@nutui/nutui 3.1.19-beta.0 → 3.1.19-beta.1
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.d.ts +38 -37
- package/dist/nutui.es.js +13439 -12616
- package/dist/nutui.umd.js +13431 -12695
- package/dist/packages/_es/ActionSheet.js +12 -18
- package/dist/packages/_es/Address.js +78 -69
- package/dist/packages/_es/Audio.js +12 -12
- package/dist/packages/_es/AudioOperate.js +1 -1
- package/dist/packages/_es/Avatar.js +3 -3
- package/dist/packages/_es/BackTop.js +68 -110
- package/dist/packages/_es/Badge.js +3 -3
- package/dist/packages/_es/Barrage.js +62 -55
- package/dist/packages/_es/Button.js +2 -2
- package/dist/packages/_es/Calendar.js +28 -23
- package/dist/packages/_es/CalendarItem.js +3 -3
- package/dist/packages/_es/Card.js +6 -5
- package/dist/packages/_es/Cascader.js +7 -7
- package/dist/packages/_es/Cell.js +4 -11
- package/dist/packages/_es/CellGroup.js +1 -1
- package/dist/packages/_es/Checkbox.js +1 -1
- package/dist/packages/_es/CheckboxGroup.js +1 -1
- package/dist/packages/_es/CircleProgress.js +149 -40
- package/dist/packages/_es/Col.js +1 -1
- package/dist/packages/_es/Collapse.js +34 -8
- package/dist/packages/_es/CollapseItem.js +90 -59
- package/dist/packages/_es/CountDown.js +5 -5
- package/dist/packages/_es/CountUp.js +43 -51
- package/dist/packages/_es/DatePicker.js +21 -20
- package/dist/packages/_es/Dialog.js +8 -86
- package/dist/packages/_es/Divider.js +4 -4
- package/dist/packages/_es/Drag.js +92 -54
- package/dist/packages/_es/Elevator.js +74 -49
- package/dist/packages/_es/Empty.js +3 -3
- package/dist/packages/_es/FixedNav.js +5 -5
- package/dist/packages/_es/Form.js +4 -4
- package/dist/packages/_es/FormItem.js +1 -1
- package/dist/packages/_es/Grid.js +1 -1
- package/dist/packages/_es/GridItem.js +8 -26
- package/dist/packages/_es/Icon.js +1 -1
- package/dist/packages/_es/ImagePreview.js +15 -84
- package/dist/packages/_es/Indicator.js +3 -3
- package/dist/packages/_es/InfiniteLoading.js +93 -107
- package/dist/packages/_es/Input.js +8 -8
- package/dist/packages/_es/InputNumber.js +23 -16
- package/dist/packages/_es/Layout.js +1 -1
- package/dist/packages/_es/List.js +41 -34
- package/dist/packages/_es/Menu.js +15 -12
- package/dist/packages/_es/MenuItem.js +9 -9
- package/dist/packages/_es/Navbar.js +3 -4
- package/dist/packages/_es/NoticeBar.js +47 -40
- package/dist/packages/_es/Notify.js +29 -168
- package/dist/packages/_es/NumberKeyboard.js +5 -10
- package/dist/packages/_es/OldPicker.js +122 -120
- package/dist/packages/_es/OverLay.js +5 -25
- package/dist/packages/_es/Pagination.js +7 -7
- package/dist/packages/_es/Picker.js +39 -16
- package/dist/packages/_es/Popover.js +155 -30
- package/dist/packages/_es/Popup.js +8 -71
- package/dist/packages/_es/Price.js +17 -5
- package/dist/packages/_es/Progress.js +18 -8
- package/dist/packages/_es/PullRefresh.js +1 -1
- package/dist/packages/_es/Radio.js +2 -2
- package/dist/packages/_es/RadioGroup.js +1 -1
- package/dist/packages/_es/Range.js +46 -33
- package/dist/packages/_es/Rate.js +16 -19
- package/dist/packages/_es/Row.js +1 -1
- package/dist/packages/_es/SearchBar.js +8 -6
- package/dist/packages/_es/ShortPassword.js +89 -67
- package/dist/packages/_es/SideNavBar.js +5 -16
- package/dist/packages/_es/SideNavBarItem.js +1 -1
- package/dist/packages/_es/Signature.js +69 -88
- package/dist/packages/_es/Skeleton.js +8 -11
- package/dist/packages/_es/Sku.js +47 -56
- package/dist/packages/_es/Step.js +1 -1
- package/dist/packages/_es/Steps.js +1 -1
- package/dist/packages/_es/Sticky.js +28 -23
- package/dist/packages/_es/SubSideNavBar.js +1 -1
- package/dist/packages/_es/Swipe.js +39 -26
- package/dist/packages/_es/Swiper.js +31 -13
- package/dist/packages/_es/SwiperItem.js +1 -1
- package/dist/packages/_es/Switch.js +3 -3
- package/dist/packages/_es/TabPane.js +1 -1
- package/dist/packages/_es/Tabbar.js +3 -3
- package/dist/packages/_es/TabbarItem.js +17 -23
- package/dist/packages/_es/Table.js +13 -13
- package/dist/packages/_es/Tabs.js +21 -20
- package/dist/packages/_es/Tag.js +4 -4
- package/dist/packages/_es/TextArea.js +44 -42
- package/dist/packages/_es/TimeDetail.js +4 -3
- package/dist/packages/_es/TimePannel.js +3 -3
- package/dist/packages/_es/TimeSelect.js +8 -7
- package/dist/packages/_es/Toast.js +41 -170
- package/dist/packages/_es/Uploader.js +109 -138
- package/dist/packages/_es/Video.js +3 -3
- package/dist/packages/_es/common.js +1 -1
- package/dist/packages/_es/component.js +1 -1
- package/dist/packages/_es/index.js +44 -6
- package/dist/packages/_es/{index5.js → index.taro.js} +127 -95
- package/dist/packages/_es/index2.js +1 -1
- package/dist/packages/_es/index3.js +56 -28
- package/dist/packages/_es/index4.js +413 -56
- package/dist/packages/_es/plugin-vue_export-helper.js +1 -1
- package/dist/packages/_es/pxCheck.js +1 -1
- package/dist/packages/_es/use-lock-scroll.js +23 -0
- package/dist/packages/_es/util.js +1 -1
- package/dist/packages/uploader/index.scss +2 -2
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +61 -61
- package/dist/styles/themes/jdt.scss +61 -61
- package/package.json +1 -1
- package/dist/packages/_es/raf.js +0 -19
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.19-beta.
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -44,8 +44,17 @@ const _sfc_main = create({
|
|
|
44
44
|
[componentName]: true
|
|
45
45
|
};
|
|
46
46
|
});
|
|
47
|
+
const replaceSpecialChar = (url) => {
|
|
48
|
+
url = url.replace(/"/g, '"');
|
|
49
|
+
url = url.replace(/&/g, "&");
|
|
50
|
+
url = url.replace(/</g, "<");
|
|
51
|
+
url = url.replace(/>/g, ">");
|
|
52
|
+
url = url.replace(/ /g, " ");
|
|
53
|
+
url = url.replace(/¥/g, "\uFFE5");
|
|
54
|
+
return url;
|
|
55
|
+
};
|
|
47
56
|
const showSymbol = computed(() => {
|
|
48
|
-
const symbol = props.needSymbol ? props.symbol : "";
|
|
57
|
+
const symbol = props.needSymbol ? replaceSpecialChar(props.symbol) : "";
|
|
49
58
|
return symbol;
|
|
50
59
|
});
|
|
51
60
|
const checkPoint = (price) => {
|
|
@@ -86,7 +95,8 @@ const _sfc_main = create({
|
|
|
86
95
|
showSymbol,
|
|
87
96
|
checkPoint,
|
|
88
97
|
formatThousands,
|
|
89
|
-
formatDecimal
|
|
98
|
+
formatDecimal,
|
|
99
|
+
replaceSpecialChar
|
|
90
100
|
};
|
|
91
101
|
}
|
|
92
102
|
});
|
|
@@ -99,6 +109,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
99
109
|
_ctx.needSymbol && _ctx.position == "before" ? (openBlock(), createElementBlock("view", {
|
|
100
110
|
key: 0,
|
|
101
111
|
class: normalizeClass(["nut-price--symbol", `nut-price--symbol-${_ctx.size}`]),
|
|
112
|
+
decode: "true",
|
|
102
113
|
innerHTML: _ctx.showSymbol
|
|
103
114
|
}, null, 10, _hoisted_1)) : createCommentVNode("", true),
|
|
104
115
|
createElementVNode("view", {
|
|
@@ -114,9 +125,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
114
125
|
_ctx.needSymbol && _ctx.position == "after" ? (openBlock(), createElementBlock("view", {
|
|
115
126
|
key: 2,
|
|
116
127
|
class: normalizeClass(["nut-price--symbol", `nut-price--symbol-${_ctx.size}`]),
|
|
128
|
+
decode: "true",
|
|
117
129
|
innerHTML: _ctx.showSymbol
|
|
118
130
|
}, null, 10, _hoisted_2)) : createCommentVNode("", true)
|
|
119
131
|
], 2);
|
|
120
132
|
}
|
|
121
|
-
var
|
|
122
|
-
export {
|
|
133
|
+
var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
134
|
+
export { index_taro as default };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.19-beta.
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { ref, computed, onMounted, resolveComponent, openBlock, createElementBlock, createElementVNode, normalizeClass, normalizeStyle, toDisplayString, createCommentVNode, createBlock } from "vue";
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
|
+
import { eventCenter, getCurrentInstance } from "@tarojs/taro";
|
|
8
9
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
10
|
const { create } = createComponent("progress");
|
|
10
11
|
const _sfc_main = create({
|
|
@@ -20,7 +21,7 @@ const _sfc_main = create({
|
|
|
20
21
|
},
|
|
21
22
|
status: {
|
|
22
23
|
type: String,
|
|
23
|
-
default: ""
|
|
24
|
+
default: "text"
|
|
24
25
|
},
|
|
25
26
|
strokeWidth: {
|
|
26
27
|
type: [Number, String],
|
|
@@ -63,6 +64,8 @@ const _sfc_main = create({
|
|
|
63
64
|
const height = ref(props.strokeWidth + "px");
|
|
64
65
|
const progressOuter = ref();
|
|
65
66
|
const insideText = ref();
|
|
67
|
+
const refRandomId = Math.random().toString(36).slice(-8);
|
|
68
|
+
const randRef = ref(refRandomId);
|
|
66
69
|
const bgStyle = computed(() => {
|
|
67
70
|
return {
|
|
68
71
|
width: props.percentage + "%",
|
|
@@ -75,22 +78,28 @@ const _sfc_main = create({
|
|
|
75
78
|
};
|
|
76
79
|
});
|
|
77
80
|
onMounted(() => {
|
|
81
|
+
eventCenter.once(getCurrentInstance().router.onReady, () => {
|
|
82
|
+
});
|
|
78
83
|
});
|
|
79
84
|
return {
|
|
80
85
|
height,
|
|
81
86
|
bgStyle,
|
|
82
87
|
textStyle,
|
|
83
88
|
progressOuter,
|
|
84
|
-
insideText
|
|
89
|
+
insideText,
|
|
90
|
+
randRef
|
|
85
91
|
};
|
|
86
92
|
}
|
|
87
93
|
});
|
|
88
94
|
const _hoisted_1 = { class: "nut-progress" };
|
|
95
|
+
const _hoisted_2 = ["id"];
|
|
96
|
+
const _hoisted_3 = ["id"];
|
|
89
97
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
90
98
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
91
99
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
92
100
|
createElementVNode("div", {
|
|
93
101
|
class: normalizeClass(["nut-progress-outer", [_ctx.showText && !_ctx.textInside ? "nut-progress-outer-part" : "", _ctx.size ? "nut-progress-" + _ctx.size : ""]]),
|
|
102
|
+
id: "nut-progress-outer-taro-" + _ctx.randRef,
|
|
94
103
|
ref: "progressOuter",
|
|
95
104
|
style: normalizeStyle({ height: _ctx.height })
|
|
96
105
|
}, [
|
|
@@ -102,6 +111,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
102
111
|
key: 0,
|
|
103
112
|
class: "nut-progress-text nut-progress-insidetext",
|
|
104
113
|
ref: "insideText",
|
|
114
|
+
id: "nut-progress-insidetext-taro-" + _ctx.randRef,
|
|
105
115
|
style: normalizeStyle({
|
|
106
116
|
lineHeight: _ctx.height,
|
|
107
117
|
left: `${_ctx.percentage}%`,
|
|
@@ -112,15 +122,15 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
112
122
|
createElementVNode("span", {
|
|
113
123
|
style: normalizeStyle(_ctx.textStyle)
|
|
114
124
|
}, toDisplayString(_ctx.percentage) + toDisplayString(_ctx.isShowPercentage ? "%" : ""), 5)
|
|
115
|
-
],
|
|
125
|
+
], 12, _hoisted_3)) : createCommentVNode("", true)
|
|
116
126
|
], 6)
|
|
117
|
-
],
|
|
127
|
+
], 14, _hoisted_2),
|
|
118
128
|
_ctx.showText && !_ctx.textInside ? (openBlock(), createElementBlock("div", {
|
|
119
129
|
key: 0,
|
|
120
130
|
class: "nut-progress-text",
|
|
121
131
|
style: normalizeStyle({ lineHeight: _ctx.height })
|
|
122
132
|
}, [
|
|
123
|
-
_ctx.status == "
|
|
133
|
+
_ctx.status == "text" || _ctx.status == "active" ? (openBlock(), createElementBlock("span", {
|
|
124
134
|
key: 0,
|
|
125
135
|
style: normalizeStyle(_ctx.textStyle)
|
|
126
136
|
}, toDisplayString(_ctx.percentage) + toDisplayString(_ctx.isShowPercentage ? "%" : ""), 5)) : _ctx.status == "icon" ? (openBlock(), createBlock(_component_nut_icon, {
|
|
@@ -132,5 +142,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
132
142
|
], 4)) : createCommentVNode("", true)
|
|
133
143
|
]);
|
|
134
144
|
}
|
|
135
|
-
var
|
|
136
|
-
export {
|
|
145
|
+
var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
146
|
+
export { index_taro as default };
|
|
@@ -15,7 +15,7 @@ var __spreadValues = (a, b) => {
|
|
|
15
15
|
return a;
|
|
16
16
|
};
|
|
17
17
|
/*!
|
|
18
|
-
* @nutui/nutui v3.1.19-beta.
|
|
18
|
+
* @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
|
|
19
19
|
* (c) 2022 @jdf2e.
|
|
20
20
|
* Released under the MIT License.
|
|
21
21
|
*/
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.19-beta.
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { inject, computed, h } from "vue";
|
|
7
|
-
import { c as createComponent } from "./component.js";
|
|
8
7
|
import _sfc_main$1 from "./Icon.js";
|
|
8
|
+
import { c as createComponent } from "./component.js";
|
|
9
9
|
import "./pxCheck.js";
|
|
10
10
|
const { componentName, create } = createComponent("radio");
|
|
11
11
|
const _sfc_main = create({
|
|
@@ -18,14 +18,15 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
/*!
|
|
21
|
-
* @nutui/nutui v3.1.19-beta.
|
|
21
|
+
* @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
|
|
22
22
|
* (c) 2022 @jdf2e.
|
|
23
23
|
* Released under the MIT License.
|
|
24
24
|
*/
|
|
25
|
+
import Taro from "@tarojs/taro";
|
|
25
26
|
import { ref, computed, toRefs, openBlock, createElementBlock, normalizeClass, toDisplayString, createCommentVNode, createElementVNode, normalizeStyle, withModifiers, Fragment, renderList, createTextVNode, renderSlot } from "vue";
|
|
26
27
|
import { c as createComponent } from "./component.js";
|
|
27
|
-
import { u as useTouch } from "./
|
|
28
|
-
import { u as
|
|
28
|
+
import { u as useTouch } from "./index3.js";
|
|
29
|
+
import { u as useTaroRect } from "./index.js";
|
|
29
30
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
30
31
|
const { componentName, create } = createComponent("range");
|
|
31
32
|
const _sfc_main = create({
|
|
@@ -214,16 +215,18 @@ const _sfc_main = create({
|
|
|
214
215
|
emit("change", value);
|
|
215
216
|
}
|
|
216
217
|
};
|
|
217
|
-
const onClick = (event) => {
|
|
218
|
+
const onClick = async (event) => {
|
|
218
219
|
if (props.disabled) {
|
|
219
220
|
return;
|
|
220
221
|
}
|
|
221
222
|
const { min, modelValue } = props;
|
|
222
|
-
const rect =
|
|
223
|
-
let delta = event.clientX - rect.left;
|
|
223
|
+
const rect = await useTaroRect(root, Taro);
|
|
224
|
+
let delta = event.touches[0].clientX - rect.left;
|
|
224
225
|
let total = rect.width;
|
|
226
|
+
console.log(delta);
|
|
227
|
+
console.log(total);
|
|
225
228
|
if (props.vertical) {
|
|
226
|
-
delta = event.clientY - rect.top;
|
|
229
|
+
delta = event.touches[0].clientY - rect.top;
|
|
227
230
|
total = rect.height;
|
|
228
231
|
}
|
|
229
232
|
const value = Number(min) + delta / total * scope.value;
|
|
@@ -251,8 +254,10 @@ const _sfc_main = create({
|
|
|
251
254
|
startValue = format(currentValue);
|
|
252
255
|
}
|
|
253
256
|
dragStatus.value = "start";
|
|
257
|
+
event.stopPropagation();
|
|
258
|
+
event.preventDefault();
|
|
254
259
|
};
|
|
255
|
-
const onTouchMove = (event) => {
|
|
260
|
+
const onTouchMove = async (event) => {
|
|
256
261
|
if (props.disabled) {
|
|
257
262
|
return;
|
|
258
263
|
}
|
|
@@ -261,7 +266,7 @@ const _sfc_main = create({
|
|
|
261
266
|
}
|
|
262
267
|
touch.move(event);
|
|
263
268
|
dragStatus.value = "draging";
|
|
264
|
-
const rect =
|
|
269
|
+
const rect = await useTaroRect(root, Taro);
|
|
265
270
|
let delta = touch.deltaX.value;
|
|
266
271
|
let total = rect.width;
|
|
267
272
|
let diff = delta / total * scope.value;
|
|
@@ -279,7 +284,7 @@ const _sfc_main = create({
|
|
|
279
284
|
event.stopPropagation();
|
|
280
285
|
event.preventDefault();
|
|
281
286
|
};
|
|
282
|
-
const onTouchEnd = () => {
|
|
287
|
+
const onTouchEnd = (event) => {
|
|
283
288
|
if (props.disabled) {
|
|
284
289
|
return;
|
|
285
290
|
}
|
|
@@ -288,11 +293,14 @@ const _sfc_main = create({
|
|
|
288
293
|
emit("drag-end");
|
|
289
294
|
}
|
|
290
295
|
dragStatus.value = "";
|
|
296
|
+
event.stopPropagation();
|
|
297
|
+
event.preventDefault();
|
|
291
298
|
};
|
|
292
299
|
const curValue = (idx) => {
|
|
293
300
|
const value = typeof idx === "number" ? props.modelValue[idx] : props.modelValue;
|
|
294
301
|
return value;
|
|
295
302
|
};
|
|
303
|
+
const refRandomId = Math.random().toString(36).slice(-8);
|
|
296
304
|
return __spreadProps(__spreadValues({
|
|
297
305
|
root,
|
|
298
306
|
classes,
|
|
@@ -310,7 +318,8 @@ const _sfc_main = create({
|
|
|
310
318
|
markClassName,
|
|
311
319
|
marksStyle,
|
|
312
320
|
marksList,
|
|
313
|
-
tickStyle
|
|
321
|
+
tickStyle,
|
|
322
|
+
refRandomId
|
|
314
323
|
});
|
|
315
324
|
}
|
|
316
325
|
});
|
|
@@ -318,21 +327,22 @@ const _hoisted_1 = {
|
|
|
318
327
|
key: 0,
|
|
319
328
|
class: "min"
|
|
320
329
|
};
|
|
321
|
-
const _hoisted_2 =
|
|
330
|
+
const _hoisted_2 = ["id"];
|
|
331
|
+
const _hoisted_3 = {
|
|
322
332
|
key: 0,
|
|
323
333
|
class: "nut-range-mark"
|
|
324
334
|
};
|
|
325
|
-
const
|
|
326
|
-
const
|
|
335
|
+
const _hoisted_4 = ["tabindex", "aria-valuemin", "aria-valuenow", "aria-valuemax", "onTouchstart"];
|
|
336
|
+
const _hoisted_5 = {
|
|
327
337
|
key: 0,
|
|
328
338
|
class: "number"
|
|
329
339
|
};
|
|
330
|
-
const
|
|
331
|
-
const
|
|
340
|
+
const _hoisted_6 = ["tabindex", "aria-valuemin", "aria-valuenow", "aria-valuemax"];
|
|
341
|
+
const _hoisted_7 = {
|
|
332
342
|
key: 0,
|
|
333
343
|
class: "number"
|
|
334
344
|
};
|
|
335
|
-
const
|
|
345
|
+
const _hoisted_8 = {
|
|
336
346
|
key: 1,
|
|
337
347
|
class: "max"
|
|
338
348
|
};
|
|
@@ -343,11 +353,12 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
343
353
|
!_ctx.hiddenRange ? (openBlock(), createElementBlock("view", _hoisted_1, toDisplayString(+_ctx.min), 1)) : createCommentVNode("", true),
|
|
344
354
|
createElementVNode("view", {
|
|
345
355
|
ref: "root",
|
|
356
|
+
id: "root-" + _ctx.refRandomId,
|
|
346
357
|
style: normalizeStyle(_ctx.wrapperStyle),
|
|
347
358
|
class: normalizeClass(_ctx.classes),
|
|
348
359
|
onClick: _cache[9] || (_cache[9] = withModifiers((...args) => _ctx.onClick && _ctx.onClick(...args), ["stop"]))
|
|
349
360
|
}, [
|
|
350
|
-
_ctx.marksList.length > 0 ? (openBlock(), createElementBlock("view",
|
|
361
|
+
_ctx.marksList.length > 0 ? (openBlock(), createElementBlock("view", _hoisted_3, [
|
|
351
362
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.marksList, (marks) => {
|
|
352
363
|
return openBlock(), createElementBlock("span", {
|
|
353
364
|
key: marks,
|
|
@@ -366,22 +377,23 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
366
377
|
class: "nut-range-bar",
|
|
367
378
|
style: normalizeStyle(_ctx.barStyle)
|
|
368
379
|
}, [
|
|
369
|
-
_ctx.range ? (openBlock(), createElementBlock(Fragment, { key: 0 }, renderList([0, 1], (
|
|
380
|
+
_ctx.range ? (openBlock(), createElementBlock(Fragment, { key: 0 }, renderList([0, 1], (index) => {
|
|
370
381
|
return createElementVNode("view", {
|
|
371
|
-
key:
|
|
382
|
+
key: index,
|
|
372
383
|
role: "slider",
|
|
373
384
|
class: normalizeClass({
|
|
374
|
-
"nut-range-button-wrapper-left":
|
|
375
|
-
"nut-range-button-wrapper-right":
|
|
385
|
+
"nut-range-button-wrapper-left": index == 0,
|
|
386
|
+
"nut-range-button-wrapper-right": index == 1
|
|
376
387
|
}),
|
|
388
|
+
"catch-move": true,
|
|
377
389
|
tabindex: _ctx.disabled ? -1 : 0,
|
|
378
390
|
"aria-valuemin": +_ctx.min,
|
|
379
|
-
"aria-valuenow": _ctx.curValue(
|
|
391
|
+
"aria-valuenow": _ctx.curValue(index),
|
|
380
392
|
"aria-valuemax": +_ctx.max,
|
|
381
393
|
"aria-orientation": "horizontal",
|
|
382
394
|
onTouchstart: withModifiers((e) => {
|
|
383
|
-
if (typeof
|
|
384
|
-
_ctx.buttonIndex =
|
|
395
|
+
if (typeof index === "number") {
|
|
396
|
+
_ctx.buttonIndex = index;
|
|
385
397
|
}
|
|
386
398
|
_ctx.onTouchStart(e);
|
|
387
399
|
}, ["stop", "prevent"]),
|
|
@@ -395,9 +407,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
395
407
|
class: "nut-range-button",
|
|
396
408
|
style: normalizeStyle(_ctx.buttonStyle)
|
|
397
409
|
}, [
|
|
398
|
-
!_ctx.hiddenTag ? (openBlock(), createElementBlock("view",
|
|
410
|
+
!_ctx.hiddenTag ? (openBlock(), createElementBlock("view", _hoisted_5, toDisplayString(_ctx.curValue(index)), 1)) : createCommentVNode("", true)
|
|
399
411
|
], 4))
|
|
400
|
-
], 42,
|
|
412
|
+
], 42, _hoisted_4);
|
|
401
413
|
}), 64)) : (openBlock(), createElementBlock("view", {
|
|
402
414
|
key: 1,
|
|
403
415
|
role: "slider",
|
|
@@ -407,6 +419,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
407
419
|
"aria-valuenow": _ctx.curValue(),
|
|
408
420
|
"aria-valuemax": +_ctx.max,
|
|
409
421
|
"aria-orientation": "horizontal",
|
|
422
|
+
"catch-move": true,
|
|
410
423
|
onTouchstart: _cache[4] || (_cache[4] = withModifiers((e) => {
|
|
411
424
|
_ctx.onTouchStart(e);
|
|
412
425
|
}, ["stop", "prevent"])),
|
|
@@ -420,13 +433,13 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
420
433
|
class: "nut-range-button",
|
|
421
434
|
style: normalizeStyle(_ctx.buttonStyle)
|
|
422
435
|
}, [
|
|
423
|
-
!_ctx.hiddenTag ? (openBlock(), createElementBlock("view",
|
|
436
|
+
!_ctx.hiddenTag ? (openBlock(), createElementBlock("view", _hoisted_7, toDisplayString(_ctx.curValue()), 1)) : createCommentVNode("", true)
|
|
424
437
|
], 4))
|
|
425
|
-
], 40,
|
|
438
|
+
], 40, _hoisted_6))
|
|
426
439
|
], 4)
|
|
427
|
-
],
|
|
428
|
-
!_ctx.hiddenRange ? (openBlock(), createElementBlock("view",
|
|
440
|
+
], 14, _hoisted_2),
|
|
441
|
+
!_ctx.hiddenRange ? (openBlock(), createElementBlock("view", _hoisted_8, toDisplayString(+_ctx.max), 1)) : createCommentVNode("", true)
|
|
429
442
|
], 2);
|
|
430
443
|
}
|
|
431
|
-
var
|
|
432
|
-
export {
|
|
444
|
+
var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
445
|
+
export { index_taro as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.19-beta.
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -71,20 +71,16 @@ const _sfc_main = create({
|
|
|
71
71
|
[prefixCls]: true
|
|
72
72
|
};
|
|
73
73
|
});
|
|
74
|
-
const onClick = (e,
|
|
75
|
-
e.preventDefault();
|
|
76
|
-
e.stopPropagation();
|
|
74
|
+
const onClick = (e, index) => {
|
|
77
75
|
if (props.disabled || props.readonly)
|
|
78
76
|
return;
|
|
79
77
|
let value = 0;
|
|
80
|
-
if (
|
|
78
|
+
if (index === 1 && props.modelValue === index)
|
|
81
79
|
;
|
|
82
80
|
else {
|
|
83
|
-
value =
|
|
84
|
-
if (props.allowHalf) {
|
|
85
|
-
|
|
86
|
-
value -= 0.5;
|
|
87
|
-
}
|
|
81
|
+
value = index;
|
|
82
|
+
if (props.allowHalf && e == 2) {
|
|
83
|
+
value -= 0.5;
|
|
88
84
|
}
|
|
89
85
|
}
|
|
90
86
|
emit("update:modelValue", value);
|
|
@@ -97,7 +93,6 @@ const _sfc_main = create({
|
|
|
97
93
|
};
|
|
98
94
|
}
|
|
99
95
|
});
|
|
100
|
-
const _hoisted_1 = ["onClick"];
|
|
101
96
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
102
97
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
103
98
|
return openBlock(), createElementBlock("view", {
|
|
@@ -107,37 +102,39 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
107
102
|
return openBlock(), createElementBlock("view", {
|
|
108
103
|
class: "nut-rate-item",
|
|
109
104
|
key: n,
|
|
110
|
-
onClick: ($event) => _ctx.onClick($event, n),
|
|
111
105
|
style: normalizeStyle({ marginRight: _ctx.pxCheck(_ctx.spacing) })
|
|
112
106
|
}, [
|
|
113
107
|
createVNode(_component_nut_icon, {
|
|
114
108
|
size: _ctx.iconSize,
|
|
115
109
|
class: normalizeClass(["nut-rate-item__icon", { "nut-rate-item__icon--disabled": _ctx.disabled || n > _ctx.modelValue }]),
|
|
110
|
+
onClick: ($event) => _ctx.onClick(1, n),
|
|
111
|
+
color: n <= _ctx.modelValue ? _ctx.activeColor : _ctx.voidColor,
|
|
116
112
|
"font-class-name": _ctx.fontClassName,
|
|
117
113
|
"class-prefix": _ctx.classPrefix,
|
|
118
|
-
color: n <= _ctx.modelValue ? _ctx.activeColor : _ctx.voidColor,
|
|
119
114
|
name: n <= _ctx.modelValue ? _ctx.checkedIcon : _ctx.uncheckedIcon
|
|
120
|
-
}, null, 8, ["size", "class", "font-class-name", "class-prefix", "
|
|
115
|
+
}, null, 8, ["size", "onClick", "class", "color", "font-class-name", "class-prefix", "name"]),
|
|
121
116
|
_ctx.allowHalf && _ctx.modelValue + 1 > n ? (openBlock(), createBlock(_component_nut_icon, {
|
|
122
117
|
key: 0,
|
|
123
118
|
class: "nut-rate-item__icon nut-rate-item__icon--half",
|
|
119
|
+
onClick: ($event) => _ctx.onClick(2, n),
|
|
124
120
|
"font-class-name": _ctx.fontClassName,
|
|
125
121
|
"class-prefix": _ctx.classPrefix,
|
|
126
122
|
color: n <= _ctx.modelValue + 1 ? _ctx.activeColor : _ctx.voidColor,
|
|
127
123
|
size: _ctx.iconSize,
|
|
128
124
|
name: _ctx.checkedIcon
|
|
129
|
-
}, null, 8, ["font-class-name", "class-prefix", "color", "size", "name"])) : _ctx.allowHalf && _ctx.modelValue + 1 < n ? (openBlock(), createBlock(_component_nut_icon, {
|
|
125
|
+
}, null, 8, ["onClick", "font-class-name", "class-prefix", "color", "size", "name"])) : _ctx.allowHalf && _ctx.modelValue + 1 < n ? (openBlock(), createBlock(_component_nut_icon, {
|
|
130
126
|
key: 1,
|
|
131
127
|
class: "nut-rate-item__icon nut-rate-item__icon--disabled nut-rate-item__icon--half",
|
|
128
|
+
onClick: ($event) => _ctx.onClick(2, n),
|
|
132
129
|
"font-class-name": _ctx.fontClassName,
|
|
133
130
|
"class-prefix": _ctx.classPrefix,
|
|
134
131
|
color: _ctx.voidColor,
|
|
135
132
|
size: _ctx.iconSize,
|
|
136
133
|
name: _ctx.uncheckedIcon
|
|
137
|
-
}, null, 8, ["font-class-name", "class-prefix", "color", "size", "name"])) : createCommentVNode("", true)
|
|
138
|
-
],
|
|
134
|
+
}, null, 8, ["onClick", "font-class-name", "class-prefix", "color", "size", "name"])) : createCommentVNode("", true)
|
|
135
|
+
], 4);
|
|
139
136
|
}), 128))
|
|
140
137
|
], 2);
|
|
141
138
|
}
|
|
142
|
-
var
|
|
143
|
-
export {
|
|
139
|
+
var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
140
|
+
export { index_taro as default };
|
package/dist/packages/_es/Row.js
CHANGED
|
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
/*!
|
|
21
|
-
* @nutui/nutui v3.1.19-beta.
|
|
21
|
+
* @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
|
|
22
22
|
* (c) 2022 @jdf2e.
|
|
23
23
|
* Released under the MIT License.
|
|
24
24
|
*/
|
|
@@ -154,7 +154,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
154
154
|
createElementVNode("view", _hoisted_3, [
|
|
155
155
|
createElementVNode("form", {
|
|
156
156
|
action: "#",
|
|
157
|
-
|
|
157
|
+
onsubmit: "return false",
|
|
158
|
+
onSubmit: _cache[4] || (_cache[4] = withModifiers((...args) => _ctx.handleSubmit && _ctx.handleSubmit(...args), ["prevent"]))
|
|
158
159
|
}, [
|
|
159
160
|
createElementVNode("input", {
|
|
160
161
|
class: "nut-searchbar__input-bar",
|
|
@@ -164,12 +165,13 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
164
165
|
value: _ctx.modelValue,
|
|
165
166
|
onInput: _cache[0] || (_cache[0] = (...args) => _ctx.valueChange && _ctx.valueChange(...args)),
|
|
166
167
|
onFocus: _cache[1] || (_cache[1] = (...args) => _ctx.valueFocus && _ctx.valueFocus(...args)),
|
|
167
|
-
onBlur: _cache[2] || (_cache[2] = (...args) => _ctx.valueBlur && _ctx.valueBlur(...args))
|
|
168
|
+
onBlur: _cache[2] || (_cache[2] = (...args) => _ctx.valueBlur && _ctx.valueBlur(...args)),
|
|
169
|
+
onConfirm: _cache[3] || (_cache[3] = (...args) => _ctx.handleSubmit && _ctx.handleSubmit(...args))
|
|
168
170
|
}, null, 40, _hoisted_4)
|
|
169
171
|
], 32),
|
|
170
172
|
_ctx.clearable ? withDirectives((openBlock(), createElementBlock("view", {
|
|
171
173
|
key: 0,
|
|
172
|
-
onClick: _cache[
|
|
174
|
+
onClick: _cache[5] || (_cache[5] = (...args) => _ctx.handleClear && _ctx.handleClear(...args)),
|
|
173
175
|
class: "nut-searchbar__input-clear"
|
|
174
176
|
}, [
|
|
175
177
|
createVNode(_component_nut_icon, {
|
|
@@ -190,5 +192,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
190
192
|
])) : createCommentVNode("", true)
|
|
191
193
|
], 4);
|
|
192
194
|
}
|
|
193
|
-
var
|
|
194
|
-
export {
|
|
195
|
+
var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
196
|
+
export { index_taro as default };
|