af-mobile-client-vue3 1.2.59 → 1.3.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/build/vite/index.ts +2 -12
- package/build/vite/optimize.ts +2 -2
- package/compress.js +36 -0
- package/package.json +114 -114
- package/src/App.vue +3 -5
- 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 +23 -13
- package/src/components/core/Tabbar/index.vue +5 -3
- package/src/components/data/XBadge/index.vue +2 -2
- package/src/components/data/XCellList/index.vue +10 -10
- package/src/components/data/XFormGroup/doc/FormGroupDemo.vue +4 -4
- package/src/components/data/XFormGroup/index.vue +11 -1
- package/src/components/data/XFormItem/index.vue +2 -22
- 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/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/layout/NormalDataLayout/index.vue +2 -3
- package/src/config/routes.ts +6 -2
- package/src/constants/index.ts +2 -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/router/routes.ts +0 -6
- package/src/router/types.ts +0 -2
- 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/XCellListView/index.vue +23 -72
- package/src/views/component/XFormGroupView/index.vue +7 -11
- package/src/views/component/XFormView/index.vue +2 -2
- package/tsconfig.json +5 -8
- package/uno.config.ts +32 -1
- package/vite.config.ts +1 -1
- 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
|
@@ -10,12 +10,14 @@ const props = withDefaults(defineProps<{
|
|
|
10
10
|
groupFormData?: object
|
|
11
11
|
mode?: string
|
|
12
12
|
isScrollspy?: boolean
|
|
13
|
+
formShow?: any
|
|
13
14
|
}>(), {
|
|
14
15
|
configName: '',
|
|
15
16
|
serviceName: undefined,
|
|
16
17
|
groupFormData: () => ({}),
|
|
17
18
|
mode: '查询',
|
|
18
19
|
isScrollspy: true,
|
|
20
|
+
formShow: undefined,
|
|
19
21
|
})
|
|
20
22
|
const emit = defineEmits(['submit', 'xFormItemEmitFunc'])
|
|
21
23
|
|
|
@@ -25,6 +27,7 @@ interface Form {
|
|
|
25
27
|
groupFormData?: object
|
|
26
28
|
mode?: string
|
|
27
29
|
isScrollspy?: boolean
|
|
30
|
+
formShow?: any
|
|
28
31
|
}
|
|
29
32
|
|
|
30
33
|
const groupItems = ref([])
|
|
@@ -38,6 +41,12 @@ const propsData = ref<Partial<Form>>({})
|
|
|
38
41
|
const slots = useSlots()
|
|
39
42
|
const renderableGroupItems = computed(() => {
|
|
40
43
|
return groupItems.value.filter((item) => {
|
|
44
|
+
if (props.formShow && (item.groupName || item.slotName)) {
|
|
45
|
+
const showKey = `show${item.groupName || item.slotName}`
|
|
46
|
+
if (props.formShow[showKey] === false) {
|
|
47
|
+
return false
|
|
48
|
+
}
|
|
49
|
+
}
|
|
41
50
|
if (item.formGroupType === 'slot') {
|
|
42
51
|
return !!(item.slotName && slots[item.slotName])
|
|
43
52
|
}
|
|
@@ -53,6 +62,7 @@ function init(params: Form) {
|
|
|
53
62
|
serviceName: props.serviceName,
|
|
54
63
|
groupFormData: props.groupFormData,
|
|
55
64
|
mode: props.mode,
|
|
65
|
+
formShow: props.formShow,
|
|
56
66
|
...params,
|
|
57
67
|
}
|
|
58
68
|
formData.value = propsData.value.groupFormData
|
|
@@ -141,7 +151,7 @@ defineExpose({ init, removeRef, xFormListRef })
|
|
|
141
151
|
>
|
|
142
152
|
<div
|
|
143
153
|
class="x-form-group-item"
|
|
144
|
-
:class="{ 'is-last': index ===
|
|
154
|
+
:class="{ 'is-last': index === renderableGroupItems.length - 1 }"
|
|
145
155
|
>
|
|
146
156
|
<div v-if="item.describe && propsData.isScrollspy && (item.groupName || item.slotName)" class="form-group-title">
|
|
147
157
|
<span class="form-group-bar" />
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import type { FieldType } from 'vant'
|
|
3
3
|
import type { Numeric } from 'vant/es/utils'
|
|
4
4
|
import ImageUploader from '@af-mobile-client-vue3/components/core/ImageUploader/index.vue'
|
|
5
|
-
import Uploader from '@af-mobile-client-vue3/components/core/Uploader/index.vue'
|
|
6
5
|
import XGridDropOption from '@af-mobile-client-vue3/components/core/XGridDropOption/index.vue'
|
|
7
6
|
import XMultiSelect from '@af-mobile-client-vue3/components/core/XMultiSelect/index.vue'
|
|
8
7
|
import XSelect from '@af-mobile-client-vue3/components/core/XSelect/index.vue'
|
|
@@ -964,29 +963,9 @@ function findOptionInTree(options, value) {
|
|
|
964
963
|
</VanField>
|
|
965
964
|
|
|
966
965
|
<!-- 文件上传 -->
|
|
967
|
-
<VanField
|
|
968
|
-
v-if="attr.type === 'file' && showItem"
|
|
969
|
-
name="uploader"
|
|
970
|
-
:label="labelData"
|
|
971
|
-
:label-align="labelAlign"
|
|
972
|
-
:input-align="attr.inputAlign ? attr.inputAlign : 'left'"
|
|
973
|
-
:rules="[{ required: attr.rule.required === 'true', message: `请选择${attr.name}` }]"
|
|
974
|
-
:required="attr.rule.required === 'true'"
|
|
975
|
-
>
|
|
976
|
-
<template #input>
|
|
977
|
-
<!-- <van-uploader v-model="localValue" /> -->
|
|
978
|
-
<Uploader
|
|
979
|
-
upload-mode="server"
|
|
980
|
-
:image-list="(modelData as any[])"
|
|
981
|
-
authority="admin"
|
|
982
|
-
@update-file-list="updateFile"
|
|
983
|
-
/>
|
|
984
|
-
</template>
|
|
985
|
-
</VanField>
|
|
986
|
-
|
|
987
966
|
<!-- 图片上传, 手机端拍照 -->
|
|
988
967
|
<VanField
|
|
989
|
-
v-if="attr.type === 'image' && showItem"
|
|
968
|
+
v-if="(attr.type === 'image' || attr.type === 'file') && showItem"
|
|
990
969
|
name="image"
|
|
991
970
|
:label="labelData"
|
|
992
971
|
:label-align="labelAlign"
|
|
@@ -1000,6 +979,7 @@ function findOptionInTree(options, value) {
|
|
|
1000
979
|
:image-list="(modelData as any[])"
|
|
1001
980
|
authority="admin"
|
|
1002
981
|
:attr="attr"
|
|
982
|
+
:mode="props.mode"
|
|
1003
983
|
@update-file-list="updateFile"
|
|
1004
984
|
/>
|
|
1005
985
|
</template>
|
|
@@ -81,10 +81,10 @@ initComponent()
|
|
|
81
81
|
function initComponent() {
|
|
82
82
|
for (let i = 0; i < props.jsonConfig.content.length; i++) {
|
|
83
83
|
receivedFunction.push({
|
|
84
|
-
// eslint-disable-next-line no-
|
|
85
|
-
labelFunction:
|
|
86
|
-
// eslint-disable-next-line no-
|
|
87
|
-
valueFunction:
|
|
84
|
+
// eslint-disable-next-line no-new-func
|
|
85
|
+
labelFunction: new Function(`return ${props.jsonConfig.content[i].customFunctionForLabel}`)(),
|
|
86
|
+
// eslint-disable-next-line no-new-func
|
|
87
|
+
valueFunction: new Function(`return ${props.jsonConfig.content[i].customFunctionForValue}`)(),
|
|
88
88
|
})
|
|
89
89
|
}
|
|
90
90
|
formatConfig()
|
|
@@ -127,25 +127,25 @@ function initComponent() {
|
|
|
127
127
|
</template>
|
|
128
128
|
|
|
129
129
|
<style scoped lang="less">
|
|
130
|
-
.main{
|
|
130
|
+
.main {
|
|
131
131
|
padding-top: 4vh;
|
|
132
132
|
width: 100vw;
|
|
133
133
|
height: 100vh;
|
|
134
134
|
background-color: #eff2f5;
|
|
135
135
|
|
|
136
|
-
.title{
|
|
136
|
+
.title {
|
|
137
137
|
padding-bottom: 2vh;
|
|
138
138
|
color: rgb(50, 50, 51);
|
|
139
139
|
text-align: center;
|
|
140
140
|
margin: 0 0 3vh;
|
|
141
141
|
}
|
|
142
142
|
|
|
143
|
-
.text_box{
|
|
143
|
+
.text_box {
|
|
144
144
|
margin-top: 2vh;
|
|
145
145
|
margin-bottom: 2vh;
|
|
146
146
|
}
|
|
147
147
|
|
|
148
|
-
.main_text{
|
|
148
|
+
.main_text {
|
|
149
149
|
padding-left: 16px;
|
|
150
150
|
font-weight: 400;
|
|
151
151
|
line-height: 1.6;
|
|
@@ -154,53 +154,53 @@ function initComponent() {
|
|
|
154
154
|
font-size: 14px;
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
.show_value_item{
|
|
157
|
+
.show_value_item {
|
|
158
158
|
text-align: center;
|
|
159
159
|
font-size: 1.2em;
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
-
.cell_group{
|
|
162
|
+
.cell_group {
|
|
163
163
|
margin-top: 2vh;
|
|
164
164
|
margin-bottom: 2vh;
|
|
165
165
|
}
|
|
166
166
|
|
|
167
|
-
.form_item{
|
|
167
|
+
.form_item {
|
|
168
168
|
margin-top: 2vh;
|
|
169
169
|
}
|
|
170
170
|
|
|
171
|
-
.button_group{
|
|
171
|
+
.button_group {
|
|
172
172
|
text-align: center;
|
|
173
173
|
margin-top: 3vh;
|
|
174
174
|
margin-bottom: 3vh;
|
|
175
175
|
}
|
|
176
176
|
|
|
177
|
-
.button_group
|
|
177
|
+
.button_group > :first-child {
|
|
178
178
|
margin-right: 3vw;
|
|
179
179
|
}
|
|
180
180
|
|
|
181
|
-
.divider{
|
|
181
|
+
.divider {
|
|
182
182
|
color: #1989fa;
|
|
183
183
|
border-color: #1989fa;
|
|
184
|
-
padding: 0 16px
|
|
184
|
+
padding: 0 16px;
|
|
185
185
|
}
|
|
186
186
|
|
|
187
|
-
.submit_button{
|
|
187
|
+
.submit_button {
|
|
188
188
|
background-color: #eff2f5;
|
|
189
189
|
padding: 5vh;
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
192
|
|
|
193
|
-
.skeleton{
|
|
194
|
-
margin-top: 5vh
|
|
193
|
+
.skeleton {
|
|
194
|
+
margin-top: 5vh;
|
|
195
195
|
}
|
|
196
|
-
.my-cell-group{
|
|
197
|
-
margin: 0 0 10px 0
|
|
196
|
+
.my-cell-group {
|
|
197
|
+
margin: 0 0 10px 0;
|
|
198
198
|
}
|
|
199
199
|
:deep(.van-collapse-item__content) {
|
|
200
200
|
background-color: #eff2f5;
|
|
201
201
|
padding: 10px 0;
|
|
202
202
|
}
|
|
203
|
-
:deep(.van-cell-group__title){
|
|
203
|
+
:deep(.van-cell-group__title) {
|
|
204
204
|
padding-top: 10px;
|
|
205
205
|
padding-bottom: 10px;
|
|
206
206
|
}
|
|
@@ -210,7 +210,7 @@ function initComponent() {
|
|
|
210
210
|
:deep(.van-cell__title) {
|
|
211
211
|
font-weight: 600;
|
|
212
212
|
}
|
|
213
|
-
:deep(.van-uploader__wrapper){
|
|
213
|
+
:deep(.van-uploader__wrapper) {
|
|
214
214
|
padding: 10px;
|
|
215
215
|
display: flex;
|
|
216
216
|
flex-wrap: wrap;
|
|
@@ -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
|
|
|
@@ -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'))
|
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
|
]
|