Browse Source

解决关联选项设置隐藏时options错乱bug

lwx_v8
liwenxuan 2 years ago
parent
commit
880fffd651
  1. 7
      src/components/DesignForm/public/form/formItem.vue

7
src/components/DesignForm/public/form/formItem.vue

@ -69,6 +69,7 @@ const control = computed(() => {
// return props.data
})
const options = ref(props.data.options)
//console.log("FormItem*********************************************************"+JSON.stringify(props.data))
const changeEvent = inject(constControlChange, '') as any
const updateModel = (val: any) => {
let controlAttribute = ""
@ -552,7 +553,7 @@ const imgUploadApiUrl = import.meta.env.VITE_APP_BASE_API+"/api/upordown"
<el-radio
:key="index"
:label="transformOption(item.value)"
v-for="(item, index) in options"
v-for="(item, index) in props.data.options"
>
<span :style="getFormItemInputStyle(configStyle,5)">{{ item.label }}</span>
@ -566,7 +567,7 @@ const imgUploadApiUrl = import.meta.env.VITE_APP_BASE_API+"/api/upordown"
:style="getFormItemInputStyle(configStyle,4)"
>
<el-checkbox
v-for="(item, index) in options"
v-for="(item, index) in props.data.options"
:key="index"
:label="transformOption(item.value)"
>
@ -580,7 +581,7 @@ const imgUploadApiUrl = import.meta.env.VITE_APP_BASE_API+"/api/upordown"
:data="data"
:disabled="editDisabled"
v-model="value"
:options="options"
:options="props.data.options"
:remote-method="getAxiosOptions"
:transformOption="transformOption"
/>

Loading…
Cancel
Save