@nutui/nutui 4.3.10 → 4.3.12
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/CHANGELOG.md +174 -146
- package/dist/nutui.es.js +1 -1
- package/dist/nutui.js +2808 -2822
- package/dist/nutui.umd.js +1 -1
- package/dist/packages/{Interceptor-DlY2h6Y7.js → Interceptor-CBzqGJrl.js} +1 -1
- package/dist/packages/address/Address.js +5 -9
- package/dist/packages/addresslist/AddressList.js +3 -4
- package/dist/packages/audiooperate/AudioOperate.js +1 -1
- package/dist/packages/avatarcropper/AvatarCropper.js +3 -5
- package/dist/packages/avatargroup/AvatarGroup.js +1 -2
- package/dist/packages/badge/Badge.js +1 -2
- package/dist/packages/calendar/Calendar.js +1 -1
- package/dist/packages/calendarcard/CalendarCard.js +1 -1
- package/dist/packages/cascader/Cascader.js +6 -6
- package/dist/packages/checkbox/Checkbox.js +1 -2
- package/dist/packages/circleprogress/CircleProgress.js +1 -1
- package/dist/packages/collapseitem/CollapseItem.js +1 -1
- package/dist/packages/comment/Comment.js +2 -3
- package/dist/packages/configprovider/ConfigProvider.js +2 -4
- package/dist/packages/countdown/Countdown.js +3 -5
- package/dist/packages/datepicker/DatePicker.js +1 -1
- package/dist/packages/dialog/Dialog.js +4 -7
- package/dist/packages/ecard/Ecard.js +1 -1
- package/dist/packages/elevator/Elevator.js +4 -8
- package/dist/packages/ellipsis/Ellipsis.js +2 -4
- package/dist/packages/empty/Empty.js +3 -11
- package/dist/packages/fixednav/FixedNav.js +1 -1
- package/dist/packages/form/Form.js +1 -1
- package/dist/packages/image/Image.js +2 -4
- package/dist/packages/imagepreview/ImagePreview.js +5 -9
- package/dist/packages/{index-CFigyH92.js → index-BOB4ytqZ.js} +1 -1
- package/dist/packages/indicator/Indicator.js +1 -1
- package/dist/packages/infiniteloading/InfiniteLoading.js +2 -2
- package/dist/packages/input/Input.js +1 -2
- package/dist/packages/inputnumber/InputNumber.js +7 -14
- package/dist/packages/list/List.js +1 -2
- package/dist/packages/locale/lang/en-US.js +1 -4
- package/dist/packages/locale/lang/id-ID.js +1 -4
- package/dist/packages/locale/lang/index.js +1 -4
- package/dist/packages/locale/lang/zh-CN.js +1 -4
- package/dist/packages/locale/lang/zh-TW.js +1 -4
- package/dist/packages/{mountComponent-DBQ88Fjz.js → mountComponent-CLi4Nz91.js} +1 -1
- package/dist/packages/noticebar/Noticebar.js +1 -2
- package/dist/packages/numberkeyboard/NumberKeyboard.js +1 -1
- package/dist/packages/overlay/Overlay.js +1 -1
- package/dist/packages/pagination/Pagination.js +5 -9
- package/dist/packages/picker/Picker.js +9 -5
- package/dist/packages/popover/Popover.js +2 -3
- package/dist/packages/pullrefresh/PullRefresh.js +4 -6
- package/dist/packages/radio/Radio.js +1 -2
- package/dist/packages/range/Range.js +1 -1
- package/dist/packages/rate/Rate.js +4 -7
- package/dist/packages/{renderIcon-BfOvhG7i.js → renderIcon-CfE94nuJ.js} +1 -2
- package/dist/packages/searchbar/Searchbar.js +2 -2
- package/dist/packages/shortpassword/ShortPassword.js +1 -1
- package/dist/packages/signature/Signature.js +1 -1
- package/dist/packages/sku/Sku.js +1 -1
- package/dist/packages/space/Space.js +1 -2
- package/dist/packages/step/Step.js +1 -2
- package/dist/packages/sticky/Sticky.js +3 -6
- package/dist/packages/swipe/Swipe.js +2 -4
- package/dist/packages/swiper/Swiper.js +7 -13
- package/dist/packages/switch/Switch.js +1 -2
- package/dist/packages/tabbar/Tabbar.js +28 -3
- package/dist/packages/tabbaritem/TabbarItem.js +38 -15
- package/dist/packages/table/Table.js +1 -1
- package/dist/packages/tabs/Tabs.js +7 -15
- package/dist/packages/textarea/Textarea.js +3 -5
- package/dist/packages/timeselect/TimeSelect.js +1 -1
- package/dist/packages/toast/Toast.js +2 -2
- package/dist/packages/trendarrow/TrendArrow.js +1 -1
- package/dist/packages/uploader/Uploader.js +4 -8
- package/dist/packages/{util-DnfK0Qan.js → util-D1pvnUYu.js} +1 -2
- package/dist/packages/video/Video.js +2 -3
- package/dist/resolver/index.js +2 -4
- package/dist/resolver/index.mjs +2 -4
- package/dist/smartips/web-types.json +13 -4
- package/dist/types/__VUE/datepicker/index.vue.d.ts +1 -63
- package/dist/types/__VUE/menu/index.vue.d.ts +1 -1
- package/dist/types/__VUE/picker/Column.vue.d.ts +1 -0
- package/dist/types/__VUE/tabbar/tabbar.vue.d.ts +6 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/utils/useRelation/useChildren.d.ts +1 -1
- package/package.json +1 -1
- package/dist/style.js +0 -1
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
-
var __publicField = (obj, key, value) =>
|
|
4
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
-
return value;
|
|
6
|
-
};
|
|
3
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
7
4
|
import { B as BaseLang } from "./baseLang-Bnfy6fTl.js";
|
|
8
5
|
class Lang extends BaseLang {
|
|
9
6
|
constructor() {
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
-
var __publicField = (obj, key, value) =>
|
|
4
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
-
return value;
|
|
6
|
-
};
|
|
3
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
7
4
|
import { B as BaseLang } from "./baseLang-Bnfy6fTl.js";
|
|
8
5
|
class Lang extends BaseLang {
|
|
9
6
|
constructor() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createApp } from "vue";
|
|
2
|
-
import { h as isString, i as isFunction } from "./util-
|
|
2
|
+
import { h as isString, i as isFunction } from "./util-D1pvnUYu.js";
|
|
3
3
|
const CreateComponent = (options, component) => {
|
|
4
4
|
let elWrap = document.body;
|
|
5
5
|
const teleport = options.teleport || "body";
|
|
@@ -265,8 +265,7 @@ const _sfc_main = create({
|
|
|
265
265
|
}
|
|
266
266
|
});
|
|
267
267
|
const updateSlotChild = () => {
|
|
268
|
-
if (slots.default)
|
|
269
|
-
state.scrollList = [].concat(slots.default()[0].children);
|
|
268
|
+
if (slots.default) state.scrollList = [].concat(slots.default()[0].children);
|
|
270
269
|
};
|
|
271
270
|
const watchSlots = () => {
|
|
272
271
|
setTimeout(() => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ref, computed, watch, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, createElementVNode, toDisplayString, createCommentVNode, Fragment, renderList, normalizeClass, createTextVNode } from "vue";
|
|
2
2
|
import { c as createComponent } from "../component-DQf3CENX.js";
|
|
3
3
|
import { N as NutPopup } from "../index-wLaOjIn1.js";
|
|
4
|
-
import { u as useLocale } from "../index-
|
|
4
|
+
import { u as useLocale } from "../index-BOB4ytqZ.js";
|
|
5
5
|
import { _ as _export_sfc } from "../_plugin-vue_export-helper-1tPrXgE0.js";
|
|
6
6
|
const { create } = createComponent("number-keyboard");
|
|
7
7
|
const cN = "NutNumberKeyboard";
|
|
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
import { defineComponent, computed, watchEffect, openBlock, createBlock, Transition, withCtx, withDirectives, createElementVNode, normalizeClass, normalizeStyle, withModifiers, renderSlot, vShow } from "vue";
|
|
21
|
-
import { b as body } from "../util-
|
|
21
|
+
import { b as body } from "../util-D1pvnUYu.js";
|
|
22
22
|
import { w as withInstall } from "../with-install-Ch3FF0uS.js";
|
|
23
23
|
let count = 0;
|
|
24
24
|
const CLSNAME = "nut-overflow-hidden";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { toRefs, computed, watchEffect, openBlock, createElementBlock, createElementVNode, normalizeClass, renderSlot, createTextVNode, toDisplayString, Fragment, renderList, createCommentVNode } from "vue";
|
|
2
2
|
import { c as createComponent } from "../component-DQf3CENX.js";
|
|
3
|
-
import { u as useLocale } from "../index-
|
|
3
|
+
import { u as useLocale } from "../index-BOB4ytqZ.js";
|
|
4
4
|
import { _ as _export_sfc } from "../_plugin-vue_export-helper-1tPrXgE0.js";
|
|
5
5
|
const { create } = createComponent("pagination");
|
|
6
6
|
const cN = "NutPagination";
|
|
@@ -54,19 +54,15 @@ const _sfc_main = create({
|
|
|
54
54
|
return Math.max(1, num);
|
|
55
55
|
});
|
|
56
56
|
const select = (curPage, isSelect) => {
|
|
57
|
-
if (curPage > countRef.value || curPage < 1)
|
|
58
|
-
|
|
59
|
-
if (
|
|
60
|
-
emit("update:modelValue", curPage);
|
|
61
|
-
if (isSelect)
|
|
62
|
-
emit("change", curPage);
|
|
57
|
+
if (curPage > countRef.value || curPage < 1) return;
|
|
58
|
+
if (curPage != modelValue.value) emit("update:modelValue", curPage);
|
|
59
|
+
if (isSelect) emit("change", curPage);
|
|
63
60
|
};
|
|
64
61
|
const setPage = (number, text, active = false) => {
|
|
65
62
|
return { number, text, active };
|
|
66
63
|
};
|
|
67
64
|
const pages = computed(() => {
|
|
68
|
-
if (mode.value == "simple")
|
|
69
|
-
return;
|
|
65
|
+
if (mode.value == "simple") return;
|
|
70
66
|
let items = [];
|
|
71
67
|
const pageCount = countRef.value;
|
|
72
68
|
const pageSize = +showPageSize.value;
|
|
@@ -19,11 +19,11 @@ var __spreadValues = (a, b) => {
|
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
import { reactive, computed, ref, watch, toRefs, onMounted, openBlock, createElementBlock, createElementVNode, normalizeStyle, Fragment, renderList, normalizeClass, toDisplayString, createCommentVNode, resolveComponent, renderSlot, createVNode } from "vue";
|
|
21
21
|
import { c as createComponent } from "../component-DQf3CENX.js";
|
|
22
|
-
import { d as preventDefault, e as clamp } from "../util-
|
|
22
|
+
import { d as preventDefault, e as clamp } from "../util-D1pvnUYu.js";
|
|
23
23
|
import { p as pxCheck } from "../pxCheck-DN6FYV6q.js";
|
|
24
24
|
import { u as useTouch } from "../index-I8tfW3Kf.js";
|
|
25
25
|
import { _ as _export_sfc } from "../_plugin-vue_export-helper-1tPrXgE0.js";
|
|
26
|
-
import { u as useLocale } from "../index-
|
|
26
|
+
import { u as useLocale } from "../index-BOB4ytqZ.js";
|
|
27
27
|
const DEFAULT_FILED_NAMES = {
|
|
28
28
|
text: "text",
|
|
29
29
|
value: "value",
|
|
@@ -98,8 +98,7 @@ const usePicker = (props, emit) => {
|
|
|
98
98
|
const options = cursor[fields.children];
|
|
99
99
|
const value = defaultValues2[columnIndex];
|
|
100
100
|
let index = options.findIndex((columnItem) => columnItem[fields.value] === value);
|
|
101
|
-
if (index === -1)
|
|
102
|
-
index = 0;
|
|
101
|
+
if (index === -1) index = 0;
|
|
103
102
|
cursor = cursor[fields.children][index];
|
|
104
103
|
columnIndex++;
|
|
105
104
|
formatted.push(options);
|
|
@@ -335,6 +334,9 @@ const _sfc_main$1 = create$1({
|
|
|
335
334
|
return false;
|
|
336
335
|
}
|
|
337
336
|
};
|
|
337
|
+
const isCurrPick = (index) => {
|
|
338
|
+
return index == state.currIndex;
|
|
339
|
+
};
|
|
338
340
|
const setTransform = (translateY = 0, type, time = DEFAULT_DURATION, deg) => {
|
|
339
341
|
if (type === "end") {
|
|
340
342
|
touchTime.value = time;
|
|
@@ -414,6 +416,7 @@ const _sfc_main$1 = create$1({
|
|
|
414
416
|
return __spreadProps(__spreadValues(__spreadValues({}, toRefs(state)), toRefs(props)), {
|
|
415
417
|
setRollerStyle,
|
|
416
418
|
isHidden,
|
|
419
|
+
isCurrPick,
|
|
417
420
|
roller,
|
|
418
421
|
onTouchStart,
|
|
419
422
|
onTouchMove,
|
|
@@ -456,7 +459,8 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
456
459
|
item && item[_ctx.fieldNames.text] && !_ctx.threeDimensional ? (openBlock(), createElementBlock("view", {
|
|
457
460
|
key: 1,
|
|
458
461
|
class: normalizeClass(["nut-picker-roller-item-tile", {
|
|
459
|
-
[item[_ctx.fieldNames.className]]: item[_ctx.fieldNames.className]
|
|
462
|
+
[item[_ctx.fieldNames.className]]: item[_ctx.fieldNames.className],
|
|
463
|
+
"nut-picker-roller-item-selected": _ctx.isCurrPick(index + 1)
|
|
460
464
|
}]),
|
|
461
465
|
style: normalizeStyle({ height: _ctx.pxCheck(_ctx.optionHeight), lineHeight: _ctx.pxCheck(_ctx.optionHeight) })
|
|
462
466
|
}, toDisplayString(item[_ctx.fieldNames.text]), 7)) : createCommentVNode("", true)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref, computed, onMounted, watch, nextTick, resolveComponent, openBlock, createElementBlock, Fragment, renderSlot, createCommentVNode, createBlock, Teleport, createElementVNode, normalizeClass, normalizeStyle, createVNode, withCtx, renderList, withModifiers, resolveDynamicComponent, toDisplayString } from "vue";
|
|
2
2
|
import { c as createComponent } from "../component-DQf3CENX.js";
|
|
3
|
-
import { r as renderIcon } from "../renderIcon-
|
|
3
|
+
import { r as renderIcon } from "../renderIcon-CfE94nuJ.js";
|
|
4
4
|
import { u as useRect } from "../index-B1qsj2XR.js";
|
|
5
5
|
import { N as NutPopup } from "../index-wLaOjIn1.js";
|
|
6
6
|
import { _ as _export_sfc } from "../_plugin-vue_export-helper-1tPrXgE0.js";
|
|
@@ -86,8 +86,7 @@ const _sfc_main = create({
|
|
|
86
86
|
};
|
|
87
87
|
const getRootPosition = computed(() => {
|
|
88
88
|
const styles = {};
|
|
89
|
-
if (!rootPosition.value)
|
|
90
|
-
return {};
|
|
89
|
+
if (!rootPosition.value) return {};
|
|
91
90
|
const contentWidth = elRect.value.width;
|
|
92
91
|
const contentHeight = elRect.value.height;
|
|
93
92
|
const { width, height, left, top, right } = rootPosition.value;
|
|
@@ -19,12 +19,12 @@ var __spreadValues = (a, b) => {
|
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
import { ref, reactive, computed, watch, toRefs, nextTick, resolveComponent, openBlock, createElementBlock, createElementVNode, normalizeStyle, createBlock, createCommentVNode, toDisplayString, renderSlot } from "vue";
|
|
21
21
|
import { c as createComponent } from "../component-DQf3CENX.js";
|
|
22
|
-
import { j as getScrollTopRoot } from "../util-
|
|
22
|
+
import { j as getScrollTopRoot } from "../util-D1pvnUYu.js";
|
|
23
23
|
import { u as useTouch } from "../index-I8tfW3Kf.js";
|
|
24
24
|
import { p as pxCheck } from "../pxCheck-DN6FYV6q.js";
|
|
25
25
|
import { u as useScrollParent } from "../index-BvmDLUYP.js";
|
|
26
26
|
import { Loading } from "@nutui/icons-vue";
|
|
27
|
-
import { u as useLocale } from "../index-
|
|
27
|
+
import { u as useLocale } from "../index-BOB4ytqZ.js";
|
|
28
28
|
import { _ as _export_sfc } from "../_plugin-vue_export-helper-1tPrXgE0.js";
|
|
29
29
|
const { create } = createComponent("pull-refresh");
|
|
30
30
|
const cN = "NutPullRefresh";
|
|
@@ -100,8 +100,7 @@ const _sfc_main = create({
|
|
|
100
100
|
});
|
|
101
101
|
const getHeightStyle = computed(() => {
|
|
102
102
|
const styles = {};
|
|
103
|
-
if (props.headHeight != 50)
|
|
104
|
-
styles.height = pxCheck(props.headHeight);
|
|
103
|
+
if (props.headHeight != 50) styles.height = pxCheck(props.headHeight);
|
|
105
104
|
return styles;
|
|
106
105
|
});
|
|
107
106
|
const timing = (distance) => {
|
|
@@ -181,8 +180,7 @@ const _sfc_main = create({
|
|
|
181
180
|
if (val) {
|
|
182
181
|
setPullStatus(+props.headHeight, true);
|
|
183
182
|
} else {
|
|
184
|
-
if (props.completeDuration === 0)
|
|
185
|
-
setPullStatus(0);
|
|
183
|
+
if (props.completeDuration === 0) setPullStatus(0);
|
|
186
184
|
setPullStatus(+props.headHeight, false, true);
|
|
187
185
|
setTimeout(() => {
|
|
188
186
|
setPullStatus(0);
|
|
@@ -62,8 +62,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
|
|
|
62
62
|
};
|
|
63
63
|
});
|
|
64
64
|
const handleClick = () => {
|
|
65
|
-
if (checked.value || disabled.value)
|
|
66
|
-
return;
|
|
65
|
+
if (checked.value || disabled.value) return;
|
|
67
66
|
parent.updateValue(props.label);
|
|
68
67
|
};
|
|
69
68
|
const reverseState = computed(() => parent.position.value === "left");
|
|
@@ -19,7 +19,7 @@ var __spreadValues = (a, b) => {
|
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
import { toRef, ref, computed, toRefs, openBlock, createElementBlock, normalizeClass, toDisplayString, createCommentVNode, createElementVNode, normalizeStyle, withModifiers, Fragment, renderList, createTextVNode, renderSlot } from "vue";
|
|
21
21
|
import { c as createComponent } from "../component-DQf3CENX.js";
|
|
22
|
-
import { a as isArray } from "../util-
|
|
22
|
+
import { a as isArray } from "../util-D1pvnUYu.js";
|
|
23
23
|
import { u as useTouch } from "../index-I8tfW3Kf.js";
|
|
24
24
|
import { u as useRect } from "../index-B1qsj2XR.js";
|
|
25
25
|
import { u as useFormDisabled } from "../common-BH7uB7Cn.js";
|
|
@@ -19,7 +19,7 @@ var __spreadValues = (a, b) => {
|
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
import { defineComponent, toRef, ref, openBlock, createElementBlock, Fragment, renderList, unref, normalizeStyle, createElementVNode, createBlock, resolveDynamicComponent, normalizeClass, createCommentVNode } from "vue";
|
|
21
21
|
import { StarFillN } from "@nutui/icons-vue";
|
|
22
|
-
import { r as renderIcon } from "../renderIcon-
|
|
22
|
+
import { r as renderIcon } from "../renderIcon-CfE94nuJ.js";
|
|
23
23
|
import { p as pxCheck } from "../pxCheck-DN6FYV6q.js";
|
|
24
24
|
import { u as useTouch } from "../index-I8tfW3Kf.js";
|
|
25
25
|
import { u as useFormDisabled } from "../common-BH7uB7Cn.js";
|
|
@@ -63,8 +63,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
|
|
|
63
63
|
emit("change", value);
|
|
64
64
|
};
|
|
65
65
|
const onClick = (e, index) => {
|
|
66
|
-
if (disabled.value || props.readonly)
|
|
67
|
-
return;
|
|
66
|
+
if (disabled.value || props.readonly) return;
|
|
68
67
|
let value = 0;
|
|
69
68
|
if (index === 1 && props.modelValue === index) {
|
|
70
69
|
value = 0;
|
|
@@ -93,13 +92,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
|
|
|
93
92
|
};
|
|
94
93
|
const touch = useTouch();
|
|
95
94
|
const onTouchStart = (event) => {
|
|
96
|
-
if (!props.touchable || props.readonly)
|
|
97
|
-
return;
|
|
95
|
+
if (!props.touchable || props.readonly) return;
|
|
98
96
|
touch.start(event);
|
|
99
97
|
};
|
|
100
98
|
const onTouchMove = (event) => {
|
|
101
|
-
if (!props.touchable)
|
|
102
|
-
return;
|
|
99
|
+
if (!props.touchable) return;
|
|
103
100
|
touch.move(event);
|
|
104
101
|
if (touch.isHorizontal()) {
|
|
105
102
|
if (rateRefs.value) {
|
|
@@ -19,9 +19,9 @@ var __spreadValues = (a, b) => {
|
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
import { toRef, reactive, computed, ref, onMounted, toRefs, openBlock, createElementBlock, normalizeClass, normalizeStyle, toDisplayString, createCommentVNode, renderSlot, createElementVNode, withModifiers, withDirectives, createBlock, resolveDynamicComponent, vShow } from "vue";
|
|
21
21
|
import { c as createComponent } from "../component-DQf3CENX.js";
|
|
22
|
-
import { r as renderIcon } from "../renderIcon-
|
|
22
|
+
import { r as renderIcon } from "../renderIcon-CfE94nuJ.js";
|
|
23
23
|
import { CircleClose } from "@nutui/icons-vue";
|
|
24
|
-
import { u as useLocale } from "../index-
|
|
24
|
+
import { u as useLocale } from "../index-BOB4ytqZ.js";
|
|
25
25
|
import { u as useFormDisabled } from "../common-BH7uB7Cn.js";
|
|
26
26
|
import { _ as _export_sfc } from "../_plugin-vue_export-helper-1tPrXgE0.js";
|
|
27
27
|
const { create } = createComponent("searchbar");
|
|
@@ -2,7 +2,7 @@ import { ref, computed, watch, resolveComponent, openBlock, createElementBlock,
|
|
|
2
2
|
import { c as createComponent } from "../component-DQf3CENX.js";
|
|
3
3
|
import { N as NutPopup } from "../index-wLaOjIn1.js";
|
|
4
4
|
import { Tips } from "@nutui/icons-vue";
|
|
5
|
-
import { u as useLocale } from "../index-
|
|
5
|
+
import { u as useLocale } from "../index-BOB4ytqZ.js";
|
|
6
6
|
import { _ as _export_sfc } from "../_plugin-vue_export-helper-1tPrXgE0.js";
|
|
7
7
|
const { create } = createComponent("short-password");
|
|
8
8
|
const cN = "NutShortPassword";
|
|
@@ -20,7 +20,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
20
20
|
import { ref, computed, reactive, onMounted, toRefs, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, withDirectives, vShow, toDisplayString, createCommentVNode, createVNode, withCtx, createTextVNode } from "vue";
|
|
21
21
|
import { c as createComponent } from "../component-DQf3CENX.js";
|
|
22
22
|
import { Button as _sfc_main$1 } from "../button/Button.js";
|
|
23
|
-
import { u as useLocale } from "../index-
|
|
23
|
+
import { u as useLocale } from "../index-BOB4ytqZ.js";
|
|
24
24
|
import { _ as _export_sfc } from "../_plugin-vue_export-helper-1tPrXgE0.js";
|
|
25
25
|
const { create } = createComponent("signature");
|
|
26
26
|
const cN = "NutSignature";
|
package/dist/packages/sku/Sku.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { resolveComponent, openBlock, createElementBlock, createElementVNode, renderSlot, createBlock, createCommentVNode, toDisplayString, ref, watch, onMounted, Fragment, renderList, normalizeClass, createVNode, withCtx, createSlots } from "vue";
|
|
2
2
|
import { Price as _sfc_main$5 } from "../price/Price.js";
|
|
3
3
|
import { c as createComponent } from "../component-DQf3CENX.js";
|
|
4
|
-
import { u as useLocale } from "../index-
|
|
4
|
+
import { u as useLocale } from "../index-BOB4ytqZ.js";
|
|
5
5
|
import { _ as _export_sfc } from "../_plugin-vue_export-helper-1tPrXgE0.js";
|
|
6
6
|
import { InputNumber as _sfc_main$6 } from "../inputnumber/InputNumber.js";
|
|
7
7
|
import { N as NutPopup } from "../index-wLaOjIn1.js";
|
|
@@ -22,8 +22,7 @@ const _sfc_main = create({
|
|
|
22
22
|
};
|
|
23
23
|
const getMarginStyle = (isLast) => {
|
|
24
24
|
const style = {};
|
|
25
|
-
if (!props.gutter)
|
|
26
|
-
return style;
|
|
25
|
+
if (!props.gutter) return style;
|
|
27
26
|
const marginRight = `${getMargin(Array.isArray(props.gutter) ? props.gutter[0] : props.gutter)}`;
|
|
28
27
|
const marginBottom = `${getMargin(Array.isArray(props.gutter) ? props.gutter[1] : props.gutter)}`;
|
|
29
28
|
if (isLast) {
|
|
@@ -47,8 +47,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
|
|
|
47
47
|
const { index, parent } = useParent(STEPS_KEY);
|
|
48
48
|
const status = computed(() => {
|
|
49
49
|
const activeIndex = index.value + 1;
|
|
50
|
-
if (activeIndex < +parent.props.current)
|
|
51
|
-
return "finish";
|
|
50
|
+
if (activeIndex < +parent.props.current) return "finish";
|
|
52
51
|
return activeIndex === +parent.props.current ? "process" : "wait";
|
|
53
52
|
});
|
|
54
53
|
const dot = computed(() => parent.props.progressDot);
|
|
@@ -41,13 +41,11 @@ const _sfc_main = create({
|
|
|
41
41
|
return props.position === "top" ? Number(props.top) : Number(props.bottom);
|
|
42
42
|
});
|
|
43
43
|
const rootStyle = computed(() => {
|
|
44
|
-
if (state.fixed)
|
|
45
|
-
return { height: `${state.height}px` };
|
|
44
|
+
if (state.fixed) return { height: `${state.height}px` };
|
|
46
45
|
return {};
|
|
47
46
|
});
|
|
48
47
|
const stickyStyle = computed(() => {
|
|
49
|
-
if (!state.fixed)
|
|
50
|
-
return {};
|
|
48
|
+
if (!state.fixed) return {};
|
|
51
49
|
return {
|
|
52
50
|
[props.position]: `${threshold.value}px`,
|
|
53
51
|
height: `${state.height}px`,
|
|
@@ -59,8 +57,7 @@ const _sfc_main = create({
|
|
|
59
57
|
});
|
|
60
58
|
const handleScroll = () => {
|
|
61
59
|
const containerEle = props.container;
|
|
62
|
-
if (!rootRef.value && !containerEle)
|
|
63
|
-
return;
|
|
60
|
+
if (!rootRef.value && !containerEle) return;
|
|
64
61
|
const rootRect = useRect(rootRef);
|
|
65
62
|
const stCurrent = stickyRef.value;
|
|
66
63
|
const stickyRect = useRect(stCurrent);
|
|
@@ -122,13 +122,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
|
|
|
122
122
|
};
|
|
123
123
|
const touch = useTouch();
|
|
124
124
|
const onTouchStart = (event) => {
|
|
125
|
-
if (props.disabled)
|
|
126
|
-
return;
|
|
125
|
+
if (props.disabled) return;
|
|
127
126
|
touch.start(event);
|
|
128
127
|
};
|
|
129
128
|
const onTouchMove = (event) => {
|
|
130
|
-
if (props.disabled)
|
|
131
|
-
return;
|
|
129
|
+
if (props.disabled) return;
|
|
132
130
|
touch.move(event);
|
|
133
131
|
if (touch.isHorizontal()) {
|
|
134
132
|
lockClick.value = true;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref, reactive, computed, provide, onDeactivated, onBeforeUnmount, watch, nextTick, openBlock, createElementBlock, createElementVNode, normalizeClass, normalizeStyle, renderSlot, Fragment, renderList, createCommentVNode } from "vue";
|
|
2
2
|
import { c as createComponent } from "../component-DQf3CENX.js";
|
|
3
|
-
import { e as clamp } from "../util-
|
|
3
|
+
import { e as clamp } from "../util-D1pvnUYu.js";
|
|
4
4
|
import { u as useTouch } from "../index-I8tfW3Kf.js";
|
|
5
5
|
import { r as requestAniFrame } from "../raf-c01wDYCo.js";
|
|
6
6
|
import { S as SWIPER_KEY } from "../types-DUkJysbi.js";
|
|
@@ -175,8 +175,7 @@ const _sfc_main = create({
|
|
|
175
175
|
return active;
|
|
176
176
|
};
|
|
177
177
|
const move = ({ pace = 0, offset = 0, isEmit = false }) => {
|
|
178
|
-
if (childCount.value <= 1)
|
|
179
|
-
return;
|
|
178
|
+
if (childCount.value <= 1) return;
|
|
180
179
|
const { active } = state;
|
|
181
180
|
const targetActive = getActive(pace);
|
|
182
181
|
const targetOffset = getOffset(targetActive, offset);
|
|
@@ -248,8 +247,7 @@ const _sfc_main = create({
|
|
|
248
247
|
});
|
|
249
248
|
};
|
|
250
249
|
const autoplay = () => {
|
|
251
|
-
if (+props.autoPlay <= 0 || childCount.value <= 1)
|
|
252
|
-
return;
|
|
250
|
+
if (+props.autoPlay <= 0 || childCount.value <= 1) return;
|
|
253
251
|
stopAutoPlay();
|
|
254
252
|
state.autoplayTimer = setTimeout(() => {
|
|
255
253
|
next();
|
|
@@ -269,12 +267,9 @@ const _sfc_main = create({
|
|
|
269
267
|
autoplay();
|
|
270
268
|
};
|
|
271
269
|
const onTouchStart = (e) => {
|
|
272
|
-
if (props.isPreventDefault)
|
|
273
|
-
|
|
274
|
-
if (props.
|
|
275
|
-
e.stopPropagation();
|
|
276
|
-
if (!props.touchable)
|
|
277
|
-
return;
|
|
270
|
+
if (props.isPreventDefault) e.preventDefault();
|
|
271
|
+
if (props.isStopPropagation) e.stopPropagation();
|
|
272
|
+
if (!props.touchable) return;
|
|
278
273
|
touch.start(e);
|
|
279
274
|
state.touchTime = Date.now();
|
|
280
275
|
stopAutoPlay();
|
|
@@ -291,8 +286,7 @@ const _sfc_main = create({
|
|
|
291
286
|
}
|
|
292
287
|
};
|
|
293
288
|
const onTouchEnd = () => {
|
|
294
|
-
if (!props.touchable || !state.moving)
|
|
295
|
-
return;
|
|
289
|
+
if (!props.touchable || !state.moving) return;
|
|
296
290
|
const speed = delTa.value / (Date.now() - state.touchTime);
|
|
297
291
|
const isShouldMove = Math.abs(speed) > 0.3 || Math.abs(delTa.value) > +(size.value / 2).toFixed(2);
|
|
298
292
|
if (isShouldMove && isCorrectDirection.value) {
|
|
@@ -61,8 +61,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
|
|
|
61
61
|
});
|
|
62
62
|
let updateType = "";
|
|
63
63
|
const onClick = (event) => {
|
|
64
|
-
if (props.loading || disabled.value)
|
|
65
|
-
return;
|
|
64
|
+
if (props.loading || disabled.value) return;
|
|
66
65
|
const value = isActive.value ? props.inactiveValue : props.activeValue;
|
|
67
66
|
updateType = "click";
|
|
68
67
|
emit("update:modelValue", value);
|
|
@@ -17,6 +17,26 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
var __async = (__this, __arguments, generator) => {
|
|
21
|
+
return new Promise((resolve, reject) => {
|
|
22
|
+
var fulfilled = (value) => {
|
|
23
|
+
try {
|
|
24
|
+
step(generator.next(value));
|
|
25
|
+
} catch (e) {
|
|
26
|
+
reject(e);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
var rejected = (value) => {
|
|
30
|
+
try {
|
|
31
|
+
step(generator.throw(value));
|
|
32
|
+
} catch (e) {
|
|
33
|
+
reject(e);
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
37
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
38
|
+
});
|
|
39
|
+
};
|
|
20
40
|
import { defineComponent, ref, computed, watch, onMounted, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, renderSlot, nextTick } from "vue";
|
|
21
41
|
import { u as useChildren } from "../useChildren-BZ4-J79J.js";
|
|
22
42
|
import { T as TABBAR_KEY } from "../types-MuhxzCWc.js";
|
|
@@ -31,7 +51,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
|
|
|
31
51
|
unactiveColor: { default: "" },
|
|
32
52
|
activeColor: { default: "" },
|
|
33
53
|
safeAreaInsetBottom: { type: Boolean, default: false },
|
|
34
|
-
placeholder: { type: Boolean, default: false }
|
|
54
|
+
placeholder: { type: Boolean, default: false },
|
|
55
|
+
beforeSwitch: { type: Function, default: () => true }
|
|
35
56
|
},
|
|
36
57
|
emits: ["tabSwitch", "update:modelValue"],
|
|
37
58
|
setup(__props, { emit: __emit }) {
|
|
@@ -49,11 +70,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
|
|
|
49
70
|
};
|
|
50
71
|
});
|
|
51
72
|
const { children, linkChildren } = useChildren(TABBAR_KEY);
|
|
52
|
-
const changeIndex = (index, active) => {
|
|
73
|
+
const changeIndex = (index, active) => __async(this, null, function* () {
|
|
74
|
+
const res = yield props.beforeSwitch(children[index], active);
|
|
75
|
+
if (res === false) {
|
|
76
|
+
return Promise.reject();
|
|
77
|
+
}
|
|
53
78
|
activeIndex.value = active;
|
|
54
79
|
emit("update:modelValue", active);
|
|
55
80
|
emit("tabSwitch", children[index], active);
|
|
56
|
-
};
|
|
81
|
+
});
|
|
57
82
|
linkChildren({ props, activeIndex, changeIndex });
|
|
58
83
|
watch(
|
|
59
84
|
() => props.modelValue,
|
|
@@ -17,8 +17,28 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
var __async = (__this, __arguments, generator) => {
|
|
21
|
+
return new Promise((resolve, reject) => {
|
|
22
|
+
var fulfilled = (value) => {
|
|
23
|
+
try {
|
|
24
|
+
step(generator.next(value));
|
|
25
|
+
} catch (e) {
|
|
26
|
+
reject(e);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
var rejected = (value) => {
|
|
30
|
+
try {
|
|
31
|
+
step(generator.throw(value));
|
|
32
|
+
} catch (e) {
|
|
33
|
+
reject(e);
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
37
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
38
|
+
});
|
|
39
|
+
};
|
|
20
40
|
import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, normalizeStyle, createVNode, unref, normalizeProps, guardReactiveProps, withCtx, createElementVNode, renderSlot, createCommentVNode, createBlock, resolveDynamicComponent, toDisplayString } from "vue";
|
|
21
|
-
import { r as renderIcon } from "../renderIcon-
|
|
41
|
+
import { r as renderIcon } from "../renderIcon-CfE94nuJ.js";
|
|
22
42
|
import { u as useRouter } from "../index-aiGQ-EiA.js";
|
|
23
43
|
import { u as useParent } from "../useParent-D6DiuxZZ.js";
|
|
24
44
|
import { T as TABBAR_KEY } from "../types-MuhxzCWc.js";
|
|
@@ -51,23 +71,26 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
|
|
|
51
71
|
return ((_a = props.name) != null ? _a : index.value) === parent.activeIndex.value;
|
|
52
72
|
});
|
|
53
73
|
const activeColor = computed(() => active.value ? parent.props.activeColor : parent.props.unactiveColor);
|
|
54
|
-
const change = () => {
|
|
74
|
+
const change = () => __async(this, null, function* () {
|
|
55
75
|
var _a, _b, _c;
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
76
|
+
try {
|
|
77
|
+
const key = (_a = props.name) != null ? _a : index.value;
|
|
78
|
+
yield parent.changeIndex(index.value, key);
|
|
79
|
+
if ((_b = parent.children[index.value]) == null ? void 0 : _b.href) {
|
|
80
|
+
window.location.href = parent.children[index.value].href;
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
if ((_c = parent.children[index.value]) == null ? void 0 : _c.to) {
|
|
84
|
+
const to = parent.children[index.value].to;
|
|
85
|
+
if (to && router) {
|
|
86
|
+
router.push(to);
|
|
87
|
+
} else {
|
|
88
|
+
location.replace(to);
|
|
89
|
+
}
|
|
68
90
|
}
|
|
91
|
+
} catch (err) {
|
|
69
92
|
}
|
|
70
|
-
};
|
|
93
|
+
});
|
|
71
94
|
return (_ctx, _cache) => {
|
|
72
95
|
return openBlock(), createElementBlock("div", {
|
|
73
96
|
class: normalizeClass(["nut-tabbar-item", { "nut-tabbar-item__icon--unactive": !active.value }]),
|
|
@@ -20,7 +20,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
20
20
|
import { defineComponent, h, reactive, watch, toRefs, resolveComponent, openBlock, createElementBlock, createElementVNode, normalizeClass, Fragment, renderList, normalizeStyle, createTextVNode, toDisplayString, renderSlot, createBlock, createCommentVNode } from "vue";
|
|
21
21
|
import { c as createComponent } from "../component-DQf3CENX.js";
|
|
22
22
|
import { DownArrow } from "@nutui/icons-vue";
|
|
23
|
-
import { u as useLocale } from "../index-
|
|
23
|
+
import { u as useLocale } from "../index-BOB4ytqZ.js";
|
|
24
24
|
import { _ as _export_sfc } from "../_plugin-vue_export-helper-1tPrXgE0.js";
|
|
25
25
|
const RenderColumn = defineComponent({
|
|
26
26
|
props: {
|
|
@@ -14,10 +14,7 @@ var __spreadValues = (a, b) => {
|
|
|
14
14
|
}
|
|
15
15
|
return a;
|
|
16
16
|
};
|
|
17
|
-
var __publicField = (obj, key, value) =>
|
|
18
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
19
|
-
return value;
|
|
20
|
-
};
|
|
17
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
21
18
|
var __async = (__this, __arguments, generator) => {
|
|
22
19
|
return new Promise((resolve, reject) => {
|
|
23
20
|
var fulfilled = (value) => {
|
|
@@ -42,7 +39,7 @@ import { ref, onMounted, reactive, provide, computed, watch, onActivated, nextTi
|
|
|
42
39
|
import NutSticky from "../sticky/Sticky.js";
|
|
43
40
|
import { JoySmile } from "@nutui/icons-vue";
|
|
44
41
|
import { c as createComponent } from "../component-DQf3CENX.js";
|
|
45
|
-
import { T as TypeOfFun } from "../util-
|
|
42
|
+
import { T as TypeOfFun } from "../util-D1pvnUYu.js";
|
|
46
43
|
import { p as pxCheck } from "../pxCheck-DN6FYV6q.js";
|
|
47
44
|
import { u as useRect } from "../index-B1qsj2XR.js";
|
|
48
45
|
import { r as requestAniFrame } from "../raf-c01wDYCo.js";
|
|
@@ -114,13 +111,11 @@ const useTabContentTouch = (props, tabMethods, taro, useTaroRect) => {
|
|
|
114
111
|
};
|
|
115
112
|
const touchMethods = {
|
|
116
113
|
onTouchStart(event) {
|
|
117
|
-
if (!props.swipeable)
|
|
118
|
-
return;
|
|
114
|
+
if (!props.swipeable) return;
|
|
119
115
|
touch.start(event);
|
|
120
116
|
},
|
|
121
117
|
onTouchMove(event) {
|
|
122
|
-
if (!props.swipeable)
|
|
123
|
-
return;
|
|
118
|
+
if (!props.swipeable) return;
|
|
124
119
|
touch.move(event);
|
|
125
120
|
touchState.moving = true;
|
|
126
121
|
setoffset(touch.deltaX.value, touch.deltaY.value);
|
|
@@ -266,10 +261,8 @@ const _sfc_main = create({
|
|
|
266
261
|
const currentIndex = ref(props.modelValue || 0);
|
|
267
262
|
const findTabsIndex = (value) => {
|
|
268
263
|
let index = titles.value.findIndex((item) => item.paneKey == value);
|
|
269
|
-
if (titles.value.length == 0)
|
|
270
|
-
|
|
271
|
-
else if (index == -1)
|
|
272
|
-
;
|
|
264
|
+
if (titles.value.length == 0) ;
|
|
265
|
+
else if (index == -1) ;
|
|
273
266
|
else {
|
|
274
267
|
currentIndex.value = index;
|
|
275
268
|
}
|
|
@@ -430,8 +423,7 @@ const _sfc_main = create({
|
|
|
430
423
|
};
|
|
431
424
|
});
|
|
432
425
|
const titleStyle = computed(() => {
|
|
433
|
-
if (!props.titleGutter)
|
|
434
|
-
return {};
|
|
426
|
+
if (!props.titleGutter) return {};
|
|
435
427
|
const px = pxCheck(props.titleGutter);
|
|
436
428
|
if (props.direction === "vertical") {
|
|
437
429
|
return { paddingTop: px, paddingBottom: px };
|