@kizmann/nano-ui 0.8.33 → 0.8.34
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/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/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
|
@@ -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
|
|