goodteditor-ui 1.0.94 → 1.0.95
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
}">
|
|
28
28
|
<ui-badge
|
|
29
29
|
class="mar-none mar-right-2"
|
|
30
|
-
theme="
|
|
30
|
+
:theme="selectedBadgeTheme"
|
|
31
31
|
size="small"
|
|
32
32
|
:key="index"
|
|
33
|
-
removable
|
|
33
|
+
:removable="isSelectedRemovable"
|
|
34
34
|
@click.native.stop
|
|
35
35
|
@remove="deselectOption(option)">
|
|
36
36
|
<span>{{ getOptionLabel(option) }}</span>
|
|
@@ -79,20 +79,23 @@
|
|
|
79
79
|
@slot Open state icon slot
|
|
80
80
|
-->
|
|
81
81
|
<slot name="icon-open" v-if="popoverShow">
|
|
82
|
-
<i
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
82
|
+
<i
|
|
83
|
+
class="icon mdi mdi-chevron-up"
|
|
84
|
+
:class="{
|
|
85
|
+
'mdi-18px': size === '',
|
|
86
|
+
'h-auto w-auto': size === 'small'
|
|
87
|
+
}"></i>
|
|
87
88
|
</slot>
|
|
88
89
|
<!--
|
|
89
90
|
@slot Close state icon slot
|
|
90
91
|
-->
|
|
91
92
|
<slot name="icon-close" v-else>
|
|
92
|
-
<i
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
93
|
+
<i
|
|
94
|
+
class="icon mdi mdi-chevron-down"
|
|
95
|
+
:class="{
|
|
96
|
+
'mdi-18px': size === '',
|
|
97
|
+
'h-auto w-auto': size === 'small'
|
|
98
|
+
}"></i>
|
|
96
99
|
</slot>
|
|
97
100
|
|
|
98
101
|
<ui-popover :show.sync="popoverShow" v-bind="popoverOptions">
|
|
@@ -375,7 +378,7 @@ export default {
|
|
|
375
378
|
itemHeight: {
|
|
376
379
|
type: String,
|
|
377
380
|
default: null
|
|
378
|
-
}
|
|
381
|
+
}
|
|
379
382
|
},
|
|
380
383
|
data() {
|
|
381
384
|
return {
|
|
@@ -388,8 +391,17 @@ export default {
|
|
|
388
391
|
* @return {object}
|
|
389
392
|
*/
|
|
390
393
|
cssClassExt() {
|
|
391
|
-
|
|
392
|
-
|
|
394
|
+
if (this.readonly) {
|
|
395
|
+
const { ['events-none']: eventsNone, ...cssClass } = this.cssClass;
|
|
396
|
+
return cssClass;
|
|
397
|
+
}
|
|
398
|
+
return this.cssClass;
|
|
399
|
+
},
|
|
400
|
+
selectedBadgeTheme() {
|
|
401
|
+
return this.disabled ? '' : 'primary';
|
|
402
|
+
},
|
|
403
|
+
isSelectedRemovable() {
|
|
404
|
+
return this.readonly === false && this.disabled === false;
|
|
393
405
|
}
|
|
394
406
|
},
|
|
395
407
|
watch: {
|
|
@@ -487,6 +499,9 @@ export default {
|
|
|
487
499
|
};
|
|
488
500
|
},
|
|
489
501
|
selectOption(option) {
|
|
502
|
+
if (this.readonly) {
|
|
503
|
+
return;
|
|
504
|
+
}
|
|
490
505
|
if (this.isOptionSelected(option)) {
|
|
491
506
|
return;
|
|
492
507
|
}
|
|
@@ -502,6 +517,9 @@ export default {
|
|
|
502
517
|
this.triggerModelChange(rollback);
|
|
503
518
|
},
|
|
504
519
|
deselectOption(option) {
|
|
520
|
+
if (this.readonly) {
|
|
521
|
+
return;
|
|
522
|
+
}
|
|
505
523
|
if (!this.multiple) {
|
|
506
524
|
this.popoverShow = false;
|
|
507
525
|
return;
|