@nutui/nutui 4.0.0-beta.19 → 4.0.0-beta.20
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/dist/nutui.es.js +1 -1
- package/dist/nutui.umd.js +3 -3
- package/dist/packages/_es/ActionSheet.js +1 -6
- package/dist/packages/_es/AddressList.js +30 -54
- package/dist/packages/_es/Card.js +7 -14
- package/dist/packages/_es/Comment.js +4 -4
- package/dist/packages/_es/Countup.js +10 -5
- package/dist/packages/_es/Input.js +28 -29
- package/dist/packages/_es/NumberKeyboard.js +2 -2
- package/dist/packages/_es/Picker.js +2 -1
- package/dist/packages/_es/Progress.js +11 -7
- package/dist/packages/_es/PullRefresh.js +5 -5
- package/dist/packages/_es/Rate.js +17 -16
- package/dist/packages/_es/Searchbar.js +3 -3
- package/dist/packages/_es/ShortPassword.js +10 -10
- package/dist/packages/_es/Skeleton.js +1 -1
- package/dist/packages/_es/Tour.js +5 -5
- package/dist/packages/addresslist/index.scss +14 -3
- package/dist/packages/avatar/index.scss +1 -0
- package/dist/packages/badge/index.scss +2 -2
- package/dist/packages/cell/index.scss +2 -0
- package/dist/packages/comment/index.scss +1 -1
- package/dist/packages/indicator/index.scss +4 -4
- package/dist/packages/input/index.scss +6 -2
- package/dist/packages/progress/index.scss +2 -0
- package/dist/packages/pullrefresh/index.scss +1 -1
- package/dist/packages/rate/index.scss +4 -4
- package/dist/packages/searchbar/index.scss +4 -8
- package/dist/packages/tabbaritem/index.scss +4 -0
- package/dist/packages/textarea/index.scss +7 -1
- package/dist/packages/uploader/index.scss +1 -1
- package/dist/smartips/web-types.json +68 -122
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +49 -49
- package/dist/styles/themes/jdb.scss +49 -49
- package/dist/styles/themes/jddkh.scss +49 -49
- package/dist/styles/themes/jdt.scss +49 -49
- package/dist/styles/variables-jdb.scss +3 -3
- package/dist/styles/variables-jddkh.scss +3 -3
- package/dist/styles/variables-jdt.scss +3 -3
- package/dist/styles/variables.scss +3 -3
- package/dist/types/__VUE/actionsheet/index.vue.d.ts +0 -9
- package/dist/types/__VUE/addresslist/components/GeneralShell.vue.d.ts +3 -3
- package/dist/types/__VUE/addresslist/components/ItemContents.vue.d.ts +2 -2
- package/dist/types/__VUE/addresslist/index.vue.d.ts +5 -5
- package/dist/types/__VUE/card/index.vue.d.ts +0 -21
- package/dist/types/__VUE/input/index.vue.d.ts +6 -39
- package/dist/types/__VUE/progress/index.vue.d.ts +1 -0
- package/dist/types/__VUE/rate/index.vue.d.ts +15 -9
- package/dist/types/__VUE/shortpassword/index.vue.d.ts +1 -1
- package/dist/types/__VUE/tour/index.vue.d.ts +8 -8
- package/dist/types/index.d.ts +1 -1
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ref, computed, openBlock, createElementBlock, normalizeClass, Fragment, renderList, normalizeStyle, createElementVNode, createBlock, resolveDynamicComponent, createCommentVNode } from "vue";
|
|
2
|
+
import { StarFillN } from "@nutui/icons-vue";
|
|
3
3
|
import { c as createComponent } from "./component-81a4c1d0.js";
|
|
4
4
|
import { r as renderIcon } from "./renderIcon-3d0fd47c.js";
|
|
5
5
|
import { p as pxCheck } from "./pxCheck-c6b9f6b7.js";
|
|
@@ -17,12 +17,16 @@ const _sfc_main = create({
|
|
|
17
17
|
type: [String, Number],
|
|
18
18
|
default: 0
|
|
19
19
|
},
|
|
20
|
-
|
|
20
|
+
customIcon: {
|
|
21
21
|
type: Object,
|
|
22
22
|
default: () => {
|
|
23
|
-
return
|
|
23
|
+
return StarFillN;
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
|
+
size: {
|
|
27
|
+
type: [String, Number],
|
|
28
|
+
default: void 0
|
|
29
|
+
},
|
|
26
30
|
activeColor: {
|
|
27
31
|
type: String,
|
|
28
32
|
default: ""
|
|
@@ -52,7 +56,7 @@ const _sfc_main = create({
|
|
|
52
56
|
default: 14
|
|
53
57
|
}
|
|
54
58
|
},
|
|
55
|
-
components: {
|
|
59
|
+
components: { StarFillN },
|
|
56
60
|
emits: ["update:modelValue", "change"],
|
|
57
61
|
setup(props, { emit, slots }) {
|
|
58
62
|
const rateRefs = ref([]);
|
|
@@ -98,12 +102,12 @@ const _sfc_main = create({
|
|
|
98
102
|
const touch = useTouch();
|
|
99
103
|
const touchMethods = {
|
|
100
104
|
onTouchStart(event) {
|
|
101
|
-
if (!props.touchable)
|
|
105
|
+
if (!props.touchable || props.readonly)
|
|
102
106
|
return;
|
|
103
107
|
touch.start(event);
|
|
104
108
|
},
|
|
105
109
|
onTouchMove(event) {
|
|
106
|
-
if (!props.touchable
|
|
110
|
+
if (!props.touchable)
|
|
107
111
|
return;
|
|
108
112
|
touch.move(event);
|
|
109
113
|
if (touch.isHorizontal()) {
|
|
@@ -152,24 +156,21 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
152
156
|
style: normalizeStyle({ marginRight: _ctx.pxCheck(_ctx.spacing) })
|
|
153
157
|
}, [
|
|
154
158
|
createElementVNode("view", null, [
|
|
155
|
-
(openBlock(), createBlock(resolveDynamicComponent(_ctx.renderIcon(_ctx.
|
|
159
|
+
(openBlock(), createBlock(resolveDynamicComponent(_ctx.renderIcon(_ctx.customIcon, { width: _ctx.size, height: _ctx.size, size: _ctx.size, color: n <= _ctx.modelValue ? _ctx.activeColor : _ctx.voidColor })), {
|
|
156
160
|
class: normalizeClass(["nut-rate-item__icon", { "nut-rate-item__icon--disabled": _ctx.disabled || n > _ctx.modelValue }]),
|
|
157
|
-
color: n <= _ctx.modelValue ? _ctx.activeColor : _ctx.voidColor,
|
|
158
161
|
onClick: ($event) => _ctx.onClick(1, n)
|
|
159
|
-
}, null, 8, ["class", "
|
|
162
|
+
}, null, 8, ["class", "onClick"]))
|
|
160
163
|
]),
|
|
161
164
|
_ctx.allowHalf && Number(_ctx.modelValue) + 1 > n ? (openBlock(), createElementBlock("view", _hoisted_2, [
|
|
162
|
-
(openBlock(), createBlock(resolveDynamicComponent(_ctx.renderIcon(_ctx.
|
|
165
|
+
(openBlock(), createBlock(resolveDynamicComponent(_ctx.renderIcon(_ctx.customIcon, { width: _ctx.size, height: _ctx.size, size: _ctx.size, color: n <= Number(_ctx.modelValue) + 1 ? _ctx.activeColor : _ctx.voidColor })), {
|
|
163
166
|
class: "nut-rate-item__icon",
|
|
164
|
-
color: n <= Number(_ctx.modelValue) + 1 ? _ctx.activeColor : _ctx.voidColor,
|
|
165
167
|
onClick: ($event) => _ctx.onClick(2, n)
|
|
166
|
-
}, null, 8, ["
|
|
168
|
+
}, null, 8, ["onClick"]))
|
|
167
169
|
])) : _ctx.allowHalf && Number(_ctx.modelValue) + 1 < n ? (openBlock(), createElementBlock("view", _hoisted_3, [
|
|
168
|
-
(openBlock(), createBlock(resolveDynamicComponent(_ctx.renderIcon(_ctx.
|
|
170
|
+
(openBlock(), createBlock(resolveDynamicComponent(_ctx.renderIcon(_ctx.customIcon, { width: _ctx.size, height: _ctx.size, size: _ctx.size, color: _ctx.voidColor })), {
|
|
169
171
|
class: "nut-rate-item__icon nut-rate-item__icon--disabled",
|
|
170
|
-
color: _ctx.voidColor,
|
|
171
172
|
onClick: ($event) => _ctx.onClick(2, n)
|
|
172
|
-
}, null, 8, ["
|
|
173
|
+
}, null, 8, ["onClick"]))
|
|
173
174
|
])) : createCommentVNode("", true)
|
|
174
175
|
], 12, _hoisted_1);
|
|
175
176
|
}), 128))
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { reactive, computed, ref, onMounted, toRefs, openBlock, createElementBlock, normalizeStyle, toDisplayString, createCommentVNode, renderSlot, createElementVNode, withModifiers, withDirectives, createBlock, resolveDynamicComponent, vShow } from "vue";
|
|
1
|
+
import { reactive, computed, ref, onMounted, toRefs, openBlock, createElementBlock, normalizeStyle, toDisplayString, createCommentVNode, renderSlot, createElementVNode, withModifiers, normalizeClass, withDirectives, createBlock, resolveDynamicComponent, vShow } from "vue";
|
|
2
2
|
import { c as createComponent } from "./component-81a4c1d0.js";
|
|
3
3
|
import { r as renderIcon } from "./renderIcon-3d0fd47c.js";
|
|
4
4
|
import { CircleClose } from "@nutui/icons-vue";
|
|
@@ -211,7 +211,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
211
211
|
}, [
|
|
212
212
|
createElementVNode("input", {
|
|
213
213
|
ref: "inputsearch",
|
|
214
|
-
class: "nut-searchbar__input-bar",
|
|
214
|
+
class: normalizeClass(["nut-searchbar__input-bar", _ctx.clearable && "nut-searchbar__input-bar_clear"]),
|
|
215
215
|
type: _ctx.inputType,
|
|
216
216
|
maxlength: _ctx.maxLength,
|
|
217
217
|
placeholder: _ctx.placeholder || _ctx.translate("placeholder"),
|
|
@@ -223,7 +223,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
223
223
|
onFocus: _cache[3] || (_cache[3] = (...args) => _ctx.valueFocus && _ctx.valueFocus(...args)),
|
|
224
224
|
onBlur: _cache[4] || (_cache[4] = (...args) => _ctx.valueBlur && _ctx.valueBlur(...args)),
|
|
225
225
|
style: normalizeStyle(_ctx.styleSearchbar)
|
|
226
|
-
}, null,
|
|
226
|
+
}, null, 46, _hoisted_4)
|
|
227
227
|
], 32),
|
|
228
228
|
_ctx.clearable ? withDirectives((openBlock(), createElementBlock("view", {
|
|
229
229
|
key: 0,
|
|
@@ -51,10 +51,10 @@ const _sfc_main = create({
|
|
|
51
51
|
const realInput = ref(props.modelValue);
|
|
52
52
|
const comLen = computed(() => range(Number(props.length)));
|
|
53
53
|
const show = ref(props.visible);
|
|
54
|
-
|
|
54
|
+
const onTouchStart = (event) => {
|
|
55
55
|
event.stopPropagation();
|
|
56
56
|
emit("focus");
|
|
57
|
-
}
|
|
57
|
+
};
|
|
58
58
|
watch(
|
|
59
59
|
() => props.visible,
|
|
60
60
|
(value) => {
|
|
@@ -70,20 +70,20 @@ const _sfc_main = create({
|
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
);
|
|
73
|
-
|
|
73
|
+
const close = () => {
|
|
74
74
|
emit("update:visible", false);
|
|
75
75
|
emit("close");
|
|
76
|
-
}
|
|
77
|
-
|
|
76
|
+
};
|
|
77
|
+
const range = (val) => {
|
|
78
78
|
return Math.min(Math.max(4, val), 6);
|
|
79
|
-
}
|
|
80
|
-
|
|
79
|
+
};
|
|
80
|
+
const onTips = () => {
|
|
81
81
|
emit("tips");
|
|
82
|
-
}
|
|
82
|
+
};
|
|
83
83
|
return {
|
|
84
84
|
comLen,
|
|
85
85
|
realInput,
|
|
86
|
-
|
|
86
|
+
onTouchStart,
|
|
87
87
|
range,
|
|
88
88
|
close,
|
|
89
89
|
onTips,
|
|
@@ -130,7 +130,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
130
130
|
createElementVNode("div", _hoisted_3, [
|
|
131
131
|
createElementVNode("view", {
|
|
132
132
|
class: "nut-short-password__list",
|
|
133
|
-
onTouchstart: _cache[0] || (_cache[0] = (...args) => _ctx.
|
|
133
|
+
onTouchstart: _cache[0] || (_cache[0] = (...args) => _ctx.onTouchStart && _ctx.onTouchStart(...args))
|
|
134
134
|
}, [
|
|
135
135
|
(openBlock(true), createElementBlock(Fragment, null, renderList(new Array(_ctx.comLen), (sublen, index2) => {
|
|
136
136
|
return openBlock(), createElementBlock("view", {
|
|
@@ -15,7 +15,7 @@ const _sfc_main = create({
|
|
|
15
15
|
Close
|
|
16
16
|
},
|
|
17
17
|
props: {
|
|
18
|
-
|
|
18
|
+
modelValue: { type: Boolean, default: false },
|
|
19
19
|
type: {
|
|
20
20
|
type: String,
|
|
21
21
|
default: "step"
|
|
@@ -82,10 +82,10 @@ const _sfc_main = create({
|
|
|
82
82
|
default: true
|
|
83
83
|
}
|
|
84
84
|
},
|
|
85
|
-
emits: ["update:
|
|
85
|
+
emits: ["update:modelValue", "change", "close"],
|
|
86
86
|
setup(props, { emit }) {
|
|
87
87
|
const state = reactive({
|
|
88
|
-
showTour: props.
|
|
88
|
+
showTour: props.modelValue,
|
|
89
89
|
showPopup: false,
|
|
90
90
|
active: 0
|
|
91
91
|
});
|
|
@@ -130,7 +130,7 @@ const _sfc_main = create({
|
|
|
130
130
|
state.showTour = false;
|
|
131
131
|
state.showPopup = false;
|
|
132
132
|
emit("close", state.active);
|
|
133
|
-
emit("update:
|
|
133
|
+
emit("update:modelValue", false);
|
|
134
134
|
};
|
|
135
135
|
const handleClickMask = () => {
|
|
136
136
|
props.closeOnClickOverlay && close();
|
|
@@ -140,7 +140,7 @@ const _sfc_main = create({
|
|
|
140
140
|
getRootPosition();
|
|
141
141
|
});
|
|
142
142
|
watch(
|
|
143
|
-
() => props.
|
|
143
|
+
() => props.modelValue,
|
|
144
144
|
(val) => {
|
|
145
145
|
if (val) {
|
|
146
146
|
getRootPosition();
|
|
@@ -39,9 +39,6 @@
|
|
|
39
39
|
display: flex;
|
|
40
40
|
align-items: center;
|
|
41
41
|
position: relative;
|
|
42
|
-
&:last-child {
|
|
43
|
-
border-bottom: none;
|
|
44
|
-
}
|
|
45
42
|
&__mask {
|
|
46
43
|
position: absolute;
|
|
47
44
|
top: 0;
|
|
@@ -59,6 +56,7 @@
|
|
|
59
56
|
&-del {
|
|
60
57
|
height: 55px;
|
|
61
58
|
width: 55px;
|
|
59
|
+
padding: 0 10px;
|
|
62
60
|
border-radius: 50%;
|
|
63
61
|
text-align: center;
|
|
64
62
|
background-color: $white;
|
|
@@ -66,6 +64,7 @@
|
|
|
66
64
|
display: flex;
|
|
67
65
|
justify-content: center;
|
|
68
66
|
align-items: center;
|
|
67
|
+
box-sizing: border-box;
|
|
69
68
|
}
|
|
70
69
|
&-set {
|
|
71
70
|
color: $white;
|
|
@@ -77,6 +76,18 @@
|
|
|
77
76
|
}
|
|
78
77
|
}
|
|
79
78
|
}
|
|
79
|
+
&-general {
|
|
80
|
+
&:last-child {
|
|
81
|
+
border-bottom: none;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
.nut-swipe {
|
|
85
|
+
&:last-of-type {
|
|
86
|
+
.nut-address-list-swipe {
|
|
87
|
+
border-bottom: none;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
80
91
|
&-item {
|
|
81
92
|
width: 100%;
|
|
82
93
|
&__info {
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
position: relative;
|
|
11
11
|
display: inline-block;
|
|
12
12
|
.nut-badge__icon {
|
|
13
|
+
line-height: normal;
|
|
14
|
+
transform: $badge-content-transform;
|
|
13
15
|
position: absolute;
|
|
14
16
|
background: $badge-background-color;
|
|
15
|
-
top: -20%;
|
|
16
|
-
right: -20%;
|
|
17
17
|
padding: $badge-padding;
|
|
18
18
|
text-align: center;
|
|
19
19
|
border-radius: $badge-border-radius;
|
|
@@ -80,6 +80,7 @@
|
|
|
80
80
|
display: flex;
|
|
81
81
|
flex-direction: column;
|
|
82
82
|
flex: 1;
|
|
83
|
+
min-width: 80px;
|
|
83
84
|
&-desc {
|
|
84
85
|
font-size: $cell-title-desc-font;
|
|
85
86
|
}
|
|
@@ -87,6 +88,7 @@
|
|
|
87
88
|
&__value {
|
|
88
89
|
display: inline-block;
|
|
89
90
|
text-align: right;
|
|
91
|
+
flex: 1;
|
|
90
92
|
font-size: $cell-desc-font;
|
|
91
93
|
color: $cell-desc-color;
|
|
92
94
|
&--alone {
|
|
@@ -38,11 +38,11 @@
|
|
|
38
38
|
text-align: center;
|
|
39
39
|
font-size: $indicator-number-font-size;
|
|
40
40
|
line-height: $indicator-size;
|
|
41
|
-
color: $indicator-
|
|
41
|
+
color: $indicator-color;
|
|
42
42
|
vertical-align: middle;
|
|
43
|
-
border: 1px solid $indicator-
|
|
43
|
+
border: 1px solid $indicator-color;
|
|
44
44
|
border-radius: 50%;
|
|
45
|
-
background-color: $indicator-color;
|
|
46
|
-
box-shadow: 0 0 1px 1px $indicator-color;
|
|
45
|
+
background-color: $indicator-bg-color;
|
|
46
|
+
box-shadow: 0 0 1px 1px $indicator-bg-color;
|
|
47
47
|
}
|
|
48
48
|
}
|
|
@@ -28,7 +28,7 @@ textarea {
|
|
|
28
28
|
width: 100%;
|
|
29
29
|
padding: 10px 25px;
|
|
30
30
|
display: flex;
|
|
31
|
-
line-height:
|
|
31
|
+
line-height: 20px;
|
|
32
32
|
background: $white;
|
|
33
33
|
font-size: $input-font-size;
|
|
34
34
|
box-sizing: border-box;
|
|
@@ -53,7 +53,11 @@ textarea {
|
|
|
53
53
|
resize: none;
|
|
54
54
|
flex: 1;
|
|
55
55
|
}
|
|
56
|
-
|
|
56
|
+
.input-text {
|
|
57
|
+
font-size: $input-font-size;
|
|
58
|
+
height: auto;
|
|
59
|
+
min-height: auto;
|
|
60
|
+
}
|
|
57
61
|
&__label {
|
|
58
62
|
width: 80px;
|
|
59
63
|
overflow: hidden;
|
|
@@ -70,14 +70,7 @@
|
|
|
70
70
|
display: flex;
|
|
71
71
|
justify-content: center;
|
|
72
72
|
align-items: center;
|
|
73
|
-
|
|
74
|
-
z-index: 2;
|
|
75
|
-
top: 50%;
|
|
76
|
-
right: 0;
|
|
77
|
-
width: 16px;
|
|
78
|
-
height: 16px;
|
|
79
|
-
margin-top: -8px;
|
|
80
|
-
margin-right: 10px;
|
|
73
|
+
margin-right: 13px;
|
|
81
74
|
& .nut-searchbar__nut-icon-mask-close {
|
|
82
75
|
color: rgb(204, 204, 204);
|
|
83
76
|
&:hover {
|
|
@@ -86,6 +79,9 @@
|
|
|
86
79
|
}
|
|
87
80
|
}
|
|
88
81
|
}
|
|
82
|
+
.nut-searchbar__input-bar_clear {
|
|
83
|
+
padding-right: 10px;
|
|
84
|
+
}
|
|
89
85
|
}
|
|
90
86
|
|
|
91
87
|
.nut-searchbar__iptleft-search-icon {
|
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
background: $white;
|
|
15
15
|
font-size: $textarea-font;
|
|
16
16
|
padding: 10px 25px;
|
|
17
|
-
|
|
18
17
|
&--disabled {
|
|
19
18
|
.nut-textarea__textarea,
|
|
20
19
|
.nut-textarea____limit {
|
|
@@ -45,6 +44,12 @@
|
|
|
45
44
|
border: none;
|
|
46
45
|
resize: none;
|
|
47
46
|
line-height: 20px;
|
|
47
|
+
.taro-textarea {
|
|
48
|
+
font-size: 14px;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
&__textarea__readonly {
|
|
52
|
+
padding: 5px 10px;
|
|
48
53
|
}
|
|
49
54
|
&__ali {
|
|
50
55
|
line-height: 17px;
|
|
@@ -53,5 +58,6 @@
|
|
|
53
58
|
position: absolute;
|
|
54
59
|
top: -999999px;
|
|
55
60
|
left: -999999px;
|
|
61
|
+
font-size: 14px;
|
|
56
62
|
}
|
|
57
63
|
}
|