vue2-client 1.6.45 → 1.6.46
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/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -162,18 +162,18 @@
|
|
|
162
162
|
:prop="attr.model">
|
|
163
163
|
<a-radio-group v-model="form[attr.model]">
|
|
164
164
|
<template v-if="attr.keys">
|
|
165
|
-
<a-radio v-for="(item,index) in attr.keys" :key="index" :value="item.value"
|
|
165
|
+
<a-radio v-for="(item,index) in attr.keys" :key="index" :value="item.value">
|
|
166
166
|
{{ item.label }}
|
|
167
167
|
</a-radio>
|
|
168
168
|
</template>
|
|
169
169
|
<template v-else>
|
|
170
170
|
<template v-if="attr.keyName.indexOf('logic@') !== -1">
|
|
171
|
-
<a-radio v-for="(item,index) in option" :key="index" :value="item.value"
|
|
171
|
+
<a-radio v-for="(item,index) in option" :key="index" :value="item.value">
|
|
172
172
|
{{ item.label }}
|
|
173
173
|
</a-radio>
|
|
174
174
|
</template>
|
|
175
175
|
<template v-else>
|
|
176
|
-
<a-radio v-for="(item,index) in $appdata.getDictionaryList(attr.keyName)" :key="index" :value="item.value"
|
|
176
|
+
<a-radio v-for="(item,index) in $appdata.getDictionaryList(attr.keyName)" :key="index" :value="item.value">
|
|
177
177
|
{{ item.text }}
|
|
178
178
|
</a-radio>
|
|
179
179
|
</template>
|
|
@@ -431,8 +431,27 @@ export default {
|
|
|
431
431
|
mode: this.mode,
|
|
432
432
|
disabled: this.disabled
|
|
433
433
|
})
|
|
434
|
+
} else if (this.attr.type === 'radio') {
|
|
435
|
+
this.initRadioValue()
|
|
434
436
|
}
|
|
435
437
|
})
|
|
438
|
+
} else {
|
|
439
|
+
this.initRadioValue()
|
|
440
|
+
}
|
|
441
|
+
},
|
|
442
|
+
initRadioValue () {
|
|
443
|
+
const model = this.attr.model
|
|
444
|
+
if (this.mode === '新增/修改' && this.attr.type === 'radio' && !this.form[model]) {
|
|
445
|
+
if (this.attr.keys && this.attr.keys.length > 0) {
|
|
446
|
+
this.form[model] = this.attr.keys[0].value
|
|
447
|
+
} else if (this.option && this.option.length > 0) {
|
|
448
|
+
this.form[model] = this.option[0].value
|
|
449
|
+
} else if (this.attr.keyName) {
|
|
450
|
+
const list = this.$appdata.getDictionaryList(this.attr.keyName)
|
|
451
|
+
if (list.length > 0) {
|
|
452
|
+
this.form[model] = list[0].value
|
|
453
|
+
}
|
|
454
|
+
}
|
|
436
455
|
}
|
|
437
456
|
},
|
|
438
457
|
openChangeOne (status) {
|