vue2-client 1.8.222 → 1.8.225
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/package.json
CHANGED
|
@@ -6,8 +6,9 @@
|
|
|
6
6
|
<a-form-model-item
|
|
7
7
|
:ref="attr.model"
|
|
8
8
|
:label="attr.name"
|
|
9
|
-
:labelCol="layout === 'inline' && attr.occupyCol?labelAndWrapperCol[attr.occupyCol].labelCol:undefined"
|
|
10
|
-
:wrapperCol="layout === 'inline'&& attr.occupyCol? labelAndWrapperCol[attr.occupyCol].wrapperCol:undefined"
|
|
9
|
+
:labelCol="layout === 'inline' && attr.occupyCol ? labelAndWrapperCol[attr.occupyCol].labelCol:undefined"
|
|
10
|
+
:wrapperCol="layout === 'inline'&& attr.occupyCol ? labelAndWrapperCol[attr.occupyCol].wrapperCol:undefined"
|
|
11
|
+
:style="layout === 'inline'&& attr.occupyCol && attr.occupyCol > 1? {width:`calc(100% - ${attr.occupyCol * 1.533}rem)`}:{}"
|
|
11
12
|
:prop="attr.prop ? attr.prop : attr.model">
|
|
12
13
|
<a-input-group v-if="attr.inputOnAfterName && attr.inputOnAfterFunc" compact>
|
|
13
14
|
<a-input
|
|
@@ -538,6 +539,7 @@ export default {
|
|
|
538
539
|
},
|
|
539
540
|
created () {
|
|
540
541
|
this.init()
|
|
542
|
+
this.debouncedUpdateOptions = debounce(this.updateOptions, 200)
|
|
541
543
|
},
|
|
542
544
|
computed: {
|
|
543
545
|
...mapState('account', { currUser: 'user' })
|
|
@@ -553,18 +555,18 @@ export default {
|
|
|
553
555
|
handler (newVal) {
|
|
554
556
|
// 如果是从函数获取 options
|
|
555
557
|
if (this.attr.keyName && (this.attr.keyName.toString().indexOf('async ') !== -1 || this.attr.keyName.toString().indexOf('function') !== -1)) {
|
|
556
|
-
|
|
557
|
-
if (this.attr.keyName && (this.attr.keyName.indexOf('async ') !== -1 || this.attr.keyName.indexOf('function ') !== -1)) {
|
|
558
|
-
this.optionForFunc = await executeStrFunction(this.attr.keyName, [this.form, runLogic])
|
|
559
|
-
}
|
|
560
|
-
}
|
|
561
|
-
updateOptions()
|
|
558
|
+
this.debouncedUpdateOptions()
|
|
562
559
|
}
|
|
563
560
|
},
|
|
564
561
|
deep: true
|
|
565
562
|
}
|
|
566
563
|
},
|
|
567
564
|
methods: {
|
|
565
|
+
async updateOptions () {
|
|
566
|
+
if (this.attr.keyName && (this.attr.keyName.indexOf('async ') !== -1 || this.attr.keyName.indexOf('function ') !== -1)) {
|
|
567
|
+
this.optionForFunc = await executeStrFunction(this.attr.keyName, [this.form, runLogic])
|
|
568
|
+
}
|
|
569
|
+
},
|
|
568
570
|
init () {
|
|
569
571
|
if (this.mode === '新增/修改' && !this.attr.flex) {
|
|
570
572
|
if (['horizontal', 'vertical'].includes(this.layout)) {
|
|
@@ -692,7 +694,10 @@ export default {
|
|
|
692
694
|
if (this.getDataParams && this.getDataParams[this.attr.model]) {
|
|
693
695
|
Object.assign(value, this.getDataParams[this.attr.model])
|
|
694
696
|
}
|
|
695
|
-
runLogic(logic, value,
|
|
697
|
+
runLogic(logic, Object.assign(value, {
|
|
698
|
+
orgId: this.currUser.orgid,
|
|
699
|
+
userId: this.currUser.id
|
|
700
|
+
}), this.serviceName, this.env === 'dev').then(res => {
|
|
696
701
|
callbackFun(res)
|
|
697
702
|
}).catch(e => {
|
|
698
703
|
callbackFun([])
|
|
@@ -122,7 +122,8 @@ export default {
|
|
|
122
122
|
formItems: res.formJson,
|
|
123
123
|
showSubmitBtn: false,
|
|
124
124
|
serviceName: this.serviceName,
|
|
125
|
-
modifyModelData: modifyModelData
|
|
125
|
+
modifyModelData: modifyModelData,
|
|
126
|
+
...res
|
|
126
127
|
}
|
|
127
128
|
params.showSubmitBtn = false
|
|
128
129
|
this.$nextTick(() => {
|