af-mobile-client-vue3 1.2.59 → 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/.editorconfig +5 -34
- package/.env +1 -1
- package/.env.development +0 -3
- package/.env.production +1 -7
- package/CLAUDE.md +5 -0
- package/README.md +2 -1
- package/build/vite/index.ts +2 -12
- package/build/vite/optimize.ts +2 -2
- package/compress.js +36 -0
- package/package.json +37 -37
- package/postcss.config.ts +1 -1
- package/src/App.vue +4 -6
- package/src/assets/img/banner/appraise-banner-1.png +0 -0
- package/src/assets/img/banner/appraise-banner-2.png +0 -0
- package/src/components/core/BeautifulLoading/index.vue +1 -2
- package/src/components/core/ImageUploader/index.vue +3 -2
- package/src/components/core/NavBar/index.vue +24 -14
- package/src/components/core/Tabbar/index.vue +5 -3
- 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/XBadge/index.vue +2 -2
- package/src/components/data/XCellList/index.vue +76 -30
- package/src/components/data/XForm/index.vue +1 -1
- package/src/components/data/XFormGroup/doc/FormGroupDemo.vue +4 -4
- package/src/components/data/XFormGroup/doc/README.md +33 -20
- package/src/components/data/XFormGroup/index.vue +51 -35
- package/src/components/data/XFormItem/index.vue +13 -33
- package/src/components/data/XOlMap/README.md +61 -61
- package/src/components/data/XOlMap/XLocationPicker/index.vue +2 -1
- package/src/components/data/XReportForm/XReportFormJsonRender.vue +22 -22
- package/src/components/data/XReportForm/index.vue +23 -14
- package/src/components/data/XReportGrid/XAddReport/XAddReport.vue +1 -2
- package/src/components/data/XReportGrid/XAddReport/index.md +17 -16
- package/src/components/data/XReportGrid/XReport.vue +3 -3
- package/src/components/data/XReportGrid/XReportDesign.vue +13 -13
- package/src/components/data/XReportGrid/XReportDrawer/XReportDrawer.vue +1 -1
- package/src/components/data/XReportGrid/XReportJsonRender.vue +11 -11
- package/src/components/data/XReportGrid/XReportTrGroup.vue +3 -3
- package/src/components/data/XReportGrid/index.md +14 -10
- package/src/components/data/XSignature/index.vue +1 -2
- package/src/components/layout/NormalDataLayout/index.vue +2 -3
- package/src/config/routes.ts +6 -2
- package/src/constants/index.ts +2 -0
- package/src/font-style/font.css +1 -1
- package/src/hooks/useBoolean.ts +26 -0
- package/src/hooks/useLoading.ts +16 -0
- package/src/locales/en-US.json +52 -28
- package/src/locales/zh-CN.json +57 -33
- package/src/main.ts +0 -2
- 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 -6
- package/src/router/types.ts +0 -2
- 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/types/vue-router.d.ts +0 -2
- package/src/utils/mobileUtil.ts +2 -2
- package/src/utils/queryFormDefaultRangePicker.ts +57 -57
- package/src/utils/set-page-title.ts +3 -5
- package/src/views/common/LoadError.vue +1 -2
- package/src/views/common/NotFound.vue +2 -3
- 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 +24 -73
- package/src/views/component/XFormGroupView/index.vue +7 -11
- package/src/views/component/XFormView/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/tsconfig.json +5 -8
- package/uno.config.ts +36 -1
- package/vite.config.ts +10 -3
- package/.env.envoiceShow +0 -7
- package/src/components/core/App/MicroAppView.vue +0 -59
- package/src/components/core/SvgIcon/index.vue +0 -61
- package/src/utils/local-storage.ts +0 -9
- package/src/views/component/XFormGroupView/xformgroup222.vue +0 -97
package/.editorconfig
CHANGED
|
@@ -1,38 +1,9 @@
|
|
|
1
|
+
root=true
|
|
2
|
+
|
|
1
3
|
[*]
|
|
2
4
|
charset=utf-8
|
|
3
|
-
end_of_line=lf
|
|
4
|
-
insert_final_newline=false
|
|
5
|
-
indent_style=space
|
|
6
|
-
indent_size=2
|
|
7
|
-
|
|
8
|
-
[{*.ng,*.sht,*.html,*.shtm,*.shtml,*.htm}]
|
|
9
|
-
indent_style=space
|
|
10
|
-
indent_size=2
|
|
11
|
-
|
|
12
|
-
[{*.jhm,*.xslt,*.xul,*.rng,*.xsl,*.xsd,*.ant,*.tld,*.fxml,*.jrxml,*.xml,*.jnlp,*.wsdl}]
|
|
13
|
-
indent_style=space
|
|
14
|
-
indent_size=2
|
|
15
|
-
|
|
16
|
-
[{.babelrc,.stylelintrc,jest.config,.eslintrc,.prettierrc,*.json,*.jsb3,*.jsb2,*.bowerrc}]
|
|
17
|
-
indent_style=space
|
|
18
|
-
indent_size=2
|
|
19
|
-
|
|
20
|
-
[*.svg]
|
|
21
|
-
indent_style=space
|
|
22
|
-
indent_size=2
|
|
23
|
-
|
|
24
|
-
[*.js.map]
|
|
25
|
-
indent_style=space
|
|
26
|
-
indent_size=2
|
|
27
|
-
|
|
28
|
-
[*.less]
|
|
29
|
-
indent_style=space
|
|
30
|
-
indent_size=2
|
|
31
|
-
|
|
32
|
-
[{*.vue,*.ts,*.tsx}]
|
|
33
|
-
indent_style=space
|
|
34
|
-
indent_size=2
|
|
35
|
-
|
|
36
|
-
[{.analysis_options,*.yml,*.yaml}]
|
|
37
5
|
indent_style=space
|
|
38
6
|
indent_size=2
|
|
7
|
+
end_of_line=lf
|
|
8
|
+
insert_final_newline=true
|
|
9
|
+
trim_trailing_whitespace=true
|
package/.env
CHANGED
package/.env.development
CHANGED
package/.env.production
CHANGED
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/build/vite/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { dirname, resolve } from 'node:path'
|
|
2
2
|
|
|
3
3
|
import process from 'node:process'
|
|
4
4
|
import { fileURLToPath } from 'node:url'
|
|
@@ -11,12 +11,10 @@ import viteCompression from 'vite-plugin-compression'
|
|
|
11
11
|
import { mockDevServerPlugin } from 'vite-plugin-mock-dev-server'
|
|
12
12
|
import { VitePWA } from 'vite-plugin-pwa'
|
|
13
13
|
import Sitemap from 'vite-plugin-sitemap'
|
|
14
|
-
import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
|
|
15
14
|
import VueDevTools from 'vite-plugin-vue-devtools'
|
|
16
15
|
import { createViteVConsole } from './vconsole'
|
|
17
16
|
|
|
18
17
|
export function createVitePlugins(mode: string) {
|
|
19
|
-
const root = process.cwd()
|
|
20
18
|
const env = loadEnv(mode, process.cwd())
|
|
21
19
|
|
|
22
20
|
return [
|
|
@@ -31,20 +29,12 @@ export function createVitePlugins(mode: string) {
|
|
|
31
29
|
|
|
32
30
|
// https://github.com/jbaubree/vite-plugin-sitemap
|
|
33
31
|
Sitemap({
|
|
34
|
-
outDir: env.VITE_APP_OUT_DIR
|
|
32
|
+
outDir: `./dist/${env.VITE_APP_OUT_DIR}`,
|
|
35
33
|
}),
|
|
36
34
|
|
|
37
35
|
// https://github.com/pengzhanbo/vite-plugin-mock-dev-server
|
|
38
36
|
mockDevServerPlugin(),
|
|
39
37
|
|
|
40
|
-
// TODO 放到统一icons处理,移除该插件
|
|
41
|
-
createSvgIconsPlugin({
|
|
42
|
-
// 指定图标文件夹
|
|
43
|
-
iconDirs: [path.resolve(root, 'src/icons/svg')],
|
|
44
|
-
// 指定 symbolId 格式
|
|
45
|
-
symbolId: 'icon-[dir]-[name]',
|
|
46
|
-
}),
|
|
47
|
-
|
|
48
38
|
// 生产环境 gzip 压缩资源
|
|
49
39
|
viteCompression({
|
|
50
40
|
algorithm: 'gzip',
|
package/build/vite/optimize.ts
CHANGED
|
@@ -20,10 +20,10 @@ const include = [
|
|
|
20
20
|
'vant/es/notify/style/index',
|
|
21
21
|
'vant/es/config-provider/style/index',
|
|
22
22
|
'vant/es/nav-bar/style/index',
|
|
23
|
-
'vant/es/list/style/index',
|
|
24
|
-
'vant/es/text-ellipsis/style/index',
|
|
25
23
|
'vant/es/tabbar/style/index',
|
|
26
24
|
'vant/es/tabbar-item/style/index',
|
|
25
|
+
'vant/es/list/style/index',
|
|
26
|
+
'vant/es/text-ellipsis/style/index',
|
|
27
27
|
]
|
|
28
28
|
|
|
29
29
|
const exclude = [
|
package/compress.js
ADDED
|
@@ -0,0 +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
|
+
})
|
package/package.json
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "af-mobile-client-vue3",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
5
|
-
"packageManager": "pnpm@10.
|
|
4
|
+
"version": "1.3.22.1",
|
|
5
|
+
"packageManager": "pnpm@10.13.1",
|
|
6
6
|
"description": "Vue + Vite component lib",
|
|
7
7
|
"engines": {
|
|
8
8
|
"node": ">=20.19.0"
|
|
9
9
|
},
|
|
10
10
|
"scripts": {
|
|
11
11
|
"dev": "cross-env MOCK_SERVER_PORT=8086 vite",
|
|
12
|
-
"
|
|
13
|
-
"build:dev": "vue-tsc --noEmit && vite build --mode
|
|
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",
|
|
14
15
|
"preview": "vite preview",
|
|
15
|
-
"lint": "eslint .
|
|
16
|
+
"lint": "eslint .",
|
|
16
17
|
"lint:fix": "eslint . --fix",
|
|
17
18
|
"release": "bumpp --commit --push --tag",
|
|
18
19
|
"typecheck": "vue-tsc --noEmit",
|
|
@@ -20,68 +21,69 @@
|
|
|
20
21
|
"prepare": "simple-git-hooks"
|
|
21
22
|
},
|
|
22
23
|
"dependencies": {
|
|
23
|
-
"@vant/area-data": "^2.0.0",
|
|
24
|
-
"crypto-js": "^4.2.0",
|
|
25
|
-
"dayjs": "^1.11.13",
|
|
26
|
-
"ol": "^10.5.0",
|
|
27
|
-
"vue3-hash-calendar": "^1.1.3",
|
|
28
24
|
"@iconify/vue": "4.3.0",
|
|
29
|
-
"@micro-zoe/micro-app": "1.0.0-rc.
|
|
30
|
-
"@unhead/vue": "2.0.
|
|
25
|
+
"@micro-zoe/micro-app": "1.0.0-rc.26",
|
|
26
|
+
"@unhead/vue": "2.0.12",
|
|
27
|
+
"@vant/area-data": "^2.0.0",
|
|
31
28
|
"@vant/touch-emulator": "^1.4.0",
|
|
32
29
|
"@vant/use": "^1.6.0",
|
|
33
|
-
"@vueuse/core": "^13.
|
|
30
|
+
"@vueuse/core": "^13.5.0",
|
|
34
31
|
"axios": "^1.10.0",
|
|
32
|
+
"crypto-js": "^4.2.0",
|
|
33
|
+
"dayjs": "^1.11.13",
|
|
35
34
|
"echarts": "^5.6.0",
|
|
36
35
|
"lodash-es": "^4.17.21",
|
|
37
36
|
"nprogress": "^0.2.0",
|
|
37
|
+
"ol": "^10.5.0",
|
|
38
38
|
"pinia": "^3.0.3",
|
|
39
|
-
"pinia-plugin-persistedstate": "^4.
|
|
39
|
+
"pinia-plugin-persistedstate": "^4.4.1",
|
|
40
40
|
"resize-detector": "^0.3.0",
|
|
41
|
-
"vant": "^4.9.
|
|
41
|
+
"vant": "^4.9.21",
|
|
42
42
|
"vconsole": "^3.15.1",
|
|
43
43
|
"vue": "^3.5.17",
|
|
44
|
-
"vue-i18n": "^11.1.
|
|
45
|
-
"vue-router": "^4.5.1"
|
|
44
|
+
"vue-i18n": "^11.1.10",
|
|
45
|
+
"vue-router": "^4.5.1",
|
|
46
|
+
"vue3-hash-calendar": "^1.1.3"
|
|
46
47
|
},
|
|
47
48
|
"devDependencies": {
|
|
48
|
-
"
|
|
49
|
-
"@iconify/json": "2.2.318",
|
|
50
|
-
"@types/crypto-js": "^4.2.2",
|
|
51
|
-
"@antfu/eslint-config": "4.16.1",
|
|
49
|
+
"@antfu/eslint-config": "4.17.0",
|
|
52
50
|
"@commitlint/cli": "^19.8.1",
|
|
53
51
|
"@commitlint/config-conventional": "^19.8.1",
|
|
54
52
|
"@commitlint/types": "^19.8.1",
|
|
53
|
+
"@iconify/json": "2.2.318",
|
|
54
|
+
"@iconify/utils": "^2.3.0",
|
|
55
55
|
"@intlify/unplugin-vue-i18n": "^6.0.8",
|
|
56
|
+
"@types/crypto-js": "^4.2.2",
|
|
56
57
|
"@types/lodash-es": "^4.17.12",
|
|
57
|
-
"@types/node": "^24.0.
|
|
58
|
+
"@types/node": "^24.0.14",
|
|
58
59
|
"@types/nprogress": "^0.2.3",
|
|
59
|
-
"@unocss/eslint-config": "66.
|
|
60
|
-
"@vitejs/plugin-legacy": "^7.0.
|
|
60
|
+
"@unocss/eslint-config": "66.3.3",
|
|
61
|
+
"@vitejs/plugin-legacy": "^7.0.1",
|
|
61
62
|
"@vitejs/plugin-vue": "^6.0.0",
|
|
62
63
|
"autoprefixer": "^10.4.21",
|
|
63
64
|
"bumpp": "^10.2.0",
|
|
64
65
|
"consola": "^3.4.2",
|
|
65
66
|
"cross-env": "^7.0.3",
|
|
66
|
-
"eslint": "^9.
|
|
67
|
+
"eslint": "^9.31.0",
|
|
67
68
|
"eslint-plugin-format": "^1.0.1",
|
|
68
|
-
"less": "^4.
|
|
69
|
+
"less": "^4.4.0",
|
|
69
70
|
"lint-staged": "^16.1.2",
|
|
70
71
|
"mockjs": "^1.1.0",
|
|
71
72
|
"postcss-mobile-forever": "^5.0.0",
|
|
72
|
-
"rollup": "^4.
|
|
73
|
+
"rollup": "^4.45.1",
|
|
73
74
|
"simple-git-hooks": "^2.13.0",
|
|
75
|
+
"tar": "^7.4.3",
|
|
74
76
|
"terser": "^5.43.1",
|
|
75
77
|
"typescript": "^5.8.3",
|
|
76
|
-
"unocss": "66.
|
|
77
|
-
"vite": "^7.0.
|
|
78
|
+
"unocss": "66.3.3",
|
|
79
|
+
"vite": "^7.0.5",
|
|
80
|
+
"vite-plugin-compression": "^0.5.1",
|
|
78
81
|
"vite-plugin-mock-dev-server": "^1.9.1",
|
|
79
|
-
"vite-plugin-pwa": "^1.0.
|
|
82
|
+
"vite-plugin-pwa": "^1.0.1",
|
|
80
83
|
"vite-plugin-sitemap": "^0.8.2",
|
|
81
|
-
"vite-plugin-svg-icons": "^2.0.1",
|
|
82
84
|
"vite-plugin-vconsole": "^2.1.1",
|
|
83
85
|
"vite-plugin-vue-devtools": "^7.7.7",
|
|
84
|
-
"vue-tsc": "^
|
|
86
|
+
"vue-tsc": "^3.0.2"
|
|
85
87
|
},
|
|
86
88
|
"pnpm": {
|
|
87
89
|
"allowedDeprecatedVersions": {
|
|
@@ -90,9 +92,7 @@
|
|
|
90
92
|
"sourcemap-codec": "1.4.8"
|
|
91
93
|
},
|
|
92
94
|
"peerDependencyRules": {
|
|
93
|
-
"allowedVersions": {
|
|
94
|
-
"typescript": "5.8.3"
|
|
95
|
-
}
|
|
95
|
+
"allowedVersions": {}
|
|
96
96
|
},
|
|
97
97
|
"onlyBuiltDependencies": [
|
|
98
98
|
"core-js",
|
|
@@ -102,13 +102,13 @@
|
|
|
102
102
|
]
|
|
103
103
|
},
|
|
104
104
|
"resolutions": {
|
|
105
|
-
"vite": "^7.0.
|
|
105
|
+
"vite": "^7.0.5"
|
|
106
106
|
},
|
|
107
107
|
"simple-git-hooks": {
|
|
108
108
|
"pre-commit": "pnpm lint-staged",
|
|
109
109
|
"commit-msg": "pnpm commitlint $1"
|
|
110
110
|
},
|
|
111
111
|
"lint-staged": {
|
|
112
|
-
"
|
|
112
|
+
"*": "eslint --fix"
|
|
113
113
|
}
|
|
114
114
|
}
|
package/postcss.config.ts
CHANGED
package/src/App.vue
CHANGED
|
@@ -9,13 +9,14 @@ import {
|
|
|
9
9
|
ConfigProvider as VanConfigProvider,
|
|
10
10
|
} from 'vant/es'
|
|
11
11
|
import { computed, reactive } from 'vue'
|
|
12
|
+
import { appDescription, appName } from './constants'
|
|
12
13
|
|
|
13
14
|
useHead({
|
|
14
|
-
title:
|
|
15
|
+
title: appName,
|
|
15
16
|
meta: [
|
|
16
17
|
{
|
|
17
18
|
name: 'description',
|
|
18
|
-
content:
|
|
19
|
+
content: appDescription,
|
|
19
20
|
},
|
|
20
21
|
{
|
|
21
22
|
name: 'theme-color',
|
|
@@ -52,7 +53,7 @@ const themeVars: ConfigProviderThemeVars = reactive({
|
|
|
52
53
|
<router-view v-slot="{ Component }">
|
|
53
54
|
<section class="app-wrapper">
|
|
54
55
|
<keep-alive :include="keepAliveRouteNames">
|
|
55
|
-
<component :is="Component" />
|
|
56
|
+
<component :is="Component" :key="$route.fullPath" />
|
|
56
57
|
</keep-alive>
|
|
57
58
|
</section>
|
|
58
59
|
</router-view>
|
|
@@ -73,9 +74,6 @@ input[type='password']::-ms-clear {
|
|
|
73
74
|
<style scoped>
|
|
74
75
|
.app-wrapper {
|
|
75
76
|
width: 100%;
|
|
76
|
-
/**
|
|
77
|
-
TODO 源框架问题:增加后动画无效
|
|
78
|
-
*/
|
|
79
77
|
position: relative;
|
|
80
78
|
}
|
|
81
79
|
</style>
|
|
Binary file
|
|
Binary file
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import SvgIcon from '@af-mobile-client-vue3/components/core/SvgIcon/index.vue'
|
|
3
2
|
</script>
|
|
4
3
|
|
|
5
4
|
<template>
|
|
6
5
|
<div class="main">
|
|
7
6
|
<div class="bird-container">
|
|
8
|
-
<
|
|
7
|
+
<div class="bird i-svg:bird" />
|
|
9
8
|
</div>
|
|
10
9
|
<div class="loading-text">
|
|
11
10
|
加载中,请稍候...
|
|
@@ -14,6 +14,7 @@ const props = defineProps({
|
|
|
14
14
|
authority: { default: 'user' },
|
|
15
15
|
uploadMode: { default: 'server' },
|
|
16
16
|
attr: { type: Object as () => { addOrEdit?: string, acceptCount?: number, uploadImage?: boolean }, default: () => ({}) },
|
|
17
|
+
mode: { default: '新增' }, // 预览
|
|
17
18
|
})
|
|
18
19
|
const emit = defineEmits(['updateFileList'])
|
|
19
20
|
|
|
@@ -170,7 +171,7 @@ function handleActionSelect(option: any) {
|
|
|
170
171
|
<template>
|
|
171
172
|
<div class="uploader-container">
|
|
172
173
|
<div
|
|
173
|
-
v-if="imageList.length < props.attr?.acceptCount && props.attr?.addOrEdit !== 'readonly'"
|
|
174
|
+
v-if="props.mode !== '预览' && (imageList.length < props.attr?.acceptCount && props.attr?.addOrEdit !== 'readonly')"
|
|
174
175
|
class="custom-upload-area"
|
|
175
176
|
@click="handleUploadAreaClick"
|
|
176
177
|
>
|
|
@@ -186,7 +187,7 @@ function handleActionSelect(option: any) {
|
|
|
186
187
|
ref="uploaderRef"
|
|
187
188
|
v-model="imageList"
|
|
188
189
|
:show-upload="false"
|
|
189
|
-
:deletable="props.attr?.addOrEdit !== 'readonly' && props.authority === 'admin'"
|
|
190
|
+
:deletable="(props.attr?.addOrEdit !== 'readonly' && props.authority === 'admin') && props.mode !== '预览'"
|
|
190
191
|
:multiple="props.authority === 'admin'"
|
|
191
192
|
:preview-image="true"
|
|
192
193
|
:before-delete="props.attr?.addOrEdit !== 'readonly' && props.authority === 'admin' ? deleteFileFunction : undefined"
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import { rootRouteList } from '@af-mobile-client-vue3/config/routes'
|
|
2
3
|
import { NavBar as VanNavBar } from 'vant/es'
|
|
3
4
|
import { computed } from 'vue'
|
|
4
5
|
import { useI18n } from 'vue-i18n'
|
|
@@ -6,36 +7,45 @@ import { useRoute, useRouter } from 'vue-router'
|
|
|
6
7
|
|
|
7
8
|
const route = useRoute()
|
|
8
9
|
const router = useRouter()
|
|
9
|
-
|
|
10
|
-
// back
|
|
11
|
-
function onBack() {
|
|
12
|
-
if (window.history.state.back)
|
|
13
|
-
history.back()
|
|
14
|
-
else
|
|
15
|
-
router.replace('/')
|
|
16
|
-
}
|
|
17
|
-
|
|
18
10
|
const { t } = useI18n()
|
|
19
11
|
|
|
12
|
+
const showNavBar = computed(() => route.meta.navBar)
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Get page title
|
|
16
|
+
* Located in src/locales/json
|
|
17
|
+
*/
|
|
20
18
|
const title = computed(() => {
|
|
21
19
|
if (!route.meta)
|
|
22
20
|
return ''
|
|
23
21
|
|
|
24
|
-
return route.meta.i18n ? t(route.meta.i18n) : (route.meta.title || '')
|
|
22
|
+
return route.meta.i18n ? t(route.meta.i18n as string) : (route.meta.title || '')
|
|
25
23
|
})
|
|
26
24
|
|
|
27
|
-
|
|
25
|
+
/**
|
|
26
|
+
* Show the left arrow
|
|
27
|
+
* If route name is in rootRouteList, hide left arrow
|
|
28
|
+
*/
|
|
29
|
+
const showLeftArrow = computed(() => {
|
|
30
|
+
return !(route.name && rootRouteList.includes(route.name as string))
|
|
31
|
+
})
|
|
28
32
|
|
|
29
|
-
|
|
33
|
+
// back
|
|
34
|
+
function onBack() {
|
|
35
|
+
if (window.history.state.back)
|
|
36
|
+
history.back()
|
|
37
|
+
else
|
|
38
|
+
router.replace('/')
|
|
39
|
+
}
|
|
30
40
|
</script>
|
|
31
41
|
|
|
32
42
|
<template>
|
|
33
43
|
<VanNavBar
|
|
34
44
|
v-show="showNavBar"
|
|
35
|
-
:title="title"
|
|
45
|
+
:title="title as string"
|
|
36
46
|
:fixed="true"
|
|
37
47
|
clickable placeholder
|
|
38
|
-
:left-arrow="
|
|
48
|
+
:left-arrow="showLeftArrow"
|
|
39
49
|
@click-left="onBack"
|
|
40
50
|
/>
|
|
41
51
|
</template>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import {
|
|
2
|
+
import { rootRouteList } from '@af-mobile-client-vue3/config/routes'
|
|
3
3
|
import { Tabbar as VanTabbar, TabbarItem as VanTabbarItem } from 'vant'
|
|
4
4
|
import { computed, ref } from 'vue'
|
|
5
5
|
import { useRoute } from 'vue-router'
|
|
@@ -9,11 +9,13 @@ import 'vant/lib/tabbar/index.css'
|
|
|
9
9
|
const active = ref(0)
|
|
10
10
|
const route = useRoute()
|
|
11
11
|
|
|
12
|
-
const show = computed(() =>
|
|
12
|
+
const show = computed(() => {
|
|
13
|
+
return route.name && rootRouteList.includes(route.name as string)
|
|
14
|
+
})
|
|
13
15
|
</script>
|
|
14
16
|
|
|
15
17
|
<template>
|
|
16
|
-
<VanTabbar v-if="show" v-model="active" route
|
|
18
|
+
<VanTabbar v-if="show" v-model="active" placeholder route>
|
|
17
19
|
<VanTabbarItem replace to="/Component/main">
|
|
18
20
|
{{ '首页' }}
|
|
19
21
|
<template #icon>
|
|
@@ -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
|
}
|