@nutui/nutui 3.1.18-beta.0 → 3.1.19-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +41 -0
- package/LICENSE +1 -1
- package/README.md +6 -0
- package/dist/nutui.d.ts +39 -36
- package/dist/nutui.es.js +13149 -11288
- package/dist/nutui.umd.js +13156 -11381
- package/dist/packages/_es/ActionSheet.js +13 -19
- package/dist/packages/_es/Address.js +70 -55
- package/dist/packages/_es/Audio.js +13 -13
- package/dist/packages/_es/AudioOperate.js +125 -0
- package/dist/packages/_es/Avatar.js +4 -4
- package/dist/packages/_es/BackTop.js +69 -108
- package/dist/packages/_es/Badge.js +4 -4
- package/dist/packages/_es/Barrage.js +63 -56
- package/dist/packages/_es/Button.js +3 -3
- package/dist/packages/_es/Calendar.js +30 -702
- package/dist/packages/_es/CalendarItem.js +10 -0
- package/dist/packages/_es/Card.js +7 -6
- package/dist/packages/_es/Cascader.js +8 -8
- package/dist/packages/_es/Cell.js +27 -27
- package/dist/packages/_es/CellGroup.js +2 -2
- package/dist/packages/_es/Checkbox.js +4 -4
- package/dist/packages/_es/CheckboxGroup.js +3 -3
- package/dist/packages/_es/CircleProgress.js +150 -41
- package/dist/packages/_es/Col.js +2 -2
- package/dist/packages/_es/Collapse.js +35 -9
- package/dist/packages/_es/CollapseItem.js +79 -38
- package/dist/packages/_es/CountDown.js +8 -6
- package/dist/packages/_es/CountUp.js +31 -30
- package/dist/packages/_es/DatePicker.js +81 -44
- package/dist/packages/_es/Dialog.js +7 -83
- package/dist/packages/_es/Divider.js +5 -5
- package/dist/packages/_es/Drag.js +93 -55
- package/dist/packages/_es/Elevator.js +75 -50
- package/dist/packages/_es/Empty.js +4 -4
- package/dist/packages/_es/FixedNav.js +6 -6
- package/dist/packages/_es/Form.js +11 -9
- package/dist/packages/_es/FormItem.js +9 -6
- package/dist/packages/_es/Grid.js +2 -2
- package/dist/packages/_es/GridItem.js +9 -27
- package/dist/packages/_es/Icon.js +2 -2
- package/dist/packages/_es/ImagePreview.js +14 -83
- package/dist/packages/_es/Indicator.js +4 -4
- package/dist/packages/_es/InfiniteLoading.js +94 -108
- package/dist/packages/_es/Input.js +297 -73
- package/dist/packages/_es/InputNumber.js +24 -17
- package/dist/packages/_es/Layout.js +2 -2
- package/dist/packages/_es/List.js +131 -0
- package/dist/packages/_es/Menu.js +16 -13
- package/dist/packages/_es/MenuItem.js +8 -8
- package/dist/packages/_es/Navbar.js +17 -12
- package/dist/packages/_es/NoticeBar.js +47 -39
- package/dist/packages/_es/Notify.js +28 -163
- package/dist/packages/_es/NumberKeyboard.js +4 -4
- package/dist/packages/_es/OldPicker.js +486 -0
- package/dist/packages/_es/OverLay.js +6 -26
- package/dist/packages/_es/Pagination.js +8 -8
- package/dist/packages/_es/Picker.js +192 -163
- package/dist/packages/_es/Popover.js +155 -30
- package/dist/packages/_es/Popup.js +7 -70
- package/dist/packages/_es/Price.js +18 -6
- package/dist/packages/_es/Progress.js +29 -27
- package/dist/packages/_es/PullRefresh.js +363 -0
- package/dist/packages/_es/Radio.js +4 -4
- package/dist/packages/_es/RadioGroup.js +2 -2
- package/dist/packages/_es/Range.js +169 -46
- package/dist/packages/_es/Rate.js +17 -20
- package/dist/packages/_es/Row.js +2 -2
- package/dist/packages/_es/SearchBar.js +9 -7
- package/dist/packages/_es/ShortPassword.js +90 -68
- package/dist/packages/_es/SideNavBar.js +6 -17
- package/dist/packages/_es/SideNavBarItem.js +2 -2
- package/dist/packages/_es/Signature.js +70 -70
- package/dist/packages/_es/Skeleton.js +9 -12
- package/dist/packages/_es/Sku.js +40 -31
- package/dist/packages/_es/Step.js +28 -12
- package/dist/packages/_es/Steps.js +8 -3
- package/dist/packages/_es/Sticky.js +29 -24
- package/dist/packages/_es/SubSideNavBar.js +2 -2
- package/dist/packages/_es/Swipe.js +40 -27
- package/dist/packages/_es/Swiper.js +32 -14
- package/dist/packages/_es/SwiperItem.js +2 -2
- package/dist/packages/_es/Switch.js +4 -4
- package/dist/packages/_es/TabPane.js +2 -2
- package/dist/packages/_es/Tabbar.js +4 -4
- package/dist/packages/_es/TabbarItem.js +28 -23
- package/dist/packages/_es/Table.js +14 -14
- package/dist/packages/_es/Tabs.js +19 -15
- package/dist/packages/_es/Tag.js +14 -8
- package/dist/packages/_es/TextArea.js +49 -15
- package/dist/packages/_es/TimeDetail.js +5 -4
- package/dist/packages/_es/TimePannel.js +4 -4
- package/dist/packages/_es/TimeSelect.js +9 -8
- package/dist/packages/_es/Toast.js +42 -171
- package/dist/packages/_es/Uploader.js +108 -139
- package/dist/packages/_es/Video.js +14 -10
- package/dist/packages/_es/common.js +2 -2
- package/dist/packages/_es/component.js +2 -2
- package/dist/packages/_es/index.js +45 -7
- package/dist/packages/_es/index.taro.js +719 -0
- package/dist/packages/_es/index2.js +2 -2
- package/dist/packages/_es/index3.js +57 -29
- package/dist/packages/_es/index4.js +414 -57
- package/dist/packages/_es/plugin-vue_export-helper.js +2 -2
- package/dist/packages/_es/pxCheck.js +2 -2
- package/dist/packages/_es/use-lock-scroll.js +23 -0
- package/dist/packages/_es/util.js +2 -2
- package/dist/packages/badge/index.scss +11 -13
- package/dist/packages/button/index.scss +1 -0
- package/dist/packages/calendar/index.scss +9 -4
- package/dist/packages/calendaritem/index.scss +0 -207
- package/dist/packages/cell/index.scss +6 -6
- package/dist/packages/checkbox/index.scss +4 -3
- package/dist/packages/collapseitem/index.scss +21 -11
- package/dist/packages/countdown/index.scss +3 -1
- package/dist/packages/divider/index.scss +8 -8
- package/dist/packages/elevator/index.scss +36 -36
- package/dist/packages/formitem/index.scss +15 -8
- package/dist/packages/indicator/index.scss +1 -1
- package/dist/packages/input/index.scss +70 -24
- package/dist/packages/inputnumber/index.scss +4 -2
- package/dist/packages/list/index.scss +24 -0
- package/dist/packages/menu/index.scss +3 -3
- package/dist/packages/navbar/index.scss +28 -8
- package/dist/packages/noticebar/index.scss +7 -8
- package/dist/packages/notify/index.scss +9 -0
- package/dist/packages/numberkeyboard/index.scss +22 -21
- package/dist/packages/oldpicker/index.scss +131 -0
- package/dist/packages/picker/index.scss +38 -32
- package/dist/packages/progress/index.scss +6 -5
- package/dist/packages/radio/index.scss +7 -6
- package/dist/packages/range/index.scss +109 -2
- package/dist/packages/searchbar/index.scss +7 -7
- package/dist/packages/sidenavbaritem/index.scss +5 -5
- package/dist/packages/step/index.scss +29 -29
- package/dist/packages/subsidenavbar/index.scss +10 -8
- package/dist/packages/tabbaritem/index.scss +15 -0
- package/dist/packages/timedetail/index.scss +13 -13
- package/dist/packages/timepannel/index.scss +7 -7
- package/dist/packages/timeselect/index.scss +3 -3
- package/dist/packages/uploader/index.scss +6 -6
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +64 -62
- package/dist/styles/themes/jdt.scss +91 -0
- package/dist/styles/variables-jdt.scss +728 -0
- package/dist/styles/variables.scss +250 -44
- package/package.json +2 -1
- package/dist/packages/_es/raf.js +0 -19
- package/dist/styles/themes/jdd.scss +0 -2
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
3
|
-
* (c)
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
|
|
3
|
+
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { c as createComponent } from "./component.js";
|
|
7
7
|
import { i as isPromise } from "./util.js";
|
|
8
|
-
import { computed, reactive, provide, watch, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, renderSlot } from "vue";
|
|
8
|
+
import { computed, reactive, provide, watch, resolveComponent, openBlock, createElementBlock, withModifiers, createVNode, withCtx, renderSlot } from "vue";
|
|
9
9
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
10
10
|
const component = {
|
|
11
11
|
props: {
|
|
@@ -32,7 +32,7 @@ const component = {
|
|
|
32
32
|
}, { immediate: true });
|
|
33
33
|
const findFormItem = (vnodes) => {
|
|
34
34
|
let task = [];
|
|
35
|
-
vnodes.forEach((vnode,
|
|
35
|
+
vnodes.forEach((vnode, index) => {
|
|
36
36
|
var _a, _b, _c;
|
|
37
37
|
let type = vnode.type;
|
|
38
38
|
type = type.name || type;
|
|
@@ -69,8 +69,9 @@ const component = {
|
|
|
69
69
|
}
|
|
70
70
|
let value = getPropByPath(props.modelValue, prop || "");
|
|
71
71
|
tipMessage({ prop, message: "" });
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
let _rules = [...rules];
|
|
73
|
+
while (_rules.length) {
|
|
74
|
+
const { required, validator, regex, message } = _rules.shift();
|
|
74
75
|
const errorMsg = { prop, message };
|
|
75
76
|
if (required) {
|
|
76
77
|
if (!value) {
|
|
@@ -140,7 +141,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
140
141
|
const _component_nut_cell_group = resolveComponent("nut-cell-group");
|
|
141
142
|
return openBlock(), createElementBlock("form", {
|
|
142
143
|
class: "nut-form",
|
|
143
|
-
|
|
144
|
+
action: "#",
|
|
145
|
+
onSubmit: _cache[0] || (_cache[0] = withModifiers((...args) => _ctx.onSubmit && _ctx.onSubmit(...args), ["prevent"]))
|
|
144
146
|
}, [
|
|
145
147
|
createVNode(_component_nut_cell_group, null, {
|
|
146
148
|
default: withCtx(() => [
|
|
@@ -150,5 +152,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
150
152
|
})
|
|
151
153
|
], 32);
|
|
152
154
|
}
|
|
153
|
-
var
|
|
154
|
-
export {
|
|
155
|
+
var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
156
|
+
export { index_taro as default };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
3
|
-
* (c)
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
|
|
3
|
+
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { p as pxCheck } from "./pxCheck.js";
|
|
7
|
-
import { inject, computed, resolveComponent, openBlock, createBlock, normalizeClass, withCtx, createElementBlock, normalizeStyle, toDisplayString, createCommentVNode, createElementVNode, renderSlot } from "vue";
|
|
7
|
+
import { inject, provide, computed, resolveComponent, openBlock, createBlock, normalizeClass, withCtx, createElementBlock, normalizeStyle, toDisplayString, createCommentVNode, createElementVNode, renderSlot } from "vue";
|
|
8
8
|
import { c as createComponent } from "./component.js";
|
|
9
9
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
10
10
|
const { componentName, create } = createComponent("form-item");
|
|
@@ -43,21 +43,24 @@ const _sfc_main = create({
|
|
|
43
43
|
},
|
|
44
44
|
labelAlign: {
|
|
45
45
|
type: String,
|
|
46
|
-
default: "
|
|
46
|
+
default: ""
|
|
47
47
|
},
|
|
48
48
|
errorMessageAlign: {
|
|
49
49
|
type: String,
|
|
50
|
-
default: "
|
|
50
|
+
default: ""
|
|
51
51
|
},
|
|
52
52
|
bodyAlign: {
|
|
53
53
|
type: String,
|
|
54
|
-
default: "
|
|
54
|
+
default: ""
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
57
|
components: {},
|
|
58
58
|
emits: [""],
|
|
59
59
|
setup(props, { emit }) {
|
|
60
60
|
const parent = inject("formErrorTip");
|
|
61
|
+
provide("form", {
|
|
62
|
+
props
|
|
63
|
+
});
|
|
61
64
|
const labelStyle = computed(() => {
|
|
62
65
|
return {
|
|
63
66
|
width: pxCheck(props.labelWidth),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
3
|
-
* (c)
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
|
|
3
|
+
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { c as createComponent } from "./component.js";
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
3
|
-
* (c)
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
|
|
3
|
+
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { inject, getCurrentInstance, onUnmounted, computed, ref, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, renderSlot, Fragment, createBlock, toDisplayString } from "vue";
|
|
7
|
-
import { u as useRouter } from "./index.js";
|
|
8
7
|
import { c as createComponent } from "./component.js";
|
|
9
8
|
import { p as pxCheck } from "./pxCheck.js";
|
|
10
9
|
import { G as GRID_KEY } from "./common.js";
|
|
@@ -16,10 +15,10 @@ function useInject(key) {
|
|
|
16
15
|
const { add, remove, internalChildren } = parent;
|
|
17
16
|
add(instance);
|
|
18
17
|
onUnmounted(() => remove(instance));
|
|
19
|
-
const
|
|
18
|
+
const index = computed(() => internalChildren.indexOf(instance));
|
|
20
19
|
return {
|
|
21
20
|
parent,
|
|
22
|
-
index
|
|
21
|
+
index
|
|
23
22
|
};
|
|
24
23
|
}
|
|
25
24
|
return {
|
|
@@ -41,17 +40,6 @@ const _sfc_main = create({
|
|
|
41
40
|
},
|
|
42
41
|
iconColor: {
|
|
43
42
|
type: String
|
|
44
|
-
},
|
|
45
|
-
to: {
|
|
46
|
-
type: [String, Object]
|
|
47
|
-
},
|
|
48
|
-
url: {
|
|
49
|
-
type: String,
|
|
50
|
-
default: ""
|
|
51
|
-
},
|
|
52
|
-
replace: {
|
|
53
|
-
type: Boolean,
|
|
54
|
-
default: false
|
|
55
43
|
}
|
|
56
44
|
},
|
|
57
45
|
emits: ["click"],
|
|
@@ -59,7 +47,7 @@ const _sfc_main = create({
|
|
|
59
47
|
const Parent = useInject(GRID_KEY);
|
|
60
48
|
if (!Parent.parent)
|
|
61
49
|
return;
|
|
62
|
-
const
|
|
50
|
+
const index = Parent.index;
|
|
63
51
|
const parent = Parent.parent.props;
|
|
64
52
|
const rootClass = computed(() => {
|
|
65
53
|
const prefixCls = componentName;
|
|
@@ -75,7 +63,7 @@ const _sfc_main = create({
|
|
|
75
63
|
style.paddingTop = `${100 / +parent.columnNum}%`;
|
|
76
64
|
} else if (parent.gutter) {
|
|
77
65
|
style.paddingRight = pxCheck(parent.gutter);
|
|
78
|
-
if (
|
|
66
|
+
if (index.value >= parent.columnNum) {
|
|
79
67
|
style.marginTop = pxCheck(parent.gutter);
|
|
80
68
|
}
|
|
81
69
|
}
|
|
@@ -91,7 +79,7 @@ const _sfc_main = create({
|
|
|
91
79
|
[`${prefixCls}--square`]: parent.square,
|
|
92
80
|
[`${prefixCls}--reverse`]: parent.reverse,
|
|
93
81
|
[`${prefixCls}--${parent.direction}`]: !!parent.direction,
|
|
94
|
-
[`${prefixCls}--clickable`]: parent.clickable
|
|
82
|
+
[`${prefixCls}--clickable`]: parent.clickable
|
|
95
83
|
};
|
|
96
84
|
});
|
|
97
85
|
const iconProps = computed(() => {
|
|
@@ -101,14 +89,8 @@ const _sfc_main = create({
|
|
|
101
89
|
color: props.iconColor || parent.iconColor
|
|
102
90
|
};
|
|
103
91
|
});
|
|
104
|
-
const router = useRouter();
|
|
105
92
|
const handleClick = (event) => {
|
|
106
93
|
emit("click", event);
|
|
107
|
-
if (props.to && router) {
|
|
108
|
-
router[props.replace ? "replace" : "push"](props.to);
|
|
109
|
-
} else if (props.url) {
|
|
110
|
-
props.replace ? location.replace(props.url) : location.href = props.url;
|
|
111
|
-
}
|
|
112
94
|
};
|
|
113
95
|
return {
|
|
114
96
|
rootClass,
|
|
@@ -145,5 +127,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
145
127
|
], 2)
|
|
146
128
|
], 6);
|
|
147
129
|
}
|
|
148
|
-
var
|
|
149
|
-
export {
|
|
130
|
+
var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
131
|
+
export { index_taro as default };
|
|
@@ -17,26 +17,24 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
var __publicField = (obj, key, value) => {
|
|
21
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
22
|
-
return value;
|
|
23
|
-
};
|
|
24
20
|
/*!
|
|
25
|
-
* @nutui/nutui v3.1.
|
|
26
|
-
* (c)
|
|
21
|
+
* @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
|
|
22
|
+
* (c) 2022 @jdf2e.
|
|
27
23
|
* Released under the MIT License.
|
|
28
24
|
*/
|
|
29
|
-
import { toRefs, reactive, watch, onMounted, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, withModifiers, createElementBlock, Fragment, renderList,
|
|
25
|
+
import { toRefs, reactive, watch, onMounted, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, withModifiers, createElementBlock, Fragment, renderList, createCommentVNode, toDisplayString } from "vue";
|
|
30
26
|
import { c as createComponent } from "./component.js";
|
|
31
27
|
import Popup from "./Popup.js";
|
|
32
|
-
import Video from "./Video.js";
|
|
33
28
|
import Swiper from "./Swiper.js";
|
|
34
29
|
import SwiperItem from "./SwiperItem.js";
|
|
35
30
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
31
|
+
import "./use-lock-scroll.js";
|
|
36
32
|
import "./OverLay.js";
|
|
37
33
|
import "./Icon.js";
|
|
38
34
|
import "./pxCheck.js";
|
|
35
|
+
import "./index.js";
|
|
39
36
|
import "./index2.js";
|
|
37
|
+
import "@tarojs/taro";
|
|
40
38
|
const { componentName, create } = createComponent("imagepreview");
|
|
41
39
|
const _sfc_main = create({
|
|
42
40
|
props: {
|
|
@@ -48,10 +46,6 @@ const _sfc_main = create({
|
|
|
48
46
|
type: Array,
|
|
49
47
|
default: () => []
|
|
50
48
|
},
|
|
51
|
-
videos: {
|
|
52
|
-
type: Array,
|
|
53
|
-
default: () => []
|
|
54
|
-
},
|
|
55
49
|
contentClose: {
|
|
56
50
|
type: Boolean,
|
|
57
51
|
default: false
|
|
@@ -71,16 +65,11 @@ const _sfc_main = create({
|
|
|
71
65
|
autoplay: {
|
|
72
66
|
type: [Number, String],
|
|
73
67
|
default: 3e3
|
|
74
|
-
},
|
|
75
|
-
isWrapTeleport: {
|
|
76
|
-
type: Boolean,
|
|
77
|
-
default: false
|
|
78
68
|
}
|
|
79
69
|
},
|
|
80
70
|
emits: ["close"],
|
|
81
71
|
components: {
|
|
82
72
|
[Popup.name]: Popup,
|
|
83
|
-
[Video.name]: Video,
|
|
84
73
|
[Swiper.name]: Swiper,
|
|
85
74
|
[SwiperItem.name]: SwiperItem
|
|
86
75
|
},
|
|
@@ -124,7 +113,9 @@ const _sfc_main = create({
|
|
|
124
113
|
return Math.hypot(Math.abs(second.x - first.x), Math.abs(second.y - first.y));
|
|
125
114
|
};
|
|
126
115
|
const scaleNow = () => {
|
|
127
|
-
|
|
116
|
+
if (state.eleImg != null) {
|
|
117
|
+
state.eleImg.style.transform = "scale(" + state.store.scale + ")";
|
|
118
|
+
}
|
|
128
119
|
};
|
|
129
120
|
const onTouchStart = (event) => {
|
|
130
121
|
const curTouchTime = new Date().getTime();
|
|
@@ -199,7 +190,7 @@ const _sfc_main = create({
|
|
|
199
190
|
onMounted(() => {
|
|
200
191
|
state.active = props.initNo;
|
|
201
192
|
state.showPop = props.show;
|
|
202
|
-
state.maxNo = props.images.length
|
|
193
|
+
state.maxNo = props.images.length;
|
|
203
194
|
});
|
|
204
195
|
return __spreadProps(__spreadValues({}, toRefs(state)), {
|
|
205
196
|
slideChangeEnd,
|
|
@@ -216,7 +207,6 @@ const _sfc_main = create({
|
|
|
216
207
|
const _hoisted_1 = ["src"];
|
|
217
208
|
const _hoisted_2 = { class: "nut-imagepreview-index" };
|
|
218
209
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
219
|
-
const _component_nut_video = resolveComponent("nut-video");
|
|
220
210
|
const _component_nut_swiper_item = resolveComponent("nut-swiper-item");
|
|
221
211
|
const _component_nut_swiper = resolveComponent("nut-swiper");
|
|
222
212
|
const _component_nut_popup = resolveComponent("nut-popup");
|
|
@@ -224,7 +214,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
224
214
|
"pop-class": "custom-pop",
|
|
225
215
|
visible: _ctx.showPop,
|
|
226
216
|
"onUpdate:visible": _cache[2] || (_cache[2] = ($event) => _ctx.showPop = $event),
|
|
227
|
-
isWrapTeleport: _ctx.isWrapTeleport,
|
|
228
217
|
onClick: _ctx.onClose,
|
|
229
218
|
style: { "width": "100%" }
|
|
230
219
|
}, {
|
|
@@ -247,17 +236,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
247
236
|
"pagination-color": _ctx.paginationColor
|
|
248
237
|
}, {
|
|
249
238
|
default: withCtx(() => [
|
|
250
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.videos, (item, index) => {
|
|
251
|
-
return openBlock(), createBlock(_component_nut_swiper_item, { key: index }, {
|
|
252
|
-
default: withCtx(() => [
|
|
253
|
-
createVNode(_component_nut_video, {
|
|
254
|
-
source: item.source,
|
|
255
|
-
options: item.options
|
|
256
|
-
}, null, 8, ["source", "options"])
|
|
257
|
-
]),
|
|
258
|
-
_: 2
|
|
259
|
-
}, 1024);
|
|
260
|
-
}), 128)),
|
|
261
239
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.images, (item, index) => {
|
|
262
240
|
return openBlock(), createBlock(_component_nut_swiper_item, { key: index }, {
|
|
263
241
|
default: withCtx(() => [
|
|
@@ -273,57 +251,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
273
251
|
_: 1
|
|
274
252
|
}, 8, ["auto-play", "onChange", "init-page", "pagination-visible", "pagination-color"])) : createCommentVNode("", true)
|
|
275
253
|
], 32),
|
|
276
|
-
createElementVNode("view", _hoisted_2, toDisplayString(_ctx.active) + " / " + toDisplayString(_ctx.images.length
|
|
254
|
+
createElementVNode("view", _hoisted_2, toDisplayString(_ctx.active) + " / " + toDisplayString(_ctx.images.length), 1)
|
|
277
255
|
]),
|
|
278
256
|
_: 1
|
|
279
|
-
}, 8, ["visible", "
|
|
280
|
-
}
|
|
281
|
-
var ImagePreview = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
282
|
-
class ImagePreviewOptions {
|
|
283
|
-
constructor() {
|
|
284
|
-
__publicField(this, "show", false);
|
|
285
|
-
__publicField(this, "images", []);
|
|
286
|
-
__publicField(this, "initNo", 1);
|
|
287
|
-
__publicField(this, "paginationVisible", false);
|
|
288
|
-
__publicField(this, "paginationColor", "");
|
|
289
|
-
__publicField(this, "teleport", "body");
|
|
290
|
-
__publicField(this, "onClose", () => {
|
|
291
|
-
});
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
class ImagePreviewFunction {
|
|
295
|
-
constructor(_options) {
|
|
296
|
-
__publicField(this, "options", new ImagePreviewOptions());
|
|
297
|
-
let options = Object.assign(this.options, _options);
|
|
298
|
-
let elWarp = document.body;
|
|
299
|
-
let teleport = options.teleport;
|
|
300
|
-
if (teleport != "body") {
|
|
301
|
-
if (typeof teleport == "string") {
|
|
302
|
-
elWarp = document.querySelector(teleport);
|
|
303
|
-
} else {
|
|
304
|
-
elWarp = options.teleport;
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
const root = document.createElement("view");
|
|
308
|
-
root.id = "imagepreview-" + new Date().getTime();
|
|
309
|
-
const Wrapper = {
|
|
310
|
-
setup() {
|
|
311
|
-
options.teleport = `#${root.id}`;
|
|
312
|
-
return () => {
|
|
313
|
-
return h(ImagePreview, options);
|
|
314
|
-
};
|
|
315
|
-
}
|
|
316
|
-
};
|
|
317
|
-
const instance = createVNode(Wrapper);
|
|
318
|
-
elWarp.appendChild(root);
|
|
319
|
-
render(instance, root);
|
|
320
|
-
}
|
|
257
|
+
}, 8, ["visible", "onClick"]);
|
|
321
258
|
}
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
};
|
|
325
|
-
_ImagePreview.install = (app) => {
|
|
326
|
-
app.use(ImagePreview);
|
|
327
|
-
app.config.globalProperties.$imagepreview = _ImagePreview;
|
|
328
|
-
};
|
|
329
|
-
export { ImagePreview, ImagePreviewOptions, _ImagePreview as default };
|
|
259
|
+
var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
260
|
+
export { index_taro as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
3
|
-
* (c)
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
|
|
3
|
+
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { toRefs, computed, openBlock, createElementBlock, normalizeClass, Fragment, renderList, toDisplayString } from "vue";
|
|
@@ -62,5 +62,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
62
62
|
}), 128))
|
|
63
63
|
], 2);
|
|
64
64
|
}
|
|
65
|
-
var
|
|
66
|
-
export {
|
|
65
|
+
var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
66
|
+
export { index_taro as default };
|