@nutui/nutui 3.1.22-beta.3 → 3.1.22-beta.5
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 +2074 -1902
- package/dist/nutui.umd.js +1024 -852
- package/dist/packages/_es/ActionSheet.js +2 -21
- package/dist/packages/_es/Address.js +5 -24
- package/dist/packages/_es/AddressList.js +1 -1
- package/dist/packages/_es/Animate.js +22 -0
- package/dist/packages/_es/Audio.js +3 -22
- package/dist/packages/_es/AudioOperate.js +2 -21
- package/dist/packages/_es/Avatar.js +3 -19
- package/dist/packages/_es/AvatarGroup.js +1 -1
- package/dist/packages/_es/BackTop.js +1 -1
- package/dist/packages/_es/Badge.js +1 -1
- package/dist/packages/_es/Barrage.js +1 -1
- package/dist/packages/_es/Button.js +1 -1
- package/dist/packages/_es/Calendar.js +13 -7
- package/dist/packages/_es/CalendarItem.js +2 -1
- package/dist/packages/_es/Card.js +1 -1
- package/dist/packages/_es/Cascader.js +7 -39
- package/dist/packages/_es/Category.js +1 -1
- package/dist/packages/_es/CategoryPane.js +1 -1
- package/dist/packages/_es/Cell.js +1 -1
- 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 +1 -1
- package/dist/packages/_es/Col.js +1 -1
- package/dist/packages/_es/Collapse.js +31 -22
- package/dist/packages/_es/CollapseItem.js +40 -62
- package/dist/packages/_es/Comment.js +1 -1
- package/dist/packages/_es/ConfigProvider.js +13 -0
- package/dist/packages/_es/CountDown.js +4 -23
- package/dist/packages/_es/CountUp.js +3 -22
- package/dist/packages/_es/DatePicker.js +5 -24
- package/dist/packages/_es/Dialog.js +2 -21
- package/dist/packages/_es/Divider.js +2 -21
- package/dist/packages/_es/Drag.js +1 -1
- package/dist/packages/_es/Ecard.js +1 -1
- package/dist/packages/_es/Elevator.js +16 -35
- package/dist/packages/_es/Ellipsis.js +64 -0
- package/dist/packages/_es/Empty.js +1 -1
- package/dist/packages/_es/FixedNav.js +1 -1
- package/dist/packages/_es/Form.js +2 -2
- package/dist/packages/_es/FormItem.js +1 -1
- package/dist/packages/_es/Grid.js +1 -1
- package/dist/packages/_es/GridItem.js +1 -1
- package/dist/packages/_es/Icon.js +1 -1
- package/dist/packages/_es/Image.js +31 -0
- package/dist/packages/_es/ImagePreview.js +66 -74
- package/dist/packages/_es/Indicator.js +1 -1
- package/dist/packages/_es/InfiniteLoading.js +3 -22
- package/dist/packages/_es/Input.js +2 -2
- package/dist/packages/_es/InputNumber.js +1 -1
- package/dist/packages/_es/Layout.js +1 -1
- package/dist/packages/_es/List.js +3 -22
- package/dist/packages/_es/Menu.js +37 -22
- package/dist/packages/_es/MenuItem.js +27 -24
- package/dist/packages/_es/Navbar.js +1 -1
- package/dist/packages/_es/NoticeBar.js +3 -22
- package/dist/packages/_es/Notify.js +4 -23
- package/dist/packages/_es/NumberKeyboard.js +1 -1
- package/dist/packages/_es/OldPicker.js +6 -25
- package/dist/packages/_es/OverLay.js +3 -19
- package/dist/packages/_es/Pagination.js +1 -1
- package/dist/packages/_es/Picker.js +6 -25
- package/dist/packages/_es/Popover.js +2 -21
- package/dist/packages/_es/Popup.js +5 -24
- package/dist/packages/_es/Price.js +1 -1
- package/dist/packages/_es/Progress.js +1 -1
- package/dist/packages/_es/PullRefresh.js +3 -19
- package/dist/packages/_es/Radio.js +1 -1
- package/dist/packages/_es/RadioGroup.js +1 -1
- package/dist/packages/_es/Range.js +4 -23
- package/dist/packages/_es/Rate.js +35 -14
- package/dist/packages/_es/Row.js +1 -1
- package/dist/packages/_es/SearchBar.js +3 -22
- package/dist/packages/_es/ShortPassword.js +1 -1
- package/dist/packages/_es/SideNavBar.js +2 -21
- package/dist/packages/_es/SideNavBarItem.js +1 -1
- package/dist/packages/_es/Signature.js +3 -22
- package/dist/packages/_es/Skeleton.js +1 -1
- package/dist/packages/_es/Sku.js +2 -21
- package/dist/packages/_es/Step.js +3 -22
- package/dist/packages/_es/Steps.js +1 -1
- package/dist/packages/_es/Sticky.js +1 -1
- package/dist/packages/_es/SubSideNavBar.js +3 -22
- package/dist/packages/_es/Swipe.js +3 -22
- package/dist/packages/_es/Swiper.js +1 -1
- package/dist/packages/_es/SwiperItem.js +1 -1
- package/dist/packages/_es/Switch.js +1 -1
- package/dist/packages/_es/TabPane.js +1 -1
- package/dist/packages/_es/Tabbar.js +2 -2
- package/dist/packages/_es/TabbarItem.js +1 -1
- package/dist/packages/_es/Table.js +3 -22
- package/dist/packages/_es/Tabs.js +2 -18
- package/dist/packages/_es/Tag.js +1 -1
- package/dist/packages/_es/TextArea.js +1 -1
- package/dist/packages/_es/TimeDetail.js +3 -22
- package/dist/packages/_es/TimePannel.js +3 -22
- package/dist/packages/_es/TimeSelect.js +12 -12
- package/dist/packages/_es/Toast.js +4 -23
- package/dist/packages/_es/Uploader.js +5 -21
- package/dist/packages/_es/Video.js +3 -22
- package/dist/packages/_es/common.js +1 -1
- package/dist/packages/_es/component.js +1 -1
- package/dist/packages/_es/index.js +1 -1
- package/dist/packages/_es/index2.js +1 -1
- package/dist/packages/_es/index3.js +1 -1
- package/dist/packages/_es/index4.js +8 -8
- package/dist/packages/_es/index5.js +123 -86
- package/dist/packages/_es/plugin-vue_export-helper.js +1 -1
- package/dist/packages/_es/pxCheck.js +1 -1
- package/dist/packages/_es/raf.js +1 -1
- package/dist/packages/animate/index.scss +299 -0
- package/dist/packages/cell/index.scss +7 -1
- package/dist/packages/checkbox/index.scss +10 -0
- package/dist/packages/configprovider/index.scss +2 -0
- package/dist/packages/ellipsis/index.scss +12 -0
- package/dist/packages/formitem/index.scss +12 -0
- package/dist/packages/griditem/index.scss +11 -0
- package/dist/packages/image/index.scss +39 -0
- package/dist/packages/imagepreview/index.scss +21 -2
- package/dist/packages/input/index.scss +13 -0
- package/dist/packages/inputnumber/index.scss +21 -0
- package/dist/packages/locale/lang/baseLang.js +1 -1
- package/dist/packages/locale/lang/en-US.js +1 -1
- package/dist/packages/locale/lang/id-ID.js +1 -1
- package/dist/packages/locale/lang/index.js +1 -1
- package/dist/packages/locale/lang/zh-CN.js +1 -1
- package/dist/packages/locale/lang/zh-TW.js +1 -1
- package/dist/packages/menu/index.scss +45 -36
- package/dist/packages/menuitem/index.scss +4 -0
- package/dist/packages/navbar/index.scss +9 -0
- package/dist/packages/pagination/index.scss +19 -0
- package/dist/packages/radio/index.scss +18 -0
- package/dist/packages/range/index.scss +19 -0
- package/dist/packages/rate/index.scss +1 -1
- package/dist/packages/searchbar/index.scss +21 -0
- package/dist/packages/switch/index.scss +1 -0
- package/dist/packages/tabbar/index.scss +5 -0
- package/dist/packages/tabbaritem/index.scss +7 -0
- package/dist/packages/tabpane/index.scss +5 -0
- package/dist/packages/tabs/index.scss +22 -0
- package/dist/packages/textarea/index.scss +8 -0
- package/dist/smartips/attributes.json +132 -4
- package/dist/smartips/tags.json +53 -6
- package/dist/smartips/web-types.json +6945 -0
- package/dist/style.css +1 -1
- package/dist/style.es.js +1 -1
- package/dist/styles/font/config.json +3 -1
- package/dist/styles/font/demo_index.html +49 -3
- package/dist/styles/font/iconfont.css +11 -3
- package/dist/styles/font/iconfont.js +15 -15
- package/dist/styles/font/iconfont.json +14 -0
- package/dist/styles/font/iconfont.ttf +0 -0
- package/dist/styles/font/iconfont.woff +0 -0
- package/dist/styles/font/iconfont.woff2 +0 -0
- package/dist/styles/themes/default.scss +53 -49
- package/dist/styles/themes/jdb.scss +53 -49
- package/dist/styles/themes/jdt.scss +53 -49
- package/dist/styles/variables-jdb.scss +9 -0
- package/dist/styles/variables-jdt.scss +9 -0
- package/dist/styles/variables.scss +12 -0
- package/dist/types/__VUE/address/index.vue.d.ts +4 -4
- package/dist/types/__VUE/animate/index.vue.d.ts +48 -0
- package/dist/types/__VUE/animate/type.d.ts +6 -0
- package/dist/types/__VUE/avatar/index.vue.d.ts +3 -3
- package/dist/types/__VUE/calendaritem/index.vue.d.ts +10 -2
- package/dist/types/__VUE/cascader/index.vue.d.ts +1 -1
- package/dist/types/__VUE/cell/index.vue.d.ts +2 -2
- package/dist/types/__VUE/checkbox/index.vue.d.ts +2 -2
- package/dist/types/__VUE/circleprogress/index.vue.d.ts +2 -2
- package/dist/types/__VUE/collapse/index.vue.d.ts +5 -3
- package/dist/types/__VUE/configprovider/common.d.ts +20 -0
- package/dist/types/__VUE/configprovider/index.vue.d.ts +33 -0
- package/dist/types/__VUE/divider/index.vue.d.ts +2 -2
- package/dist/types/__VUE/ecard/index.vue.d.ts +2 -2
- package/dist/types/__VUE/ellipsis/index.vue.d.ts +72 -0
- package/dist/types/__VUE/grid/index.vue.d.ts +4 -4
- package/dist/types/__VUE/image/index.vue.d.ts +105 -0
- package/dist/types/__VUE/image/type.d.ts +6 -0
- package/dist/types/__VUE/imagepreview/index.vue.d.ts +36 -2
- package/dist/types/__VUE/infiniteloading/index.vue.d.ts +6 -6
- package/dist/types/__VUE/input/index.vue.d.ts +2 -2
- package/dist/types/__VUE/menu/index.vue.d.ts +29 -2
- package/dist/types/__VUE/menuitem/index.vue.d.ts +12 -3
- package/dist/types/__VUE/noticebar/index.vue.d.ts +1 -1
- package/dist/types/__VUE/oldpicker/index.vue.d.ts +2 -2
- package/dist/types/__VUE/picker/index.vue.d.ts +2 -2
- package/dist/types/__VUE/popover/index.vue.d.ts +4 -4
- package/dist/types/__VUE/range/index.vue.d.ts +1 -1
- package/dist/types/__VUE/rate/common.d.ts +149 -0
- package/dist/types/__VUE/rate/index.vue.d.ts +19 -9
- package/dist/types/__VUE/row/index.vue.d.ts +2 -2
- package/dist/types/__VUE/searchbar/index.vue.d.ts +2 -2
- package/dist/types/__VUE/shortpassword/index.vue.d.ts +2 -2
- package/dist/types/__VUE/swiper/index.vue.d.ts +2 -2
- package/dist/types/__VUE/switch/index.vue.d.ts +2 -2
- package/dist/types/__VUE/textarea/index.vue.d.ts +2 -2
- package/dist/types/__VUE/timeselect/index.vue.d.ts +3 -2
- package/dist/types/__VUE/toast/index.vue.d.ts +1 -1
- package/dist/types/__VUE/uploader/uploader.d.ts +1 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/nutui.d.ts +5 -1
- package/package.json +5 -3
|
@@ -1,55 +1,36 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __spreadValues = (a2, b2) => {
|
|
9
|
-
for (var prop in b2 || (b2 = {}))
|
|
10
|
-
if (__hasOwnProp.call(b2, prop))
|
|
11
|
-
__defNormalProp(a2, prop, b2[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b2)) {
|
|
14
|
-
if (__propIsEnum.call(b2, prop))
|
|
15
|
-
__defNormalProp(a2, prop, b2[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a2;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a2, b2) => __defProps(a2, __getOwnPropDescs(b2));
|
|
20
1
|
/*!
|
|
21
|
-
* @nutui/nutui v3.1.22-beta.
|
|
2
|
+
* @nutui/nutui v3.1.22-beta.5 Fri Jun 24 2022 15:10:09 GMT+0800 (中国标准时间)
|
|
22
3
|
* (c) 2022 @jdf2e.
|
|
23
4
|
* Released under the MIT License.
|
|
24
5
|
*/
|
|
25
|
-
import { inject as e, reactive as
|
|
26
|
-
import { c as
|
|
6
|
+
import { inject as e, reactive as t, computed as o, getCurrentInstance as l, ref as n, watch as s, onMounted as i, toRefs as a, nextTick as p, resolveComponent as c, openBlock as r, createElementBlock as d, normalizeClass as u, createElementVNode as m, createBlock as f, createCommentVNode as y, renderSlot as g, normalizeStyle as v } from "vue";
|
|
7
|
+
import { c as x } from "./component.js";
|
|
27
8
|
import { _ as h } from "./plugin-vue_export-helper.js";
|
|
28
9
|
import "../locale/lang";
|
|
29
|
-
const { create: w, componentName: I } =
|
|
30
|
-
const d2 = e("collapseParent"), u2 =
|
|
10
|
+
const { create: w, componentName: I } = x("collapse-item"), S = w({ props: { title: { type: String, default: "" }, subTitle: { type: String, default: "" }, disabled: { type: Boolean, default: false }, name: { type: [Number, String], default: -1, required: true }, collapseRef: { type: Object } }, setup(c2, r2) {
|
|
11
|
+
const d2 = e("collapseParent"), u2 = t(d2), m2 = o(() => ({ [I]: true, [`${I}-icon`]: u2.props.icon }));
|
|
31
12
|
var f2;
|
|
32
|
-
(f2 =
|
|
33
|
-
const
|
|
34
|
-
const e2 =
|
|
35
|
-
if (!e2 || !
|
|
13
|
+
(f2 = l()).proxy && u2.children.push(f2.proxy);
|
|
14
|
+
const y2 = t({ icon: u2.props.icon, iconSize: u2.props.iconSize, iconColor: u2.props.iconColor, openExpanded: false, iconStyle: { transform: "rotate(0deg)", marginTop: u2.props.iconHeght ? "-" + u2.props.iconHeght / 2 + "px" : "-10px" } }), g2 = t({ titleIcon: u2.props.titleIcon, titleIconSize: u2.props.titleIconSize, titleIconColor: u2.props.titleIconColor, titleIconPosition: u2.props.titleIconPosition }), v2 = n(null), x2 = n(null), h2 = () => {
|
|
15
|
+
const e2 = v2.value, t2 = x2.value;
|
|
16
|
+
if (!e2 || !t2)
|
|
36
17
|
return;
|
|
37
|
-
const
|
|
38
|
-
if (
|
|
39
|
-
const
|
|
40
|
-
e2.style.willChange = "height", e2.style.height =
|
|
18
|
+
const o2 = t2.offsetHeight || "auto";
|
|
19
|
+
if (o2) {
|
|
20
|
+
const t3 = `${o2}px`;
|
|
21
|
+
e2.style.willChange = "height", e2.style.height = y2.openExpanded ? t3 : 0, u2.props.icon && !y2.openExpanded ? y2.iconStyle.transform = "rotate(0deg)" : y2.iconStyle.transform = "rotate(" + u2.props.rotate + "deg)";
|
|
41
22
|
}
|
|
42
|
-
|
|
23
|
+
y2.openExpanded || (() => {
|
|
43
24
|
const e3 = document.getElementsByClassName("collapse-wrapper")[0];
|
|
44
25
|
e3 && (e3.style.willChange = "auto");
|
|
45
26
|
})();
|
|
46
27
|
}, w2 = () => {
|
|
47
|
-
|
|
48
|
-
},
|
|
49
|
-
w2(), u2.props.icon && (
|
|
50
|
-
},
|
|
51
|
-
s(
|
|
52
|
-
e2 && (
|
|
28
|
+
y2.openExpanded = !y2.openExpanded, h2();
|
|
29
|
+
}, S2 = () => {
|
|
30
|
+
w2(), u2.props.icon && (y2.iconStyle.transform = "rotate(" + u2.props.rotate + "deg)");
|
|
31
|
+
}, T2 = o(() => c2.name), b2 = o(() => u2 ? u2.isExpanded(c2.name) : null);
|
|
32
|
+
s(b2, (e2, t2) => {
|
|
33
|
+
e2 && (y2.openExpanded = true);
|
|
53
34
|
}), s(() => {
|
|
54
35
|
var _a, _b;
|
|
55
36
|
return (_b = (_a = r2 == null ? void 0 : r2.slots) == null ? void 0 : _a.default) == null ? void 0 : _b.call(_a);
|
|
@@ -57,32 +38,29 @@ const { create: w, componentName: I } = v("collapse-item"), T = w({ props: { tit
|
|
|
57
38
|
setTimeout(() => {
|
|
58
39
|
h2();
|
|
59
40
|
}, 300);
|
|
60
|
-
}), i(() => {
|
|
61
|
-
const { name: e2 } = c2, o2 = u2 && u2.props.active;
|
|
62
|
-
a(() => {
|
|
63
|
-
if (typeof o2 == "number" || typeof o2 == "string")
|
|
64
|
-
e2 == o2 && T2();
|
|
65
|
-
else if (Object.values(o2) instanceof Array) {
|
|
66
|
-
Object.values(o2).filter((o3) => o3 == e2).length > 0 && T2();
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
41
|
});
|
|
70
|
-
|
|
42
|
+
i(() => {
|
|
43
|
+
(() => {
|
|
44
|
+
const { name: e2 } = c2, t2 = u2 && u2.props.active;
|
|
45
|
+
p(() => {
|
|
46
|
+
typeof t2 == "number" || typeof t2 == "string" ? e2 == t2 && S2() : Object.values(t2) instanceof Array && Object.values(t2).filter((t3) => t3 == e2).length > 0 && S2();
|
|
47
|
+
});
|
|
48
|
+
})();
|
|
49
|
+
});
|
|
50
|
+
return { classes: m2, emptyContent: o(() => {
|
|
71
51
|
var _a;
|
|
72
52
|
let e2 = "";
|
|
73
|
-
return ((_a =
|
|
74
|
-
})
|
|
75
|
-
u2.props.accordion ? (
|
|
76
|
-
|
|
77
|
-
})
|
|
78
|
-
u2.changeVal(b2.value), h2();
|
|
79
|
-
})) : (u2.changeValAry(c2.name), w2());
|
|
53
|
+
return ((_a = x2.value) == null ? void 0 : _a.innerText) || (e2 = "empty"), e2;
|
|
54
|
+
}), ...a(y2), ...a(u2.props), ...a(g2), wrapperRef: v2, contentRef: x2, open: w2, toggleOpen: () => {
|
|
55
|
+
u2.props.accordion ? p(() => {
|
|
56
|
+
T2.value == u2.props.active ? w2() : u2.changeVal(T2.value);
|
|
57
|
+
}) : (u2.changeValAry(String(c2.name)), w2());
|
|
80
58
|
}, changeOpen: (e2) => {
|
|
81
|
-
|
|
82
|
-
}, animation: h2 }
|
|
83
|
-
} }),
|
|
84
|
-
var
|
|
59
|
+
y2.openExpanded = e2;
|
|
60
|
+
}, animation: h2 };
|
|
61
|
+
} }), T = { class: "collapse-title" }, b = { class: "collapse-title-value" }, C = ["innerHTML"], E = { key: 0, class: "subTitle" }, z = ["innerHTML"], R = { key: 0, class: "collapse-extraWrapper" }, $ = { class: "collapse-extraRender" }, k = { class: "collapse-wrapper", ref: "wrapperRef" };
|
|
62
|
+
var H = h(S, [["render", function(e2, t2, o2, l2, n2, s2) {
|
|
85
63
|
const i2 = c("nut-icon");
|
|
86
|
-
return r(), d("view", { class: u(e2.classes) }, [m("view", { class: u(["collapse-item", { "item-expanded": e2.openExpanded }, { "nut-collapse-item-disabled": e2.disabled }]), onClick:
|
|
64
|
+
return r(), d("view", { class: u(e2.classes) }, [m("view", { class: u(["collapse-item", { "item-expanded": e2.openExpanded }, { "nut-collapse-item-disabled": e2.disabled }]), onClick: t2[0] || (t2[0] = (...t3) => e2.toggleOpen && e2.toggleOpen(...t3)) }, [m("view", T, [m("view", null, [m("view", b, [e2.titleIcon ? (r(), f(i2, { key: 0, name: e2.titleIcon, size: e2.titleIconSize, color: e2.titleIconColor, class: u([e2.titleIconPosition == "left" ? "titleIconLeft" : "titleIconRight"]) }, null, 8, ["name", "size", "color", "class"])) : y("", true), e2.$slots.mTitle ? g(e2.$slots, "mTitle", { key: 1 }) : (r(), d("view", { key: 2, innerHTML: e2.title, class: "collapse-icon-title" }, null, 8, C))])])]), e2.$slots.sTitle ? (r(), d("view", E, [g(e2.$slots, "sTitle")])) : (r(), d("view", { key: 1, innerHTML: e2.subTitle, class: "subTitle" }, null, 8, z)), e2.icon ? (r(), f(i2, { key: 2, name: e2.icon, size: e2.iconSize, color: e2.iconColor, class: u(["collapse-icon", { "col-expanded": e2.openExpanded }, { "collapse-icon-disabled": e2.disabled }]), style: v(e2.iconStyle) }, null, 8, ["name", "size", "color", "class", "style"])) : y("", true)], 2), e2.$slots.extraRender ? (r(), d("view", R, [m("div", $, [g(e2.$slots, "extraRender")])])) : y("", true), m("view", k, [m("view", { class: u(["collapse-content", e2.emptyContent]), ref: "contentRef" }, [g(e2.$slots, "default")], 2)], 512)], 2);
|
|
87
65
|
}]]);
|
|
88
|
-
export {
|
|
66
|
+
export { H as default };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* @nutui/nutui v3.1.22-beta.5 Fri Jun 24 2022 15:10:09 GMT+0800 (中国标准时间)
|
|
3
|
+
* (c) 2022 @jdf2e.
|
|
4
|
+
* Released under the MIT License.
|
|
5
|
+
*/
|
|
6
|
+
import { c as t } from "./component.js";
|
|
7
|
+
import { h as e } from "vue";
|
|
8
|
+
import "../locale/lang";
|
|
9
|
+
const o = { props: { theme: { type: String, default: "" }, tag: { type: String, default: "div" } }, setup: (t2, { slots: o2 }) => () => {
|
|
10
|
+
var _a;
|
|
11
|
+
return e(t2.tag, { class: `nut-theme-${t2.theme}` }, (_a = o2.default) == null ? void 0 : _a.call(o2));
|
|
12
|
+
} }, { componentName: a, create: p } = t("config-provider"), r = p(o);
|
|
13
|
+
export { r as default };
|
|
@@ -1,24 +1,5 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __spreadValues = (a2, b) => {
|
|
9
|
-
for (var prop in b || (b = {}))
|
|
10
|
-
if (__hasOwnProp.call(b, prop))
|
|
11
|
-
__defNormalProp(a2, prop, b[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
-
if (__propIsEnum.call(b, prop))
|
|
15
|
-
__defNormalProp(a2, prop, b[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a2;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a2, b) => __defProps(a2, __getOwnPropDescs(b));
|
|
20
1
|
/*!
|
|
21
|
-
* @nutui/nutui v3.1.22-beta.
|
|
2
|
+
* @nutui/nutui v3.1.22-beta.5 Fri Jun 24 2022 15:10:09 GMT+0800 (中国标准时间)
|
|
22
3
|
* (c) 2022 @jdf2e.
|
|
23
4
|
* Released under the MIT License.
|
|
24
5
|
*/
|
|
@@ -49,7 +30,7 @@ const d = (e2, t2 = 2) => {
|
|
|
49
30
|
const n2 = e2;
|
|
50
31
|
let r2 = { d: 0, h: 0, m: 0, s: 0, ms: 0 };
|
|
51
32
|
const a2 = 1e3, i3 = 6e4, o3 = 36e5, s3 = 24 * o3;
|
|
52
|
-
return n2 > 0 && (r2.d = n2 >= a2 ? Math.floor(n2 / s3) : 0, r2.h = Math.floor(n2 % s3 / o3), r2.m = Math.floor(n2 % o3 / i3), r2.s = Math.floor(n2 % i3 / a2), r2.ms = Math.floor(n2 % a2)), t2 == "custom" ? r2 : h2(
|
|
33
|
+
return n2 > 0 && (r2.d = n2 >= a2 ? Math.floor(n2 / s3) : 0, r2.h = Math.floor(n2 % s3 / o3), r2.m = Math.floor(n2 % o3 / i3), r2.s = Math.floor(n2 % i3 / a2), r2.ms = Math.floor(n2 % a2)), t2 == "custom" ? r2 : h2({ ...r2 });
|
|
53
34
|
}, h2 = (e2) => {
|
|
54
35
|
let { d: t2, h: n2, m: r2, s: a2, ms: o3 } = e2, s3 = i2.format;
|
|
55
36
|
if (s3.includes("DD") ? s3 = s3.replace("DD", d(t2)) : n2 += 24 * Number(t2), s3.includes("HH") ? s3 = s3.replace("HH", d(n2)) : r2 += 60 * Number(n2), s3.includes("mm") ? s3 = s3.replace("mm", d(r2)) : a2 += 60 * Number(r2), s3.includes("ss") ? s3 = s3.replace("ss", d(a2)) : o3 += 1e3 * Number(a2), s3.includes("S")) {
|
|
@@ -71,11 +52,11 @@ const d = (e2, t2 = 2) => {
|
|
|
71
52
|
T2();
|
|
72
53
|
}), r(() => i2.startTime, (e2) => {
|
|
73
54
|
T2();
|
|
74
|
-
}),
|
|
55
|
+
}), { ...a(i2), slots: s2, classes: l2, getTimeStamp: c, start: () => {
|
|
75
56
|
m2.counting || i2.autoStart || (m2.counting = true, m2.handleEndTime = Date.now() + Number(m2.restTime), S2(), o2("on-restart", m2.restTime));
|
|
76
57
|
}, pause: w, renderTime: u2, translate: f, reset: () => {
|
|
77
58
|
i2.autoStart || (w(), m2.restTime = i2.time);
|
|
78
|
-
} }
|
|
59
|
+
} };
|
|
79
60
|
} }), g = ["innerHTML"];
|
|
80
61
|
var h = u(S, [["render", function(e2, t2, n2, r2, a2, l2) {
|
|
81
62
|
return i(), o("view", { class: s(e2.classes) }, [e2.slots.default ? m(e2.$slots, "default", { key: 0 }) : (i(), o("view", { key: 1, class: "nut-cd-block", innerHTML: e2.renderTime }, null, 8, g))], 2);
|
|
@@ -1,24 +1,5 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __spreadValues = (a2, b2) => {
|
|
9
|
-
for (var prop in b2 || (b2 = {}))
|
|
10
|
-
if (__hasOwnProp.call(b2, prop))
|
|
11
|
-
__defNormalProp(a2, prop, b2[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b2)) {
|
|
14
|
-
if (__propIsEnum.call(b2, prop))
|
|
15
|
-
__defNormalProp(a2, prop, b2[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a2;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a2, b2) => __defProps(a2, __getOwnPropDescs(b2));
|
|
20
1
|
/*!
|
|
21
|
-
* @nutui/nutui v3.1.22-beta.
|
|
2
|
+
* @nutui/nutui v3.1.22-beta.5 Fri Jun 24 2022 15:10:09 GMT+0800 (中国标准时间)
|
|
22
3
|
* (c) 2022 @jdf2e.
|
|
23
4
|
* Released under the MIT License.
|
|
24
5
|
*/
|
|
@@ -153,7 +134,7 @@ const { componentName: f, create: v } = N("countup"), y = v({ props: { initNum:
|
|
|
153
134
|
});
|
|
154
135
|
}), u(() => {
|
|
155
136
|
f2(), p2.timer = null;
|
|
156
|
-
}),
|
|
137
|
+
}), { ...m(p2), ...m(n(a2)), runNumberImg: g2, setRef: (t2) => {
|
|
157
138
|
s2.value.push(t2);
|
|
158
139
|
}, topNumber: (t2) => {
|
|
159
140
|
let { num_total_len: e2, pointNum: n2, initDigit1: i2, initDigit2: r2, sortFlag: l2 } = p2, u2 = l2 == "add" || l2 == "equal" ? String(r2)[t2 - (e2 - n2)] : 10 - Number(String(r2)[t2 - (e2 - n2)]), m2 = l2 == "add" || l2 == "equal" ? String(i2)[t2] : 10 - Number(String(i2)[t2]), a3 = t2 > e2 - n2 - 1 ? 100 * -u2 + "%" : t2 <= String(i2).length - 1 ? 100 * -m2 + "%" : 0;
|
|
@@ -161,7 +142,7 @@ const { componentName: f, create: v } = N("countup"), y = v({ props: { initNum:
|
|
|
161
142
|
}, turnNumber: (t2) => {
|
|
162
143
|
let { num_total_len: e2, pointNum: n2, initDigit1: i2, initDigit2: r2, sortFlag: l2 } = p2, u2 = String(r2)[t2 - (e2 - n2)];
|
|
163
144
|
return t2 > e2 - n2 - 1 ? u2 || 0 : t2 <= String(i2).length - 1 ? String(i2)[t2] : 0;
|
|
164
|
-
} }
|
|
145
|
+
} };
|
|
165
146
|
} }), S = { class: "nut-countup" }, x = ["turn-number"];
|
|
166
147
|
var F = b(y, [["render", function(t2, e2, n2, i2, r2, l2) {
|
|
167
148
|
return a(), o("view", S, [t2.customBgImg != "" ? (a(), o(g, { key: 0 }, [t2.type == "machine" ? (a(), o("view", { key: 0, class: "run-number-machine-img", style: s({ height: t2.numHeight + "px" }) }, [(a(true), o(g, null, p(t2.machineNum, (e3, n3) => (a(), o("view", { class: "run-number-machine-img-li", ref: "run-number-machine-img-li", key: "mImg" + n3, style: s({ width: t2.numWidth + "px", height: t2.numHeight + "px", backgroundImage: "url(" + t2.customBgImg + ")", backgroundPositionY: t2.prizeY[n3] + "px" }) }, null, 4))), 128))], 4)) : (a(), o("view", { key: 1, ref: "runNumberImg", class: "run-number-img", style: s({ height: t2.numHeight + "px" }) }, [(a(true), o(g, null, p(t2.num_total_len, (e3, n3) => (a(), o("view", { class: "run-number-img-li", key: "cImg" + n3, style: s({ width: t2.numWidth + "px", height: t2.numHeight + "px", left: t2.numWidth * (n3 > t2.num_total_len - t2.pointNum - 1 ? n3 == t2.num_total_len - t2.pointNum ? 1.5 * n3 : 1.3 * n3 : n3) + "px", backgroundImage: "url(" + t2.customBgImg + ")", backgroundPositionX: "0", backgroundPositionY: -(String(t2.relNum)[n3] * t2.numHeight + t2.customSpacNum * String(t2.relNum)[n3]) + "px", transition: "all linear " + t2.during / 10 + "ms" }) }, null, 4))), 128)), t2.pointNum > 0 ? (a(), o("view", { key: 0, class: "pointstyl", style: s({ width: t2.numWidth / 2 + "px", bottom: 0, left: t2.numWidth * (t2.num_total_len - t2.pointNum) * 1.1 + "px", fontSize: "30px" }) }, ".", 4)) : c("", true)], 4))], 64)) : (a(), o(g, { key: 1 }, [t2.scrolling ? (a(), o("view", { key: 0, class: "run-number", style: s({ width: t2.numWidth * t2.num_total_len + t2.numWidth / 3 + "px", height: t2.numHeight + "px", lineHeight: t2.numHeight + "px" }) }, [(a(true), o(g, null, p(t2.num_total_len, (e3, n3) => (a(), o("view", { ref: t2.setRef, class: "numberItem", key: e3, style: s({ top: t2.topNumber(n3), left: t2.numWidth * (n3 > t2.num_total_len - t2.pointNum - 1 ? 1.1 * n3 : n3) + "px" }), "turn-number": t2.turnNumber(n3) }, [(a(true), o(g, null, p(t2.to0_10, (e4, n4) => (a(), o("view", { class: "itemSpan", key: "dote" + n4, style: s({ width: t2.numWidth + "px", height: t2.numHeight + "px", lineHeight: t2.numHeight + "px" }) }, h(e4), 5))), 128))], 12, x))), 128)), t2.pointNum > 0 ? (a(), o("view", { key: 0, class: "pointstyl", style: s({ width: t2.numWidth / 3 + "px", height: t2.numHeight + "px", lineHeight: t2.numHeight + "px", top: 0, left: t2.numWidth * (t2.num_total_len - t2.pointNum) + "px" }) }, ".", 4)) : c("", true)], 4)) : (a(), o(g, { key: 1 }, [d(h(t2.current), 1)], 64))], 64))]);
|
|
@@ -1,24 +1,5 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __spreadValues = (a2, b2) => {
|
|
9
|
-
for (var prop in b2 || (b2 = {}))
|
|
10
|
-
if (__hasOwnProp.call(b2, prop))
|
|
11
|
-
__defNormalProp(a2, prop, b2[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b2)) {
|
|
14
|
-
if (__propIsEnum.call(b2, prop))
|
|
15
|
-
__defNormalProp(a2, prop, b2[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a2;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a2, b2) => __defProps(a2, __getOwnPropDescs(b2));
|
|
20
1
|
/*!
|
|
21
|
-
* @nutui/nutui v3.1.22-beta.
|
|
2
|
+
* @nutui/nutui v3.1.22-beta.5 Fri Jun 24 2022 15:10:09 GMT+0800 (中国标准时间)
|
|
22
3
|
* (c) 2022 @jdf2e.
|
|
23
4
|
* Released under the MIT License.
|
|
24
5
|
*/
|
|
@@ -31,7 +12,7 @@ import "./OverLay.js";
|
|
|
31
12
|
import "../locale/lang";
|
|
32
13
|
import "./Icon.js";
|
|
33
14
|
import "./pxCheck.js";
|
|
34
|
-
function h(e2, t2) {
|
|
15
|
+
function h(e2, t2 = 2) {
|
|
35
16
|
let a2 = e2 + "";
|
|
36
17
|
for (; a2.length < t2; )
|
|
37
18
|
a2 = "0" + a2;
|
|
@@ -41,7 +22,7 @@ const { componentName: g, create: y, translate: D } = d("datepicker"), f = new D
|
|
|
41
22
|
function x(e2) {
|
|
42
23
|
return Object.prototype.toString.call(e2) === "[object Date]" && !isNaN(e2.getTime());
|
|
43
24
|
}
|
|
44
|
-
const b = { day: D("day"), year: D("year"), month: D("month"), hour: D("hour"), minute: D("minute"), seconds: D("seconds") }, v = y({ components: { [c.name]: c }, props:
|
|
25
|
+
const b = { day: D("day"), year: D("year"), month: D("month"), hour: D("hour"), minute: D("minute"), seconds: D("seconds") }, v = y({ components: { [c.name]: c }, props: { ...m, modelValue: null, title: { type: String, default: "" }, okText: { type: String, default: "" }, cancelText: { type: String, default: "" }, type: { type: String, default: "date" }, isShowChinese: { type: Boolean, default: false }, minuteStep: { type: Number, default: 1 }, minDate: { type: Date, default: () => new Date(f - 10, 0, 1), validator: x }, maxDate: { type: Date, default: () => new Date(f + 10, 11, 31), validator: x }, formatter: { type: Function, default: null }, filter: Function }, emits: ["click", "update:visible", "change", "confirm", "update:moduleValue"], setup(o2, { emit: l2 }) {
|
|
45
26
|
const u2 = e({ show: o2.visible, currentDate: new Date(), title: o2.title, selectedValue: [] }), i2 = (e2) => {
|
|
46
27
|
x(e2) || (e2 = o2.minDate);
|
|
47
28
|
let t2 = Math.max(e2.getTime(), o2.minDate.getTime());
|
|
@@ -104,7 +85,7 @@ const b = { day: D("day"), year: D("year"), month: D("month"), hour: D("hour"),
|
|
|
104
85
|
u2.title = e2;
|
|
105
86
|
}), n(() => o2.visible, (e2) => {
|
|
106
87
|
u2.show = e2;
|
|
107
|
-
}),
|
|
88
|
+
}), { ...r(u2), changeHandler: ({ columnIndex: e2, selectedValue: t2, selectedOptions: a2 }) => {
|
|
108
89
|
if (["date", "datetime", "datehour", "month-day"].includes(o2.type)) {
|
|
109
90
|
let e3 = [];
|
|
110
91
|
t2.forEach((t3) => {
|
|
@@ -119,7 +100,7 @@ const b = { day: D("day"), year: D("year"), month: D("month"), hour: D("hour"),
|
|
|
119
100
|
l2("update:visible", false);
|
|
120
101
|
}, confirm: (e2) => {
|
|
121
102
|
l2("update:visible", false), l2("confirm", e2);
|
|
122
|
-
}, columns: d2 }
|
|
103
|
+
}, columns: d2 };
|
|
123
104
|
} });
|
|
124
105
|
var w = p(v, [["render", function(e2, t2, a2, n2, r2, c2) {
|
|
125
106
|
const m2 = o("nut-picker");
|
|
@@ -1,24 +1,5 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __spreadValues = (a2, b2) => {
|
|
9
|
-
for (var prop in b2 || (b2 = {}))
|
|
10
|
-
if (__hasOwnProp.call(b2, prop))
|
|
11
|
-
__defNormalProp(a2, prop, b2[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b2)) {
|
|
14
|
-
if (__propIsEnum.call(b2, prop))
|
|
15
|
-
__defNormalProp(a2, prop, b2[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a2;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a2, b2) => __defProps(a2, __getOwnPropDescs(b2));
|
|
20
1
|
/*!
|
|
21
|
-
* @nutui/nutui v3.1.22-beta.
|
|
2
|
+
* @nutui/nutui v3.1.22-beta.5 Fri Jun 24 2022 15:10:09 GMT+0800 (中国标准时间)
|
|
22
3
|
* (c) 2022 @jdf2e.
|
|
23
4
|
* Released under the MIT License.
|
|
24
5
|
*/
|
|
@@ -31,7 +12,7 @@ import "../locale/lang";
|
|
|
31
12
|
import "./OverLay.js";
|
|
32
13
|
import "./Icon.js";
|
|
33
14
|
import "./pxCheck.js";
|
|
34
|
-
const { componentName: x, create: j, translate: T } = b("dialog"), D = j({ inheritAttrs: false, components: { [S.name]: S, [w.name]: w }, props:
|
|
15
|
+
const { componentName: x, create: j, translate: T } = b("dialog"), D = j({ inheritAttrs: false, components: { [S.name]: S, [w.name]: w }, props: { ..._, closeOnClickOverlay: { type: Boolean, default: false }, title: { type: String, default: "" }, content: { type: [String, Object], default: "" }, noFooter: { type: Boolean, default: false }, noOkBtn: { type: Boolean, default: false }, noCancelBtn: { type: Boolean, default: false }, cancelText: { type: String, default: "" }, okText: { type: String, default: "" }, cancelAutoClose: { type: Boolean, default: true }, textAlign: { type: String, default: "center" }, closeOnPopstate: { type: Boolean, default: false }, footerDirection: { type: String, default: "horizontal" }, customClass: { type: String, default: "" }, popStyle: { type: Object }, beforeClose: { type: Function } }, emits: ["update", "update:visible", "ok", "cancel", "opened", "closed"], setup(s2, { emit: n2 }) {
|
|
35
16
|
const i2 = e(s2.visible);
|
|
36
17
|
t(() => {
|
|
37
18
|
s2.closeOnPopstate && window.addEventListener("popstate", function() {
|
|
@@ -1,24 +1,5 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __spreadValues = (a2, b) => {
|
|
9
|
-
for (var prop in b || (b = {}))
|
|
10
|
-
if (__hasOwnProp.call(b, prop))
|
|
11
|
-
__defNormalProp(a2, prop, b[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
-
if (__propIsEnum.call(b, prop))
|
|
15
|
-
__defNormalProp(a2, prop, b[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a2;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a2, b) => __defProps(a2, __getOwnPropDescs(b));
|
|
20
1
|
/*!
|
|
21
|
-
* @nutui/nutui v3.1.22-beta.
|
|
2
|
+
* @nutui/nutui v3.1.22-beta.5 Fri Jun 24 2022 15:10:09 GMT+0800 (中国标准时间)
|
|
22
3
|
* (c) 2022 @jdf2e.
|
|
23
4
|
* Released under the MIT License.
|
|
24
5
|
*/
|
|
@@ -30,7 +11,7 @@ const { componentName: a, create: s } = r("divider");
|
|
|
30
11
|
var c = l(s({ props: { contentPosition: { type: String, default: "center" }, dashed: { type: Boolean, default: false }, hairline: { type: Boolean, default: true }, direction: { type: String, default: "horizontal" } }, components: {}, setup: (t2, o2) => ({ classes: e(() => {
|
|
31
12
|
const e2 = a;
|
|
32
13
|
let n2 = { [e2]: true }, i2 = {};
|
|
33
|
-
return i2 = t2.direction === "horizontal" ?
|
|
14
|
+
return i2 = t2.direction === "horizontal" ? { ...n2, [`${e2}-center`]: o2.slots.default, [`${e2}-left`]: t2.contentPosition === "left", [`${e2}-right`]: t2.contentPosition === "right", [`${e2}-dashed`]: t2.dashed, [`${e2}-hairline`]: t2.hairline } : { ...n2, [`${e2}-vertical`]: t2.direction === "vertical" }, i2;
|
|
34
15
|
}) }) }), [["render", function(e2, r2, l2, a2, s2, c2) {
|
|
35
16
|
return e2.direction === "horizontal" ? (t(), o("view", { key: 0, class: n(e2.classes) }, [i(e2.$slots, "default")], 2)) : (t(), o("view", { key: 1, class: n(e2.classes) }, null, 2));
|
|
36
17
|
}]]);
|
|
@@ -1,34 +1,15 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __spreadValues = (a2, b) => {
|
|
9
|
-
for (var prop in b || (b = {}))
|
|
10
|
-
if (__hasOwnProp.call(b, prop))
|
|
11
|
-
__defNormalProp(a2, prop, b[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
-
if (__propIsEnum.call(b, prop))
|
|
15
|
-
__defNormalProp(a2, prop, b[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a2;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a2, b) => __defProps(a2, __getOwnPropDescs(b));
|
|
20
1
|
/*!
|
|
21
|
-
* @nutui/nutui v3.1.22-beta.
|
|
2
|
+
* @nutui/nutui v3.1.22-beta.5 Fri Jun 24 2022 15:10:09 GMT+0800 (中国标准时间)
|
|
22
3
|
* (c) 2022 @jdf2e.
|
|
23
4
|
* Released under the MIT License.
|
|
24
5
|
*/
|
|
25
|
-
import { ref as e, reactive as t, computed as l, onMounted as i, watch as c, nextTick as n, toRefs as r, openBlock as s, createElementBlock as o, normalizeClass as a, createElementVNode as u, normalizeStyle as d, Fragment as h, renderList as p, toDisplayString as _,
|
|
26
|
-
import { c as
|
|
27
|
-
import { u as
|
|
28
|
-
import { _ as
|
|
6
|
+
import { ref as e, reactive as t, computed as l, onMounted as i, watch as c, nextTick as n, toRefs as r, openBlock as s, createElementBlock as o, normalizeClass as a, createElementVNode as u, normalizeStyle as d, Fragment as h, renderList as p, toDisplayString as _, renderSlot as x, withDirectives as y, vShow as g, createCommentVNode as v, withModifiers as f } from "vue";
|
|
7
|
+
import { c as m } from "./component.js";
|
|
8
|
+
import { u as k } from "./index3.js";
|
|
9
|
+
import { _ as H } from "./plugin-vue_export-helper.js";
|
|
29
10
|
import "../locale/lang";
|
|
30
|
-
const { componentName:
|
|
31
|
-
const a2 = e(null), u2 = t({ anchorIndex: 0, codeIndex: 0, listHeight: [], listGroup: [], touchState: { y1: 0, y2: 0 }, scrollStart: false, currentIndex: 0, currentData: {}, currentKey: "", scrollY: 0, diff: -1, fixedTop: 0 }), d2 = l(() => ({ [
|
|
11
|
+
const { componentName: I, create: S } = m("elevator"), K = S({ props: { height: { type: [Number, String], default: "200px" }, acceptKey: { type: [String], default: "title" }, indexList: { type: Array, default: () => [] }, isSticky: { type: [Boolean], default: false }, spaceHeight: { type: [Number], default: 23 }, titleHeight: { type: [Number], default: 35 } }, emits: ["click-item", "click-index"], setup(s2, o2) {
|
|
12
|
+
const a2 = e(null), u2 = t({ anchorIndex: 0, codeIndex: 0, listHeight: [], listGroup: [], touchState: { y1: 0, y2: 0 }, scrollStart: false, currentIndex: 0, currentData: {}, currentKey: "", scrollY: 0, diff: -1, fixedTop: 0 }), d2 = l(() => ({ [I]: true })), h2 = l(() => ({ transform: `translate3d(0, ${u2.scrollY + u2.fixedTop}px, 0)` })), p2 = l(() => a2.value.clientHeight), _2 = () => {
|
|
32
13
|
let e2 = 0;
|
|
33
14
|
u2.listHeight.push(e2);
|
|
34
15
|
for (let t2 = 0; t2 < u2.listGroup.length; t2++) {
|
|
@@ -36,7 +17,7 @@ const { componentName: H, create: I } = f("elevator"), S = I({ props: { height:
|
|
|
36
17
|
}
|
|
37
18
|
}, x2 = (e2) => {
|
|
38
19
|
(e2 || e2 === 0) && (e2 < 0 && (e2 = 0), e2 > u2.listHeight.length - 2 && (e2 = u2.listHeight.length - 2), u2.codeIndex = e2, a2.value.scrollTo(0, u2.listHeight[e2]));
|
|
39
|
-
},
|
|
20
|
+
}, y2 = (e2) => {
|
|
40
21
|
let t2 = e2.target.scrollTop;
|
|
41
22
|
const l2 = u2.listHeight;
|
|
42
23
|
u2.scrollY = t2;
|
|
@@ -48,14 +29,14 @@ const { componentName: H, create: I } = f("elevator"), S = I({ props: { height:
|
|
|
48
29
|
u2.currentIndex = l2.length - 2;
|
|
49
30
|
};
|
|
50
31
|
return i(() => {
|
|
51
|
-
a2.value.addEventListener("scroll",
|
|
52
|
-
}),
|
|
32
|
+
a2.value.addEventListener("scroll", y2);
|
|
33
|
+
}), k({ scrollTo: x2 }), c(() => u2.listGroup.length, () => {
|
|
53
34
|
u2.listHeight = [], n(_2);
|
|
54
35
|
}), c(() => u2.diff, (e2) => {
|
|
55
36
|
const t2 = u2.listHeight;
|
|
56
37
|
let l2 = e2 > 0 && e2 < s2.titleHeight ? e2 - s2.titleHeight : 0;
|
|
57
38
|
u2.scrollY + p2.value === t2[t2.length - 1] && l2 !== 0 && (l2 = 0), u2.fixedTop !== l2 && (u2.fixedTop = l2);
|
|
58
|
-
}),
|
|
39
|
+
}), { classes: d2, ...r(u2), fixedStyle: h2, clientHeight: p2, setListGroup: (e2) => {
|
|
59
40
|
n(() => {
|
|
60
41
|
u2.listGroup.includes(e2) || e2 == null || u2.listGroup.push(e2);
|
|
61
42
|
});
|
|
@@ -76,9 +57,9 @@ const { componentName: H, create: I } = f("elevator"), S = I({ props: { height:
|
|
|
76
57
|
o2.emit("click-item", e2, t2), u2.currentData = t2, u2.currentKey = e2;
|
|
77
58
|
}, handleClickIndex: (e2) => {
|
|
78
59
|
o2.emit("click-index", e2);
|
|
79
|
-
} }
|
|
80
|
-
} }),
|
|
81
|
-
var
|
|
82
|
-
return s(), o("view", { class: a(e2.classes) }, [u("view", { class: "nut-elevator__list", ref: "listview", style: d({ height: isNaN(+e2.height) ? e2.height : `${e2.height}px` }) }, [(s(true), o(h, null, p(e2.indexList, (t3) => (s(), o("view", { class: "nut-elevator__list__item", key: t3[e2.acceptKey], ref: e2.setListGroup }, [u("view",
|
|
60
|
+
} };
|
|
61
|
+
} }), w = { class: "nut-elevator__list__item__code" }, L = ["onClick"], T = ["innerHTML"], Y = { class: "fixed-title" }, C = { class: "nut-elevator__bars__inner" }, G = ["data-index", "onClick"];
|
|
62
|
+
var b = H(K, [["render", function(e2, t2, l2, i2, c2, n2) {
|
|
63
|
+
return s(), o("view", { class: a(e2.classes) }, [u("view", { class: "nut-elevator__list", ref: "listview", style: d({ height: isNaN(+e2.height) ? e2.height : `${e2.height}px` }) }, [(s(true), o(h, null, p(e2.indexList, (t3) => (s(), o("view", { class: "nut-elevator__list__item", key: t3[e2.acceptKey], ref: e2.setListGroup }, [u("view", w, _(t3[e2.acceptKey]), 1), (s(true), o(h, null, p(t3.list, (l3) => (s(), o("view", { class: a(["nut-elevator__list__item__name", { "nut-elevator__list__item__name--highcolor": e2.currentData.id === l3.id && e2.currentKey === t3[e2.acceptKey] }]), key: l3.id, onClick: (i3) => e2.handleClickItem(t3[e2.acceptKey], l3) }, [e2.$slots.default ? x(e2.$slots, "default", { key: 1, item: l3 }) : (s(), o("span", { key: 0, innerHTML: l3.name }, null, 8, T))], 10, L))), 128))], 512))), 128)), e2.isSticky ? y((s(), o("view", { key: 0, class: "nut-elevator__list__fixed", style: d(e2.fixedStyle) }, [u("span", Y, _(e2.indexList[e2.currentIndex][e2.acceptKey]), 1)], 4)), [[g, e2.scrollY > 0]]) : v("", true)], 4), e2.indexList.length ? y((s(), o("view", { key: 0, class: "nut-elevator__code--current" }, _(e2.indexList[e2.codeIndex][e2.acceptKey]), 513)), [[g, e2.scrollStart]]) : v("", true), u("view", { class: "nut-elevator__bars", onTouchstart: t2[0] || (t2[0] = (...t3) => e2.touchStart && e2.touchStart(...t3)), onTouchmove: t2[1] || (t2[1] = f((...t3) => e2.touchMove && e2.touchMove(...t3), ["stop", "prevent"])), onTouchend: t2[2] || (t2[2] = (...t3) => e2.touchEnd && e2.touchEnd(...t3)) }, [u("view", C, [(s(true), o(h, null, p(e2.indexList, (t3, l3) => (s(), o("view", { class: a(["nut-elevator__bars__inner__item", { active: t3[e2.acceptKey] === e2.indexList[e2.currentIndex][e2.acceptKey] }]), "data-index": l3, key: t3[e2.acceptKey], onClick: (l4) => e2.handleClickIndex(t3[e2.acceptKey]) }, _(t3[e2.acceptKey]), 11, G))), 128))])], 32)], 2);
|
|
83
64
|
}]]);
|
|
84
|
-
export {
|
|
65
|
+
export { b as default };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* @nutui/nutui v3.1.22-beta.5 Fri Jun 24 2022 15:10:09 GMT+0800 (中国标准时间)
|
|
3
|
+
* (c) 2022 @jdf2e.
|
|
4
|
+
* Released under the MIT License.
|
|
5
|
+
*/
|
|
6
|
+
import { ref as e, reactive as t, computed as n, watch as l, onMounted as o, toRefs as i, openBlock as c, createElementBlock as s, normalizeClass as d, toDisplayString as a, createCommentVNode as r, createTextVNode as p, withModifiers as x } from "vue";
|
|
7
|
+
import { c as u } from "./component.js";
|
|
8
|
+
import { _ as y } from "./plugin-vue_export-helper.js";
|
|
9
|
+
import "../locale/lang";
|
|
10
|
+
const { componentName: m, create: g } = u("ellipsis"), f = g({ props: { content: { type: String, default: "" }, direction: { type: String, default: "end" }, rows: { type: [Number, String], default: 1 }, expandText: { type: String, default: "" }, collapseText: { type: String, default: "" }, symbol: { type: String, default: "..." } }, emits: ["click", "change"], setup(c2, { emit: s2 }) {
|
|
11
|
+
const d2 = e(null);
|
|
12
|
+
let a2 = null, r2 = 0;
|
|
13
|
+
const p2 = e(), x2 = t({ exceeded: false, expanded: false }), u2 = n(() => ({ [m]: true }));
|
|
14
|
+
l(() => c2.content, (e2, t2) => {
|
|
15
|
+
e2 != t2 && (a2 && document.body.appendChild(a2), y2());
|
|
16
|
+
}), o(() => {
|
|
17
|
+
y2();
|
|
18
|
+
});
|
|
19
|
+
const y2 = () => {
|
|
20
|
+
if (!d2.value)
|
|
21
|
+
return;
|
|
22
|
+
const e2 = window.getComputedStyle(d2.value);
|
|
23
|
+
a2 = document.createElement("div");
|
|
24
|
+
Array.prototype.slice.apply(e2).forEach((t3) => {
|
|
25
|
+
a2.style.setProperty(t3, e2.getPropertyValue(t3));
|
|
26
|
+
}), a2.style.position = "fixed", a2.style.left = "999999px", a2.style.top = "999999px", a2.style.zIndex = "-1000", a2.style.height = "auto", a2.style.minHeight = "auto", a2.style.maxHeight = "auto", a2.style.textOverflow = "clip", a2.style.whiteSpace = "normal", a2.style.webkitLineClamp = "unset", a2.style.display = "block";
|
|
27
|
+
const t2 = k2(e2.lineHeight);
|
|
28
|
+
r2 = Math.floor(t2 * (Number(c2.rows) + 0.5) + k2(e2.paddingTop) + k2(e2.paddingBottom)), a2.innerText = c2.content, document.body.appendChild(a2), g2();
|
|
29
|
+
}, g2 = () => {
|
|
30
|
+
if (a2.offsetHeight <= r2)
|
|
31
|
+
x2.exceeded = false;
|
|
32
|
+
else {
|
|
33
|
+
x2.exceeded = true;
|
|
34
|
+
const e2 = c2.content.length, t2 = Math.floor((0 + e2) / 2), n2 = c2.direction === "middle" ? h2([0, t2], [t2, e2]) : f2(0, e2);
|
|
35
|
+
p2.value = n2, document.body.removeChild(a2);
|
|
36
|
+
}
|
|
37
|
+
}, f2 = (e2, t2) => {
|
|
38
|
+
const n2 = x2.expanded ? c2.collapseText : c2.expandText, l2 = c2.content.length;
|
|
39
|
+
if (t2 - e2 <= 1)
|
|
40
|
+
return c2.direction === "end" ? { leading: c2.content.slice(0, e2) + c2.symbol } : { tailing: c2.symbol + c2.content.slice(t2, l2) };
|
|
41
|
+
const o2 = Math.round((e2 + t2) / 2);
|
|
42
|
+
return c2.direction === "end" ? a2.innerText = c2.content.slice(0, o2) + c2.symbol + n2 : a2.innerText = n2 + c2.symbol + c2.content.slice(o2, l2), a2.offsetHeight <= r2 ? c2.direction === "end" ? f2(o2, t2) : f2(e2, o2) : c2.direction === "end" ? f2(e2, o2) : f2(o2, t2);
|
|
43
|
+
}, h2 = (e2, t2) => {
|
|
44
|
+
const n2 = x2.expanded ? c2.collapseText : c2.expandText, l2 = c2.content.length;
|
|
45
|
+
if (e2[1] - e2[0] <= 1 && t2[1] - t2[0] <= 1)
|
|
46
|
+
return { leading: c2.content.slice(0, e2[0]) + c2.symbol, tailing: c2.symbol + c2.content.slice(t2[1], l2) };
|
|
47
|
+
const o2 = Math.floor((e2[0] + e2[1]) / 2), i2 = Math.ceil((t2[0] + t2[1]) / 2);
|
|
48
|
+
return a2.innerText = c2.content.slice(0, o2) + c2.symbol + n2 + c2.symbol + c2.content.slice(i2, l2), a2.offsetHeight <= r2 ? h2([o2, e2[1]], [t2[0], i2]) : h2([e2[0], o2], [i2, t2[1]]);
|
|
49
|
+
}, k2 = (e2) => {
|
|
50
|
+
if (!e2)
|
|
51
|
+
return 0;
|
|
52
|
+
const t2 = e2.match(/^\d*(\.\d*)?/);
|
|
53
|
+
return t2 ? Number(t2[0]) : 0;
|
|
54
|
+
};
|
|
55
|
+
return { ...i(x2), root: d2, ellipsis: p2, classes: u2, clickHandle: (e2) => {
|
|
56
|
+
e2 == 1 ? (x2.expanded = true, s2("change", "expand")) : (x2.expanded = false, s2("change", "collapse"));
|
|
57
|
+
}, handleClick: () => {
|
|
58
|
+
s2("click");
|
|
59
|
+
} };
|
|
60
|
+
} }), h = { key: 0 }, k = { key: 1 }, b = { key: 2 };
|
|
61
|
+
var T = y(f, [["render", function(e2, t2, n2, l2, o2, i2) {
|
|
62
|
+
return c(), s("view", { class: d(e2.classes), onClick: t2[2] || (t2[2] = (...t3) => e2.handleClick && e2.handleClick(...t3)), ref: "root" }, [e2.exceeded ? r("", true) : (c(), s("view", h, a(e2.content), 1)), e2.exceeded && !e2.expanded ? (c(), s("view", k, [p(a(e2.ellipsis.leading), 1), e2.expandText ? (c(), s("span", { key: 0, class: "nut-ellipsis-text", onClick: t2[0] || (t2[0] = x((t3) => e2.clickHandle(1), ["stop"])) }, a(e2.expandText), 1)) : r("", true), p(a(e2.ellipsis.tailing), 1)])) : r("", true), e2.exceeded && e2.expanded ? (c(), s("view", b, [p(a(e2.content) + " ", 1), e2.expandText ? (c(), s("span", { key: 0, class: "nut-ellipsis-text", onClick: t2[1] || (t2[1] = x((t3) => e2.clickHandle(2), ["stop"])) }, a(e2.collapseText), 1)) : r("", true)])) : r("", true)], 2);
|
|
63
|
+
}]]);
|
|
64
|
+
export { T as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.22-beta.
|
|
2
|
+
* @nutui/nutui v3.1.22-beta.5 Fri Jun 24 2022 15:10:09 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -16,7 +16,7 @@ const v = { props: { modelValue: { type: Object, default: {} } }, components: {}
|
|
|
16
16
|
});
|
|
17
17
|
};
|
|
18
18
|
a(() => o2.modelValue, (e2) => {
|
|
19
|
-
u2();
|
|
19
|
+
u2(e2);
|
|
20
20
|
}, { immediate: true });
|
|
21
21
|
const c2 = (r2) => {
|
|
22
22
|
let t2 = [];
|