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.
Files changed (149) hide show
  1. package/.editorconfig +5 -34
  2. package/.env +1 -1
  3. package/.env.development +0 -3
  4. package/.env.production +1 -7
  5. package/CLAUDE.md +5 -0
  6. package/README.md +2 -1
  7. package/build/vite/index.ts +2 -12
  8. package/build/vite/optimize.ts +2 -2
  9. package/compress.js +36 -0
  10. package/package.json +37 -37
  11. package/postcss.config.ts +1 -1
  12. package/src/App.vue +4 -6
  13. package/src/assets/img/banner/appraise-banner-1.png +0 -0
  14. package/src/assets/img/banner/appraise-banner-2.png +0 -0
  15. package/src/components/core/BeautifulLoading/index.vue +1 -2
  16. package/src/components/core/ImageUploader/index.vue +3 -2
  17. package/src/components/core/NavBar/index.vue +24 -14
  18. package/src/components/core/Tabbar/index.vue +5 -3
  19. package/src/components/core/XGridDropOption/index.vue +7 -9
  20. package/src/components/core/XMultiSelect/index.vue +1 -1
  21. package/src/components/data/CardContainer/CardContainer.vue +118 -0
  22. package/src/components/data/CardContainer/CardHeader.vue +99 -0
  23. package/src/components/data/InfoDisplay/index.vue +132 -0
  24. package/src/components/data/UserDetail/api.ts +24 -0
  25. package/src/components/data/UserDetail/index.vue +620 -0
  26. package/src/components/data/UserDetail/recordEntries.ts +159 -0
  27. package/src/components/data/UserDetail/types.ts +26 -0
  28. package/src/components/data/XBadge/index.vue +2 -2
  29. package/src/components/data/XCellList/index.vue +76 -30
  30. package/src/components/data/XForm/index.vue +1 -1
  31. package/src/components/data/XFormGroup/doc/FormGroupDemo.vue +4 -4
  32. package/src/components/data/XFormGroup/doc/README.md +33 -20
  33. package/src/components/data/XFormGroup/index.vue +51 -35
  34. package/src/components/data/XFormItem/index.vue +13 -33
  35. package/src/components/data/XOlMap/README.md +61 -61
  36. package/src/components/data/XOlMap/XLocationPicker/index.vue +2 -1
  37. package/src/components/data/XReportForm/XReportFormJsonRender.vue +22 -22
  38. package/src/components/data/XReportForm/index.vue +23 -14
  39. package/src/components/data/XReportGrid/XAddReport/XAddReport.vue +1 -2
  40. package/src/components/data/XReportGrid/XAddReport/index.md +17 -16
  41. package/src/components/data/XReportGrid/XReport.vue +3 -3
  42. package/src/components/data/XReportGrid/XReportDesign.vue +13 -13
  43. package/src/components/data/XReportGrid/XReportDrawer/XReportDrawer.vue +1 -1
  44. package/src/components/data/XReportGrid/XReportJsonRender.vue +11 -11
  45. package/src/components/data/XReportGrid/XReportTrGroup.vue +3 -3
  46. package/src/components/data/XReportGrid/index.md +14 -10
  47. package/src/components/data/XSignature/index.vue +1 -2
  48. package/src/components/layout/NormalDataLayout/index.vue +2 -3
  49. package/src/config/routes.ts +6 -2
  50. package/src/constants/index.ts +2 -0
  51. package/src/font-style/font.css +1 -1
  52. package/src/hooks/useBoolean.ts +26 -0
  53. package/src/hooks/useLoading.ts +16 -0
  54. package/src/locales/en-US.json +52 -28
  55. package/src/locales/zh-CN.json +57 -33
  56. package/src/main.ts +0 -2
  57. package/src/plugins/collectIcons.ts +10 -0
  58. package/src/router/README.md +1 -1
  59. package/src/router/guards.ts +1 -1
  60. package/src/router/index.ts +1 -1
  61. package/src/router/routes.ts +176 -6
  62. package/src/router/types.ts +0 -2
  63. package/src/services/api/user.ts +17 -0
  64. package/src/stores/modules/setting.ts +2 -1
  65. package/src/styles/var.less +9 -0
  66. package/src/types/vue-router.d.ts +0 -2
  67. package/src/utils/mobileUtil.ts +2 -2
  68. package/src/utils/queryFormDefaultRangePicker.ts +57 -57
  69. package/src/utils/set-page-title.ts +3 -5
  70. package/src/views/common/LoadError.vue +1 -2
  71. package/src/views/common/NotFound.vue +2 -3
  72. package/src/views/component/IconifyView/index.vue +0 -3
  73. package/src/views/component/UserDetailView/UserDetailPage.vue +77 -0
  74. package/src/views/component/UserDetailView/index.vue +234 -0
  75. package/src/views/component/XCellListView/index.vue +24 -73
  76. package/src/views/component/XFormGroupView/index.vue +7 -11
  77. package/src/views/component/XFormView/index.vue +2 -2
  78. package/src/views/component/XOlMapView/testData.ts +1 -1
  79. package/src/views/component/index.vue +4 -0
  80. package/src/views/component/menu.vue +1 -1
  81. package/src/views/user/login/ForgetPasswordForm.vue +1 -1
  82. package/src/views/user/login/LoginForm.vue +4 -3
  83. package/src/views/user/login/LoginWave.vue +1 -1
  84. package/src/views/user/my/comm/ModifyPassword.vue +346 -0
  85. package/src/views/user/my/index.vue +440 -183
  86. package/src/views/user/register/index.vue +952 -0
  87. package/src/views/userRecords/AbnormalAlarmRecords.vue +21 -0
  88. package/src/views/userRecords/CardReplacementRecords.vue +21 -0
  89. package/src/views/userRecords/ChangeRecords.vue +19 -0
  90. package/src/views/userRecords/CommandViewRecords.vue +20 -0
  91. package/src/views/userRecords/GasCompensationRecords.vue +20 -0
  92. package/src/views/userRecords/InstrumentCollectionRecords.vue +21 -0
  93. package/src/views/userRecords/MeterRecords.vue +20 -0
  94. package/src/views/userRecords/OperateRecords.vue +51 -0
  95. package/src/views/userRecords/OtherChargeRecords.vue +19 -0
  96. package/src/views/userRecords/PaymentRecords.vue +28 -0
  97. package/src/views/userRecords/PriceAdjustmentRecords.vue +19 -0
  98. package/src/views/userRecords/ReplacementRecords.vue +19 -0
  99. package/src/views/userRecords/SafetyRecords.vue +19 -0
  100. package/src/views/userRecords/TransactionRecords.vue +21 -0
  101. package/src/views/userRecords/TransferRecords.vue +19 -0
  102. package/src/views/userRecords/operateRecordDetail/index.vue +316 -0
  103. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/AddUserDetail.vue +124 -0
  104. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/AdvanceDeliveryDetail.vue +88 -0
  105. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/AutoAccountsCancelDetail.vue +205 -0
  106. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/AutoAccountsDetail.vue +192 -0
  107. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/BankDkDetail.vue +192 -0
  108. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/BankPayDetail.vue +192 -0
  109. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/BlacklistDetail.vue +153 -0
  110. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/CancellationDetail.vue +101 -0
  111. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/CardMeterCenterCancelDetail.vue +127 -0
  112. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/CardMeterCenterDetail.vue +153 -0
  113. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/CardOverUserDetail.vue +153 -0
  114. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/ChangeMeterCancelDetail.vue +166 -0
  115. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/ChangeMeterDetail.vue +205 -0
  116. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/DisableManageDetail.vue +127 -0
  117. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/EnableManageDetail.vue +114 -0
  118. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/FaZheChangeDetail.vue +124 -0
  119. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/FeeDeductionDetail.vue +153 -0
  120. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/GasPriceChangeDetail.vue +126 -0
  121. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/InputtorChangeDetail.vue +126 -0
  122. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/IotMeterCenterCancelDetail.vue +114 -0
  123. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/IotMeterCenterDetail.vue +127 -0
  124. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/IotOpenDetail.vue +88 -0
  125. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/MachineCardDetail.vue +101 -0
  126. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/MachineMeterCenterCancelDetail.vue +218 -0
  127. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/MachineMeterCenterDetail.vue +153 -0
  128. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/OffGasAddGasDetail.vue +140 -0
  129. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/OtherChargeCancelDetail.vue +127 -0
  130. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/OtherChargeDetail.vue +114 -0
  131. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/OverUserChangeDetail.vue +127 -0
  132. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/ReBillDetail.vue +127 -0
  133. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/RefundDetail.vue +114 -0
  134. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/ReplaceCardManageCancelDetail.vue +127 -0
  135. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/ReplaceCardManageDetail.vue +114 -0
  136. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/SaleCardGasDetail.vue +140 -0
  137. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/TransferManageCancelDetail.vue +152 -0
  138. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/TransferManageDetail.vue +178 -0
  139. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/UserChangeDetail.vue +123 -0
  140. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/WechatPayDetail.vue +192 -0
  141. package/src/views/userRecords/types.ts +66 -0
  142. package/tsconfig.json +5 -8
  143. package/uno.config.ts +36 -1
  144. package/vite.config.ts +10 -3
  145. package/.env.envoiceShow +0 -7
  146. package/src/components/core/App/MicroAppView.vue +0 -59
  147. package/src/components/core/SvgIcon/index.vue +0 -61
  148. package/src/utils/local-storage.ts +0 -9
  149. 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
