mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-29 21:28:52 +00:00
fix(select2): 默认添加clearable属性 (#240)
* fix(select2): 默认添加clearable属性 Co-authored-by: OrangeM21 <orangemtony@gmail.com>
This commit is contained in:
@@ -76,6 +76,9 @@ export default {
|
||||
case 'field':
|
||||
type = ''
|
||||
field.component = Select2
|
||||
if (fieldMeta.required) {
|
||||
field.el.clearable = false
|
||||
}
|
||||
break
|
||||
case 'string':
|
||||
type = 'input'
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
:remote-method="filterOptions"
|
||||
:multiple="multiple"
|
||||
filterable
|
||||
:clearable="clearable"
|
||||
popper-append-to-body
|
||||
class="select2"
|
||||
v-bind="$attrs"
|
||||
@@ -69,6 +70,10 @@ export default {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
clearable: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
// 初始化值,也就是选中的值
|
||||
value: {
|
||||
type: [Array, String, Number, Boolean],
|
||||
|
||||
Reference in New Issue
Block a user