Skip to content

Commit d29fa28

Browse files
authored
Merge pull request #1794 from shentao/1793-publish-31
Publish 3.1.0
2 parents 408eba4 + 59a3c5f commit d29fa28

40 files changed

+348
-168
lines changed

dist/vue-multiselect.common.js

+44-27
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/vue-multiselect.common.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/vue-multiselect.esm.js

+21-5
Original file line numberDiff line numberDiff line change
@@ -999,6 +999,15 @@ var script = {
999999
type: Boolean,
10001000
default: false
10011001
},
1002+
/**
1003+
* Enables search input's spellcheck if true.
1004+
* @default false
1005+
* @type {Boolean}
1006+
*/
1007+
spellcheck: {
1008+
type: Boolean,
1009+
default: false
1010+
},
10021011
/**
10031012
* Fixed opening direction
10041013
* @default ''
@@ -1024,6 +1033,10 @@ var script = {
10241033
tabindex: {
10251034
type: Number,
10261035
default: 0
1036+
},
1037+
required: {
1038+
type: Boolean,
1039+
default: false
10271040
}
10281041
},
10291042
computed: {
@@ -1197,8 +1210,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
11971210
id: _ctx.id,
11981211
type: "text",
11991212
autocomplete: "off",
1200-
spellcheck: false,
1213+
spellcheck: $props.spellcheck,
12011214
placeholder: _ctx.placeholder,
1215+
required: $props.required,
12021216
style: $options.inputStyle,
12031217
value: _ctx.search,
12041218
disabled: $props.disabled,
@@ -1215,7 +1229,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
12151229
onKeypress: _cache[8] || (_cache[8] = withKeys(withModifiers($event => (_ctx.addPointerElement($event)), ["prevent","stop","self"]), ["enter"])),
12161230
class: "multiselect__input",
12171231
"aria-controls": 'listbox-'+_ctx.id
1218-
}, null, 44 /* STYLE, PROPS, HYDRATE_EVENTS */, ["name", "id", "placeholder", "value", "disabled", "tabindex", "aria-controls"]))
1232+
}, null, 44 /* STYLE, PROPS, HYDRATE_EVENTS */, ["name", "id", "spellcheck", "placeholder", "required", "value", "disabled", "tabindex", "aria-controls"]))
12191233
: createCommentVNode("v-if", true),
12201234
($options.isSingleLabelVisible)
12211235
? (openBlock(), createBlock("span", {
@@ -1254,7 +1268,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
12541268
class: "multiselect__content",
12551269
style: $options.contentStyle,
12561270
role: "listbox",
1257-
id: 'listbox-'+_ctx.id
1271+
id: 'listbox-'+_ctx.id,
1272+
"aria-multiselectable": _ctx.multiple
12581273
}, [
12591274
renderSlot(_ctx.$slots, "beforeList"),
12601275
(_ctx.multiple && _ctx.max === _ctx.internalValue.length)
@@ -1271,6 +1286,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
12711286
return (openBlock(), createBlock("li", {
12721287
class: "multiselect__element",
12731288
key: index,
1289+
"aria-selected": _ctx.isSelected(option),
12741290
id: _ctx.id + '-' + index,
12751291
role: !(option && (option.$isLabel || option.$isDisabled)) ? 'option' : null
12761292
}, [
@@ -1311,7 +1327,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
13111327
])
13121328
], 42 /* CLASS, PROPS, HYDRATE_EVENTS */, ["data-select", "data-deselect", "onMouseenter", "onMousedown"]))
13131329
: createCommentVNode("v-if", true)
1314-
], 8 /* PROPS */, ["id", "role"]))
1330+
], 8 /* PROPS */, ["aria-selected", "id", "role"]))
13151331
}), 128 /* KEYED_FRAGMENT */))
13161332
: createCommentVNode("v-if", true),
13171333
withDirectives(createVNode("li", null, [
@@ -1333,7 +1349,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
13331349
[vShow, $props.showNoOptions && ((_ctx.options.length === 0 || ($options.hasOptionGroup === true && _ctx.filteredOptions.length === 0)) && !_ctx.search && !$props.loading)]
13341350
]),
13351351
renderSlot(_ctx.$slots, "afterList")
1336-
], 12 /* STYLE, PROPS */, ["id"])
1352+
], 12 /* STYLE, PROPS */, ["id", "aria-multiselectable"])
13371353
], 36 /* STYLE, HYDRATE_EVENTS */), [
13381354
[vShow, _ctx.isOpen]
13391355
])

dist/vue-multiselect.js

