@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
|
@@ -0,0 +1,31 @@
|
|
|
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 { reactive as r, useSlots as o, computed as e, watch as t, toRefs as i, resolveComponent as l, openBlock as s, createElementBlock as a, normalizeClass as n, normalizeStyle as d, createElementVNode as g, createBlock as c, createCommentVNode as u, renderSlot as m } from "vue";
|
|
7
|
+
import { c as p } from "./component.js";
|
|
8
|
+
import { p as f } from "./pxCheck.js";
|
|
9
|
+
import { _ as y } from "./plugin-vue_export-helper.js";
|
|
10
|
+
import "../locale/lang";
|
|
11
|
+
const { componentName: h, create: k } = p("image"), w = k({ props: { src: String, fit: { type: String, default: "fill" }, position: { type: String, default: "center" }, alt: { type: String, default: "" }, width: { type: String, default: "center" }, height: { type: String, default: "" }, round: { type: Boolean, default: false }, radius: [String, Number], showError: { type: Boolean, default: true }, showLoading: { type: Boolean, default: true } }, emits: ["click", "load", "error"], setup(l2, { emit: s2 }) {
|
|
12
|
+
const a2 = r({ loading: true, isError: false, slotLoding: o().loading, slotError: o().error }), n2 = e(() => ({ [h]: true, [`${h}-round`]: l2.round })), d2 = e(() => {
|
|
13
|
+
let r2 = {};
|
|
14
|
+
return l2.width && (r2.width = f(l2.width)), l2.height && (r2.height = f(l2.height)), l2.radius !== void 0 && l2.radius !== null && (r2.overflow = "hidden", r2.borderRadius = f(l2.radius)), r2;
|
|
15
|
+
}), g2 = e(() => ({ objectFit: l2.fit, objectPosition: l2.position }));
|
|
16
|
+
t(() => l2.src, (r2) => {
|
|
17
|
+
a2.isError = false, a2.loading = true;
|
|
18
|
+
});
|
|
19
|
+
return { ...i(a2), imageClick: (r2) => {
|
|
20
|
+
s2("click", r2);
|
|
21
|
+
}, classes: n2, styles: g2, stylebox: d2, error: () => {
|
|
22
|
+
a2.isError = true, a2.loading = false, s2("error");
|
|
23
|
+
}, load: () => {
|
|
24
|
+
a2.loading = false, s2("load");
|
|
25
|
+
} };
|
|
26
|
+
} }), v = ["src", "alt"], E = { key: 0, class: "nut-img-loading" }, S = { key: 1, class: "nut-img-error" };
|
|
27
|
+
var b = y(w, [["render", function(r2, o2, e2, t2, i2, p2) {
|
|
28
|
+
const f2 = l("nut-icon");
|
|
29
|
+
return s(), a("view", { class: n(r2.classes), style: d(r2.stylebox), onClick: o2[2] || (o2[2] = (...o3) => r2.imageClick && r2.imageClick(...o3)) }, [g("img", { class: "nut-img", src: r2.src, alt: r2.alt, onLoad: o2[0] || (o2[0] = (...o3) => r2.load && r2.load(...o3)), onError: o2[1] || (o2[1] = (...o3) => r2.error && r2.error(...o3)), style: d(r2.styles) }, null, 44, v), r2.loading ? (s(), a("view", E, [r2.slotLoding ? u("", true) : (s(), c(f2, { key: 0, name: "image" })), m(r2.$slots, "loading")])) : u("", true), r2.isError && !r2.loading ? (s(), a("view", S, [r2.slotError ? u("", true) : (s(), c(f2, { key: 0, name: "image-error" })), m(r2.$slots, "error")])) : u("", true)], 6);
|
|
30
|
+
}]]);
|
|
31
|
+
export { b as default };
|
|
@@ -1,102 +1,94 @@
|
|
|
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 { toRefs as e, reactive as o,
|
|
26
|
-
import { c as
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import
|
|
6
|
+
import { toRefs as e, reactive as o, computed as t, watch as i, onMounted as n, resolveComponent as s, openBlock as a, createBlock as l, withCtx as c, createElementVNode as r, withModifiers as p, createElementBlock as u, Fragment as m, renderList as g, createVNode as d, createCommentVNode as h, toDisplayString as f, normalizeStyle as v, render as y, h as w } from "vue";
|
|
7
|
+
import { c as b, a as C } from "./component.js";
|
|
8
|
+
import x from "./Popup.js";
|
|
9
|
+
import T from "./Video.js";
|
|
10
|
+
import I from "./Swiper.js";
|
|
11
|
+
import S from "./SwiperItem.js";
|
|
12
|
+
import j from "./Icon.js";
|
|
13
|
+
import { _ as N } from "./plugin-vue_export-helper.js";
|
|
32
14
|
import "../locale/lang";
|
|
33
15
|
import "./OverLay.js";
|
|
34
|
-
import "./Icon.js";
|
|
35
16
|
import "./pxCheck.js";
|
|
36
17
|
import "./index3.js";
|
|
37
|
-
const { componentName:
|
|
18
|
+
const { componentName: k, create: E } = b("imagepreview"), P = E({ props: { show: { type: Boolean, default: false }, images: { type: Array, default: () => [] }, videos: { type: Array, default: () => [] }, contentClose: { type: Boolean, default: true }, initNo: { type: Number, default: 1 }, paginationVisible: { type: Boolean, default: false }, paginationColor: { type: String, default: "#fff" }, autoplay: { type: [Number, String], default: 3e3 }, isWrapTeleport: { type: Boolean, default: false }, showIndex: { type: Boolean, default: true }, closeable: { type: Boolean, default: false }, closeIcon: { type: String, default: "circle-close" }, closeIconPosition: { type: String, default: "top-right" }, beforeClose: Function }, emits: ["close", "change"], components: { [x.name]: x, [T.name]: T, [I.name]: I, [S.name]: S, [j.name]: j }, setup(s2, { emit: a2 }) {
|
|
38
19
|
e(s2);
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
20
|
+
const l2 = o({ showPop: false, active: 1, maxNo: 1, source: { src: "https://storage.jd.com/about/big-final.mp4?Expires=3730193075&AccessKey=3LoYX1dQWa6ZXzQl&Signature=ViMFjz%2BOkBxS%2FY1rjtUVqbopbJI%3D", type: "video/mp4" }, options: { muted: true, controls: true }, eleImg: null, store: { scale: 1, moveable: false }, lastTouchEndTime: 0 }), c2 = t(() => {
|
|
21
|
+
let e2 = {};
|
|
22
|
+
return s2.closeIconPosition == "top-right" ? e2.right = "10px" : e2.left = "10px", e2;
|
|
23
|
+
}), r2 = () => {
|
|
24
|
+
if (s2.beforeClose) {
|
|
25
|
+
const e2 = s2.beforeClose.apply(null, l2.active);
|
|
26
|
+
C(e2) ? e2.then((e3) => {
|
|
27
|
+
e3 && p2();
|
|
28
|
+
}) : e2 && p2();
|
|
29
|
+
} else
|
|
30
|
+
p2();
|
|
31
|
+
}, p2 = () => {
|
|
32
|
+
l2.showPop = false, l2.store.scale = 1, m2(), l2.active = 1, a2("close");
|
|
33
|
+
}, u2 = (e2, o2) => Math.hypot(Math.abs(o2.x - e2.x), Math.abs(o2.y - e2.y)), m2 = () => {
|
|
34
|
+
l2.eleImg.style.transform = "scale(" + l2.store.scale + ")";
|
|
35
|
+
}, g2 = (e2) => {
|
|
36
|
+
if (!l2.store.moveable)
|
|
45
37
|
return;
|
|
46
|
-
const o2 =
|
|
47
|
-
var t2 = e2.touches, i2 = t2[0],
|
|
48
|
-
if (
|
|
49
|
-
const e3 =
|
|
50
|
-
o2.scale = o2.originScale * e3, o2.scale > 3 && (o2.scale = 3),
|
|
38
|
+
const o2 = l2.store;
|
|
39
|
+
var t2 = e2.touches, i2 = t2[0], n2 = t2[1];
|
|
40
|
+
if (n2) {
|
|
41
|
+
const e3 = u2({ x: i2.pageX, y: i2.pageY }, { x: n2.pageX, y: n2.pageY }) / o2.oriDistance;
|
|
42
|
+
o2.scale = o2.originScale * e3, o2.scale > 3 && (o2.scale = 3), m2();
|
|
51
43
|
}
|
|
52
|
-
},
|
|
53
|
-
|
|
54
|
-
const e2 =
|
|
55
|
-
e2.moveable = false, (e2.scale < 1.1 && e2.scale > 1 || e2.scale < 1) && (e2.scale = 1,
|
|
44
|
+
}, d2 = () => {
|
|
45
|
+
l2.lastTouchEndTime = new Date().getTime();
|
|
46
|
+
const e2 = l2.store;
|
|
47
|
+
e2.moveable = false, (e2.scale < 1.1 && e2.scale > 1 || e2.scale < 1) && (e2.scale = 1, m2());
|
|
56
48
|
};
|
|
57
|
-
return
|
|
58
|
-
|
|
59
|
-
}),
|
|
60
|
-
|
|
61
|
-
}),
|
|
62
|
-
|
|
63
|
-
}, onClose:
|
|
64
|
-
s2.contentClose &&
|
|
49
|
+
return i(() => s2.show, (e2) => {
|
|
50
|
+
l2.showPop = e2, l2.eleImg = document.querySelector(".nut-imagepreview"), document.addEventListener("touchmove", g2), document.addEventListener("touchend", d2), document.addEventListener("touchcancel", d2);
|
|
51
|
+
}), n(() => {
|
|
52
|
+
l2.active = s2.initNo, l2.showPop = s2.show, l2.maxNo = s2.images.length + s2.videos.length;
|
|
53
|
+
}), { ...e(l2), slideChangeEnd: function(e2) {
|
|
54
|
+
l2.active = e2 + 1, a2("change", l2.active);
|
|
55
|
+
}, onClose: r2, closeOnImg: () => {
|
|
56
|
+
s2.contentClose && r2();
|
|
65
57
|
}, onTouchStart: (e2) => {
|
|
66
|
-
if (new Date().getTime() -
|
|
67
|
-
const e3 =
|
|
68
|
-
e3.scale > 1 ? e3.scale = 1 : e3.scale == 1 && (e3.scale = 2),
|
|
58
|
+
if (new Date().getTime() - l2.lastTouchEndTime < 300) {
|
|
59
|
+
const e3 = l2.store;
|
|
60
|
+
e3.scale > 1 ? e3.scale = 1 : e3.scale == 1 && (e3.scale = 2), m2();
|
|
69
61
|
}
|
|
70
62
|
var o2 = e2.touches, t2 = o2[0], i2 = o2[1];
|
|
71
|
-
const
|
|
72
|
-
|
|
73
|
-
}, onTouchMove:
|
|
74
|
-
} }),
|
|
75
|
-
var
|
|
76
|
-
const
|
|
77
|
-
return a(),
|
|
63
|
+
const n2 = l2.store;
|
|
64
|
+
n2.moveable = true, i2 && (n2.oriDistance = u2({ x: t2.pageX, y: t2.pageY }, { x: i2.pageX, y: i2.pageY })), n2.originScale = n2.scale || 1;
|
|
65
|
+
}, onTouchMove: g2, onTouchEnd: d2, getDistance: u2, scaleNow: m2, styles: c2 };
|
|
66
|
+
} }), B = ["src"], D = { key: 0, class: "nut-imagepreview-index" };
|
|
67
|
+
var O = N(P, [["render", function(e2, o2, t2, i2, n2, y2) {
|
|
68
|
+
const w2 = s("nut-video"), b2 = s("nut-swiper-item"), C2 = s("nut-swiper"), x2 = s("nut-icon"), T2 = s("nut-popup");
|
|
69
|
+
return a(), l(T2, { "pop-class": "custom-pop", visible: e2.showPop, "onUpdate:visible": o2[3] || (o2[3] = (o3) => e2.showPop = o3), isWrapTeleport: e2.isWrapTeleport, onClick: e2.onClose, style: { width: "100%" } }, { default: c(() => [r("view", { class: "nut-imagepreview", onClick: o2[0] || (o2[0] = p((...o3) => e2.closeOnImg && e2.closeOnImg(...o3), ["stop"])), onTouchstartCapture: o2[1] || (o2[1] = (...o3) => e2.onTouchStart && e2.onTouchStart(...o3)) }, [e2.showPop ? (a(), l(C2, { key: 0, "auto-play": e2.autoplay, class: "nut-imagepreview-swiper", loop: true, "is-preventDefault": false, direction: "horizontal", onChange: e2.slideChangeEnd, "init-page": e2.initNo > e2.maxNo ? e2.maxNo - 1 : e2.initNo - 1, "pagination-visible": e2.paginationVisible, "pagination-color": e2.paginationColor }, { default: c(() => [(a(true), u(m, null, g(e2.videos, (e3, o3) => (a(), l(b2, { key: o3 }, { default: c(() => [d(w2, { source: e3.source, options: e3.options }, null, 8, ["source", "options"])]), _: 2 }, 1024))), 128)), (a(true), u(m, null, g(e2.images, (e3, o3) => (a(), l(b2, { key: o3 }, { default: c(() => [r("img", { src: e3.src, class: "nut-imagepreview-img" }, null, 8, B)]), _: 2 }, 1024))), 128))]), _: 1 }, 8, ["auto-play", "onChange", "init-page", "pagination-visible", "pagination-color"])) : h("", true)], 32), e2.showIndex ? (a(), u("view", D, f(e2.active) + " / " + f(e2.images.length + e2.videos.length), 1)) : h("", true), e2.closeable ? (a(), u("view", { key: 1, class: "nut-imagepreview-close-icon", onClick: o2[2] || (o2[2] = (...o3) => e2.handleCloseIcon && e2.handleCloseIcon(...o3)), style: v(e2.styles) }, [d(x2, { name: e2.closeIcon, color: "#ffffff" }, null, 8, ["name"])], 4)) : h("", true)]), _: 1 }, 8, ["visible", "isWrapTeleport", "onClick"]);
|
|
78
70
|
}]]);
|
|
79
|
-
class
|
|
71
|
+
class V {
|
|
80
72
|
constructor() {
|
|
81
73
|
this.show = false, this.images = [], this.initNo = 1, this.paginationVisible = false, this.paginationColor = "", this.teleport = "body", this.onClose = () => {
|
|
82
74
|
};
|
|
83
75
|
}
|
|
84
76
|
}
|
|
85
|
-
class
|
|
77
|
+
class X {
|
|
86
78
|
constructor(e2) {
|
|
87
|
-
this.options = new
|
|
79
|
+
this.options = new V();
|
|
88
80
|
let o2 = Object.assign(this.options, e2), t2 = document.body, i2 = o2.teleport;
|
|
89
81
|
i2 != "body" && (t2 = typeof i2 == "string" ? document.querySelector(i2) : o2.teleport);
|
|
90
|
-
const
|
|
91
|
-
|
|
92
|
-
const
|
|
93
|
-
t2.appendChild(
|
|
82
|
+
const n2 = document.createElement("view");
|
|
83
|
+
n2.id = "imagepreview-" + new Date().getTime();
|
|
84
|
+
const s2 = d({ setup: () => (o2.teleport = `#${n2.id}`, () => w(O, o2)) });
|
|
85
|
+
t2.appendChild(n2), y(s2, n2);
|
|
94
86
|
}
|
|
95
87
|
}
|
|
96
|
-
const
|
|
97
|
-
return new
|
|
88
|
+
const Y = function(e2) {
|
|
89
|
+
return new X(e2);
|
|
98
90
|
};
|
|
99
|
-
|
|
100
|
-
e2.use(
|
|
91
|
+
Y.install = (e2) => {
|
|
92
|
+
e2.use(O), e2.config.globalProperties.$imagepreview = Y;
|
|
101
93
|
};
|
|
102
|
-
export {
|
|
94
|
+
export { O as ImagePreview, V as ImagePreviewOptions, Y 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, 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
|
*/
|
|
@@ -64,7 +45,7 @@ const { componentName: b, create: x, translate: E } = y("infiniteloading"), S =
|
|
|
64
45
|
v2.value && (v2.value = false, T2());
|
|
65
46
|
}), i(() => {
|
|
66
47
|
v2.value = true, d2.scrollEl.removeEventListener("scroll", w2, a2.useCapture);
|
|
67
|
-
}),
|
|
48
|
+
}), { classes: f2, ...r(d2), touchStart: (e2) => {
|
|
68
49
|
if (d2.beforeScrollTop == 0 && !d2.isTouching && a2.isOpenRefresh) {
|
|
69
50
|
d2.y = e2.touches[0].pageY, d2.isTouching = true;
|
|
70
51
|
const t2 = d2.refreshTop.firstElementChild.offsetHeight;
|
|
@@ -74,7 +55,7 @@ const { componentName: b, create: x, translate: E } = y("infiniteloading"), S =
|
|
|
74
55
|
d2.distance = e2.touches[0].pageY - d2.y, d2.distance > 0 && d2.isTouching ? (e2.preventDefault(), d2.distance >= d2.refreshMaxH && (d2.distance = d2.refreshMaxH)) : (d2.distance = 0, d2.isTouching = false);
|
|
75
56
|
}, touchEnd: () => {
|
|
76
57
|
d2.distance && (d2.distance < d2.refreshMaxH ? d2.distance = 0 : c2("refresh", y2));
|
|
77
|
-
}, getStyle: p2, translate: E, slots: u2 }
|
|
58
|
+
}, getStyle: p2, translate: E, slots: u2 };
|
|
78
59
|
} }), M = { class: "top-box" }, I = { class: "top-text" }, H = { class: "nut-infinite-container" }, k = { class: "nut-infinite-bottom" }, C = { key: 0, class: "bottom-box" }, $ = { class: "bottom-text" }, j = { key: 0, class: "tips" };
|
|
79
60
|
var B = v(S, [["render", function(e2, t2, o2, n2, s2, l2) {
|
|
80
61
|
const i2 = a("nut-icon");
|
|
@@ -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
|
*/
|
|
@@ -11,7 +11,7 @@ function k(e2, t2, l2) {
|
|
|
11
11
|
const n2 = e2.indexOf(t2);
|
|
12
12
|
return n2 === -1 ? e2 : t2 === "-" && n2 !== 0 ? e2.slice(0, n2) : e2.slice(0, n2 + 1) + e2.slice(n2).replace(l2, "");
|
|
13
13
|
}
|
|
14
|
-
function I(e2, t2, l2) {
|
|
14
|
+
function I(e2, t2 = true, l2 = true) {
|
|
15
15
|
e2 = t2 ? k(e2, ".", /\./g) : e2.split(".")[0];
|
|
16
16
|
const n2 = t2 ? /[^-0-9.]/g : /[^-0-9]/g;
|
|
17
17
|
return (e2 = l2 ? k(e2, "-", /-/g) : e2.replace(/-/, "")).replace(n2, "");
|
|
@@ -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
|
*/
|
|
@@ -31,11 +12,11 @@ var v = p(d({ props: { height: { type: [Number], default: 50 }, listData: { type
|
|
|
31
12
|
const n2 = t(null), o2 = e({ startOffset: 0, start: 0, list: a2.listData.slice() }), c2 = l(() => Math.ceil(a2.containerHeight / a2.height)), h2 = l(() => o2.start + c2.value), m2 = l(() => `translate3d(0, ${o2.startOffset}px, 0)`), u2 = l(() => ({ [f]: true })), g2 = l(() => o2.list.length * a2.height), p2 = l(() => o2.list.slice(o2.start, Math.min(h2.value, o2.list.length)));
|
|
32
13
|
return s(() => a2.listData, () => {
|
|
33
14
|
o2.list = a2.listData.slice();
|
|
34
|
-
}),
|
|
15
|
+
}), { ...i(o2), list: n2, getTransform: m2, listHeight: g2, visibleData: p2, classes: u2, handleScrollEvent: () => {
|
|
35
16
|
var _a;
|
|
36
17
|
const t2 = (_a = n2.value) == null ? void 0 : _a.scrollTop;
|
|
37
18
|
o2.start = Math.floor(t2 / a2.height), h2.value > o2.list.length && (r2("scroll"), r2("scroll-bottom")), o2.startOffset = t2 - t2 % a2.height;
|
|
38
|
-
} }
|
|
19
|
+
} };
|
|
39
20
|
} }), [["render", function(t2, e2, l2, s2, i2, g2) {
|
|
40
21
|
return a(), r("view", { class: n(t2.classes), onScrollPassive: e2[0] || (e2[0] = (...e3) => t2.handleScrollEvent && t2.handleScrollEvent(...e3)), ref: "list" }, [o("div", { class: "nut-list-phantom", style: c({ height: t2.listHeight + "px" }) }, null, 4), o("div", { class: "nut-list-container", style: c({ transform: t2.getTransform }) }, [(a(true), r(h, null, m(t2.visibleData, (e3, l3) => (a(), r("div", { class: "nut-list-item", style: c({ height: t2.height + "px" }), key: e3 }, [u(t2.$slots, "default", { item: e3, index: l3 })], 4))), 128))], 4)], 34);
|
|
41
22
|
}]]);
|
|
@@ -1,36 +1,51 @@
|
|
|
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
|
*/
|
|
6
|
-
import { ref as e, computed as t,
|
|
7
|
-
import { c as
|
|
8
|
-
import { u as
|
|
9
|
-
import { _ as
|
|
6
|
+
import { ref as e, computed as t, onMounted as o, onUnmounted as l, reactive as n, provide as s, resolveComponent as r, openBlock as i, createElementBlock as a, normalizeClass as c, createElementVNode as u, Fragment as d, renderList as p, normalizeStyle as m, toDisplayString as f, createVNode as v, renderSlot as w } from "vue";
|
|
7
|
+
import { c as g } from "./component.js";
|
|
8
|
+
import { u as h } from "./index2.js";
|
|
9
|
+
import { _ as y } from "./plugin-vue_export-helper.js";
|
|
10
10
|
import "../locale/lang";
|
|
11
|
-
const { componentName:
|
|
12
|
-
const
|
|
13
|
-
const e2 =
|
|
11
|
+
const { componentName: b, create: x } = g("menu"), C = x({ props: { activeColor: { type: String, default: "" }, overlay: { type: Boolean, default: true }, lockScroll: { type: Boolean, default: true }, duration: { type: [Number, String], default: 0 }, closeOnClickOverlay: { type: Boolean, default: true }, direction: { type: String, default: "down" }, scrollFixed: { type: [Boolean, String, Number], default: false }, titleClass: [String] }, setup(r2, { emit: i2, slots: a2 }) {
|
|
12
|
+
const c2 = e(), u2 = e(0), d2 = e(false), { children: p2, linkChildren: m2 } = (() => {
|
|
13
|
+
const e2 = n([]), t2 = n([]);
|
|
14
14
|
return { children: e2, linkChildren: (o2) => {
|
|
15
|
-
|
|
15
|
+
s("menuParent", Object.assign({ link: (o3) => {
|
|
16
16
|
o3.proxy && (t2.push(o3), e2.push(o3.proxy));
|
|
17
17
|
}, children: e2, internalChildren: t2 }, o2));
|
|
18
18
|
} };
|
|
19
|
-
})(),
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
})(), f2 = t(() => p2.some((e2) => e2.state.showWrapper)), v2 = t(() => ({ [b]: true, "scroll-fixed": d2.value }));
|
|
20
|
+
m2({ props: r2, offset: u2 });
|
|
21
|
+
const w2 = () => {
|
|
22
|
+
const { scrollFixed: e2 } = r2, t2 = (o2 = window, Math.max(0, "scrollTop" in o2 ? o2.scrollTop : o2.pageYOffset));
|
|
23
|
+
var o2;
|
|
24
|
+
d2.value = t2 > (typeof e2 == "boolean" ? 30 : Number(e2));
|
|
25
|
+
};
|
|
26
|
+
return o(() => {
|
|
27
|
+
const { scrollFixed: e2 } = r2;
|
|
28
|
+
e2 && window.addEventListener("scroll", w2);
|
|
29
|
+
}), l(() => {
|
|
30
|
+
const { scrollFixed: e2 } = r2;
|
|
31
|
+
e2 && window.removeEventListener("scroll", w2);
|
|
32
|
+
}), { toggleItem: (e2) => {
|
|
33
|
+
p2.forEach((t2, o2) => {
|
|
23
34
|
o2 === e2 ? ((() => {
|
|
24
|
-
if (
|
|
25
|
-
const e3 =
|
|
26
|
-
|
|
35
|
+
if (c2.value) {
|
|
36
|
+
const e3 = h(c2);
|
|
37
|
+
r2.direction === "down" ? u2.value = e3.bottom : u2.value = window.innerHeight - e3.top;
|
|
27
38
|
}
|
|
28
39
|
})(), t2.toggle()) : t2.state.showPopup && t2.toggle(false, { immediate: true });
|
|
29
40
|
});
|
|
30
|
-
}, children:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
41
|
+
}, children: p2, opened: f2, classes: v2, barRef: c2, getClasses: (e2) => {
|
|
42
|
+
let t2 = "";
|
|
43
|
+
const { titleClass: o2 } = r2;
|
|
44
|
+
return e2 && (t2 += "active"), o2 && (t2 += ` ${o2}`), t2;
|
|
45
|
+
} };
|
|
46
|
+
} }), _ = ["onClick"], k = { class: "nut-menu__title-text" };
|
|
47
|
+
var S = y(C, [["render", function(e2, t2, o2, l2, n2, s2) {
|
|
48
|
+
const g2 = r("nut-icon");
|
|
49
|
+
return i(), a("view", { class: c(e2.classes) }, [u("view", { class: c(["nut-menu__bar", { opened: e2.opened }]), ref: "barRef" }, [(i(true), a(d, null, p(e2.children, (t3, o3) => (i(), a("view", { key: o3, class: c(["nut-menu__item", { disabled: t3.disabled, active: t3.state.showPopup }]), onClick: (l3) => !t3.disabled && e2.toggleItem(o3), style: m({ color: t3.state.showPopup ? e2.activeColor : "" }) }, [u("view", { class: c(["nut-menu__title", e2.getClasses(t3.state.showPopup)]) }, [u("view", k, f(t3.renderTitle()), 1), v(g2, { name: t3.titleIcon || (e2.direction === "up" ? "arrow-up" : "down-arrow"), size: "10", class: "nut-menu__title-icon" }, null, 8, ["name"])], 2)], 14, _))), 128))], 2), w(e2.$slots, "default")], 2);
|
|
35
50
|
}]]);
|
|
36
|
-
export {
|
|
51
|
+
export { S as default };
|
|
@@ -1,42 +1,45 @@
|
|
|
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
|
*/
|
|
6
|
-
import { reactive as e, computed as o, inject as
|
|
6
|
+
import { reactive as e, computed as o, inject as t, getCurrentInstance as l, resolveComponent as n, withDirectives as p, openBlock as a, createElementBlock as r, normalizeClass as s, createElementVNode as i, normalizeStyle as u, vShow as c, createVNode as d, mergeProps as m, withCtx as h, Fragment as v, renderList as f, createBlock as y, createCommentVNode as w, toDisplayString as k, renderSlot as C } from "vue";
|
|
7
7
|
import { c as P } from "./component.js";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { _
|
|
8
|
+
import S from "./Icon.js";
|
|
9
|
+
import x from "./Popup.js";
|
|
10
|
+
import { _ } from "./plugin-vue_export-helper.js";
|
|
11
11
|
import "../locale/lang";
|
|
12
12
|
import "./pxCheck.js";
|
|
13
13
|
import "./OverLay.js";
|
|
14
|
-
const { componentName:
|
|
15
|
-
const
|
|
16
|
-
const e2 =
|
|
14
|
+
const { componentName: g, create: b } = P("menu-item"), V = b({ props: { title: String, options: { type: Array, default: [] }, disabled: { type: Boolean, default: false }, modelValue: null, cols: { type: Number, default: 1 }, titleIcon: String, optionIcon: { type: String, default: "Check" } }, components: { [S.name]: S, [x.name]: x }, emits: ["update:modelValue", "change"], setup(n2, { emit: p2, slots: a2 }) {
|
|
15
|
+
const r2 = e({ showPopup: false, transition: true, showWrapper: false, isShowPlaceholderElement: false }), { parent: s2 } = (() => {
|
|
16
|
+
const e2 = t("menuParent", null);
|
|
17
17
|
if (e2) {
|
|
18
|
-
const o2 =
|
|
19
|
-
return
|
|
18
|
+
const o2 = l(), { link: t2 } = e2;
|
|
19
|
+
return t2(o2), { parent: e2 };
|
|
20
20
|
}
|
|
21
21
|
})();
|
|
22
|
-
return { classes: o(() => ({ [
|
|
22
|
+
return { classes: o(() => ({ [g]: true })), placeholderElementStyle: o(() => {
|
|
23
|
+
const e2 = { height: s2.offset.value + "px" };
|
|
24
|
+
return s2.props.direction === "down" ? e2 : { ...e2, top: "auto" };
|
|
25
|
+
}), renderTitle: () => {
|
|
23
26
|
var _a;
|
|
24
|
-
if (
|
|
25
|
-
return
|
|
26
|
-
const e2 = (_a =
|
|
27
|
+
if (n2.title)
|
|
28
|
+
return n2.title;
|
|
29
|
+
const e2 = (_a = n2.options) == null ? void 0 : _a.find((e3) => e3.value === n2.modelValue);
|
|
27
30
|
return e2 ? e2.text : "";
|
|
28
|
-
}, state:
|
|
29
|
-
e2 !==
|
|
31
|
+
}, state: r2, parent: s2, toggle: (e2 = !r2.showPopup, o2 = {}) => {
|
|
32
|
+
e2 !== r2.showPopup && (r2.showPopup = e2, r2.isShowPlaceholderElement = e2, e2 && (r2.showWrapper = true));
|
|
30
33
|
}, onClick: (e2) => {
|
|
31
|
-
|
|
34
|
+
r2.showPopup = false, r2.isShowPlaceholderElement = false, e2.value !== n2.modelValue && (p2("update:modelValue", e2.value), p2("change", e2.value));
|
|
32
35
|
}, handleClose: () => {
|
|
33
|
-
|
|
36
|
+
r2.showWrapper = false, r2.isShowPlaceholderElement = false;
|
|
34
37
|
}, handleClickOutside: () => {
|
|
35
|
-
|
|
38
|
+
r2.showPopup = false;
|
|
36
39
|
} };
|
|
37
|
-
} }),
|
|
38
|
-
var
|
|
39
|
-
const
|
|
40
|
-
return
|
|
40
|
+
} }), E = { class: "nut-menu-item__content" }, j = ["onClick"];
|
|
41
|
+
var O = _(V, [["render", function(e2, o2, t2, l2, P2, S2) {
|
|
42
|
+
const x2 = n("nut-icon"), _2 = n("nut-popup");
|
|
43
|
+
return p((a(), r("view", { class: s(e2.classes) }, [p(i("div", { onClick: o2[0] || (o2[0] = (...o3) => e2.handleClickOutside && e2.handleClickOutside(...o3)), class: s(["placeholder-element", { up: e2.parent.props.direction === "up" }]), style: u(e2.placeholderElementStyle) }, null, 6), [[c, e2.state.isShowPlaceholderElement]]), d(_2, m({ style: e2.parent.props.direction === "down" ? { top: e2.parent.offset.value + "px" } : { bottom: e2.parent.offset.value + "px" }, overlayStyle: e2.parent.props.direction === "down" ? { top: e2.parent.offset.value + "px" } : { bottom: e2.parent.offset.value + "px" } }, e2.$attrs, { visible: e2.state.showPopup, "onUpdate:visible": o2[1] || (o2[1] = (o3) => e2.state.showPopup = o3), position: e2.parent.props.direction === "down" ? "top" : "bottom", duration: e2.parent.props.duration, "pop-class": "nut-menu__pop", overlayClass: "nut-menu__overlay", overlay: e2.parent.props.overlay, onClosed: e2.handleClose, lockScroll: e2.parent.props.lockScroll, isWrapTeleport: false, "close-on-click-overlay": e2.parent.props.closeOnClickOverlay }), { default: h(() => [i("view", E, [(a(true), r(v, null, f(e2.options, (o3, t3) => (a(), r("view", { key: t3, class: s(["nut-menu-item__option", { active: o3.value === e2.modelValue }]), style: u({ "flex-basis": 100 / e2.cols + "%" }), onClick: (t4) => e2.onClick(o3) }, [o3.value === e2.modelValue ? (a(), y(x2, { key: 0, name: e2.optionIcon, color: e2.parent.props.activeColor }, null, 8, ["name", "color"])) : w("", true), i("view", { style: u({ color: o3.value === e2.modelValue ? e2.parent.props.activeColor : "" }) }, k(o3.text), 5)], 14, j))), 128)), C(e2.$slots, "default")])]), _: 3 }, 16, ["style", "overlayStyle", "visible", "position", "duration", "overlay", "onClosed", "lockScroll", "close-on-click-overlay"])], 2)), [[c, e2.state.showWrapper]]);
|
|
41
44
|
}]]);
|
|
42
|
-
export {
|
|
45
|
+
export { O 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, 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
|
*/
|
|
@@ -79,7 +60,7 @@ const { componentName: $, create: N } = A("noticebar"), T = N({ props: { directi
|
|
|
79
60
|
h2.keepAlive = true, clearInterval(h2.timer);
|
|
80
61
|
}), c(() => {
|
|
81
62
|
clearInterval(h2.timer);
|
|
82
|
-
}),
|
|
63
|
+
}), { ...r(e2), ...r(h2), isEllipsis: f2, classes: y2, iconShow: g2, barStyle: k2, contentStyle: w2, iconBg: v2, horseLampStyle: C2, wrap: u2, content: m2, handleClick: (e3) => {
|
|
83
64
|
d2("click", e3);
|
|
84
65
|
}, onClickIcon: (t2) => {
|
|
85
66
|
e2.closeMode && (h2.showNoticeBar = !e2.closeMode), d2("close", t2);
|
|
@@ -91,7 +72,7 @@ const { componentName: $, create: N } = A("noticebar"), T = N({ props: { directi
|
|
|
91
72
|
d2("click", e3);
|
|
92
73
|
}, handleClickIcon: () => {
|
|
93
74
|
d2("close", h2.scrollList[0]);
|
|
94
|
-
}, slots: p2 }
|
|
75
|
+
}, slots: p2 };
|
|
95
76
|
} }), E = { ref: "wrap", class: "wrap" }, W = ["onClick"];
|
|
96
77
|
var M = B(T, [["render", function(e2, t2, l2, o2, i2, n2) {
|
|
97
78
|
const s2 = d("nut-icon"), a2 = d("ScrollItem");
|