From 86e3f1ee9a2c4cb737ea5603f47cbe5c044c1e57 Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Mon, 1 Apr 2024 10:33:32 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E8=BF=87=E6=BB=A4=E7=BB=84=E4=BB=B6):=20?= =?UTF-8?q?=E4=B8=8B=E6=8B=89=E7=BB=84=E4=BB=B6=E5=8D=95=E9=80=89=E6=A1=86?= =?UTF-8?q?=E9=80=89=E4=B8=AD=E5=90=8E=E6=97=A0=E6=B3=95=E5=8F=96=E6=B6=88?= =?UTF-8?q?=E9=80=89=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../panel/filter/filterMain/FilterHead.vue | 40 +++++++++++++++---- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/core/frontend/src/views/panel/filter/filterMain/FilterHead.vue b/core/frontend/src/views/panel/filter/filterMain/FilterHead.vue index a8b044646b..45f183f3f8 100644 --- a/core/frontend/src/views/panel/filter/filterMain/FilterHead.vue +++ b/core/frontend/src/views/panel/filter/filterMain/FilterHead.vue @@ -55,6 +55,26 @@ >{{ $t('commons.required') }} + + 当前组件的展示风格为平铺,如果设为非必填,那么组件的展示风格将切换为下拉展示。 +
+ + {{ $t('commons.cancel') }} + {{ $t('commons.confirm') }} + +
+
@@ -77,18 +97,22 @@ export default { }, data() { return { - targets: [] + dialogVisible: false } - }, - computed: { - - }, - - created() { - }, methods: { + sureRequired() { + this.element.options.attrs.required = false + this.dialogVisible = false + }, requiredChange(val) { + if (val === false && (this.element.style.showMode && this.element.style.showMode === 'radio' && !this.element.options.attrs.multiple)) { + this.dialogVisible = true + this.$nextTick(() => { + this.element.options.attrs.required = true + }) + return + } this.$emit('required-change', val) }, getTableName(tableId) {