Commit 6af5561a authored by 郭志伟's avatar 郭志伟

fix(select): 选择框问题修复

parent 8f05a5ff
......@@ -19,6 +19,12 @@
watch: {
selected(val) {
this.$emit('input', val);
},
value: {
immediate: true,
handler(val) {
this.selected = val;
}
}
}
}
......
......@@ -42,6 +42,9 @@ export default class DynamicForm extends Vue {
return cur.point.y > next.point.y ? 1 : -1;
});
this.list = list.map((element, index) => ({ id: element.id, label: element.title + '-' + element.id}));
if (!this.list.includes(item => item.id === this.selected)) {
this.selected = '';
}
// console.log('curEleIndex', pointY, this.pageData?.elements?.filter(v => pointY < v?.point?.y), this.list);
}
}
......@@ -29,7 +29,7 @@
@moved="movedEvent"
:style="transformStyle(item.commonStyle, item.name)"
:class="{'Dcmcp-item_selected': curEleIndex === index && curChildIndex === null}">
<component ref="container" :id="item.id" class="Dcmcp-item-com" @handleElementClick="handleElementClick" :containerIndex="index" :childItem="item" :is="item.name" :key="index" v-bind="item.props"></component>
<component ref="container" :id="item.id" class="Dcmcp-item-com" @handleElementClick="handleElementClick" :containerIndex="index" :childItem="item" :is="item.name" :key="item.point.i + index" v-bind="item.props"></component>
</grid-item>
<grid-item
v-if="pageData.props.showPageBottomTip"
......@@ -74,6 +74,7 @@
border-radius: 6px;
overflow: hidden;
}
width: 375px;
height: 619px;
min-height: 619px;
......
......@@ -80,7 +80,7 @@ export default class GoodsTabsMixin extends Vue {
this.pageData.elements.forEach(element => {
if (element.name === 'cs-goods-tabs' || element.name === 'cs-floor-nav') {
element.props?.list.forEach(item => {
if (selectedComponentIds.includes(item.componentId)) {
if (item.componentId && selectedComponentIds.includes(item.componentId)) {
throw new Error(`组件<${element.title}${element.id}>存在重复组件,请修改后继续操作`);
} else {
selectedComponentIds.push(item.componentId);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment