Commit bf18bcec6630033225e5e35024cdcd148c6881a7
Merge branch 'fix/linkedge' into 'main_dev'
fix: 修复场景联动查看模式下无法展开条件筛选 See merge request yunteng/thingskit-front!1021
Showing
3 changed files
with
13 additions
and
3 deletions
@@ -47,6 +47,7 @@ | @@ -47,6 +47,7 @@ | ||
47 | isClose: { type: Boolean, default: true }, | 47 | isClose: { type: Boolean, default: true }, |
48 | title: { type: String, default: '' }, | 48 | title: { type: String, default: '' }, |
49 | loading: { type: Boolean }, | 49 | loading: { type: Boolean }, |
50 | + defaultExpand: { type: Boolean, default: true }, | ||
50 | /** | 51 | /** |
51 | * Can it be expanded | 52 | * Can it be expanded |
52 | */ | 53 | */ |
@@ -75,7 +76,7 @@ | @@ -75,7 +76,7 @@ | ||
75 | 76 | ||
76 | const emit = defineEmits(['expand', 'change', 'hchange']); | 77 | const emit = defineEmits(['expand', 'change', 'hchange']); |
77 | 78 | ||
78 | - const show = ref(true); | 79 | + const show = ref(props.defaultExpand); |
79 | 80 | ||
80 | const { prefixCls } = useDesign('collapse-container'); | 81 | const { prefixCls } = useDesign('collapse-container'); |
81 | 82 |
@@ -53,6 +53,8 @@ | @@ -53,6 +53,8 @@ | ||
53 | const index = unref(conditionListElRef).findIndex((item) => item.key === key); | 53 | const index = unref(conditionListElRef).findIndex((item) => item.key === key); |
54 | 54 | ||
55 | ~index && unref(conditionListElRef).splice(index, 1); | 55 | ~index && unref(conditionListElRef).splice(index, 1); |
56 | + | ||
57 | + handleConditionFormValueChange(); | ||
56 | }; | 58 | }; |
57 | 59 | ||
58 | const handleAdd = () => { | 60 | const handleAdd = () => { |
@@ -82,7 +84,7 @@ | @@ -82,7 +84,7 @@ | ||
82 | 84 | ||
83 | <template> | 85 | <template> |
84 | <Card class="condition-filter-card !border-dashed !border-2 !border-gray-200 !rounded-lg"> | 86 | <Card class="condition-filter-card !border-dashed !border-2 !border-gray-200 !rounded-lg"> |
85 | - <CollapseContainer class="rounded-lg" :is-close="!disabledDrawer"> | 87 | + <CollapseContainer class="rounded-lg" :default-expand="!disabledDrawer"> |
86 | <template #title> | 88 | <template #title> |
87 | <section class="flex !p-2"> | 89 | <section class="flex !p-2"> |
88 | <div class="w-20 flex-grow-0 flex-shrink-0"> 条件筛选 </div> | 90 | <div class="w-20 flex-grow-0 flex-shrink-0"> 条件筛选 </div> |
@@ -76,7 +76,14 @@ | @@ -76,7 +76,14 @@ | ||
76 | </script> | 76 | </script> |
77 | 77 | ||
78 | <template> | 78 | <template> |
79 | - <BasicModal @register="registerModal" title="启用规则" :width="600" @ok="handleOk"> | 79 | + <BasicModal |
80 | + @register="registerModal" | ||
81 | + title="启用规则" | ||
82 | + :width="600" | ||
83 | + @ok="handleOk" | ||
84 | + :cancel-text="disabledDrawer ? '关闭' : '取消'" | ||
85 | + :show-ok-btn="!disabledDrawer" | ||
86 | + > | ||
80 | <BasicForm @register="register" :disabled="disabledDrawer"> | 87 | <BasicForm @register="register" :disabled="disabledDrawer"> |
81 | <template #custom="{ model, field }"> | 88 | <template #custom="{ model, field }"> |
82 | <CustomRule ref="customRuleElRef" v-model:value="model[field]" /> | 89 | <CustomRule ref="customRuleElRef" v-model:value="model[field]" /> |