goodteditor-ui 1.0.24 → 1.0.25
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
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
@slot Dropdown header slot
|
|
5
5
|
-->
|
|
6
6
|
<slot name="header"></slot>
|
|
7
|
-
<ul ref="ul">
|
|
7
|
+
<ul ref="ul" :style="{ maxHeight }">
|
|
8
8
|
<!--
|
|
9
9
|
@slot Label slot for single mode
|
|
10
10
|
@binding {Object} option option
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
:key="index"
|
|
28
28
|
@click="onOptionClick(option, index)"
|
|
29
29
|
>
|
|
30
|
-
<div class="text-truncate" style="min-height: calc(var(--line-height)*1rem)">
|
|
30
|
+
<div class="text-truncate" style="min-height: calc(var(--line-height) * 1rem)">
|
|
31
31
|
{{ option }}
|
|
32
32
|
</div>
|
|
33
33
|
</li>
|
|
@@ -73,10 +73,17 @@ export default {
|
|
|
73
73
|
size: {
|
|
74
74
|
type: String,
|
|
75
75
|
default: '',
|
|
76
|
-
validator: function(value) {
|
|
76
|
+
validator: function (value) {
|
|
77
77
|
return ['', 'small', 'large'].indexOf(value) >= 0;
|
|
78
78
|
},
|
|
79
79
|
},
|
|
80
|
+
/**
|
|
81
|
+
* Defines the max-height of the dropdown list (value may be any css unit/expression)
|
|
82
|
+
*/
|
|
83
|
+
maxHeight: {
|
|
84
|
+
type: String,
|
|
85
|
+
default: '',
|
|
86
|
+
},
|
|
80
87
|
/**
|
|
81
88
|
* The current cursor index position (.sync)
|
|
82
89
|
*/
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
<ui-datalist
|
|
38
38
|
class="w-100 pull-left"
|
|
39
39
|
@select-option="onDatalistSelectOption"
|
|
40
|
-
v-bind="{ size, options: suggestedOptions }"
|
|
40
|
+
v-bind="{ size, maxHeight: dropdownMaxHeight, options: suggestedOptions }"
|
|
41
41
|
:cursorIndex.sync="dataListCursorIndex"
|
|
42
42
|
ref="datalist"
|
|
43
43
|
>
|
|
@@ -51,14 +51,7 @@
|
|
|
51
51
|
-->
|
|
52
52
|
<slot name="noresults" v-if="!loading && !suggestedOptions.length"></slot>
|
|
53
53
|
</template>
|
|
54
|
-
<template
|
|
55
|
-
#option="{
|
|
56
|
-
option,
|
|
57
|
-
index,
|
|
58
|
-
cursorIndex,
|
|
59
|
-
setCursorIndex,
|
|
60
|
-
}"
|
|
61
|
-
>
|
|
54
|
+
<template #option="{ option, index, cursorIndex, setCursorIndex }">
|
|
62
55
|
<!--
|
|
63
56
|
@slot Dropdown option
|
|
64
57
|
@binding {String} option option label
|
|
@@ -159,7 +152,17 @@ export default {
|
|
|
159
152
|
type: Number,
|
|
160
153
|
default: 0,
|
|
161
154
|
},
|
|
155
|
+
/**
|
|
156
|
+
* Defines the dropdown's max-height
|
|
157
|
+
*/
|
|
158
|
+
dropdownMaxHeight: {
|
|
159
|
+
default: '',
|
|
160
|
+
},
|
|
161
|
+
/**
|
|
162
|
+
* Auto width
|
|
163
|
+
*/
|
|
162
164
|
autoWidth: {
|
|
165
|
+
type: Boolean,
|
|
163
166
|
default: true,
|
|
164
167
|
},
|
|
165
168
|
},
|
|
@@ -266,6 +269,11 @@ export default {
|
|
|
266
269
|
},
|
|
267
270
|
onInputBlur(e) {
|
|
268
271
|
this.rootHasFocus = false;
|
|
272
|
+
/**
|
|
273
|
+
* Blur event reemit
|
|
274
|
+
* @property {Event} event
|
|
275
|
+
*/
|
|
276
|
+
this.$emit('blur', e);
|
|
269
277
|
},
|
|
270
278
|
onInputFocus(e) {
|
|
271
279
|
this.rootHasFocus = true;
|