File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 5050 }
5151 },
5252 methods: {
53+ isMultiple () {
54+ return this .parentSelect .multiple ;
55+ },
5356 setParentOption () {
54- if (! this .parentSelect . multiple ) {
57+ if (! this .isMultiple () ) {
5558 this .parentSelect .selectOption (this .value , this .$refs .item .textContent );
5659 } else {
5760 this .check = ! this .check ;
6467 },
6568 watch: {
6669 isSelected (selected ) {
67- if (this .parentSelect . multiple ) {
70+ if (this .isMultiple () ) {
6871 this .check = selected;
6972 }
7073 },
9093 this .parentSelect .multipleOptions [this .index ] = {};
9194 this .parentSelect .options [this .index ] = this ;
9295
93- if (this .parentSelect .value === this .value ) {
96+ if (this .isMultiple () && this . parentSelect . value . indexOf ( this . value ) >= 0 || this . parentSelect .value === this .value ) {
9497 this .setParentOption ();
9598 }
9699 },
You can’t perform that action at this time.
0 commit comments