From 0328db0491c8ec1453b8c6fefc5cefe17f619803 Mon Sep 17 00:00:00 2001 From: zhangyu Date: Sun, 25 Jun 2023 14:52:20 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=20el-seleect=20=E5=8F=AF=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=E6=9D=A1=E7=9B=AE=20=E4=BB=A5=E5=8F=8A=20el-autocompl?= =?UTF-8?q?ete=20=E6=B7=BB=E5=8A=A0=E6=9C=80=E5=A4=A7=E9=95=BF=E5=BA=A6?= =?UTF-8?q?=E4=B8=BA64=E7=9A=84=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/common/elSelect/MyElSelect.vue | 8 ++++++++ .../src/components/common/filterSearch/filterSearch.vue | 4 ++-- .../components/common/project/meta2d/meta2dElement.vue | 6 +++--- .../common/rightBox/administration/modelBox.vue | 2 +- .../src/components/common/rightBox/alertSilenceBox.vue | 1 + .../src/components/common/rightBox/chart/chartConfig.vue | 4 ++-- .../components/common/rightBox/chart/otherChartConfig.vue | 2 +- .../common/rightBox/chart/systemChartConfig.vue | 4 ++-- nezha-fronted/src/components/common/rightBox/issueBox.vue | 2 +- .../src/components/common/rightBox/moduleBox.vue | 1 + .../common/rightBox/trafficSetting/trafficSettingTab.vue | 2 ++ .../src/components/common/searchBox/searchBox.vue | 2 +- 12 files changed, 25 insertions(+), 13 deletions(-) diff --git a/nezha-fronted/src/components/common/elSelect/MyElSelect.vue b/nezha-fronted/src/components/common/elSelect/MyElSelect.vue index 0b5eb7cf2..f4f1ec53f 100644 --- a/nezha-fronted/src/components/common/elSelect/MyElSelect.vue +++ b/nezha-fronted/src/components/common/elSelect/MyElSelect.vue @@ -48,6 +48,7 @@ :class="[selectSize ? `is-${ selectSize }` : '']" :disabled="selectDisabled" :autocomplete="autoComplete || autocomplete" + :maxlength = "maxlength" @focus="handleFocus" @blur="softFocus = false" @click.stop @@ -72,6 +73,7 @@ v-model="selectedLabel" type="text" :placeholder="currentPlaceholder" + :maxlength = "maxlength" :name="name" :id="id" :autocomplete="autoComplete || autocomplete" @@ -301,6 +303,9 @@ export default { popperAppendToBody: { type: Boolean, default: true + }, + maxlength: { + type: Number } }, @@ -332,6 +337,9 @@ export default { }, watch: { + maxlength (n) { + console.log(n) + }, selectDisabled () { this.$nextTick(() => { this.resetInputHeight() diff --git a/nezha-fronted/src/components/common/filterSearch/filterSearch.vue b/nezha-fronted/src/components/common/filterSearch/filterSearch.vue index 0b2d8f76e..8f3f4343e 100644 --- a/nezha-fronted/src/components/common/filterSearch/filterSearch.vue +++ b/nezha-fronted/src/components/common/filterSearch/filterSearch.vue @@ -12,7 +12,7 @@
- +
@@ -806,7 +806,7 @@
- +
@@ -1087,7 +1087,7 @@ :title="legend.legend" style="width: 100%" filterable - allow-create + allow-create :maxlength="64" default-first-option clearable> diff --git a/nezha-fronted/src/components/common/rightBox/administration/modelBox.vue b/nezha-fronted/src/components/common/rightBox/administration/modelBox.vue index 596db3b05..b4cfe6e31 100644 --- a/nezha-fronted/src/components/common/rightBox/administration/modelBox.vue +++ b/nezha-fronted/src/components/common/rightBox/administration/modelBox.vue @@ -15,7 +15,7 @@ - + diff --git a/nezha-fronted/src/components/common/rightBox/alertSilenceBox.vue b/nezha-fronted/src/components/common/rightBox/alertSilenceBox.vue index f3ca52d5a..6a7a880db 100644 --- a/nezha-fronted/src/components/common/rightBox/alertSilenceBox.vue +++ b/nezha-fronted/src/components/common/rightBox/alertSilenceBox.vue @@ -75,6 +75,7 @@ popper-class="right-box-select-top right-public-box-dropdown-top" placeholder="key" size="mini" + :maxlength="64" @select="handleSelect" > diff --git a/nezha-fronted/src/components/common/rightBox/chart/chartConfig.vue b/nezha-fronted/src/components/common/rightBox/chart/chartConfig.vue index 68b789548..7a11db015 100644 --- a/nezha-fronted/src/components/common/rightBox/chart/chartConfig.vue +++ b/nezha-fronted/src/components/common/rightBox/chart/chartConfig.vue @@ -940,7 +940,7 @@ style="margin-right: 10px" @change="change('valueMapping', index)" filterable - allow-create + allow-create :maxlength="64" default-first-option > --> @@ -177,6 +178,7 @@ :trigger-on-focus="true" popper-class="no-style-class" size="mini" + :maxlength="64" :highlight-first-item="true" @input="ifIndexInputChange(scope.row[item.prop],scope.row,scope.$index)" > diff --git a/nezha-fronted/src/components/common/searchBox/searchBox.vue b/nezha-fronted/src/components/common/searchBox/searchBox.vue index a780527ad..46ac98c95 100644 --- a/nezha-fronted/src/components/common/searchBox/searchBox.vue +++ b/nezha-fronted/src/components/common/searchBox/searchBox.vue @@ -78,7 +78,7 @@ v-model="editDialogObj.value" multiple filterable - allow-create + allow-create :maxlength="64" default-first-option >