From 16f275e4cd6fcf9a6185e76d797dcac36460a1ea Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=B4=AB=E6=98=9F?= <1315228475@qq.com>
Date: Wed, 16 Oct 2024 17:22:32 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E8=B0=83=E6=95=B4=E7=99=BB=E5=BD=95?=
=?UTF-8?q?=E9=A1=B5=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.prettierrc | 6 +
.vscode/settings.json | 5 +
package.json | 1 +
src/pages.json | 1 +
src/pages/login/components/Banner.vue | 19 ++
src/pages/login/components/Copyright.vue | 15 ++
src/pages/login/components/LoginForm.vue | 248 +++++++++----------
src/pages/login/components/MoreLoginWays.vue | 16 ++
src/pages/login/components/PhoneLogin.vue | 40 +++
src/pages/login/index.vue | 84 +++----
src/style/iconfont.css | 6 +-
src/style/index.scss | 1 +
src/types/auto-import.d.ts | 93 +------
uno.config.ts | 28 ++-
14 files changed, 292 insertions(+), 271 deletions(-)
create mode 100644 .prettierrc
create mode 100644 src/pages/login/components/Banner.vue
create mode 100644 src/pages/login/components/Copyright.vue
create mode 100644 src/pages/login/components/MoreLoginWays.vue
create mode 100644 src/pages/login/components/PhoneLogin.vue
diff --git a/.prettierrc b/.prettierrc
new file mode 100644
index 0000000..48d1d17
--- /dev/null
+++ b/.prettierrc
@@ -0,0 +1,6 @@
+{
+ "semi": false,
+ "singleQuote": true,
+ "trailingComma": "none",
+ "vueIndentScriptAndStyle": true
+}
diff --git a/.vscode/settings.json b/.vscode/settings.json
index fec1619..ba2dad4 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -59,5 +59,10 @@
"CHANGELOG.md": "CHANGELOG*",
"package.json": "pnpm-lock.yaml,pnpm-workspace.yaml,LICENSE,.gitattributes,.gitignore,.gitpod.yml,CNAME,.npmrc,.browserslistrc",
".eslintrc.cjs": ".eslintignore,.prettierignore,.stylelintignore,.commitlintrc.*,.prettierrc.*,.stylelintrc.*,.eslintrc-auto-import.json,.editorconfig,.commitlint.cjs"
+ },
+ "editor.quickSuggestions": {
+ "other": "on",
+ "comments": "on",
+ "strings": "on"
}
}
diff --git a/package.json b/package.json
index 04106a1..095645c 100644
--- a/package.json
+++ b/package.json
@@ -88,6 +88,7 @@
"@dcloudio/uni-components": "3.0.0-alpha-4010520240507001",
"@dcloudio/uni-h5": "3.0.0-alpha-4010520240507001",
"@dcloudio/uni-mp-weixin": "3.0.0-alpha-4010520240507001",
+ "@iconify/json": "^2.2.260",
"dayjs": "1.11.10",
"pinia": "2.0.36",
"pinia-plugin-persistedstate": "3.2.1",
diff --git a/src/pages.json b/src/pages.json
index 5a442d8..51c1986 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -86,6 +86,7 @@
"path": "pages/login/index",
"type": "page",
"style": {
+ "navigationStyle": "custom",
"navigationBarTitleText": "登录页面"
}
},
diff --git a/src/pages/login/components/Banner.vue b/src/pages/login/components/Banner.vue
new file mode 100644
index 0000000..37d3cd1
--- /dev/null
+++ b/src/pages/login/components/Banner.vue
@@ -0,0 +1,19 @@
+
+
+
+
+
+ 你好
+
+
+ 欢迎登录芋道快速开发平台
+
+
+
+
+
+
+
+
diff --git a/src/pages/login/components/Copyright.vue b/src/pages/login/components/Copyright.vue
new file mode 100644
index 0000000..d9b9bd7
--- /dev/null
+++ b/src/pages/login/components/Copyright.vue
@@ -0,0 +1,15 @@
+
+
+
+
+ 已阅读并同意
+ 《用户协议》
+ 和
+ 《隐私政策》
+
+
+
+
diff --git a/src/pages/login/components/LoginForm.vue b/src/pages/login/components/LoginForm.vue
index b449cbb..5ada5cc 100644
--- a/src/pages/login/components/LoginForm.vue
+++ b/src/pages/login/components/LoginForm.vue
@@ -1,146 +1,140 @@
-
-
-
-
-
- handleInputFocus('tenantName')"
- />
-
-
-
- handleInputFocus('username')"
- />
-
-
-
- handleInputFocus('password')"
- />
-
-
-
-
-
-
- 登录
-
+
+
+
+
+
+
+
+ 记住
+
+
+
+ 登录
+
+
+
+ 本机号登录
+
+
-
+
diff --git a/src/pages/login/components/MoreLoginWays.vue b/src/pages/login/components/MoreLoginWays.vue
new file mode 100644
index 0000000..e770769
--- /dev/null
+++ b/src/pages/login/components/MoreLoginWays.vue
@@ -0,0 +1,16 @@
+
+
+
+ 更多登录方式
+
+
+
+
+
+
+
+
diff --git a/src/pages/login/components/PhoneLogin.vue b/src/pages/login/components/PhoneLogin.vue
new file mode 100644
index 0000000..670ca39
--- /dev/null
+++ b/src/pages/login/components/PhoneLogin.vue
@@ -0,0 +1,40 @@
+
+
+
+ handleInputFocus('tenantName')"
+ />
+
+ 还没有账号?
+
+
+
+
+ 下一步
+
+
+
+
+
diff --git a/src/pages/login/index.vue b/src/pages/login/index.vue
index 9479b3b..583bd34 100644
--- a/src/pages/login/index.vue
+++ b/src/pages/login/index.vue
@@ -1,74 +1,66 @@
{
style: {
- navigationBarTitleText: '登录页面',
- },
+ navigationStyle: 'custom',
+ navigationBarTitleText: '登录页面'
+ }
}
-
+
-
-
- 你好
- 欢迎登录芋道快速开发平台
-
-
-
-
+
+
-
+
-
- 手机号登录
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
- 已阅读并同意
- 《用户协议》
- 和
- 《隐私政策》
-
+
diff --git a/src/style/iconfont.css b/src/style/iconfont.css
index 35da86c..b6dd117 100644
--- a/src/style/iconfont.css
+++ b/src/style/iconfont.css
@@ -3,8 +3,10 @@
src:
url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAOwAAsAAAAAB9AAAANjAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHFQGYACDHAqDBIJqATYCJAMQCwoABCAFhGcHPRvnBsgusG3kMyE15/44PsBX09waBHv0REDt97oHAQDFrOIyPirRiULQ+TJcXV0hCYTuVFcBC915/2vX/32Q80hkZ5PZGZ9snvwruVLloidKqYN6iKC53bOtbKwVLSIi3W6zCWZbs3VbER3j9JpGX3ySYcc94IQRTK5s4epS/jSqIgvg37qlY2/jwQN7D9ADpfRCmIknQByTscVZPTBr+hnnCKg2o4bjakvXEPjuY65DJGeJNtBUhn1JxOBuB2UZmUpBOXdsFp4oxOv4GHgs3h/+wRDcicqSZJG1q9kK1z/Af9NpqxjpC2QaAdpHlCFh4spcYXs5sMWpSk5wUj31G2dLQKVKkZ/w7f/8/i/A3JVUSZK9f7xIKJeU14IFpBI/Qfkkz46GT/CuaGREfCtKJUougWeQWHvVC5Lcz2BGS+SePR99vj3yjJx7h574tp7uWcOh4yfaTjS/245TT/vkQrN+a7RLkK8+Vd+bz+FSGh+9srDQKPeJ2s29z7ah4+efdoxefRbbGwfy7ht+SuIWukzsu1b6ePP+6kN1aamb47qsPim1Ia3xdEpDcl1dckPKGYnneI23+57r2W1Mmkqs6ajrChRCs5qyQ66rTVWhgZaG7toOeHm5cxn0sSQuNDEgcUTdNTSupKI1JRZih/JssAUKezPeOJJzbNozF6zWJuuVavVU5Tgtkop/SDzHa7ytvnCTq0PhkEfi4xLLtb0PuwyOAYqmrYQApFJyoJjTnfz+ve94vvv2f/yWgxl8Jd8Di2DRDPuob59mU/+VfDCROQyR8xSnmP9fXm7liagmN39OlmbvjqG0sMsJKrU0EFXogaRSH5bNY1CmxhyUq7QC1cY1T67RwuQk5CoM2RUQNLoEUb03kDS6h2XzcyjT7iOUa/QXqq1Hn6/GUBAaGcGcWJFlGUmCoVOp8kLvABHnVczGYiOE2SVEUH5OXj/TSnTCDjHAviAWcE4RZYaGWszNiKoayGSGTASeY+PcrMjNpVMvyREMDRoxBMYRVojFMkQiMOhohubdzxtAiOapMMbERpKMnQT9SL4ceQysVdJZVa9kEbsFogIcRyEUE2kN0mL7CDVIGhBzupWMEHA5bDvipgq5hKJcKef8ivbx1kC15KgcYkghhzLxYNntxoKCReJ82jAHAAA=')
format('woff2'),
- url('//at.alicdn.com/t/c/font_4543091_njpo5b95nl.woff?t=1715485842402') format('woff'),
- url('//at.alicdn.com/t/c/font_4543091_njpo5b95nl.ttf?t=1715485842402') format('truetype');
+ url('//at.alicdn.com/t/c/font_4543091_njpo5b95nl.woff?t=1715485842402')
+ format('woff'),
+ url('//at.alicdn.com/t/c/font_4543091_njpo5b95nl.ttf?t=1715485842402')
+ format('truetype');
}
.iconfont {
diff --git a/src/style/index.scss b/src/style/index.scss
index 4a9f82c..97a0a2b 100644
--- a/src/style/index.scss
+++ b/src/style/index.scss
@@ -10,6 +10,7 @@
:root,
page {
+ --wot-color-primary: #4f79f9;
// 修改按主题色
// --wot-color-theme: #37c2bc;
diff --git a/src/types/auto-import.d.ts b/src/types/auto-import.d.ts
index 6351212..117a03d 100644
--- a/src/types/auto-import.d.ts
+++ b/src/types/auto-import.d.ts
@@ -59,6 +59,7 @@ declare global {
const onUnload: typeof import('@dcloudio/uni-app')['onUnload']
const onUnmounted: typeof import('vue')['onUnmounted']
const onUpdated: typeof import('vue')['onUpdated']
+ const onWatcherCleanup: typeof import('vue')['onWatcherCleanup']
const provide: typeof import('vue')['provide']
const reactive: typeof import('vue')['reactive']
const readonly: typeof import('vue')['readonly']
@@ -76,9 +77,12 @@ declare global {
const useAttrs: typeof import('vue')['useAttrs']
const useCssModule: typeof import('vue')['useCssModule']
const useCssVars: typeof import('vue')['useCssVars']
+ const useId: typeof import('vue')['useId']
+ const useModel: typeof import('vue')['useModel']
const useNavbarWeixin: (typeof import('../hooks/useNavbarWeixin'))['default']
const useRequest: typeof import('../hooks/useRequest')['default']
const useSlots: typeof import('vue')['useSlots']
+ const useTemplateRef: typeof import('vue')['useTemplateRef']
const useUpload: typeof import('../hooks/useUpload')['default']
const useUpload2: typeof import('../hooks/useUpload2')['default']
const watch: typeof import('vue')['watch']
@@ -89,7 +93,7 @@ declare global {
// for type re-export
declare global {
// @ts-ignore
- export type { Component, ComponentPublicInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue'
+ export type { Component, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue'
import('vue')
}
// for vue template auto import
@@ -151,6 +155,7 @@ declare module 'vue' {
readonly onUnload: UnwrapRef
readonly onUnmounted: UnwrapRef
readonly onUpdated: UnwrapRef
+ readonly onWatcherCleanup: UnwrapRef
readonly provide: UnwrapRef
readonly reactive: UnwrapRef
readonly readonly: UnwrapRef
@@ -168,91 +173,11 @@ declare module 'vue' {
readonly useAttrs: UnwrapRef
readonly useCssModule: UnwrapRef
readonly useCssVars: UnwrapRef
+ readonly useId: UnwrapRef
+ readonly useModel: UnwrapRef
readonly useRequest: UnwrapRef
readonly useSlots: UnwrapRef
- readonly useUpload: UnwrapRef
- readonly watch: UnwrapRef
- readonly watchEffect: UnwrapRef
- readonly watchPostEffect: UnwrapRef
- readonly watchSyncEffect: UnwrapRef
- }
-}
-declare module '@vue/runtime-core' {
- interface GlobalComponents {}
- interface ComponentCustomProperties {
- readonly EffectScope: UnwrapRef
- readonly computed: UnwrapRef
- readonly createApp: UnwrapRef
- readonly customRef: UnwrapRef
- readonly defineAsyncComponent: UnwrapRef
- readonly defineComponent: UnwrapRef
- readonly effectScope: UnwrapRef
- readonly getCurrentInstance: UnwrapRef
- readonly getCurrentScope: UnwrapRef
- readonly h: UnwrapRef
- readonly inject: UnwrapRef
- readonly isProxy: UnwrapRef
- readonly isReactive: UnwrapRef
- readonly isReadonly: UnwrapRef
- readonly isRef: UnwrapRef
- readonly markRaw: UnwrapRef
- readonly nextTick: UnwrapRef
- readonly onActivated: UnwrapRef
- readonly onAddToFavorites: UnwrapRef
- readonly onBackPress: UnwrapRef
- readonly onBeforeMount: UnwrapRef
- readonly onBeforeUnmount: UnwrapRef
- readonly onBeforeUpdate: UnwrapRef
- readonly onDeactivated: UnwrapRef
- readonly onError: UnwrapRef
- readonly onErrorCaptured: UnwrapRef
- readonly onHide: UnwrapRef
- readonly onLaunch: UnwrapRef
- readonly onLoad: UnwrapRef
- readonly onMounted: UnwrapRef
- readonly onNavigationBarButtonTap: UnwrapRef
- readonly onNavigationBarSearchInputChanged: UnwrapRef
- readonly onNavigationBarSearchInputClicked: UnwrapRef
- readonly onNavigationBarSearchInputConfirmed: UnwrapRef
- readonly onNavigationBarSearchInputFocusChanged: UnwrapRef
- readonly onPageNotFound: UnwrapRef
- readonly onPageScroll: UnwrapRef
- readonly onPullDownRefresh: UnwrapRef
- readonly onReachBottom: UnwrapRef
- readonly onReady: UnwrapRef
- readonly onRenderTracked: UnwrapRef
- readonly onRenderTriggered: UnwrapRef
- readonly onResize: UnwrapRef
- readonly onScopeDispose: UnwrapRef
- readonly onServerPrefetch: UnwrapRef
- readonly onShareAppMessage: UnwrapRef
- readonly onShareTimeline: UnwrapRef
- readonly onShow: UnwrapRef
- readonly onTabItemTap: UnwrapRef
- readonly onThemeChange: UnwrapRef
- readonly onUnhandledRejection: UnwrapRef
- readonly onUnload: UnwrapRef
- readonly onUnmounted: UnwrapRef
- readonly onUpdated: UnwrapRef
- readonly provide: UnwrapRef
- readonly reactive: UnwrapRef
- readonly readonly: UnwrapRef
- readonly ref: UnwrapRef
- readonly resolveComponent: UnwrapRef
- readonly shallowReactive: UnwrapRef
- readonly shallowReadonly: UnwrapRef
- readonly shallowRef: UnwrapRef
- readonly toRaw: UnwrapRef
- readonly toRef: UnwrapRef
- readonly toRefs: UnwrapRef
- readonly toValue: UnwrapRef
- readonly triggerRef: UnwrapRef
- readonly unref: UnwrapRef
- readonly useAttrs: UnwrapRef
- readonly useCssModule: UnwrapRef
- readonly useCssVars: UnwrapRef
- readonly useRequest: UnwrapRef
- readonly useSlots: UnwrapRef
+ readonly useTemplateRef: UnwrapRef
readonly useUpload: UnwrapRef
readonly watch: UnwrapRef
readonly watchEffect: UnwrapRef
diff --git a/uno.config.ts b/uno.config.ts
index 1c15aad..b279350 100644
--- a/uno.config.ts
+++ b/uno.config.ts
@@ -6,10 +6,14 @@ import {
presetAttributify,
presetIcons,
transformerDirectives,
- transformerVariantGroup,
+ transformerVariantGroup
} from 'unocss'
-import { presetApplet, presetRemRpx, transformerAttributify } from 'unocss-applet'
+import {
+ presetApplet,
+ presetRemRpx,
+ transformerAttributify
+} from 'unocss-applet'
// @see https://unocss.dev/presets/legacy-compat
// import { presetLegacyCompat } from '@unocss/preset-legacy-compat'
@@ -25,7 +29,7 @@ if (isMp) {
// 非小程序用官方预设
presetUno(),
// 支持css class属性化
- presetAttributify(),
+ presetAttributify()
)
}
export default defineConfig({
@@ -37,9 +41,9 @@ export default defineConfig({
warn: true,
extraProperties: {
display: 'inline-block',
- 'vertical-align': 'middle',
- },
- }),
+ 'vertical-align': 'middle'
+ }
+ })
// 将颜色函数 (rgb()和hsl()) 从空格分隔转换为逗号分隔,更好的兼容性app端,example:
// `rgb(255 0 0)` -> `rgb(255, 0, 0)`
// `rgba(255 0 0 / 0.5)` -> `rgba(255, 0, 0, 0.5)`
@@ -63,20 +67,20 @@ export default defineConfig({
transformerAttributify({
// 解决与第三方框架样式冲突问题
prefixedOnly: true,
- prefix: 'fg',
- }),
+ prefix: 'fg'
+ })
],
rules: [
[
'p-safe',
{
padding:
- 'env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)',
- },
+ 'env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)'
+ }
],
['pt-safe', { 'padding-top': 'env(safe-area-inset-top)' }],
- ['pb-safe', { 'padding-bottom': 'env(safe-area-inset-bottom)' }],
- ],
+ ['pb-safe', { 'padding-bottom': 'env(safe-area-inset-bottom)' }]
+ ]
})
/**
--
Gitee