wip(login): login developing

This commit is contained in:
陈凯龙
2021-12-31 17:19:53 +08:00
parent bc749702b5
commit 45d657d44c
23 changed files with 3413 additions and 12 deletions

View File

View File

@@ -20,7 +20,7 @@ const emit = defineEmits(['update:modelValue'])
// 生成class前缀
const { getPrefixCls } = useDesign()
const prefixCls = ref(getPrefixCls('inputpassword'))
const prefixCls = ref(getPrefixCls('input-password'))
// 设置input的type属性
const textType = ref<'password' | 'text'>('password')
@@ -66,7 +66,7 @@ const getPasswordStrength = computed(() => {
</template>
<style lang="less" scoped>
@prefix-cls: ~'@{namespace}-inputpassword';
@prefix-cls: ~'@{namespace}-input-password';
.@{prefix-cls} {
&__bar {

View File

@@ -0,0 +1,3 @@
import VLocaleDropdown from './src/VLocaleDropdown.vue'
export { VLocaleDropdown }

View File

@@ -0,0 +1,19 @@
<script setup lang="ts"></script>
<template>
<div>s</div>
<!-- <el-dropdown trigger="click">
<span class="el-dropdown-link">
Dropdown List<el-icon class="el-icon--right"><arrow-down /></el-icon>
</span>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item :icon="Plus">Action 1</el-dropdown-item>
<el-dropdown-item :icon="CirclePlusFilled"> Action 2 </el-dropdown-item>
<el-dropdown-item :icon="CirclePlus">Action 3</el-dropdown-item>
<el-dropdown-item :icon="Check">Action 4</el-dropdown-item>
<el-dropdown-item :icon="CircleCheck">Action 5</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown> -->
</template>

View File

@@ -0,0 +1,3 @@
import VThemeSwitch from './src/VThemeSwitch.vue'
export { VThemeSwitch }

View File

@@ -0,0 +1,48 @@
<script setup lang="ts">
import { ref } from 'vue'
import { useAppStore } from '@/store/modules/app'
import Sun from '~icons/emojione-monotone/sun'
import CrescentMoon from '~icons/emojione-monotone/crescent-moon'
import { ElSwitch } from 'element-plus'
import { useCssVar } from '@vueuse/core'
import { useDesign } from '@/hooks/web/useDesign'
const appStore = useAppStore()
// 初始化获取是否是暗黑主题
const isDark = ref(appStore.getIsDark)
const { getPrefixCls } = useDesign()
const prefixCls = getPrefixCls('theme-switch')
// 设置switch的背景颜色
const blackColor = useCssVar('--el-color-black', document.documentElement)
function themeChange(val: boolean) {
appStore.setIsDark(val)
}
</script>
<template>
<ElSwitch
:class="prefixCls"
v-model="isDark"
inline-prompt
:border-color="blackColor"
:inactive-color="blackColor"
:active-color="blackColor"
:active-icon="Sun"
:inactive-icon="CrescentMoon"
@change="themeChange"
/>
</template>
<style lang="less" scoped>
@prefix-cls: ~'@{namespace}-theme-switch';
.@{prefix-cls} {
:deep(.el-icon) {
color: #fde047;
}
}
</style>