Merge pull request #2229 from cuneytsenturk/master

Seletbox add clear button
This commit is contained in:
Cüneyt Şentürk 2021-08-19 10:24:00 +03:00 committed by GitHub
commit 3b8b3de38e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 75 additions and 0 deletions

View File

@ -11,6 +11,7 @@
<el-select v-model="selected" :placeholder="placeholder" filterable <el-select v-model="selected" :placeholder="placeholder" filterable
@change="change" @visible-change="visibleChange" @remove-tag="removeTag" @clear="clear" @blur="blur" @focus="focus" @change="change" @visible-change="visibleChange" @remove-tag="removeTag" @clear="clear" @blur="blur" @focus="focus"
:clearable="clearable"
:disabled="disabled" :disabled="disabled"
:multiple="multiple" :multiple="multiple"
:readonly="readonly" :readonly="readonly"
@ -247,6 +248,12 @@ export default {
description: "Selectbox disabled status" description: "Selectbox disabled status"
}, },
clearable: {
type: Boolean,
default: true,
description: "Selectbox clearable status"
},
disabled: { disabled: {
type: Boolean, type: Boolean,
default: false, default: false,

View File

@ -11,6 +11,7 @@
<el-select v-model="selected" :placeholder="placeholder" filterable remote reserve-keyword <el-select v-model="selected" :placeholder="placeholder" filterable remote reserve-keyword
@change="change" @visible-change="visibleChange" @remove-tag="removeTag" @clear="clear" @blur="blur" @focus="focus" @change="change" @visible-change="visibleChange" @remove-tag="removeTag" @clear="clear" @blur="blur" @focus="focus"
:clearable="clearable"
:disabled="disabled" :disabled="disabled"
:multiple="multiple" :multiple="multiple"
:readonly="readonly" :readonly="readonly"
@ -110,6 +111,7 @@
<span v-else> <span v-else>
<el-select v-model="selected" :placeholder="placeholder" filterable remote reserve-keyword <el-select v-model="selected" :placeholder="placeholder" filterable remote reserve-keyword
@change="change" @visible-change="visibleChange" @remove-tag="removeTag" @clear="clear" @blur="blur" @focus="focus" @change="change" @visible-change="visibleChange" @remove-tag="removeTag" @clear="clear" @blur="blur" @focus="focus"
:clearable="clearable"
:disabled="disabled" :disabled="disabled"
:multiple="multiple" :multiple="multiple"
:readonly="readonly" :readonly="readonly"
@ -338,6 +340,12 @@ export default {
description: "Selectbox disabled status" description: "Selectbox disabled status"
}, },
clearable: {
type: Boolean,
default: true,
description: "Selectbox clearable status"
},
disabled: { disabled: {
type: Boolean, type: Boolean,
default: false, default: false,

View File

@ -79,6 +79,12 @@
:readonly="{{ $attributes['readonly'] }}" :readonly="{{ $attributes['readonly'] }}"
@endif @endif
@if (isset($attributes['clearable']))
:clearable="{{ $attributes['clearable'] }}"
@else
clearable
@endif
@if (isset($attributes['disabled'])) @if (isset($attributes['disabled']))
:disabled="{{ $attributes['disabled'] }}" :disabled="{{ $attributes['disabled'] }}"
@endif @endif

View File

@ -57,6 +57,12 @@
:readonly="{{ $attributes['readonly'] }}" :readonly="{{ $attributes['readonly'] }}"
@endif @endif
@if (isset($attributes['clearable']))
:clearable="{{ $attributes['clearable'] }}"
@else
clearable
@endif
@if (isset($attributes['disabled'])) @if (isset($attributes['disabled']))
:disabled="{{ $attributes['disabled'] }}" :disabled="{{ $attributes['disabled'] }}"
@endif @endif

View File

@ -81,6 +81,12 @@
:readonly="{{ $attributes['readonly'] }}" :readonly="{{ $attributes['readonly'] }}"
@endif @endif
@if (isset($attributes['clearable']))
:clearable="{{ $attributes['clearable'] }}"
@else
clearable
@endif
@if (isset($attributes['disabled'])) @if (isset($attributes['disabled']))
:disabled="{{ $attributes['disabled'] }}" :disabled="{{ $attributes['disabled'] }}"
@endif @endif

View File

@ -59,6 +59,12 @@
:readonly="{{ $attributes['readonly'] }}" :readonly="{{ $attributes['readonly'] }}"
@endif @endif
@if (isset($attributes['clearable']))
:clearable="{{ $attributes['clearable'] }}"
@else
clearable
@endif
@if (isset($attributes['disabled'])) @if (isset($attributes['disabled']))
:disabled="{{ $attributes['disabled'] }}" :disabled="{{ $attributes['disabled'] }}"
@endif @endif

View File

@ -73,6 +73,12 @@
:readonly="{{ $attributes['readonly'] }}" :readonly="{{ $attributes['readonly'] }}"
@endif @endif
@if (isset($attributes['clearable']))
:clearable="{{ $attributes['clearable'] }}"
@else
clearable
@endif
@if (isset($attributes['disabled'])) @if (isset($attributes['disabled']))
:disabled="{{ $attributes['disabled'] }}" :disabled="{{ $attributes['disabled'] }}"
@endif @endif

View File

@ -51,6 +51,12 @@
:readonly="{{ $attributes['readonly'] }}" :readonly="{{ $attributes['readonly'] }}"
@endif @endif
@if (isset($attributes['clearable']))
:clearable="{{ $attributes['clearable'] }}"
@else
clearable
@endif
@if (isset($attributes['disabled'])) @if (isset($attributes['disabled']))
:disabled="{{ $attributes['disabled'] }}" :disabled="{{ $attributes['disabled'] }}"
@endif @endif

View File

@ -75,6 +75,12 @@
:readonly="{{ $attributes['readonly'] }}" :readonly="{{ $attributes['readonly'] }}"
@endif @endif
@if (isset($attributes['clearable']))
:clearable="{{ $attributes['clearable'] }}"
@else
clearable
@endif
@if (isset($attributes['disabled'])) @if (isset($attributes['disabled']))
:disabled="{{ $attributes['disabled'] }}" :disabled="{{ $attributes['disabled'] }}"
@endif @endif

View File

@ -53,6 +53,12 @@
:readonly="{{ $attributes['readonly'] }}" :readonly="{{ $attributes['readonly'] }}"
@endif @endif
@if (isset($attributes['clearable']))
:clearable="{{ $attributes['clearable'] }}"
@else
clearable
@endif
@if (isset($attributes['disabled'])) @if (isset($attributes['disabled']))
:disabled="{{ $attributes['disabled'] }}" :disabled="{{ $attributes['disabled'] }}"
@endif @endif

View File

@ -75,6 +75,12 @@
:readonly="{{ $attributes['readonly'] }}" :readonly="{{ $attributes['readonly'] }}"
@endif @endif
@if (isset($attributes['clearable']))
:clearable="{{ $attributes['clearable'] }}"
@else
clearable
@endif
@if (isset($attributes['disabled'])) @if (isset($attributes['disabled']))
:disabled="{{ $attributes['disabled'] }}" :disabled="{{ $attributes['disabled'] }}"
@endif @endif

View File

@ -53,6 +53,12 @@
:readonly="{{ $attributes['readonly'] }}" :readonly="{{ $attributes['readonly'] }}"
@endif @endif
@if (isset($attributes['clearable']))
:clearable="{{ $attributes['clearable'] }}"
@else
clearable
@endif
@if (isset($attributes['disabled'])) @if (isset($attributes['disabled']))
:disabled="{{ $attributes['disabled'] }}" :disabled="{{ $attributes['disabled'] }}"
@endif @endif