- if (typeof value === 'object' && Object.keys(value).length === 0) {
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
- // eslint-disable-next-line no-eval
437
- const fun = eval(`(${functionStr})`)
438
- return fun(value, activatedConfig)
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
- // eslint-disable-next-line no-eval
443
- const fun = eval(`(${functionStr})`)
444
- return fun(activatedConfig)
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
- readonly
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 { user: currUser } = storeToRefs(userStore)
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 | ไธšๅŠกๆ ‡้ข˜ | String | '' |
35
- | businessType | ไธšๅŠก็ฑปๅž‹ | String | '' |
36
- | visible | ๆ˜ฏๅฆๆ˜พ็คบๆจกๆ€ๆก† | Boolean | false |
37
- | jsonData | JSON้…็ฝฎ๏ผŒๆ นๆฎ[ๅทฅๅ…ท>ๆŸฅ่ฏข้…็ฝฎ็”Ÿๆˆ]ๅŠŸ่ƒฝ็”Ÿๆˆ | Object | {} |
38
- | modifyModelData | ไฟฎๆ”นๆ“ไฝœๅ‰ๆŸฅ่ฏขๅ‡บ็š„ไธšๅŠกๆ•ฐๆฎ | Object | {} |
39
- | loading | ๆ–ฐๅขžๆˆ–ไฟฎๆ”นไธšๅŠกๆ˜ฏๅฆๆ‰ง่กŒไธญ | Boolean | false |
40
- | fixedAddForm | ๅ›บๅฎšๆ–ฐๅขž่กจๅ•๏ผŒไผšๅ’Œๆ–ฐๅขž่กจๅ•ๅˆๅนถ | Object | {} |
41
- | getDataParams | ่ฐƒ็”จlogic่Žทๅ–ๆ•ฐๆฎๆบ็š„่ฟฝๅŠ ๅ‚ๆ•ฐ | Object | - |
42
- | @onSubmit | ่กจๅ•็š„ๆไบคไบ‹ไปถ | event | - |
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-eval
325
- const func = eval(`(${cell.customFunctionForDynamicDataIndex})`)
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, (newVal) => {
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
- <a-input v-model="data[item.dataIndex][index]" :style="`width:${item.inputWidth ? item.inputWidth : '100'}%`" :disabled="true" />
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
- <a-input v-model="data[item.dataIndex][index]" :style="`width:${item.inputWidth ? item.inputWidth : '100'}%`" />
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 : 20vh;
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;
@@ -31,7 +31,7 @@ const attr = ref({})
31
31
 
32
32
  // Store
33
33
  const userStore = useUserStore()
34
- const { user: currUser } = storeToRefs(userStore)
34
+ const currUser = storeToRefs(userStore)
35
35
 
36
36
  // Refs
37
37
  const mainRef = ref()
@@ -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-eval
161
- labelFunction: eval(`(${props.config.content[i].customFunctionForLabel})`),
162
- // eslint-disable-next-line no-eval
163
- valueFunction: eval(`(${props.config.content[i].customFunctionForValue})`),
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, item))"
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-input
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-input
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-input
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-input
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( 24,144,255 );
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, defineAsyncComponent, inject, nextTick, onBeforeMount, ref, watch } from 'vue'
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', value: any): void
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 | ้…็ฝฎๆ–‡ไปถๅ | 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 |
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
  // ้š่—ๅŽŸๆœ‰็š„ๅบ•้ƒจๆŒ‰้’ฎ