+21-5
Original file line numberDiff line numberDiff line change
@@ -1000,6 +1000,15 @@ var VueMultiselect = (function (exports, vue) {
10001000
type: Boolean,
10011001
default: false
10021002
},
1003+
/**
1004+
* Enables search input's spellcheck if true.
1005+
* @default false
1006+
* @type {Boolean}
1007+
*/
1008+
spellcheck: {
1009+
type: Boolean,
1010+
default: false
1011+
},
10031012
/**
10041013
* Fixed opening direction
10051014
* @default ''
@@ -1025,6 +1034,10 @@ var VueMultiselect = (function (exports, vue) {
10251034
tabindex: {
10261035
type: Number,
10271036
default: 0
1037+
},
1038+
required: {
1039+
type: Boolean,
1040+
default: false
10281041
}
10291042
},
10301043
computed: {
@@ -1198,8 +1211,9 @@ var VueMultiselect = (function (exports, vue) {
11981211
id: _ctx.id,
11991212
type: "text",
12001213
autocomplete: "off",
1201-
spellcheck: false,
1214+
spellcheck: $props.spellcheck,
12021215
placeholder: _ctx.placeholder,
1216+
required: $props.required,
12031217
style: $options.inputStyle,
12041218
value: _ctx.search,
12051219
disabled: $props.disabled,
@@ -1216,7 +1230,7 @@ var VueMultiselect = (function (exports, vue) {
12161230
onKeypress: _cache[8] || (_cache[8] = vue.withKeys(vue.withModifiers($event => (_ctx.addPointerElement($event)), ["prevent","stop","self"]), ["enter"])),
12171231
class: "multiselect__input",
12181232
"aria-controls": 'listbox-'+_ctx.id
1219-
}, null, 44 /* STYLE, PROPS, HYDRATE_EVENTS */, ["name", "id", "placeholder", "value", "disabled", "tabindex", "aria-controls"]))
1233+
}, null, 44 /* STYLE, PROPS, HYDRATE_EVENTS */, ["name", "id", "spellcheck", "placeholder", "required", "value", "disabled", "tabindex", "aria-controls"]))
12201234
: vue.createCommentVNode("v-if", true),
12211235
($options.isSingleLabelVisible)
12221236
? (vue.openBlock(), vue.createBlock("span", {
@@ -1255,7 +1269,8 @@ var VueMultiselect = (function (exports, vue) {
12551269
class: "multiselect__content",
12561270
style: $options.contentStyle,
12571271
role: "listbox",
1258-
id: 'listbox-'+_ctx.id
1272+
id: 'listbox-'+_ctx.id,
1273+
"aria-multiselectable": _ctx.multiple
12591274
}, [
12601275
vue.renderSlot(_ctx.$slots, "beforeList"),
12611276
(_ctx.multiple && _ctx.max === _ctx.internalValue.length)
@@ -1272,6 +1287,7 @@ var VueMultiselect = (function (exports, vue) {
12721287
return (vue.openBlock(), vue.createBlock("li", {
12731288
class: "multiselect__element",
12741289
key: index,
1290+
"aria-selected": _ctx.isSelected(option),
12751291
id: _ctx.id + '-' + index,
12761292
role: !(option && (option.$isLabel || option.$isDisabled)) ? 'option' : null
12771293
}, [
@@ -1312,7 +1328,7 @@ var VueMultiselect = (function (exports, vue) {
13121328
])
13131329
], 42 /* CLASS, PROPS, HYDRATE_EVENTS */, ["data-select", "data-deselect", "onMouseenter", "onMousedown"]))
13141330
: vue.createCommentVNode("v-if", true)
1315-
], 8 /* PROPS */, ["id", "role"]))
1331+
], 8 /* PROPS */, ["aria-selected", "id", "role"]))
13161332
}), 128 /* KEYED_FRAGMENT */))
13171333
: vue.createCommentVNode("v-if", true),
13181334
vue.withDirectives(vue.createVNode("li", null, [
@@ -1334,7 +1350,7 @@ var VueMultiselect = (function (exports, vue) {
13341350
[vue.vShow, $props.showNoOptions && ((_ctx.options.length === 0 || ($options.hasOptionGroup === true && _ctx.filteredOptions.length === 0)) && !_ctx.search && !$props.loading)]
13351351
]),
13361352
vue.renderSlot(_ctx.$slots, "afterList")
1337-
], 12 /* STYLE, PROPS */, ["id"])
1353+
], 12 /* STYLE, PROPS */, ["id", "aria-multiselectable"])
13381354
], 36 /* STYLE, HYDRATE_EVENTS */), [
13391355
[vue.vShow, _ctx.isOpen]
13401356
])

0 commit comments

Comments
 (0)