af-mobile-client-vue3 1.3.1 → 1.3.2-2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +5 -0
- package/README.md +2 -1
- package/compress.js +36 -36
- package/package.json +114 -114
- package/postcss.config.ts +1 -1
- package/src/App.vue +1 -1
- package/src/components/core/NavBar/index.vue +1 -1
- package/src/components/core/XGridDropOption/index.vue +7 -9
- package/src/components/core/XMultiSelect/index.vue +1 -1
- package/src/components/data/CardContainer/CardContainer.vue +118 -0
- package/src/components/data/CardContainer/CardHeader.vue +99 -0
- package/src/components/data/InfoDisplay/index.vue +132 -0
- package/src/components/data/UserDetail/api.ts +24 -0
- package/src/components/data/UserDetail/index.vue +620 -0
- package/src/components/data/UserDetail/recordEntries.ts +159 -0
- package/src/components/data/UserDetail/types.ts +26 -0
- package/src/components/data/XCellList/index.vue +66 -20
- package/src/components/data/XForm/index.vue +1 -1
- package/src/components/data/XFormGroup/doc/README.md +33 -20
- package/src/components/data/XFormGroup/index.vue +42 -36
- package/src/components/data/XFormItem/index.vue +11 -11
- package/src/components/data/XOlMap/README.md +61 -61
- package/src/components/data/XOlMap/XLocationPicker/index.vue +2 -1
- package/src/components/data/XReportGrid/XAddReport/index.md +17 -16
- package/src/components/data/XReportGrid/index.md +14 -10
- package/src/components/data/XSignature/index.vue +1 -2
- package/src/font-style/font.css +1 -1
- package/src/hooks/useBoolean.ts +26 -0
- package/src/hooks/useLoading.ts +16 -0
- package/src/plugins/collectIcons.ts +10 -0
- package/src/router/README.md +1 -1
- package/src/router/guards.ts +1 -1
- package/src/router/index.ts +1 -1
- package/src/router/routes.ts +176 -0
- package/src/services/api/user.ts +17 -0
- package/src/stores/modules/setting.ts +2 -1
- package/src/styles/var.less +9 -0
- package/src/views/component/IconifyView/index.vue +0 -3
- package/src/views/component/UserDetailView/UserDetailPage.vue +77 -0
- package/src/views/component/UserDetailView/index.vue +234 -0
- package/src/views/component/XCellListView/index.vue +2 -2
- package/src/views/component/XOlMapView/testData.ts +1 -1
- package/src/views/component/index.vue +4 -0
- package/src/views/component/menu.vue +1 -1
- package/src/views/user/login/ForgetPasswordForm.vue +1 -1
- package/src/views/user/login/LoginForm.vue +4 -3
- package/src/views/user/login/LoginWave.vue +1 -1
- package/src/views/user/my/comm/ModifyPassword.vue +346 -0
- package/src/views/user/my/index.vue +440 -183
- package/src/views/user/register/index.vue +952 -0
- package/src/views/userRecords/AbnormalAlarmRecords.vue +21 -0
- package/src/views/userRecords/CardReplacementRecords.vue +21 -0
- package/src/views/userRecords/ChangeRecords.vue +19 -0
- package/src/views/userRecords/CommandViewRecords.vue +20 -0
- package/src/views/userRecords/GasCompensationRecords.vue +20 -0
- package/src/views/userRecords/InstrumentCollectionRecords.vue +21 -0
- package/src/views/userRecords/MeterRecords.vue +20 -0
- package/src/views/userRecords/OperateRecords.vue +51 -0
- package/src/views/userRecords/OtherChargeRecords.vue +19 -0
- package/src/views/userRecords/PaymentRecords.vue +28 -0
- package/src/views/userRecords/PriceAdjustmentRecords.vue +19 -0
- package/src/views/userRecords/ReplacementRecords.vue +19 -0
- package/src/views/userRecords/SafetyRecords.vue +19 -0
- package/src/views/userRecords/TransactionRecords.vue +21 -0
- package/src/views/userRecords/TransferRecords.vue +19 -0
- package/src/views/userRecords/operateRecordDetail/index.vue +316 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/AddUserDetail.vue +124 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/AdvanceDeliveryDetail.vue +88 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/AutoAccountsCancelDetail.vue +205 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/AutoAccountsDetail.vue +192 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/BankDkDetail.vue +192 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/BankPayDetail.vue +192 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/BlacklistDetail.vue +153 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/CancellationDetail.vue +101 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/CardMeterCenterCancelDetail.vue +127 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/CardMeterCenterDetail.vue +153 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/CardOverUserDetail.vue +153 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/ChangeMeterCancelDetail.vue +166 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/ChangeMeterDetail.vue +205 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/DisableManageDetail.vue +127 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/EnableManageDetail.vue +114 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/FaZheChangeDetail.vue +124 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/FeeDeductionDetail.vue +153 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/GasPriceChangeDetail.vue +126 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/InputtorChangeDetail.vue +126 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/IotMeterCenterCancelDetail.vue +114 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/IotMeterCenterDetail.vue +127 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/IotOpenDetail.vue +88 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/MachineCardDetail.vue +101 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/MachineMeterCenterCancelDetail.vue +218 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/MachineMeterCenterDetail.vue +153 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/OffGasAddGasDetail.vue +140 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/OtherChargeCancelDetail.vue +127 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/OtherChargeDetail.vue +114 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/OverUserChangeDetail.vue +127 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/ReBillDetail.vue +127 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/RefundDetail.vue +114 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/ReplaceCardManageCancelDetail.vue +127 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/ReplaceCardManageDetail.vue +114 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/SaleCardGasDetail.vue +140 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/TransferManageCancelDetail.vue +152 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/TransferManageDetail.vue +178 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/UserChangeDetail.vue +123 -0
- package/src/views/userRecords/operateRecordDetail/operateRecordDetails/WechatPayDetail.vue +192 -0
- package/src/views/userRecords/types.ts +66 -0
- package/uno.config.ts +5 -1
- package/vite.config.ts +9 -2
package/CLAUDE.md
CHANGED
|
@@ -182,3 +182,8 @@ This is a main application for micro-frontend architecture:
|
|
|
182
182
|
- **Vue TSC** for type checking
|
|
183
183
|
- **Commitlint** for commit message standards
|
|
184
184
|
- **Lint-staged** for pre-commit hooks
|
|
185
|
+
|
|
186
|
+
## 注意事项
|
|
187
|
+
|
|
188
|
+
- 此项目作为组件库项目 所以没有开启自动引入 不能自动引入 vue 中的 ref/compute 等
|
|
189
|
+
- 此项目为了统一业务项目使用,所以 使用 @af-mobile-client-vue3/ 表示 src 而不是 @/
|
package/README.md
CHANGED
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
<p align="center">指南非常地详细,并非说明上手多么地复杂,只是更好地使用它做的说明而已</p>
|
|
14
14
|
|
|
15
15
|
## 需要注意的地方
|
|
16
|
+
|
|
16
17
|
- 本项目作为微前端框架micro-app的主应用,虽然同样派生自example项目,但example项目主要用于子应用的快速建设,因此本项目在微前端接入代码方面和example表现不一致
|
|
17
18
|
|
|
18
19
|
## 特性
|
|
@@ -102,7 +103,7 @@ pnpm build
|
|
|
102
103
|
支持现代浏览器
|
|
103
104
|
|
|
104
105
|
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt=" Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>IE | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt=" Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Safari |
|
|
105
|
-
|
|
106
|
+
| :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
|
|
106
107
|
| not support | last 2 versions | last 2 versions | last 2 versions | last 2 versions |
|
|
107
108
|
|
|
108
109
|
### 新增页面
|
package/compress.js
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import fs from 'node:fs'
|
|
2
|
-
import path from 'node:path'
|
|
3
|
-
import { fileURLToPath } from 'node:url'
|
|
4
|
-
import * as tar from 'tar'
|
|
5
|
-
|
|
6
|
-
// 当前文件所在目录
|
|
7
|
-
const __filename = fileURLToPath(import.meta.url)
|
|
8
|
-
const __dirname = path.dirname(__filename)
|
|
9
|
-
|
|
10
|
-
// 压缩源目录名(即 build 后生成的目录名)
|
|
11
|
-
const outputName = `dist_af-library-mobile-web`
|
|
12
|
-
|
|
13
|
-
// 源目录路径
|
|
14
|
-
const cwd = path.join(__dirname, 'dist', outputName)
|
|
15
|
-
|
|
16
|
-
// 输出 tar.gz 文件路径
|
|
17
|
-
const outputPath = path.join(__dirname, 'dist', `${outputName}.tar.gz`)
|
|
18
|
-
|
|
19
|
-
if (!fs.existsSync(cwd)) {
|
|
20
|
-
console.error('❌ 目录不存在:', cwd)
|
|
21
|
-
// eslint-disable-next-line node/prefer-global/process
|
|
22
|
-
process.exit(1)
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
tar.c(
|
|
26
|
-
{
|
|
27
|
-
gzip: true,
|
|
28
|
-
file: outputPath,
|
|
29
|
-
cwd,
|
|
30
|
-
},
|
|
31
|
-
['.'],
|
|
32
|
-
).then(() => {
|
|
33
|
-
console.log(`✅ 压缩完成: ${outputPath}`)
|
|
34
|
-
}).catch((err) => {
|
|
35
|
-
console.error('❌ 压缩失败:', err)
|
|
36
|
-
})
|
|
1
|
+
import fs from 'node:fs'
|
|
2
|
+
import path from 'node:path'
|
|
3
|
+
import { fileURLToPath } from 'node:url'
|
|
4
|
+
import * as tar from 'tar'
|
|
5
|
+
|
|
6
|
+
// 当前文件所在目录
|
|
7
|
+
const __filename = fileURLToPath(import.meta.url)
|
|
8
|
+
const __dirname = path.dirname(__filename)
|
|
9
|
+
|
|
10
|
+
// 压缩源目录名(即 build 后生成的目录名)
|
|
11
|
+
const outputName = `dist_af-library-mobile-web`
|
|
12
|
+
|
|
13
|
+
// 源目录路径
|
|
14
|
+
const cwd = path.join(__dirname, 'dist', outputName)
|
|
15
|
+
|
|
16
|
+
// 输出 tar.gz 文件路径
|
|
17
|
+
const outputPath = path.join(__dirname, 'dist', `${outputName}.tar.gz`)
|
|
18
|
+
|
|
19
|
+
if (!fs.existsSync(cwd)) {
|
|
20
|
+
console.error('❌ 目录不存在:', cwd)
|
|
21
|
+
// eslint-disable-next-line node/prefer-global/process
|
|
22
|
+
process.exit(1)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
tar.c(
|
|
26
|
+
{
|
|
27
|
+
gzip: true,
|
|
28
|
+
file: outputPath,
|
|
29
|
+
cwd,
|
|
30
|
+
},
|
|
31
|
+
['.'],
|
|
32
|
+
).then(() => {
|
|
33
|
+
console.log(`✅ 压缩完成: ${outputPath}`)
|
|
34
|
+
}).catch((err) => {
|
|
35
|
+
console.error('❌ 压缩失败:', err)
|
|
36
|
+
})
|
package/package.json
CHANGED
|
@@ -1,114 +1,114 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "af-mobile-client-vue3",
|
|
3
|
-
"type": "module",
|
|
4
|
-
"version": "1.3.1",
|
|
5
|
-
"packageManager": "pnpm@10.13.1",
|
|
6
|
-
"description": "Vue + Vite component lib",
|
|
7
|
-
"engines": {
|
|
8
|
-
"node": ">=20.19.0"
|
|
9
|
-
},
|
|
10
|
-
"scripts": {
|
|
11
|
-
"dev": "cross-env MOCK_SERVER_PORT=8086 vite",
|
|
12
|
-
"compress": "node ./compress.js",
|
|
13
|
-
"build:dev": "vue-tsc --noEmit && vite build --mode development",
|
|
14
|
-
"build:pro": "vue-tsc --noEmit && vite build --mode production && pnpm run compress",
|
|
15
|
-
"preview": "vite preview",
|
|
16
|
-
"lint": "eslint .",
|
|
17
|
-
"lint:fix": "eslint . --fix",
|
|
18
|
-
"release": "bumpp --commit --push --tag",
|
|
19
|
-
"typecheck": "vue-tsc --noEmit",
|
|
20
|
-
"commitlint": "commitlint --edit",
|
|
21
|
-
"prepare": "simple-git-hooks"
|
|
22
|
-
},
|
|
23
|
-
"dependencies": {
|
|
24
|
-
"@iconify/vue": "4.3.0",
|
|
25
|
-
"@micro-zoe/micro-app": "1.0.0-rc.26",
|
|
26
|
-
"@unhead/vue": "2.0.12",
|
|
27
|
-
"@vant/area-data": "^2.0.0",
|
|
28
|
-
"@vant/touch-emulator": "^1.4.0",
|
|
29
|
-
"@vant/use": "^1.6.0",
|
|
30
|
-
"@vueuse/core": "^13.5.0",
|
|
31
|
-
"axios": "^1.10.0",
|
|
32
|
-
"crypto-js": "^4.2.0",
|
|
33
|
-
"dayjs": "^1.11.13",
|
|
34
|
-
"echarts": "^5.6.0",
|
|
35
|
-
"lodash-es": "^4.17.21",
|
|
36
|
-
"nprogress": "^0.2.0",
|
|
37
|
-
"ol": "^10.5.0",
|
|
38
|
-
"pinia": "^3.0.3",
|
|
39
|
-
"pinia-plugin-persistedstate": "^4.4.1",
|
|
40
|
-
"resize-detector": "^0.3.0",
|
|
41
|
-
"vant": "^4.9.21",
|
|
42
|
-
"vconsole": "^3.15.1",
|
|
43
|
-
"vue": "^3.5.17",
|
|
44
|
-
"vue-i18n": "^11.1.10",
|
|
45
|
-
"vue-router": "^4.5.1",
|
|
46
|
-
"vue3-hash-calendar": "^1.1.3"
|
|
47
|
-
},
|
|
48
|
-
"devDependencies": {
|
|
49
|
-
"@antfu/eslint-config": "4.17.0",
|
|
50
|
-
"@commitlint/cli": "^19.8.1",
|
|
51
|
-
"@commitlint/config-conventional": "^19.8.1",
|
|
52
|
-
"@commitlint/types": "^19.8.1",
|
|
53
|
-
"@iconify/json": "2.2.318",
|
|
54
|
-
"@iconify/utils": "^2.3.0",
|
|
55
|
-
"@intlify/unplugin-vue-i18n": "^6.0.8",
|
|
56
|
-
"@types/crypto-js": "^4.2.2",
|
|
57
|
-
"@types/lodash-es": "^4.17.12",
|
|
58
|
-
"@types/node": "^24.0.14",
|
|
59
|
-
"@types/nprogress": "^0.2.3",
|
|
60
|
-
"@unocss/eslint-config": "66.3.3",
|
|
61
|
-
"@vitejs/plugin-legacy": "^7.0.1",
|
|
62
|
-
"@vitejs/plugin-vue": "^6.0.0",
|
|
63
|
-
"autoprefixer": "^10.4.21",
|
|
64
|
-
"bumpp": "^10.2.0",
|
|
65
|
-
"consola": "^3.4.2",
|
|
66
|
-
"cross-env": "^7.0.3",
|
|
67
|
-
"eslint": "^9.31.0",
|
|
68
|
-
"eslint-plugin-format": "^1.0.1",
|
|
69
|
-
"less": "^4.4.0",
|
|
70
|
-
"lint-staged": "^16.1.2",
|
|
71
|
-
"mockjs": "^1.1.0",
|
|
72
|
-
"postcss-mobile-forever": "^5.0.0",
|
|
73
|
-
"rollup": "^4.45.1",
|
|
74
|
-
"simple-git-hooks": "^2.13.0",
|
|
75
|
-
"tar": "^7.4.3",
|
|
76
|
-
"terser": "^5.43.1",
|
|
77
|
-
"typescript": "^5.8.3",
|
|
78
|
-
"unocss": "66.3.3",
|
|
79
|
-
"vite": "^7.0.5",
|
|
80
|
-
"vite-plugin-compression": "^0.5.1",
|
|
81
|
-
"vite-plugin-mock-dev-server": "^1.9.1",
|
|
82
|
-
"vite-plugin-pwa": "^1.0.1",
|
|
83
|
-
"vite-plugin-sitemap": "^0.8.2",
|
|
84
|
-
"vite-plugin-vconsole": "^2.1.1",
|
|
85
|
-
"vite-plugin-vue-devtools": "^7.7.7",
|
|
86
|
-
"vue-tsc": "^3.0.2"
|
|
87
|
-
},
|
|
88
|
-
"pnpm": {
|
|
89
|
-
"allowedDeprecatedVersions": {
|
|
90
|
-
"glob": "7.2.3",
|
|
91
|
-
"inflight": "1.0.6",
|
|
92
|
-
"sourcemap-codec": "1.4.8"
|
|
93
|
-
},
|
|
94
|
-
"peerDependencyRules": {
|
|
95
|
-
"allowedVersions": {}
|
|
96
|
-
},
|
|
97
|
-
"onlyBuiltDependencies": [
|
|
98
|
-
"core-js",
|
|
99
|
-
"esbuild",
|
|
100
|
-
"simple-git-hooks",
|
|
101
|
-
"unrs-resolver"
|
|
102
|
-
]
|
|
103
|
-
},
|
|
104
|
-
"resolutions": {
|
|
105
|
-
"vite": "^7.0.5"
|
|
106
|
-
},
|
|
107
|
-
"simple-git-hooks": {
|
|
108
|
-
"pre-commit": "pnpm lint-staged",
|
|
109
|
-
"commit-msg": "pnpm commitlint $1"
|
|
110
|
-
},
|
|
111
|
-
"lint-staged": {
|
|
112
|
-
"*": "eslint --fix"
|
|
113
|
-
}
|
|
114
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "af-mobile-client-vue3",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "1.3.22.1",
|
|
5
|
+
"packageManager": "pnpm@10.13.1",
|
|
6
|
+
"description": "Vue + Vite component lib",
|
|
7
|
+
"engines": {
|
|
8
|
+
"node": ">=20.19.0"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"dev": "cross-env MOCK_SERVER_PORT=8086 vite",
|
|
12
|
+
"compress": "node ./compress.js",
|
|
13
|
+
"build:dev": "vue-tsc --noEmit && vite build --mode development && pnpm run compress",
|
|
14
|
+
"build:pro": "vue-tsc --noEmit && vite build --mode production && pnpm run compress",
|
|
15
|
+
"preview": "vite preview",
|
|
16
|
+
"lint": "eslint .",
|
|
17
|
+
"lint:fix": "eslint . --fix",
|
|
18
|
+
"release": "bumpp --commit --push --tag",
|
|
19
|
+
"typecheck": "vue-tsc --noEmit",
|
|
20
|
+
"commitlint": "commitlint --edit",
|
|
21
|
+
"prepare": "simple-git-hooks"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@iconify/vue": "4.3.0",
|
|
25
|
+
"@micro-zoe/micro-app": "1.0.0-rc.26",
|
|
26
|
+
"@unhead/vue": "2.0.12",
|
|
27
|
+
"@vant/area-data": "^2.0.0",
|
|
28
|
+
"@vant/touch-emulator": "^1.4.0",
|
|
29
|
+
"@vant/use": "^1.6.0",
|
|
30
|
+
"@vueuse/core": "^13.5.0",
|
|
31
|
+
"axios": "^1.10.0",
|
|
32
|
+
"crypto-js": "^4.2.0",
|
|
33
|
+
"dayjs": "^1.11.13",
|
|
34
|
+
"echarts": "^5.6.0",
|
|
35
|
+
"lodash-es": "^4.17.21",
|
|
36
|
+
"nprogress": "^0.2.0",
|
|
37
|
+
"ol": "^10.5.0",
|
|
38
|
+
"pinia": "^3.0.3",
|
|
39
|
+
"pinia-plugin-persistedstate": "^4.4.1",
|
|
40
|
+
"resize-detector": "^0.3.0",
|
|
41
|
+
"vant": "^4.9.21",
|
|
42
|
+
"vconsole": "^3.15.1",
|
|
43
|
+
"vue": "^3.5.17",
|
|
44
|
+
"vue-i18n": "^11.1.10",
|
|
45
|
+
"vue-router": "^4.5.1",
|
|
46
|
+
"vue3-hash-calendar": "^1.1.3"
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@antfu/eslint-config": "4.17.0",
|
|
50
|
+
"@commitlint/cli": "^19.8.1",
|
|
51
|
+
"@commitlint/config-conventional": "^19.8.1",
|
|
52
|
+
"@commitlint/types": "^19.8.1",
|
|
53
|
+
"@iconify/json": "2.2.318",
|
|
54
|
+
"@iconify/utils": "^2.3.0",
|
|
55
|
+
"@intlify/unplugin-vue-i18n": "^6.0.8",
|
|
56
|
+
"@types/crypto-js": "^4.2.2",
|
|
57
|
+
"@types/lodash-es": "^4.17.12",
|
|
58
|
+
"@types/node": "^24.0.14",
|
|
59
|
+
"@types/nprogress": "^0.2.3",
|
|
60
|
+
"@unocss/eslint-config": "66.3.3",
|
|
61
|
+
"@vitejs/plugin-legacy": "^7.0.1",
|
|
62
|
+
"@vitejs/plugin-vue": "^6.0.0",
|
|
63
|
+
"autoprefixer": "^10.4.21",
|
|
64
|
+
"bumpp": "^10.2.0",
|
|
65
|
+
"consola": "^3.4.2",
|
|
66
|
+
"cross-env": "^7.0.3",
|
|
67
|
+
"eslint": "^9.31.0",
|
|
68
|
+
"eslint-plugin-format": "^1.0.1",
|
|
69
|
+
"less": "^4.4.0",
|
|
70
|
+
"lint-staged": "^16.1.2",
|
|
71
|
+
"mockjs": "^1.1.0",
|
|
72
|
+
"postcss-mobile-forever": "^5.0.0",
|
|
73
|
+
"rollup": "^4.45.1",
|
|
74
|
+
"simple-git-hooks": "^2.13.0",
|
|
75
|
+
"tar": "^7.4.3",
|
|
76
|
+
"terser": "^5.43.1",
|
|
77
|
+
"typescript": "^5.8.3",
|
|
78
|
+
"unocss": "66.3.3",
|
|
79
|
+
"vite": "^7.0.5",
|
|
80
|
+
"vite-plugin-compression": "^0.5.1",
|
|
81
|
+
"vite-plugin-mock-dev-server": "^1.9.1",
|
|
82
|
+
"vite-plugin-pwa": "^1.0.1",
|
|
83
|
+
"vite-plugin-sitemap": "^0.8.2",
|
|
84
|
+
"vite-plugin-vconsole": "^2.1.1",
|
|
85
|
+
"vite-plugin-vue-devtools": "^7.7.7",
|
|
86
|
+
"vue-tsc": "^3.0.2"
|
|
87
|
+
},
|
|
88
|
+
"pnpm": {
|
|
89
|
+
"allowedDeprecatedVersions": {
|
|
90
|
+
"glob": "7.2.3",
|
|
91
|
+
"inflight": "1.0.6",
|
|
92
|
+
"sourcemap-codec": "1.4.8"
|
|
93
|
+
},
|
|
94
|
+
"peerDependencyRules": {
|
|
95
|
+
"allowedVersions": {}
|
|
96
|
+
},
|
|
97
|
+
"onlyBuiltDependencies": [
|
|
98
|
+
"core-js",
|
|
99
|
+
"esbuild",
|
|
100
|
+
"simple-git-hooks",
|
|
101
|
+
"unrs-resolver"
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
"resolutions": {
|
|
105
|
+
"vite": "^7.0.5"
|
|
106
|
+
},
|
|
107
|
+
"simple-git-hooks": {
|
|
108
|
+
"pre-commit": "pnpm lint-staged",
|
|
109
|
+
"commit-msg": "pnpm commitlint $1"
|
|
110
|
+
},
|
|
111
|
+
"lint-staged": {
|
|
112
|
+
"*": "eslint --fix"
|
|
113
|
+
}
|
|
114
|
+
}
|
package/postcss.config.ts
CHANGED
package/src/App.vue
CHANGED
|
@@ -53,7 +53,7 @@ const themeVars: ConfigProviderThemeVars = reactive({
|
|
|
53
53
|
<router-view v-slot="{ Component }">
|
|
54
54
|
<section class="app-wrapper">
|
|
55
55
|
<keep-alive :include="keepAliveRouteNames">
|
|
56
|
-
<component :is="Component" />
|
|
56
|
+
<component :is="Component" :key="$route.fullPath" />
|
|
57
57
|
</keep-alive>
|
|
58
58
|
</section>
|
|
59
59
|
</router-view>
|
|
@@ -3,8 +3,6 @@ import {
|
|
|
3
3
|
Button as VanButton,
|
|
4
4
|
Checkbox as VanCheckbox,
|
|
5
5
|
CheckboxGroup as VanCheckboxGroup,
|
|
6
|
-
Grid as VanGrid,
|
|
7
|
-
GridItem as VanGridItem,
|
|
8
6
|
Radio as VanRadio,
|
|
9
7
|
RadioGroup as VanRadioGroup,
|
|
10
8
|
} from 'vant'
|
|
@@ -132,24 +130,24 @@ function valueChange(value: string | string[]) {
|
|
|
132
130
|
display: none;
|
|
133
131
|
}
|
|
134
132
|
|
|
135
|
-
:deep(.van-checkbox)
|
|
133
|
+
:deep(.van-checkbox) {
|
|
136
134
|
width: 100%;
|
|
137
135
|
}
|
|
138
|
-
:deep(.van-radio__icon)
|
|
136
|
+
:deep(.van-radio__icon) {
|
|
139
137
|
display: none;
|
|
140
138
|
}
|
|
141
|
-
:deep(.van-radio)
|
|
139
|
+
:deep(.van-radio) {
|
|
142
140
|
width: 100%;
|
|
143
141
|
}
|
|
144
|
-
:deep(.van-button)
|
|
142
|
+
:deep(.van-button) {
|
|
145
143
|
width: 100%;
|
|
146
|
-
background-color: rgb(247,248,250);
|
|
144
|
+
background-color: rgb(247, 248, 250);
|
|
147
145
|
white-space: nowrap;
|
|
148
146
|
}
|
|
149
|
-
:deep(.van-checkbox__label)
|
|
147
|
+
:deep(.van-checkbox__label) {
|
|
150
148
|
width: 100%;
|
|
151
149
|
}
|
|
152
|
-
:deep(.van-radio__label)
|
|
150
|
+
:deep(.van-radio__label) {
|
|
153
151
|
width: 100%;
|
|
154
152
|
}
|
|
155
153
|
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ref, watch } from 'vue'
|
|
3
|
+
import CardHeader from './CardHeader.vue'
|
|
4
|
+
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
shadow: {
|
|
7
|
+
type: Boolean,
|
|
8
|
+
default: true,
|
|
9
|
+
},
|
|
10
|
+
className: {
|
|
11
|
+
type: String,
|
|
12
|
+
default: '',
|
|
13
|
+
},
|
|
14
|
+
title: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: '',
|
|
17
|
+
},
|
|
18
|
+
collapsible: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: false,
|
|
21
|
+
},
|
|
22
|
+
defaultCollapsed: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: false,
|
|
25
|
+
},
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
const isCollapsed = ref(props.defaultCollapsed)
|
|
29
|
+
|
|
30
|
+
function handleToggle(collapsed: boolean) {
|
|
31
|
+
isCollapsed.value = collapsed
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// 过渡动画钩子函数
|
|
35
|
+
function onEnter(el: HTMLElement) {
|
|
36
|
+
el.style.height = '0'
|
|
37
|
+
el.style.overflow = 'hidden'
|
|
38
|
+
el.style.opacity = '0'
|
|
39
|
+
el.style.transformOrigin = 'top'
|
|
40
|
+
el.style.transform = 'scaleY(0.8)'
|
|
41
|
+
|
|
42
|
+
// 触发回流
|
|
43
|
+
void el.offsetHeight
|
|
44
|
+
|
|
45
|
+
el.style.transition = 'height 0.2s ease, opacity 0.2s ease, transform 0.2s ease'
|
|
46
|
+
el.style.height = `${el.scrollHeight}px`
|
|
47
|
+
el.style.opacity = '1'
|
|
48
|
+
el.style.transform = 'scaleY(1)'
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function onAfterEnter(el: HTMLElement) {
|
|
52
|
+
el.style.height = ''
|
|
53
|
+
el.style.overflow = ''
|
|
54
|
+
el.style.transition = ''
|
|
55
|
+
el.style.transformOrigin = ''
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function onBeforeLeave(el: HTMLElement) {
|
|
59
|
+
el.style.height = `${el.scrollHeight}px`
|
|
60
|
+
el.style.overflow = 'hidden'
|
|
61
|
+
el.style.transformOrigin = 'top'
|
|
62
|
+
|
|
63
|
+
// 触发回流
|
|
64
|
+
void el.offsetHeight
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function onLeave(el: HTMLElement) {
|
|
68
|
+
el.style.transition = 'height 0.2s ease, opacity 0.2s ease, transform 0.2s ease'
|
|
69
|
+
el.style.height = '0'
|
|
70
|
+
el.style.opacity = '0'
|
|
71
|
+
el.style.transform = 'scaleY(0.8)'
|
|
72
|
+
}
|
|
73
|
+
watch(() => props.defaultCollapsed, (newVal) => {
|
|
74
|
+
isCollapsed.value = newVal
|
|
75
|
+
})
|
|
76
|
+
</script>
|
|
77
|
+
|
|
78
|
+
<template>
|
|
79
|
+
<div class="card-container" :class="[shadow ? 'with-shadow' : '', className]">
|
|
80
|
+
<CardHeader
|
|
81
|
+
v-if="title"
|
|
82
|
+
:title="title"
|
|
83
|
+
:collapsible="collapsible"
|
|
84
|
+
:default-collapsed="defaultCollapsed"
|
|
85
|
+
@toggle="handleToggle"
|
|
86
|
+
/>
|
|
87
|
+
<transition
|
|
88
|
+
name="collapse-transition"
|
|
89
|
+
@enter="onEnter"
|
|
90
|
+
@after-enter="onAfterEnter"
|
|
91
|
+
@before-leave="onBeforeLeave"
|
|
92
|
+
@leave="onLeave"
|
|
93
|
+
>
|
|
94
|
+
<div v-show="!isCollapsed" class="card-content">
|
|
95
|
+
<slot />
|
|
96
|
+
</div>
|
|
97
|
+
</transition>
|
|
98
|
+
</div>
|
|
99
|
+
</template>
|
|
100
|
+
|
|
101
|
+
<style lang="less" scoped>
|
|
102
|
+
.card-container {
|
|
103
|
+
background-color: #fff;
|
|
104
|
+
border-radius: 8px;
|
|
105
|
+
border: 1px solid #e5e7eb;
|
|
106
|
+
padding: 10px;
|
|
107
|
+
// margin-bottom: 0;
|
|
108
|
+
|
|
109
|
+
&.with-shadow {
|
|
110
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.card-content {
|
|
115
|
+
will-change: height, opacity, transform;
|
|
116
|
+
transform-origin: top;
|
|
117
|
+
}
|
|
118
|
+
</style>
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ref } from 'vue'
|
|
3
|
+
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
title: {
|
|
6
|
+
type: String,
|
|
7
|
+
required: true,
|
|
8
|
+
},
|
|
9
|
+
icon: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: '',
|
|
12
|
+
},
|
|
13
|
+
collapsible: {
|
|
14
|
+
type: Boolean,
|
|
15
|
+
default: false,
|
|
16
|
+
},
|
|
17
|
+
defaultCollapsed: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: false,
|
|
20
|
+
},
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
const emit = defineEmits(['toggle'])
|
|
24
|
+
|
|
25
|
+
const isCollapsed = ref(props.defaultCollapsed)
|
|
26
|
+
|
|
27
|
+
function toggleCollapse() {
|
|
28
|
+
if (props.collapsible) {
|
|
29
|
+
isCollapsed.value = !isCollapsed.value
|
|
30
|
+
emit('toggle', isCollapsed.value)
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
</script>
|
|
34
|
+
|
|
35
|
+
<template>
|
|
36
|
+
<div class="card-header" @click="toggleCollapse">
|
|
37
|
+
<div class="card-header__title">
|
|
38
|
+
<slot name="icon">
|
|
39
|
+
<van-icon v-if="icon" class="card-header__icon" :name="icon" />
|
|
40
|
+
</slot>
|
|
41
|
+
<h4 class="card-header__text">
|
|
42
|
+
{{ title }}
|
|
43
|
+
</h4>
|
|
44
|
+
</div>
|
|
45
|
+
<div class="card-header__extra">
|
|
46
|
+
<slot name="extra" />
|
|
47
|
+
<van-icon
|
|
48
|
+
v-if="collapsible"
|
|
49
|
+
class="card-header__collapse-icon"
|
|
50
|
+
:name="isCollapsed ? 'arrow-down' : 'arrow-up'"
|
|
51
|
+
/>
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
</template>
|
|
55
|
+
|
|
56
|
+
<style lang="less" scoped>
|
|
57
|
+
.card-header {
|
|
58
|
+
display: flex;
|
|
59
|
+
justify-content: space-between;
|
|
60
|
+
align-items: center;
|
|
61
|
+
margin-bottom: 8px;
|
|
62
|
+
padding-bottom: 6px;
|
|
63
|
+
border-bottom: 1px solid #f0f0f0;
|
|
64
|
+
|
|
65
|
+
&__title {
|
|
66
|
+
display: flex;
|
|
67
|
+
align-items: center;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&__icon {
|
|
71
|
+
margin-right: 8px;
|
|
72
|
+
font-size: 14px;
|
|
73
|
+
color: #666;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
&__text {
|
|
77
|
+
font-size: 14px;
|
|
78
|
+
font-weight: 600;
|
|
79
|
+
color: #333;
|
|
80
|
+
margin: 0;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
&__extra {
|
|
84
|
+
display: flex;
|
|
85
|
+
align-items: center;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
&__collapse-icon {
|
|
89
|
+
margin-left: 8px;
|
|
90
|
+
font-size: 14px;
|
|
91
|
+
color: #666;
|
|
92
|
+
cursor: pointer;
|
|
93
|
+
|
|
94
|
+
&:hover {
|
|
95
|
+
color: #333;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
</style>
|