diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 993d360f..7a82a00e 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,19 +1,14 @@ { "recommendations": [ - "johnsoncodehk.volar", "octref.vetur", "dbaeumer.vscode-eslint", "stylelint.vscode-stylelint", - "DavidAnson.vscode-markdownlint", "esbenp.prettier-vscode", "mrmlnc.vscode-less", "antfu.i18n-ally", - "cpylua.language-postcss", - "Orta.vscode-jest", "antfu.iconify", "mikestead.dotenv", "bradlc.vscode-tailwindcss", - "heybourn.headwind", - "znck.vue-language-features" + "heybourn.headwind" ] } diff --git a/.vscode/i18n-ally-reviews.yml b/.vscode/i18n-ally-reviews.yml new file mode 100644 index 00000000..0b288c1c --- /dev/null +++ b/.vscode/i18n-ally-reviews.yml @@ -0,0 +1,5 @@ +# Review comments generated by i18n-ally. Please commit this file. + +reviews: + sys.login.autoLogin: + description: '1' diff --git a/CHANGELOG.zh_CN.md b/CHANGELOG.zh_CN.md index f962b89d..4fca970b 100644 --- a/CHANGELOG.zh_CN.md +++ b/CHANGELOG.zh_CN.md @@ -1,9 +1,14 @@ ## Wip +### ✨ Refactor + +- 登录页重构,新增注册页面/重置密码页面/手机登录/二维码登录 + ### ✨ Features - 新增 `settingButtonPosition`配置项,用于配置`设置`按钮位置 - `modal`可以通过双击头部切换全屏 +- 新增`CountDownInput`组件 ### ⚡ Performance Improvements diff --git a/build/config/themeConfig.ts b/build/config/themeConfig.ts index 44683f33..4b004af3 100644 --- a/build/config/themeConfig.ts +++ b/build/config/themeConfig.ts @@ -94,7 +94,7 @@ export function generateModifyVars() { 'disabled-color': 'rgba(0, 0, 0, 0.25)', // Failure color 'heading-color': 'rgba(0, 0, 0, 0.85)', // Title color 'text-color': 'rgba(0, 0, 0, 0.85)', // Main text color - 'text-color-secondary ': 'rgba(0, 0, 0, 0.45)', // Subtext color + 'text-color-secondary': 'rgba(0, 0, 0, 0.45)', // Subtext color 'font-size-base': '14px', // Main font size 'box-shadow-base': '0 2px 8px rgba(0, 0, 0, 0.15)', // Floating shadow 'border-color-base': '#d9d9d9', // Border color, diff --git a/package.json b/package.json index dc721b14..93510ee9 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "vditor": "^3.8.1", "vue": "^3.0.5", "vue-i18n": "9.0.0-rc.2", - "vue-router": "^4.0.3", + "vue-router": "^4.0.4", "vue-types": "^3.0.2", "vuex": "^4.0.0", "vuex-module-decorators": "^1.0.1", @@ -92,7 +92,7 @@ "pretty-quick": "^3.1.0", "rimraf": "^3.0.2", "rollup-plugin-visualizer": "^4.2.0", - "stylelint": "^13.10.0", + "stylelint": "^13.11.0", "stylelint-config-prettier": "^8.0.2", "stylelint-config-standard": "^20.0.0", "stylelint-order": "^4.1.0", @@ -104,10 +104,10 @@ "vite-plugin-imagemin": "^0.2.6", "vite-plugin-mock": "^2.1.4", "vite-plugin-purge-icons": "^0.7.0", - "vite-plugin-pwa": "^0.5.1", - "vite-plugin-style-import": "^0.7.2", + "vite-plugin-pwa": "^0.5.2", + "vite-plugin-style-import": "^0.7.3", "vite-plugin-theme": "^0.4.3", - "vite-plugin-windicss": "0.3.12", + "vite-plugin-windicss": "0.4.3", "vue-eslint-parser": "^7.5.0", "yargs": "^16.2.0" }, diff --git a/src/assets/images/login/login-bg.png b/src/assets/images/login/login-bg.png deleted file mode 100644 index b773a245..00000000 Binary files a/src/assets/images/login/login-bg.png and /dev/null differ diff --git a/src/assets/images/login/login-in.png b/src/assets/images/login/login-in.png deleted file mode 100644 index 3a45b722..00000000 Binary files a/src/assets/images/login/login-in.png and /dev/null differ diff --git a/src/assets/svg/login-bg.svg b/src/assets/svg/login-bg.svg new file mode 100644 index 00000000..18cfd2db --- /dev/null +++ b/src/assets/svg/login-bg.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/src/assets/svg/login-box-bg.svg b/src/assets/svg/login-box-bg.svg new file mode 100644 index 00000000..ee7dbdc2 --- /dev/null +++ b/src/assets/svg/login-box-bg.svg @@ -0,0 +1 @@ +responsive \ No newline at end of file diff --git a/src/components/Application/src/AppLogo.vue b/src/components/Application/src/AppLogo.vue index ee506e19..522b272d 100644 --- a/src/components/Application/src/AppLogo.vue +++ b/src/components/Application/src/AppLogo.vue @@ -10,8 +10,13 @@ >
{{ title }} @@ -38,6 +43,7 @@ theme: propTypes.oneOf(['light', 'dark']), // Whether to show title showTitle: propTypes.bool.def(true), + alwaysShowTitle: propTypes.bool.def(false), }, setup() { const { prefixCls } = useDesign('app-logo'); diff --git a/src/components/CountDown/index.ts b/src/components/CountDown/index.ts new file mode 100644 index 00000000..fdcbccf0 --- /dev/null +++ b/src/components/CountDown/index.ts @@ -0,0 +1,4 @@ +import CountButton from './src/CountButton.vue'; +import CountdownInput from './src/CountdownInput.vue'; + +export { CountdownInput, CountButton }; diff --git a/src/components/CountDown/src/CountButton.vue b/src/components/CountDown/src/CountButton.vue new file mode 100644 index 00000000..59c58393 --- /dev/null +++ b/src/components/CountDown/src/CountButton.vue @@ -0,0 +1,57 @@ + + diff --git a/src/components/CountDown/src/CountdownInput.vue b/src/components/CountDown/src/CountdownInput.vue new file mode 100644 index 00000000..1a0f1167 --- /dev/null +++ b/src/components/CountDown/src/CountdownInput.vue @@ -0,0 +1,55 @@ + + + diff --git a/src/components/CountDown/src/useCountdown.ts b/src/components/CountDown/src/useCountdown.ts new file mode 100644 index 00000000..f6ed67dc --- /dev/null +++ b/src/components/CountDown/src/useCountdown.ts @@ -0,0 +1,51 @@ +import { ref, unref } from 'vue'; +import { tryOnUnmounted } from '/@/utils/helper/vueHelper'; + +export function useCountdown(count: number) { + const currentCount = ref(count); + + const isStart = ref(false); + + let timerId: ReturnType | null; + + function clear() { + timerId && window.clearInterval(timerId); + } + + function stop() { + isStart.value = false; + timerId = null; + clear(); + } + + function start() { + if (unref(isStart) || !!timerId) { + return; + } + isStart.value = true; + timerId = setInterval(() => { + if (unref(currentCount) === 1) { + stop(); + currentCount.value = count; + } else { + currentCount.value -= 1; + } + }, 1000); + } + + function reset() { + currentCount.value = count; + stop(); + } + + function restart() { + reset(); + start(); + } + + tryOnUnmounted(() => { + reset(); + }); + + return { start, reset, restart, clear, stop, currentCount, isStart }; +} diff --git a/src/components/StrengthMeter/src/index.vue b/src/components/StrengthMeter/src/index.vue index 8265b2b1..1f98e372 100644 --- a/src/components/StrengthMeter/src/index.vue +++ b/src/components/StrengthMeter/src/index.vue @@ -1,5 +1,5 @@