fix: el-seleect 可创建条目 以及 el-autocomplete 添加最大长度为64的限制
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<div class="condition__column">
|
||||
<div v-if="meta.nameIsEditing">
|
||||
<el-select
|
||||
allow-create
|
||||
allow-create :maxlength="64"
|
||||
filterable
|
||||
size="mini"
|
||||
v-model="meta.name"
|
||||
@@ -35,7 +35,7 @@
|
||||
<div class="condition__column">
|
||||
<div v-if="meta.operIsEditing">
|
||||
<el-select
|
||||
allow-create
|
||||
allow-create :maxlength="64"
|
||||
filterable
|
||||
size="mini"
|
||||
v-model="meta.oper"
|
||||
|
||||
@@ -466,7 +466,7 @@
|
||||
</el-select>
|
||||
</div>
|
||||
<div style="display: inline-block;width: calc(70% - 13px);margin-left: 10px">
|
||||
<el-select v-model="pen.data.textLegend" size="small" filterable allow-create clearable default-first-option>
|
||||
<el-select v-model="pen.data.textLegend" size="small" filterable allow-create :maxlength="64" clearable default-first-option>
|
||||
<el-option v-for="item in queryValues.filter(query => (query.parent === pen.data.textParent) && query.type === 'item')" :key="item.id" :value="item.name" :label='item.name' :title="item.name" style="width: 302px"> </el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
@@ -806,7 +806,7 @@
|
||||
</el-select>
|
||||
</div>
|
||||
<div style="display: inline-block;width: calc(70% - 13px);margin-left: 10px">
|
||||
<el-select v-model="pen.data.legend" size="small" filterable allow-create clearable default-first-option>
|
||||
<el-select v-model="pen.data.legend" size="small" filterable allow-create :maxlength="64" clearable default-first-option>
|
||||
<el-option class="text-ellipsis" v-for="item in queryValues.filter(query => (query.parent === pen.data.parent) && query.type === 'item')" :key="item.id" :value="item.name" :label='item.name' :title="item.name" style="width: 302px;"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
@@ -1087,7 +1087,7 @@
|
||||
:title="legend.legend"
|
||||
style="width: 100%"
|
||||
filterable
|
||||
allow-create
|
||||
allow-create :maxlength="64"
|
||||
default-first-option
|
||||
clearable>
|
||||
<el-option class="text-ellipsis" v-for="item in queryValues.filter(query => (query.parent === legend.parent) && query.type === 'item')" :key="item.id" :value="item.name" :label='item.name' :title='item.name' style="width: 300px"></el-option>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
</el-form-item>
|
||||
<!--brand-->
|
||||
<el-form-item :label='$t("asset.brand")' prop="brandId">
|
||||
<el-select value-key="id" allow-create class="right-box__select" popper-class="right-box-select-top prevent-clickoutside" :filterable="true" v-model="editModel.brandId" placeholder="" size="small" id="module-box-input-project">
|
||||
<el-select value-key="id" allow-create :maxlength="64" class="right-box__select" popper-class="right-box-select-top prevent-clickoutside" :filterable="true" v-model="editModel.brandId" placeholder="" size="small" id="module-box-input-project">
|
||||
<el-option :id="'module-project-'+item.id" v-for="item in brandList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
@@ -75,6 +75,7 @@
|
||||
popper-class="right-box-select-top right-public-box-dropdown-top"
|
||||
placeholder="key"
|
||||
size="mini"
|
||||
:maxlength="64"
|
||||
@select="handleSelect"
|
||||
></el-autocomplete>
|
||||
</el-form-item>
|
||||
|
||||
@@ -940,7 +940,7 @@
|
||||
style="margin-right: 10px"
|
||||
@change="change('valueMapping', index)"
|
||||
filterable
|
||||
allow-create
|
||||
allow-create :maxlength="64"
|
||||
default-first-option
|
||||
>
|
||||
<el-option
|
||||
@@ -1018,7 +1018,7 @@
|
||||
size="small"
|
||||
@change="change"
|
||||
filterable
|
||||
allow-create
|
||||
allow-create :maxlength="64"
|
||||
default-first-option
|
||||
>
|
||||
<el-option
|
||||
|
||||
@@ -195,7 +195,7 @@
|
||||
size="small"
|
||||
@change="change"
|
||||
filterable
|
||||
allow-create
|
||||
allow-create :maxlength="64"
|
||||
default-first-option
|
||||
>
|
||||
<el-option
|
||||
|
||||
@@ -690,7 +690,7 @@
|
||||
style="margin-right: 10px"
|
||||
@change="change('valueMapping', index)"
|
||||
filterable
|
||||
allow-create
|
||||
allow-create :maxlength="64"
|
||||
default-first-option
|
||||
>
|
||||
<el-option
|
||||
@@ -769,7 +769,7 @@
|
||||
size="small"
|
||||
@change="change"
|
||||
filterable
|
||||
allow-create
|
||||
allow-create :maxlength="64"
|
||||
default-first-option
|
||||
>
|
||||
<el-option
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
:placeholder="editIssue.type"
|
||||
style="margin-right: 10px"
|
||||
filterable
|
||||
allow-create
|
||||
allow-create :maxlength="64"
|
||||
default-first-option
|
||||
>
|
||||
<el-option
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
<!-- <el-input placeholder="" v-model=""></el-input>-->
|
||||
<el-autocomplete
|
||||
id="module-box-input-pattern"
|
||||
:maxlength="64"
|
||||
v-model="editModule.endpointNameTmpl"
|
||||
:fetch-suggestions="querySearch"
|
||||
:placeholder="$t('overall.placeHolder')"
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
id="traffic-setting-asset"
|
||||
popper-class="no-style-class"
|
||||
size="small"
|
||||
:maxlength="64"
|
||||
v-model="assetSetting.host"
|
||||
></el-autocomplete>
|
||||
<el-popover @hide="popHide" @show="popShow" placement="bottom" popper-class="no-style-class" trigger="hover">
|
||||
@@ -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)"
|
||||
></el-autocomplete>
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
v-model="editDialogObj.value"
|
||||
multiple
|
||||
filterable
|
||||
allow-create
|
||||
allow-create :maxlength="64"
|
||||
default-first-option
|
||||
>
|
||||
<el-option
|
||||
|
||||
Reference in New Issue
Block a user