improve multiselect

This commit is contained in:
LouisLam 2021-08-08 21:14:29 +08:00
parent 3265c3cbc3
commit 9fa8d5c1fa
2 changed files with 20 additions and 13 deletions

View file

@ -162,8 +162,8 @@
border-color: $dark-border-color; border-color: $dark-border-color;
} }
.multiselect__option--selected.multiselect__option--highlight { .multiselect--above .multiselect__content-wrapper {
border-color: $dark-border-color;
} }
.multiselect__option--selected { .multiselect__option--selected {

View file

@ -107,6 +107,7 @@
:preserve-search="true" :preserve-search="true"
placeholder="Pick Accepted Status Codes..." placeholder="Pick Accepted Status Codes..."
:preselect-first="false" :preselect-first="false"
:max-height="600"
:taggable="true" :taggable="true"
></VueMultiselect> ></VueMultiselect>
@ -161,25 +162,17 @@ export default {
NotificationDialog, NotificationDialog,
VueMultiselect, VueMultiselect,
}, },
data() { data() {
let acceptedStatusCodeOptions = [
"100-199",
"200-299",
"300-399",
"400-499",
"500-599",
];
for (let i = 100; i <= 999; i++) {
acceptedStatusCodeOptions.push(i.toString());
}
return { return {
processing: false, processing: false,
monitor: { monitor: {
notificationIDList: {}, notificationIDList: {},
}, },
acceptedStatusCodeOptions, acceptedStatusCodeOptions: [],
} }
}, },
computed: { computed: {
pageName() { pageName() {
return (this.isAdd) ? "Add New Monitor" : "Edit" return (this.isAdd) ? "Add New Monitor" : "Edit"
@ -198,6 +191,20 @@ export default {
}, },
mounted() { mounted() {
this.init(); this.init();
let acceptedStatusCodeOptions = [
"100-199",
"200-299",
"300-399",
"400-499",
"500-599",
];
for (let i = 100; i <= 999; i++) {
acceptedStatusCodeOptions.push(i.toString());
}
this.acceptedStatusCodeOptions = acceptedStatusCodeOptions;
}, },
methods: { methods: {
init() { init() {