@@ -5,11 +5,10 @@ import {
5
5
  Row as VanRow,
6
6
  } from 'vant'
7
7
 
8
- const { title } = withDefaults(defineProps<{
8
+ const { title } = defineProps<{
9
9
  // ๆ ‡้ข˜
10
10
  title: string
11
- }>(), {
12
- })
11
+ }>()
13
12
 
14
13
  // back
15
14
  const onClickLeft = () => history.back()
@@ -1,5 +1,9 @@
1
- // ๅฎšไน‰ๅฏผ่ˆชๆ ๅ’Œๆ ‡็ญพๆ ๅฏ่ง็š„่ทฏ็”ฑ็™ฝๅๅ•
2
- export const routeWhiteList: readonly string[] = [
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
  ]
@@ -0,0 +1,2 @@
1
+ export const appName = 'Vue3-Client'
2
+ export const appDescription = 'ๅŸบไบŽVant4็š„็งปๅŠจ็ซฏ็ป„ไปถๅบ“ๆ‰ฉๅฑ•'
@@ -1,4 +1,4 @@
1
1
  @font-face {
2
2
  font-family: 'PingFangSC-Regular-woff2';
3
3
  src: url('./PingFangSC-Regular.woff2') format('woff2');
4
- }
4
+ }
@@ -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
+ }
@@ -1,29 +1,46 @@
1
1
  {
2
- "menus": {
3
- "home": "Home",
4
- "profile": "My Center",
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
- "basicSettings": "Basic Settings",
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
- "layouts": {
36
- "home": "HOME",
37
- "profile": "PROFILE"
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
- "profile": {
40
- "login": "Login",
41
- "settings": "Settings",
42
- "docs": "Docs"
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
- "sign-up": "Click to sign up",
61
- "forgot-password": "Forgot password?"
81
+ "signUp": "Click to sign up",
82
+ "forgotPassword": "Forgot password?"
62
83
  },
63
- "forgot-password": {
84
+
85
+ "forgotPassword": {
64
86
  "email": "Email",
65
87
  "code": "Code",
66
88
  "password": "Password",
67
- "comfirmPassword": "Password again",
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
- "comfirmPassword": "Password again",
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
- "comfirmTitle": "Confirm Exit?"
126
+ "confirmTitle": "Confirm Exit?"
103
127
  }
104
128
  }