@kizmann/nano-ui 0.8.34 → 0.8.36
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
|
@@ -15,6 +15,14 @@ export default {
|
|
|
15
15
|
type: [Object]
|
|
16
16
|
},
|
|
17
17
|
|
|
18
|
+
extraValue: {
|
|
19
|
+
default()
|
|
20
|
+
{
|
|
21
|
+
return null;
|
|
22
|
+
},
|
|
23
|
+
type: [Object]
|
|
24
|
+
},
|
|
25
|
+
|
|
18
26
|
config: {
|
|
19
27
|
default()
|
|
20
28
|
{
|
|
@@ -36,7 +44,7 @@ export default {
|
|
|
36
44
|
data()
|
|
37
45
|
{
|
|
38
46
|
return {
|
|
39
|
-
tempValue: this.modelValue
|
|
47
|
+
tempValue: this.modelValue, sempValue: this.extraValue || this.modelValue
|
|
40
48
|
};
|
|
41
49
|
},
|
|
42
50
|
|
|
@@ -46,6 +54,12 @@ export default {
|
|
|
46
54
|
if ( value !== this.tempValue ) {
|
|
47
55
|
this.tempValue = value;
|
|
48
56
|
}
|
|
57
|
+
},
|
|
58
|
+
|
|
59
|
+
extraValue: function (value) {
|
|
60
|
+
if ( value !== this.sempValue ) {
|
|
61
|
+
this.sempValue = value;
|
|
62
|
+
}
|
|
49
63
|
}
|
|
50
64
|
|
|
51
65
|
},
|
|
@@ -101,7 +115,7 @@ export default {
|
|
|
101
115
|
}
|
|
102
116
|
|
|
103
117
|
let sources = {
|
|
104
|
-
$scope: this.scope, $model: this.tempValue, $global: window
|
|
118
|
+
$scope: this.scope, $model: this.tempValue, $extra: this.sempValue, $global: window
|
|
105
119
|
};
|
|
106
120
|
|
|
107
121
|
if ( exists ) {
|
|
@@ -170,7 +184,7 @@ export default {
|
|
|
170
184
|
}
|
|
171
185
|
|
|
172
186
|
let sources = {
|
|
173
|
-
$scope: this.scope, $model: this.tempValue, $global: window
|
|
187
|
+
$scope: this.scope, $model: this.tempValue, $extra: this.sempValue, $global: window
|
|
174
188
|
};
|
|
175
189
|
|
|
176
190
|
let result = Obj.get(sources, value.replace(/^!+/, ''));
|
|
@@ -193,7 +207,7 @@ export default {
|
|
|
193
207
|
}
|
|
194
208
|
|
|
195
209
|
let sources = {
|
|
196
|
-
$scope: this.scope, $model: this.tempValue, $global: window
|
|
210
|
+
$scope: this.scope, $model: this.tempValue, $extra: this.sempValue, $global: window
|
|
197
211
|
};
|
|
198
212
|
|
|
199
213
|
if ( ! Any.isNull(fallback) && Obj.get(sources, prop, -1337) === -1337 ) {
|
|
@@ -210,7 +224,7 @@ export default {
|
|
|
210
224
|
}
|
|
211
225
|
|
|
212
226
|
let sources = {
|
|
213
|
-
$scope: this.scope, $model: this.tempValue, $global: window
|
|
227
|
+
$scope: this.scope, $model: this.tempValue, $extra: this.sempValue, $global: window
|
|
214
228
|
};
|
|
215
229
|
|
|
216
230
|
Obj.set(sources, prop, value);
|
|
@@ -152,6 +152,14 @@ export default {
|
|
|
152
152
|
|
|
153
153
|
},
|
|
154
154
|
|
|
155
|
+
computed: {
|
|
156
|
+
|
|
157
|
+
deepDisabled() {
|
|
158
|
+
return this.NFormItem ? this.NFormItem.disabled(this.disabled) :
|
|
159
|
+
this.disabled;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
},
|
|
155
163
|
|
|
156
164
|
watch: {
|
|
157
165
|
|
|
@@ -246,7 +254,7 @@ export default {
|
|
|
246
254
|
|
|
247
255
|
let props = {};
|
|
248
256
|
|
|
249
|
-
if ( ! this.
|
|
257
|
+
if ( ! this.deepDisabled ) {
|
|
250
258
|
props.onMousedown = this.clearDatetimepicker;
|
|
251
259
|
}
|
|
252
260
|
|
|
@@ -270,7 +278,7 @@ export default {
|
|
|
270
278
|
{
|
|
271
279
|
let props = {
|
|
272
280
|
value: '',
|
|
273
|
-
disabled: this.
|
|
281
|
+
disabled: this.deepDisabled,
|
|
274
282
|
placeholder: this.placeholder,
|
|
275
283
|
onInput: this.onValueInput,
|
|
276
284
|
};
|
|
@@ -357,7 +365,7 @@ export default {
|
|
|
357
365
|
size: this.size,
|
|
358
366
|
position: this.position,
|
|
359
367
|
scrollClose: true,
|
|
360
|
-
disabled: this.
|
|
368
|
+
disabled: this.deepDisabled
|
|
361
369
|
};
|
|
362
370
|
|
|
363
371
|
let slots = {
|
|
@@ -391,7 +399,7 @@ export default {
|
|
|
391
399
|
classList.push('n-focus');
|
|
392
400
|
}
|
|
393
401
|
|
|
394
|
-
if ( this.
|
|
402
|
+
if ( this.deepDisabled ) {
|
|
395
403
|
classList.push('n-disabled');
|
|
396
404
|
}
|
|
397
405
|
|