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
|
@@ -143,10 +143,7 @@ function isFieldEmpty(value: any): boolean {
|
|
|
143
143
|
if (Array.isArray(value) && value.length === 0) {
|
|
144
144
|
return true
|
|
145
145
|
}
|
|
146
|
-
|
|
147
|
-
return true
|
|
148
|
-
}
|
|
149
|
-
return false
|
|
146
|
+
return typeof value === 'object' && Object.keys(value).length === 0
|
|
150
147
|
}
|
|
151
148
|
|
|
152
149
|
// ่กจๅๆ ก้ช
|
|
@@ -432,16 +429,28 @@ function getConfigAndJoin(config: configDefine, outerLock: getConfigLock): void
|
|
|
432
429
|
}
|
|
433
430
|
}
|
|
434
431
|
|
|
435
|
-
function deserializeFunctionAndRun(functionStr, value) {
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
432
|
+
function deserializeFunctionAndRun(functionStr: string, value: any) {
|
|
433
|
+
try {
|
|
434
|
+
// eslint-disable-next-line no-new-func
|
|
435
|
+
const fun = new Function('value', 'activatedConfig', `return (${functionStr})(value, activatedConfig)`)
|
|
436
|
+
return fun(value, activatedConfig)
|
|
437
|
+
}
|
|
438
|
+
catch (err) {
|
|
439
|
+
console.error('Failed to deserialize and run function:', err)
|
|
440
|
+
return null
|
|
441
|
+
}
|
|
439
442
|
}
|
|
440
443
|
|
|
441
|
-
function deserializeFunctionAndRunWithConfig(functionStr) {
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
444
|
+
function deserializeFunctionAndRunWithConfig(functionStr: string) {
|
|
445
|
+
try {
|
|
446
|
+
// eslint-disable-next-line no-new-func
|
|
447
|
+
const fun = new Function('activatedConfig', `return (${functionStr})(activatedConfig)`)
|
|
448
|
+
return fun(activatedConfig)
|
|
449
|
+
}
|
|
450
|
+
catch (err) {
|
|
451
|
+
console.error('Failed to deserialize and run function with config:', err)
|
|
452
|
+
return null
|
|
453
|
+
}
|
|
445
454
|
}
|
|
446
455
|
|
|
447
456
|
// ๅฐtable้
็ฝฎ็่กจๆ ผ่ฝฌๆขไธบ้ๅFormๅฑ็คบ็ๆ ผๅผ
|
|
@@ -1009,9 +1018,9 @@ function getNow() {
|
|
|
1009
1018
|
<van-cell-group v-else-if="row.type === 'signature'" inset style="margin-top: 4vh">
|
|
1010
1019
|
<van-field
|
|
1011
1020
|
:label="row.valueText ? `${row.valueText}:` : ''"
|
|
1012
|
-
|
|
1021
|
+
|
|
1013
1022
|
rows="1"
|
|
1014
|
-
autosize
|
|
1023
|
+
autosize readonly
|
|
1015
1024
|
>
|
|
1016
1025
|
<template #button>
|
|
1017
1026
|
<XSignature v-model="activatedConfig.data[row.dataIndex]" />
|
|
@@ -33,7 +33,7 @@ const attr = ref({})
|
|
|
33
33
|
|
|
34
34
|
// Store
|
|
35
35
|
const userStore = useUserStore()
|
|
36
|
-
const
|
|
36
|
+
const currUser = storeToRefs(userStore)
|
|
37
37
|
|
|
38
38
|
// Refs
|
|
39
39
|
const mainRef = ref()
|
|
@@ -142,7 +142,6 @@ async function onSubmit() {
|
|
|
142
142
|
if (result?.message) {
|
|
143
143
|
showDialog({
|
|
144
144
|
message: result.message,
|
|
145
|
-
type: messageType,
|
|
146
145
|
})
|
|
147
146
|
}
|
|
148
147
|
|
|
@@ -21,32 +21,33 @@ export default {
|
|
|
21
21
|
## ไปฃ็ ๆผ็คบ
|
|
22
22
|
|
|
23
23
|
```html
|
|
24
|
-
<x-add-report
|
|
25
|
-
|
|
26
|
-
>
|
|
27
|
-
</x-add-report>
|
|
24
|
+
<x-add-report> </x-add-report>
|
|
28
25
|
```
|
|
29
26
|
|
|
30
27
|
## API
|
|
31
28
|
|
|
32
|
-
| ๅๆฐ
|
|
33
|
-
|
|
34
|
-
| businessTitle | ไธๅกๆ ้ข
|
|
35
|
-
| businessType | ไธๅก็ฑปๅ
|
|
36
|
-
| visible | ๆฏๅฆๆพ็คบๆจกๆๆก
|
|
37
|
-
| jsonData | JSON้
็ฝฎ๏ผๆ นๆฎ[ๅทฅๅ
ท>ๆฅ่ฏข้
็ฝฎ็ๆ]ๅ่ฝ็ๆ | Object | {}
|
|
38
|
-
| modifyModelData | ไฟฎๆนๆไฝๅๆฅ่ฏขๅบ็ไธๅกๆฐๆฎ
|
|
39
|
-
| loading | ๆฐๅขๆไฟฎๆนไธๅกๆฏๅฆๆง่กไธญ
|
|
40
|
-
| fixedAddForm | ๅบๅฎๆฐๅข่กจๅ๏ผไผๅๆฐๅข่กจๅๅๅนถ
|
|
41
|
-
| getDataParams
|
|
42
|
-
| @onSubmit | ่กจๅ็ๆไบคไบไปถ
|
|
29
|
+
| ๅๆฐ | ่ฏดๆ | ็ฑปๅ | ้ป่ฎคๅผ |
|
|
30
|
+
| --------------- | ----------------------------------------- | ------- | ------ |
|
|
31
|
+
| businessTitle | ไธๅกๆ ้ข | String | '' |
|
|
32
|
+
| businessType | ไธๅก็ฑปๅ | String | '' |
|
|
33
|
+
| visible | ๆฏๅฆๆพ็คบๆจกๆๆก | Boolean | false |
|
|
34
|
+
| jsonData | JSON้
็ฝฎ๏ผๆ นๆฎ[ๅทฅๅ
ท>ๆฅ่ฏข้
็ฝฎ็ๆ]ๅ่ฝ็ๆ | Object | {} |
|
|
35
|
+
| modifyModelData | ไฟฎๆนๆไฝๅๆฅ่ฏขๅบ็ไธๅกๆฐๆฎ | Object | {} |
|
|
36
|
+
| loading | ๆฐๅขๆไฟฎๆนไธๅกๆฏๅฆๆง่กไธญ | Boolean | false |
|
|
37
|
+
| fixedAddForm | ๅบๅฎๆฐๅข่กจๅ๏ผไผๅๆฐๅข่กจๅๅๅนถ | Object | {} |
|
|
38
|
+
| getDataParams | ่ฐ็จlogic่ทๅๆฐๆฎๆบ็่ฟฝๅ ๅๆฐ | Object | - |
|
|
39
|
+
| @onSubmit | ่กจๅ็ๆไบคไบไปถ | event | - |
|
|
43
40
|
|
|
44
41
|
## ไพๅญ1
|
|
45
|
-
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
46
45
|
ๅ่XFormTable็ปไปถ
|
|
46
|
+
|
|
47
47
|
```
|
|
48
48
|
|
|
49
49
|
ๆณจๆไบ้กน
|
|
50
50
|
----
|
|
51
51
|
|
|
52
52
|
> ๆฌ็ปไปถๅทฒ็ปๅฎ็ฐไบ่ช้ๅบๅธๅฑ๏ผๅจไธๅๅ่พจ็ไธ็่ฎพๅคๅๅฏๅพๅฐๅบๆฌ็ๆณ็ๅฑ็คบๆๆ
|
|
53
|
+
```
|
|
@@ -295,7 +295,7 @@ function exportData() {
|
|
|
295
295
|
}
|
|
296
296
|
|
|
297
297
|
function printDocument() {
|
|
298
|
-
const printContent = window.rawDocument.getElementById('printReady')
|
|
298
|
+
const printContent = (window as any).rawDocument.getElementById('printReady')
|
|
299
299
|
// printElement(printContent)
|
|
300
300
|
showDialog({ message: 'ๆไฝๆๅ๏ผ' })
|
|
301
301
|
}
|
|
@@ -321,8 +321,8 @@ function configInit() {
|
|
|
321
321
|
activeConfig.value.columns.forEach((row: any[]) => {
|
|
322
322
|
row.forEach((cell) => {
|
|
323
323
|
if (cell.dynamicDataIndex === true) {
|
|
324
|
-
// eslint-disable-next-line no-
|
|
325
|
-
const func =
|
|
324
|
+
// eslint-disable-next-line no-new-func
|
|
325
|
+
const func = new Function(`return ${cell.customFunctionForDynamicDataIndex}`)()
|
|
326
326
|
cell.dataIndex = func(config.value)
|
|
327
327
|
}
|
|
328
328
|
if (['action', 'click'].includes(cell.eventType) && cell.customFunction && !cell.events) {
|
|
@@ -151,7 +151,7 @@ onMounted(() => {
|
|
|
151
151
|
})
|
|
152
152
|
|
|
153
153
|
// ็ๅฌ
|
|
154
|
-
watch(() => props.config, (
|
|
154
|
+
watch(() => props.config, () => {
|
|
155
155
|
// ้
็ฝฎๅๅๆถ็ๅค็
|
|
156
156
|
}, { deep: true })
|
|
157
157
|
|
|
@@ -248,10 +248,10 @@ watch(() => activatedConfig.value, (val) => {
|
|
|
248
248
|
<span class="inputsDivItemLabel">{{ displayFormatStartText(item.format) }}</span>
|
|
249
249
|
<template v-if="!forDisplay">
|
|
250
250
|
<template v-if="item.inputReadOnly === true">
|
|
251
|
-
<
|
|
251
|
+
<van-field v-model="data[item.dataIndex][index]" :style="`width:${item.inputWidth ? item.inputWidth : '100'}%`" :disabled="true" />
|
|
252
252
|
</template>
|
|
253
253
|
<template v-else>
|
|
254
|
-
<
|
|
254
|
+
<van-field v-model="data[item.dataIndex][index]" :style="`width:${item.inputWidth ? item.inputWidth : '100'}%`" />
|
|
255
255
|
</template>
|
|
256
256
|
</template>
|
|
257
257
|
<template v-else>
|
|
@@ -446,7 +446,7 @@ watch(() => activatedConfig.value, (val) => {
|
|
|
446
446
|
</template>
|
|
447
447
|
|
|
448
448
|
<style lang="less" scoped>
|
|
449
|
-
.img{
|
|
449
|
+
.img {
|
|
450
450
|
width: 95%;
|
|
451
451
|
height: 180px;
|
|
452
452
|
object-fit: cover;
|
|
@@ -490,8 +490,8 @@ watch(() => activatedConfig.value, (val) => {
|
|
|
490
490
|
.reportTable {
|
|
491
491
|
width: 100%;
|
|
492
492
|
border-collapse: collapse;
|
|
493
|
-
table-layout:fixed;
|
|
494
|
-
word-break:break-all;
|
|
493
|
+
table-layout: fixed;
|
|
494
|
+
word-break: break-all;
|
|
495
495
|
}
|
|
496
496
|
}
|
|
497
497
|
.reportMainForDisplay {
|
|
@@ -532,8 +532,8 @@ watch(() => activatedConfig.value, (val) => {
|
|
|
532
532
|
.reportTable {
|
|
533
533
|
width: 100%;
|
|
534
534
|
border-collapse: collapse;
|
|
535
|
-
table-layout:fixed;
|
|
536
|
-
word-break:break-all;
|
|
535
|
+
table-layout: fixed;
|
|
536
|
+
word-break: break-all;
|
|
537
537
|
}
|
|
538
538
|
}
|
|
539
539
|
.reportMainNoPadding {
|
|
@@ -544,7 +544,7 @@ watch(() => activatedConfig.value, (val) => {
|
|
|
544
544
|
// background-color: #fff;
|
|
545
545
|
border-radius: 8px;
|
|
546
546
|
height: auto;
|
|
547
|
-
min-height
|
|
547
|
+
min-height: 20vh;
|
|
548
548
|
overflow-y: auto;
|
|
549
549
|
overflow-x: hidden;
|
|
550
550
|
|
|
@@ -578,17 +578,17 @@ watch(() => activatedConfig.value, (val) => {
|
|
|
578
578
|
.reportTable {
|
|
579
579
|
width: 100%;
|
|
580
580
|
border-collapse: collapse;
|
|
581
|
-
table-layout:fixed;
|
|
582
|
-
word-break:break-all;
|
|
581
|
+
table-layout: fixed;
|
|
582
|
+
word-break: break-all;
|
|
583
583
|
}
|
|
584
584
|
}
|
|
585
|
-
.tools{
|
|
585
|
+
.tools {
|
|
586
586
|
position: fixed;
|
|
587
587
|
right: 2%;
|
|
588
588
|
text-align: right;
|
|
589
589
|
width: 60%;
|
|
590
590
|
cursor: pointer;
|
|
591
|
-
.toolsItem{
|
|
591
|
+
.toolsItem {
|
|
592
592
|
width: 15%;
|
|
593
593
|
margin-right: 3%;
|
|
594
594
|
display: inline-block;
|
|
@@ -123,7 +123,7 @@ function determineCellStyle(labelFunctionReturn: any, color = '#000', borderWidt
|
|
|
123
123
|
padding: '8px',
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
-
let result
|
|
126
|
+
let result: any
|
|
127
127
|
// ๅคๆญ่กจๅคดๆฏๅฆๆๅฃฐๆ็ๆ ทๅผ
|
|
128
128
|
if (labelFunctionReturn.style !== undefined)
|
|
129
129
|
result = props.noTopBorder ? { ...NoTopBorder, ...labelFunctionReturn.style } : { ...withBorder, ...labelFunctionReturn.style }
|
|
@@ -157,10 +157,10 @@ onBeforeMount(() => {
|
|
|
157
157
|
// ้ๅ้
็ฝฎ๏ผๅฐๆๆJSONไผ ้็ๆนๆณไฟๅญๅฐไธไธชๆฐ็ปไธญ๏ผๅนถ็จindexๆฅไธไธๅฏนๅบ
|
|
158
158
|
for (let i = 0; i < props.config.content.length; i++) {
|
|
159
159
|
receivedFunction.value.push({
|
|
160
|
-
// eslint-disable-next-line no-
|
|
161
|
-
labelFunction:
|
|
162
|
-
// eslint-disable-next-line no-
|
|
163
|
-
valueFunction:
|
|
160
|
+
// eslint-disable-next-line no-new-func
|
|
161
|
+
labelFunction: new Function(`return ${props.config.content[i].customFunctionForLabel}`)(),
|
|
162
|
+
// eslint-disable-next-line no-new-func
|
|
163
|
+
valueFunction: new Function(`return ${props.config.content[i].customFunctionForValue}`)(),
|
|
164
164
|
})
|
|
165
165
|
}
|
|
166
166
|
})
|
|
@@ -188,7 +188,7 @@ onBeforeMount(() => {
|
|
|
188
188
|
<!-- ่กจๅคด -->
|
|
189
189
|
<td
|
|
190
190
|
:class="noTopBorder ? 'tdWithNoTopBorder' : 'tdWithBorder'"
|
|
191
|
-
:style="determineCellStyle(receivedFunction[rowIndex].labelFunction(config,
|
|
191
|
+
:style="determineCellStyle(receivedFunction[rowIndex].labelFunction(config, row))"
|
|
192
192
|
colspan="6"
|
|
193
193
|
>
|
|
194
194
|
<template v-if="receivedFunction[rowIndex].labelFunction(config).type === 'key'">
|
|
@@ -214,13 +214,13 @@ onBeforeMount(() => {
|
|
|
214
214
|
</template>
|
|
215
215
|
<template v-else>
|
|
216
216
|
<template v-if="receivedFunction[rowIndex].valueFunction(config).originalKey">
|
|
217
|
-
<van-
|
|
217
|
+
<van-field
|
|
218
218
|
:value="config.data[receivedFunction[rowIndex].valueFunction(config).originalKey]"
|
|
219
219
|
@input="(val) => emit('update:config', { ...config, data: { ...config.data, [receivedFunction[rowIndex].valueFunction(config).originalKey]: val } })"
|
|
220
220
|
/>
|
|
221
221
|
</template>
|
|
222
222
|
<template v-else>
|
|
223
|
-
<van-
|
|
223
|
+
<van-field
|
|
224
224
|
:value="config.data[receivedFunction[rowIndex].valueFunction(config).content]"
|
|
225
225
|
@input="(val) => emit('update:config', { ...config, data: { ...config.data, [receivedFunction[rowIndex].valueFunction(config).content]: val } })"
|
|
226
226
|
/>
|
|
@@ -304,14 +304,14 @@ onBeforeMount(() => {
|
|
|
304
304
|
/>
|
|
305
305
|
</template>
|
|
306
306
|
<template v-else>
|
|
307
|
-
<van-
|
|
307
|
+
<van-field
|
|
308
308
|
:value="item[receivedFunction[rowIndex].valueFunction(config, item).originalKey]"
|
|
309
309
|
@input="(val) => emit('update:config', { ...config, data: { ...config.data, [receivedFunction[rowIndex].valueFunction(config, item).originalKey]: val } })"
|
|
310
310
|
/>
|
|
311
311
|
</template>
|
|
312
312
|
</template>
|
|
313
313
|
<template v-else>
|
|
314
|
-
<van-
|
|
314
|
+
<van-field
|
|
315
315
|
:value="item[receivedFunction[rowIndex].valueFunction(config, item).content]"
|
|
316
316
|
@input="(val) => emit('update:config', { ...config, data: { ...config.data, [receivedFunction[rowIndex].valueFunction(config, item).content]: val } })"
|
|
317
317
|
/>
|
|
@@ -341,7 +341,7 @@ onBeforeMount(() => {
|
|
|
341
341
|
|
|
342
342
|
<style scoped lang="less">
|
|
343
343
|
.imgSrc {
|
|
344
|
-
color: rgb(
|
|
344
|
+
color: rgb(24, 144, 255);
|
|
345
345
|
font-size: 0.9em;
|
|
346
346
|
margin: auto;
|
|
347
347
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import XFormTable from '@af-mobile-client-vue3/components/data/XCellList/index.vue'
|
|
2
3
|
// import { getRealKeyData } from '@af-mobile-client-vue3/utils/util'
|
|
3
4
|
import { executeStrFunctionByContext } from '@af-mobile-client-vue3/utils/runEvalFunction'
|
|
4
5
|
import {
|
|
@@ -7,7 +8,7 @@ import {
|
|
|
7
8
|
Row as VanRow,
|
|
8
9
|
} from 'vant'
|
|
9
10
|
|
|
10
|
-
import { computed,
|
|
11
|
+
import { computed, inject, nextTick, onBeforeMount, ref, watch } from 'vue'
|
|
11
12
|
|
|
12
13
|
const props = withDefaults(defineProps<Props>(), {
|
|
13
14
|
showImgInCell: false,
|
|
@@ -24,7 +25,7 @@ const emit = defineEmits<{
|
|
|
24
25
|
(e: 'update:configData', value: any): void
|
|
25
26
|
(e: 'change', value: any): void
|
|
26
27
|
(e: 'updateImg', value: any): void
|
|
27
|
-
(e: 'selectRow',
|
|
28
|
+
(e: 'selectRow', selectedRowKeys: any[], selectedRows: any[]): void
|
|
28
29
|
(e: 'slotRendered'): void
|
|
29
30
|
(e: 'listClick', value: any): void
|
|
30
31
|
}>()
|
|
@@ -36,7 +37,6 @@ const emit = defineEmits<{
|
|
|
36
37
|
const isInAModal = ref(false)
|
|
37
38
|
|
|
38
39
|
// ๅจๆๅฏผๅ
ฅ็ปไปถ
|
|
39
|
-
const XFormTable = defineAsyncComponent(() => import('@af-mobile-client-vue3/components/data/XCellList/index.vue'))
|
|
40
40
|
// const XAddNativeForm = defineAsyncComponent(() => import('@af-mobile-client-vue3/components/common/XAddNativeForm/XAddNativeForm.vue'))
|
|
41
41
|
// const XFormGroup = defineAsyncComponent(() => import('@af-mobile-client-vue3/components/common/XFormGroup/XFormGroup.vue'))
|
|
42
42
|
// const XTreePro = defineAsyncComponent(() => import('@af-mobile-client-vue3/components/common/XTree/XTreePro.vue'))
|
|
@@ -20,20 +20,24 @@ export default {
|
|
|
20
20
|
|
|
21
21
|
## API
|
|
22
22
|
|
|
23
|
-
| ๅๆฐ | ่ฏดๆ
|
|
24
|
-
|
|
25
|
-
| configName
|
|
26
|
-
| activatedSlotName| ๆฟๆดปๆๆงฝๅ
|
|
27
|
-
| files
|
|
28
|
-
| authority
|
|
29
|
-
| localConfig
|
|
30
|
-
| dontFormat |
|
|
31
|
-
| configData
|
|
23
|
+
| ๅๆฐ | ่ฏดๆ | ็ฑปๅ | ้ป่ฎคๅผ |
|
|
24
|
+
| ----------------- | ---------------------------- | ------- | ---------- |
|
|
25
|
+
| configName | ้
็ฝฎๆไปถๅ | String | ๆ ๏ผๅฟ
ๅกซ๏ผ |
|
|
26
|
+
| activatedSlotName | ๆฟๆดปๆๆงฝๅ | String | undefined |
|
|
27
|
+
| files | ๆไปถๅ่กจ | Array | [] |
|
|
28
|
+
| authority | ๆ้ๆงๅถ | String | user |
|
|
29
|
+
| localConfig | ๆฌๅฐ้
็ฝฎ | Object | undefined |
|
|
30
|
+
| dontFormat | ็ฆๆญขๅทฒ็ปๆ ผๅผๅๅ็้
็ฝฎๆ ผๅผๅ | Boolean | false |
|
|
31
|
+
| configData | ้
็ฝฎไธญ็Data | Object | undefined |
|
|
32
|
+
|
|
32
33
|
## ไพๅญ1
|
|
33
|
-
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
34
37
|
```vue
|
|
35
38
|
<XReport :config-name="'test_tableConfig'" :activated-slot-name="'test_tableConfig_slot'" />
|
|
36
39
|
```
|
|
40
|
+
|
|
37
41
|
## ๆณจๆไบ้กน
|
|
38
42
|
|
|
39
43
|
> ๅจๆไบๆ
ๅตไธ๏ผๆฏๅฆๆๆบ็ซฏ๏ผๅช้่ฆ่พๅ
ฅ่กจๆ ผไธญไธ้จๅ็ๅ
ๅฎนใ
|
|
@@ -226,8 +226,7 @@ onBeforeUnmount(() => {
|
|
|
226
226
|
display: flex;
|
|
227
227
|
justify-content: center;
|
|
228
228
|
align-items: center;
|
|
229
|
-
padding: env(safe-area-inset-top) env(safe-area-inset-right)
|
|
230
|
-
env(safe-area-inset-bottom) env(safe-area-inset-left);
|
|
229
|
+
padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
|
|
231
230
|
|
|
232
231
|
:deep(.van-signature) {
|
|
233
232
|
// ้่ๅๆ็ๅบ้จๆ้ฎ
|
package/src/config/routes.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* List of root-level route names.
|
|
3
|
+
* In the Navbar component, the left arrow is hidden for these routes.
|
|
4
|
+
* However, the Tabbar is shown on these routes.
|
|
5
|
+
*/
|
|
6
|
+
export const rootRouteList: readonly string[] = [
|
|
3
7
|
'ComponentView', // ้ฆ้กต
|
|
4
8
|
'userProfile', // ไธชไบบไธญๅฟ
|
|
5
9
|
]
|
package/src/font-style/font.css
CHANGED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ref } from 'vue'
|
|
2
|
+
|
|
3
|
+
export default function useBoolean(initValue = false) {
|
|
4
|
+
const bool = ref(initValue)
|
|
5
|
+
|
|
6
|
+
function setBool(value: boolean) {
|
|
7
|
+
bool.value = value
|
|
8
|
+
}
|
|
9
|
+
function setTrue() {
|
|
10
|
+
setBool(true)
|
|
11
|
+
}
|
|
12
|
+
function setFalse() {
|
|
13
|
+
setBool(false)
|
|
14
|
+
}
|
|
15
|
+
function toggle() {
|
|
16
|
+
setBool(!bool.value)
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
return {
|
|
20
|
+
bool,
|
|
21
|
+
setBool,
|
|
22
|
+
setTrue,
|
|
23
|
+
setFalse,
|
|
24
|
+
toggle,
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import useBoolean from './useBoolean'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* ๅ ่ฝฝ็ถๆ็ฎก็ Hook
|
|
5
|
+
* @param initValue ๅๅงๅ ่ฝฝ็ถๆ๏ผ้ป่ฎคไธบ false
|
|
6
|
+
* @returns {object} ๅ
ๅซ loading ็ถๆๅๆงๅถๆนๆณ
|
|
7
|
+
*/
|
|
8
|
+
export default function useLoading(initValue = false) {
|
|
9
|
+
const { bool: loading, setTrue: startLoading, setFalse: endLoading } = useBoolean(initValue)
|
|
10
|
+
|
|
11
|
+
return {
|
|
12
|
+
loading,
|
|
13
|
+
startLoading,
|
|
14
|
+
endLoading,
|
|
15
|
+
}
|
|
16
|
+
}
|
package/src/locales/en-US.json
CHANGED
|
@@ -1,29 +1,46 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"
|
|
4
|
-
"
|
|
2
|
+
"navbar": {
|
|
3
|
+
"Home": "Home",
|
|
4
|
+
"Profile": "Profile",
|
|
5
|
+
"Mock": "๐๏ธ Mock",
|
|
6
|
+
"Charts": "๐ Charts",
|
|
7
|
+
"UnoCSS": "โก UnoCSS",
|
|
8
|
+
"Counter": "๐ Persistent State",
|
|
9
|
+
"KeepAlive": "โป๏ธ Page Cache",
|
|
10
|
+
"ScrollCache": "๐ Scroll Cache",
|
|
11
|
+
"Login": "๐งโ๐ป Login",
|
|
12
|
+
"Register": "๐งโ๐ป Register",
|
|
13
|
+
"ForgotPassword": "โ Forgot Password",
|
|
14
|
+
"Settings": "โ๏ธ Settings",
|
|
15
|
+
"404": "โ ๏ธ Page 404",
|
|
16
|
+
"Undefined": "๐คท Undefined title"
|
|
17
|
+
},
|
|
18
|
+
|
|
19
|
+
"tabbar": {
|
|
20
|
+
"home": "HOME",
|
|
21
|
+
"profile": "PROFILE"
|
|
22
|
+
},
|
|
23
|
+
|
|
24
|
+
"home": {
|
|
5
25
|
"darkMode": "๐ Dark Mode",
|
|
6
|
-
"mockGuide": "๐ฟ Mock Guide",
|
|
7
26
|
"language": "๐ Language",
|
|
8
|
-
"404Demo": "๐
Page 404 Demo",
|
|
9
|
-
"echartsDemo": "๐ Echarts Demo",
|
|
10
|
-
"persistPiniaState": "๐ Persistent Pinia state",
|
|
11
|
-
"unocssExample": "๐จ Unocss example",
|
|
12
|
-
"keepAlive": "๐งก KeepAlive Demo",
|
|
13
|
-
"scrollCache": "๐ Scroll Cache Demo",
|
|
14
|
-
"login": "๐ Login",
|
|
15
|
-
"register": "Register",
|
|
16
27
|
"settings": "Settings",
|
|
17
|
-
"
|
|
18
|
-
"exampleComponents": "Example components",
|
|
19
|
-
"forgot-password": "Forgot Password"
|
|
28
|
+
"examples": "Examples"
|
|
20
29
|
},
|
|
30
|
+
|
|
31
|
+
"profile": {
|
|
32
|
+
"login": "Login",
|
|
33
|
+
"settings": "Settings",
|
|
34
|
+
"docs": "Docs"
|
|
35
|
+
},
|
|
36
|
+
|
|
21
37
|
"mock": {
|
|
22
38
|
"fromAsyncData": "Data from asynchronous requests",
|
|
23
39
|
"noData": "No data",
|
|
24
40
|
"pull": "Pull",
|
|
25
41
|
"reset": "Reset"
|
|
26
42
|
},
|
|
43
|
+
|
|
27
44
|
"charts": {
|
|
28
45
|
"January": "Jan",
|
|
29
46
|
"February": "Feb",
|
|
@@ -32,24 +49,28 @@
|
|
|
32
49
|
"May": "May",
|
|
33
50
|
"June": "Jun"
|
|
34
51
|
},
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"
|
|
52
|
+
|
|
53
|
+
"counter": {
|
|
54
|
+
"description": "This counter's state is persisted via Pinia. Try refreshing the page to see it in action."
|
|
38
55
|
},
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"
|
|
42
|
-
"
|
|
56
|
+
|
|
57
|
+
"unocss": {
|
|
58
|
+
"title": "Hello, Unocss!",
|
|
59
|
+
"description": "This is a simple example of Unocss in action.",
|
|
60
|
+
"button": "Button"
|
|
43
61
|
},
|
|
62
|
+
|
|
44
63
|
"keepAlive": {
|
|
45
64
|
"label": "The current component will be cached"
|
|
46
65
|
},
|
|
66
|
+
|
|
47
67
|
"scrollCache": {
|
|
48
68
|
"sectionTitle": "Section title",
|
|
49
69
|
"sectionText": "Section text text text text text text text text text text",
|
|
50
70
|
"finished": "Already at the bottom ~",
|
|
51
71
|
"loading": "Loading..."
|
|
52
72
|
},
|
|
73
|
+
|
|
53
74
|
"login": {
|
|
54
75
|
"login": "Sign In",
|
|
55
76
|
"logout": "Sign Out",
|
|
@@ -57,14 +78,15 @@
|
|
|
57
78
|
"password": "Password",
|
|
58
79
|
"pleaseEnterEmail": "Please enter email",
|
|
59
80
|
"pleaseEnterPassword": "Please enter password",
|
|
60
|
-
"
|
|
61
|
-
"
|
|
81
|
+
"signUp": "Click to sign up",
|
|
82
|
+
"forgotPassword": "Forgot password?"
|
|
62
83
|
},
|
|
63
|
-
|
|
84
|
+
|
|
85
|
+
"forgotPassword": {
|
|
64
86
|
"email": "Email",
|
|
65
87
|
"code": "Code",
|
|
66
88
|
"password": "Password",
|
|
67
|
-
"
|
|
89
|
+
"confirmPassword": "Password again",
|
|
68
90
|
"pleaseEnterEmail": "Please enter email",
|
|
69
91
|
"pleaseEnterCode": "Please enter code",
|
|
70
92
|
"pleaseEnterPassword": "Please enter password",
|
|
@@ -77,12 +99,13 @@
|
|
|
77
99
|
"sendCodeSuccess": "Sent, the code is",
|
|
78
100
|
"passwordResetSuccess": "Password reset succeeded"
|
|
79
101
|
},
|
|
102
|
+
|
|
80
103
|
"register": {
|
|
81
104
|
"email": "Email",
|
|
82
105
|
"code": "Code",
|
|
83
106
|
"nickname": "Nickname",
|
|
84
107
|
"password": "Password",
|
|
85
|
-
"
|
|
108
|
+
"confirmPassword": "Password again",
|
|
86
109
|
"pleaseEnterEmail": "Please enter email",
|
|
87
110
|
"pleaseEnterCode": "Please enter code",
|
|
88
111
|
"pleaseEnterNickname": "Please enter nickname",
|
|
@@ -96,9 +119,10 @@
|
|
|
96
119
|
"sendCodeSuccess": "Sent, the code is",
|
|
97
120
|
"registerSuccess": "Register succeeded"
|
|
98
121
|
},
|
|
122
|
+
|
|
99
123
|
"settings": {
|
|
100
124
|
"logout": "Sign Out",
|
|
101
125
|
"currentVersion": "Current Version",
|
|
102
|
-
"
|
|
126
|
+
"confirmTitle": "Confirm Exit?"
|
|
103
127
|
}
|
|
104
128
|
}
|