@kizmann/nano-ui 0.8.33 → 0.8.35
Sign up to get free protection for your applications and to get access to all the features.
- package/demos/overview.html +9 -1
- package/dist/nano-ui.css +1 -1
- package/dist/nano-ui.js +1 -1
- package/dist/nano-ui.js.map +1 -1
- package/package.json +1 -1
- package/src/config/src/config/config-next.js +19 -5
- package/src/form/src/form-item/form-item.scss +1 -1
- package/src/input-number/src/input-number/input-number.js +9 -0
- package/src/select/src/select/select.js +19 -6
- package/src/switch/src/switch/switch.js +20 -3
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 {};
|
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
|
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);
|
@@ -60,7 +60,7 @@
|
|
60
60
|
|
61
61
|
.n-form-item--#{$suffix} .n-form-item__condition {
|
62
62
|
font-size: $-form-item-font - 2;
|
63
|
-
padding: $-form-item-size * $-form-item-ratio * 0.
|
63
|
+
padding: $-form-item-size * $-form-item-ratio * 0.15 $-form-item-size * $-form-item-ratio * 0.75;
|
64
64
|
}
|
65
65
|
|
66
66
|
.n-form-item--#{$suffix} .n-form-item__label {
|
@@ -4,6 +4,14 @@ export default {
|
|
4
4
|
|
5
5
|
name: 'NSelect',
|
6
6
|
|
7
|
+
inject: {
|
8
|
+
|
9
|
+
NFormItem: {
|
10
|
+
default: undefined
|
11
|
+
}
|
12
|
+
|
13
|
+
},
|
14
|
+
|
7
15
|
props: {
|
8
16
|
|
9
17
|
modelValue: {
|
@@ -152,6 +160,11 @@ export default {
|
|
152
160
|
|
153
161
|
computed: {
|
154
162
|
|
163
|
+
deepDisabled() {
|
164
|
+
return this.NFormItem ? this.NFormItem.disabled(this.disabled) :
|
165
|
+
this.disabled;
|
166
|
+
},
|
167
|
+
|
155
168
|
empty()
|
156
169
|
{
|
157
170
|
return Any.isEmpty(this.tempValue);
|
@@ -494,7 +507,7 @@ export default {
|
|
494
507
|
|
495
508
|
let props = {};
|
496
509
|
|
497
|
-
if ( ! this.
|
510
|
+
if ( ! this.deepDisabled ) {
|
498
511
|
props.onMousedown = this.clear;
|
499
512
|
}
|
500
513
|
|
@@ -524,7 +537,7 @@ export default {
|
|
524
537
|
class: nano.Icons.times,
|
525
538
|
};
|
526
539
|
|
527
|
-
if ( ! this.
|
540
|
+
if ( ! this.deepDisabled ) {
|
528
541
|
props.onMousedown = (event) => this.toggleOption(value, event);
|
529
542
|
}
|
530
543
|
|
@@ -589,7 +602,7 @@ export default {
|
|
589
602
|
let props = {
|
590
603
|
value: this.search,
|
591
604
|
placeholder: this.placeholder,
|
592
|
-
disabled: this.
|
605
|
+
disabled: this.deepDisabled,
|
593
606
|
onFocus: this.onFocusInput,
|
594
607
|
onInput: this.onInputInput,
|
595
608
|
onKeydown: this.onKeydownInput
|
@@ -635,7 +648,7 @@ export default {
|
|
635
648
|
let props = {
|
636
649
|
value: this.search,
|
637
650
|
placeholder: this.placeholder,
|
638
|
-
disabled: this.
|
651
|
+
disabled: this.deepDisabled,
|
639
652
|
onFocus: this.onFocusInput,
|
640
653
|
onInput: this.onInputInput,
|
641
654
|
onKeydown: this.onKeydownInput
|
@@ -721,7 +734,7 @@ export default {
|
|
721
734
|
listen: true,
|
722
735
|
size: this.size,
|
723
736
|
scrollClose: true,
|
724
|
-
disabled: this.
|
737
|
+
disabled: this.deepDisabled,
|
725
738
|
onClose: this.resetInput
|
726
739
|
};
|
727
740
|
|
@@ -774,7 +787,7 @@ export default {
|
|
774
787
|
classList.push('n-focus');
|
775
788
|
}
|
776
789
|
|
777
|
-
if ( this.
|
790
|
+
if ( this.deepDisabled ) {
|
778
791
|
classList.push('n-disabled');
|
779
792
|
}
|
780
793
|
|
@@ -4,6 +4,14 @@ export default {
|
|
4
4
|
|
5
5
|
name: 'NSwitch',
|
6
6
|
|
7
|
+
inject: {
|
8
|
+
|
9
|
+
NFormItem: {
|
10
|
+
default: undefined
|
11
|
+
}
|
12
|
+
|
13
|
+
},
|
14
|
+
|
7
15
|
props: {
|
8
16
|
|
9
17
|
modelValue: {
|
@@ -58,6 +66,15 @@ export default {
|
|
58
66
|
|
59
67
|
},
|
60
68
|
|
69
|
+
computed: {
|
70
|
+
|
71
|
+
deepDisabled() {
|
72
|
+
return this.NFormItem ? this.NFormItem.disabled(this.disabled) :
|
73
|
+
this.disabled;
|
74
|
+
}
|
75
|
+
|
76
|
+
},
|
77
|
+
|
61
78
|
data()
|
62
79
|
{
|
63
80
|
return {
|
@@ -99,7 +116,7 @@ export default {
|
|
99
116
|
|
100
117
|
let props = {};
|
101
118
|
|
102
|
-
if ( ! this.
|
119
|
+
if ( ! this.deepDisabled ) {
|
103
120
|
props.onMousedown = this.eventClick;
|
104
121
|
}
|
105
122
|
|
@@ -122,7 +139,7 @@ export default {
|
|
122
139
|
|
123
140
|
let props = {};
|
124
141
|
|
125
|
-
if ( ! this.
|
142
|
+
if ( ! this.deepDisabled ) {
|
126
143
|
props.onMousedown = this.eventClick;
|
127
144
|
}
|
128
145
|
|
@@ -156,7 +173,7 @@ export default {
|
|
156
173
|
classList.push('n-off');
|
157
174
|
}
|
158
175
|
|
159
|
-
if ( this.
|
176
|
+
if ( this.deepDisabled ) {
|
160
177
|
classList.push('n-disabled');
|
161
178
|
}
|
162
179
|
|