@nutui/nutui 3.1.17 → 3.1.19-beta.0
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 +7 -1
- package/dist/nutui.d.ts +3 -1
- package/dist/nutui.es.js +2335 -1280
- package/dist/nutui.umd.js +2350 -1293
- package/dist/packages/_es/ActionSheet.js +8 -3
- package/dist/packages/_es/Address.js +17 -11
- package/dist/packages/_es/Audio.js +2 -2
- package/dist/packages/_es/AudioOperate.js +125 -0
- package/dist/packages/_es/Avatar.js +2 -2
- package/dist/packages/_es/BackTop.js +7 -4
- package/dist/packages/_es/Badge.js +2 -2
- package/dist/packages/_es/Barrage.js +2 -2
- package/dist/packages/_es/Button.js +2 -2
- package/dist/packages/_es/Calendar.js +10 -687
- package/dist/packages/_es/CalendarItem.js +10 -0
- package/dist/packages/_es/Card.js +2 -2
- package/dist/packages/_es/Cascader.js +2 -2
- package/dist/packages/_es/Cell.js +25 -18
- package/dist/packages/_es/CellGroup.js +2 -2
- package/dist/packages/_es/Checkbox.js +4 -4
- package/dist/packages/_es/CheckboxGroup.js +4 -4
- package/dist/packages/_es/CircleProgress.js +2 -2
- package/dist/packages/_es/Col.js +2 -2
- package/dist/packages/_es/Collapse.js +2 -2
- package/dist/packages/_es/CollapseItem.js +31 -19
- package/dist/packages/_es/CountDown.js +4 -2
- package/dist/packages/_es/CountUp.js +25 -16
- package/dist/packages/_es/DatePicker.js +83 -47
- package/dist/packages/_es/Dialog.js +7 -5
- package/dist/packages/_es/Divider.js +2 -2
- package/dist/packages/_es/Drag.js +4 -4
- package/dist/packages/_es/Elevator.js +3 -3
- package/dist/packages/_es/Empty.js +2 -2
- package/dist/packages/_es/FixedNav.js +2 -2
- package/dist/packages/_es/Form.js +8 -6
- package/dist/packages/_es/FormItem.js +9 -6
- package/dist/packages/_es/Grid.js +2 -2
- package/dist/packages/_es/GridItem.js +3 -3
- package/dist/packages/_es/Icon.js +2 -2
- package/dist/packages/_es/ImagePreview.js +11 -6
- package/dist/packages/_es/Indicator.js +2 -2
- package/dist/packages/_es/InfiniteLoading.js +2 -2
- package/dist/packages/_es/Input.js +290 -66
- package/dist/packages/_es/InputNumber.js +2 -2
- package/dist/packages/_es/Layout.js +2 -2
- package/dist/packages/_es/List.js +124 -0
- package/dist/packages/_es/Menu.js +3 -3
- package/dist/packages/_es/MenuItem.js +4 -4
- package/dist/packages/_es/Navbar.js +31 -66
- package/dist/packages/_es/NoticeBar.js +41 -22
- package/dist/packages/_es/Notify.js +9 -5
- package/dist/packages/_es/NumberKeyboard.js +9 -4
- package/dist/packages/_es/OldPicker.js +484 -0
- package/dist/packages/_es/OverLay.js +2 -2
- package/dist/packages/_es/Pagination.js +2 -2
- package/dist/packages/_es/Picker.js +164 -157
- package/dist/packages/_es/Popover.js +7 -4
- package/dist/packages/_es/Popup.js +4 -4
- package/dist/packages/_es/Price.js +2 -2
- package/dist/packages/_es/Progress.js +14 -22
- package/dist/packages/_es/PullRefresh.js +363 -0
- package/dist/packages/_es/Radio.js +3 -3
- package/dist/packages/_es/RadioGroup.js +2 -2
- package/dist/packages/_es/Range.js +131 -21
- package/dist/packages/_es/Rate.js +2 -2
- package/dist/packages/_es/Row.js +2 -2
- package/dist/packages/_es/SearchBar.js +2 -2
- package/dist/packages/_es/ShortPassword.js +9 -4
- package/dist/packages/_es/SideNavBar.js +2 -2
- package/dist/packages/_es/SideNavBarItem.js +2 -2
- package/dist/packages/_es/Signature.js +25 -6
- package/dist/packages/_es/Skeleton.js +2 -2
- package/dist/packages/_es/Sku.js +31 -13
- package/dist/packages/_es/Step.js +28 -12
- package/dist/packages/_es/Steps.js +8 -3
- package/dist/packages/_es/Sticky.js +3 -3
- package/dist/packages/_es/SubSideNavBar.js +2 -2
- package/dist/packages/_es/Swipe.js +3 -3
- package/dist/packages/_es/Swiper.js +3 -3
- package/dist/packages/_es/SwiperItem.js +3 -3
- package/dist/packages/_es/Switch.js +2 -2
- package/dist/packages/_es/TabPane.js +2 -2
- package/dist/packages/_es/Tabbar.js +2 -2
- package/dist/packages/_es/TabbarItem.js +23 -8
- package/dist/packages/_es/Table.js +2 -2
- package/dist/packages/_es/Tabs.js +8 -5
- package/dist/packages/_es/Tag.js +11 -5
- package/dist/packages/_es/TextArea.js +38 -6
- package/dist/packages/_es/TimeDetail.js +2 -2
- package/dist/packages/_es/TimePannel.js +2 -2
- package/dist/packages/_es/TimeSelect.js +8 -3
- package/dist/packages/_es/Toast.js +16 -9
- package/dist/packages/_es/Uploader.js +2 -4
- package/dist/packages/_es/Video.js +12 -8
- package/dist/packages/_es/common.js +2 -2
- package/dist/packages/_es/component.js +2 -2
- package/dist/packages/_es/index.js +6 -8
- package/dist/packages/_es/index2.js +9 -32
- package/dist/packages/_es/index3.js +29 -57
- package/dist/packages/_es/index4.js +64 -0
- package/dist/packages/_es/index5.js +687 -0
- package/dist/packages/_es/plugin-vue_export-helper.js +2 -2
- package/dist/packages/_es/pxCheck.js +2 -2
- package/dist/packages/_es/raf.js +2 -2
- package/dist/packages/_es/util.js +2 -2
- package/dist/packages/actionsheet/index.scss +7 -6
- package/dist/packages/badge/index.scss +11 -13
- package/dist/packages/button/index.scss +6 -5
- package/dist/packages/calendar/index.scss +9 -4
- package/dist/packages/calendaritem/index.scss +0 -207
- package/dist/packages/cell/index.scss +9 -9
- package/dist/packages/cellgroup/index.scss +1 -1
- 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 +30 -8
- package/dist/packages/noticebar/index.scss +10 -5
- package/dist/packages/notify/index.scss +10 -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 +24 -19
- package/dist/packages/radio/index.scss +7 -6
- package/dist/packages/range/index.scss +113 -6
- 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/swiper/index.scss +4 -4
- package/dist/packages/switch/index.scss +8 -8
- package/dist/packages/tabbar/index.scss +3 -2
- package/dist/packages/tabbaritem/index.scss +19 -3
- package/dist/packages/tabs/index.scss +1 -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/toast/index.scss +8 -7
- package/dist/packages/uploader/index.scss +4 -4
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +43 -41
- package/dist/styles/themes/jdt.scss +91 -0
- package/dist/styles/variables-jdt.scss +728 -0
- package/dist/styles/variables.scss +322 -38
- package/package.json +3 -2
- package/dist/styles/themes/jdd.scss +0 -2
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.0 Mon Mar 28 2022 17:50:21 GMT+0800 (中国标准时间)
|
|
3
|
+
* (c) 2022 @jdf2e.
|
|
4
|
+
* Released under the MIT License.
|
|
5
|
+
*/
|
|
6
|
+
import "vue";
|
|
7
|
+
import "./component.js";
|
|
8
|
+
export { C as default } from "./index5.js";
|
|
9
|
+
import "./raf.js";
|
|
10
|
+
import "./plugin-vue_export-helper.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
3
|
-
* (c)
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.0 Mon Mar 28 2022 17:50:21 GMT+0800 (中国标准时间)
|
|
3
|
+
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { c as createComponent } from "./component.js";
|
|
@@ -35,8 +35,8 @@ var __publicField = (obj, key, value) => {
|
|
|
35
35
|
return value;
|
|
36
36
|
};
|
|
37
37
|
/*!
|
|
38
|
-
* @nutui/nutui v3.1.
|
|
39
|
-
* (c)
|
|
38
|
+
* @nutui/nutui v3.1.19-beta.0 Mon Mar 28 2022 17:50:21 GMT+0800 (中国标准时间)
|
|
39
|
+
* (c) 2022 @jdf2e.
|
|
40
40
|
* Released under the MIT License.
|
|
41
41
|
*/
|
|
42
42
|
import { computed, ref, watch, resolveComponent, openBlock, createBlock, withCtx, createElementBlock, Fragment, renderList, createElementVNode, normalizeClass, toDisplayString, createCommentVNode, createVNode } from "vue";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
3
|
-
* (c)
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.0 Mon Mar 28 2022 17:50:21 GMT+0800 (中国标准时间)
|
|
3
|
+
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { computed, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, renderSlot, createBlock, createCommentVNode, Fragment, createElementVNode, toDisplayString, createTextVNode } from "vue";
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
|
-
import { useRouter } from "
|
|
8
|
+
import { u as useRouter } from "./index.js";
|
|
9
9
|
import { p as pxCheck } from "./pxCheck.js";
|
|
10
10
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
11
11
|
const { componentName, create } = createComponent("cell");
|
|
@@ -52,8 +52,16 @@ const _sfc_main = create({
|
|
|
52
52
|
};
|
|
53
53
|
}
|
|
54
54
|
});
|
|
55
|
-
const _hoisted_1 = {
|
|
56
|
-
|
|
55
|
+
const _hoisted_1 = {
|
|
56
|
+
key: 0,
|
|
57
|
+
class: "nut-cell__icon"
|
|
58
|
+
};
|
|
59
|
+
const _hoisted_2 = {
|
|
60
|
+
key: 1,
|
|
61
|
+
class: "nut-cell__title"
|
|
62
|
+
};
|
|
63
|
+
const _hoisted_3 = { class: "title" };
|
|
64
|
+
const _hoisted_4 = { class: "nut-cell__title-desc" };
|
|
57
65
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
58
66
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
59
67
|
return openBlock(), createElementBlock("view", {
|
|
@@ -62,29 +70,28 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
62
70
|
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))
|
|
63
71
|
}, [
|
|
64
72
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
65
|
-
_ctx.
|
|
66
|
-
key: 0,
|
|
67
|
-
class: normalizeClass(["nut-cell__title", { icon: _ctx.icon || _ctx.$slots.icon }])
|
|
68
|
-
}, [
|
|
73
|
+
_ctx.icon || _ctx.$slots.icon ? (openBlock(), createElementBlock("view", _hoisted_1, [
|
|
69
74
|
_ctx.$slots.icon ? renderSlot(_ctx.$slots, "icon", { key: 0 }) : _ctx.icon ? (openBlock(), createBlock(_component_nut_icon, {
|
|
70
75
|
key: 1,
|
|
71
76
|
class: "icon",
|
|
72
77
|
name: _ctx.icon
|
|
73
|
-
}, null, 8, ["name"])) : createCommentVNode("", true)
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
+
}, null, 8, ["name"])) : createCommentVNode("", true)
|
|
79
|
+
])) : createCommentVNode("", true),
|
|
80
|
+
_ctx.title || _ctx.subTitle ? (openBlock(), createElementBlock("view", _hoisted_2, [
|
|
81
|
+
_ctx.subTitle ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
82
|
+
createElementVNode("view", _hoisted_3, toDisplayString(_ctx.title), 1),
|
|
83
|
+
createElementVNode("view", _hoisted_4, toDisplayString(_ctx.subTitle), 1)
|
|
84
|
+
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
78
85
|
createTextVNode(toDisplayString(_ctx.title), 1)
|
|
79
86
|
], 64))
|
|
80
|
-
]
|
|
87
|
+
])) : createCommentVNode("", true),
|
|
81
88
|
_ctx.desc ? (openBlock(), createElementBlock("view", {
|
|
82
|
-
key:
|
|
89
|
+
key: 2,
|
|
83
90
|
class: "nut-cell__value",
|
|
84
91
|
style: normalizeStyle({ "text-align": _ctx.descTextAlign })
|
|
85
92
|
}, toDisplayString(_ctx.desc), 5)) : createCommentVNode("", true),
|
|
86
|
-
_ctx.$slots.link ? renderSlot(_ctx.$slots, "link", { key:
|
|
87
|
-
key:
|
|
93
|
+
_ctx.$slots.link ? renderSlot(_ctx.$slots, "link", { key: 3 }) : _ctx.isLink || _ctx.to ? (openBlock(), createBlock(_component_nut_icon, {
|
|
94
|
+
key: 4,
|
|
88
95
|
class: "nut-cell__link",
|
|
89
96
|
name: "right"
|
|
90
97
|
})) : createCommentVNode("", true)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
3
|
-
* (c)
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.0 Mon Mar 28 2022 17:50:21 GMT+0800 (中国标准时间)
|
|
3
|
+
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { computed, openBlock, createElementBlock, normalizeClass, renderSlot, toDisplayString, createCommentVNode, createElementVNode } from "vue";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
3
|
-
* (c)
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.0 Mon Mar 28 2022 17:50:21 GMT+0800 (中国标准时间)
|
|
3
|
+
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { inject, computed, onMounted, getCurrentInstance, h } from "vue";
|
|
@@ -27,7 +27,7 @@ const _sfc_main = create({
|
|
|
27
27
|
},
|
|
28
28
|
iconSize: {
|
|
29
29
|
type: [String, Number],
|
|
30
|
-
default: "
|
|
30
|
+
default: ""
|
|
31
31
|
},
|
|
32
32
|
iconName: {
|
|
33
33
|
type: String,
|
|
@@ -54,7 +54,7 @@ const _sfc_main = create({
|
|
|
54
54
|
}
|
|
55
55
|
});
|
|
56
56
|
const pDisabled = computed(() => {
|
|
57
|
-
return hasParent.value ? parent.disabled : props.disabled;
|
|
57
|
+
return hasParent.value ? parent.disabled.value : props.disabled;
|
|
58
58
|
});
|
|
59
59
|
const checked = computed(() => !!props.modelValue);
|
|
60
60
|
const color = computed(() => {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
3
|
-
* (c)
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.0 Mon Mar 28 2022 17:50:21 GMT+0800 (中国标准时间)
|
|
3
|
+
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { reactive, provide, computed, watch, h } from "vue";
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
|
-
import { u as useExpose } from "./
|
|
8
|
+
import { u as useExpose } from "./index2.js";
|
|
9
9
|
const { create, componentName } = createComponent("checkboxgroup");
|
|
10
10
|
const _sfc_main = create({
|
|
11
11
|
props: {
|
|
@@ -43,7 +43,7 @@ const _sfc_main = create({
|
|
|
43
43
|
};
|
|
44
44
|
provide("parent", {
|
|
45
45
|
value: computed(() => props.modelValue),
|
|
46
|
-
disabled: props.disabled,
|
|
46
|
+
disabled: computed(() => props.disabled),
|
|
47
47
|
updateValue,
|
|
48
48
|
relation
|
|
49
49
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
3
|
-
* (c)
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.0 Mon Mar 28 2022 17:50:21 GMT+0800 (中国标准时间)
|
|
3
|
+
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { computed, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, renderSlot, createTextVNode, toDisplayString } from "vue";
|
package/dist/packages/_es/Col.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
3
|
-
* (c)
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.0 Mon Mar 28 2022 17:50:21 GMT+0800 (中国标准时间)
|
|
3
|
+
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { inject, computed, openBlock, createElementBlock, normalizeClass, normalizeStyle, renderSlot } from "vue";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
3
|
-
* (c)
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.0 Mon Mar 28 2022 17:50:21 GMT+0800 (中国标准时间)
|
|
3
|
+
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { provide, openBlock, createElementBlock, renderSlot } from "vue";
|
|
@@ -18,11 +18,11 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
/*!
|
|
21
|
-
* @nutui/nutui v3.1.
|
|
22
|
-
* (c)
|
|
21
|
+
* @nutui/nutui v3.1.19-beta.0 Mon Mar 28 2022 17:50:21 GMT+0800 (中国标准时间)
|
|
22
|
+
* (c) 2022 @jdf2e.
|
|
23
23
|
* Released under the MIT License.
|
|
24
24
|
*/
|
|
25
|
-
import { inject, reactive, computed, getCurrentInstance, ref, watch, onMounted,
|
|
25
|
+
import { inject, reactive, computed, getCurrentInstance, ref, watch, onMounted, nextTick, toRefs, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, createBlock, createCommentVNode, renderSlot, normalizeStyle } from "vue";
|
|
26
26
|
import { c as createComponent } from "./component.js";
|
|
27
27
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
28
28
|
const { create, componentName } = createComponent("collapse-item");
|
|
@@ -85,7 +85,9 @@ const _sfc_main = create({
|
|
|
85
85
|
const contentRef = ref(null);
|
|
86
86
|
const onTransitionEnd = () => {
|
|
87
87
|
const wrapperRefEle = document.getElementsByClassName("collapse-wrapper")[0];
|
|
88
|
-
wrapperRefEle
|
|
88
|
+
if (wrapperRefEle) {
|
|
89
|
+
wrapperRefEle.style.willChange = "auto";
|
|
90
|
+
}
|
|
89
91
|
};
|
|
90
92
|
const animation = () => {
|
|
91
93
|
const wrapperRefEle = wrapperRef.value;
|
|
@@ -163,19 +165,30 @@ const _sfc_main = create({
|
|
|
163
165
|
onMounted(() => {
|
|
164
166
|
const { name } = props;
|
|
165
167
|
const active = parent && parent.props.active;
|
|
166
|
-
|
|
167
|
-
if (
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
168
|
+
nextTick(() => {
|
|
169
|
+
if (typeof active == "number" || typeof active == "string") {
|
|
170
|
+
if (name == active) {
|
|
171
|
+
defaultOpen();
|
|
172
|
+
}
|
|
173
|
+
} else if (Object.values(active) instanceof Array) {
|
|
174
|
+
const f = Object.values(active).filter((item) => item == name);
|
|
175
|
+
if (f.length > 0) {
|
|
176
|
+
defaultOpen();
|
|
177
|
+
}
|
|
174
178
|
}
|
|
179
|
+
});
|
|
180
|
+
});
|
|
181
|
+
const emptyContent = computed(() => {
|
|
182
|
+
let ele = contentRef.value;
|
|
183
|
+
let _class = "";
|
|
184
|
+
if (!(ele == null ? void 0 : ele.innerText)) {
|
|
185
|
+
_class = "empty";
|
|
175
186
|
}
|
|
187
|
+
return _class;
|
|
176
188
|
});
|
|
177
189
|
return __spreadProps(__spreadValues(__spreadValues(__spreadValues({
|
|
178
|
-
classes
|
|
190
|
+
classes,
|
|
191
|
+
emptyContent
|
|
179
192
|
}, toRefs(proxyData)), toRefs(parent.props)), toRefs(titleIconStyle)), {
|
|
180
193
|
wrapperRef,
|
|
181
194
|
contentRef,
|
|
@@ -198,10 +211,6 @@ const _hoisted_6 = {
|
|
|
198
211
|
class: "collapse-wrapper",
|
|
199
212
|
ref: "wrapperRef"
|
|
200
213
|
};
|
|
201
|
-
const _hoisted_7 = {
|
|
202
|
-
class: "collapse-content",
|
|
203
|
-
ref: "contentRef"
|
|
204
|
-
};
|
|
205
214
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
206
215
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
207
216
|
return openBlock(), createElementBlock("view", {
|
|
@@ -246,9 +255,12 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
246
255
|
}, null, 8, ["name", "size", "color", "class", "style"])) : createCommentVNode("", true)
|
|
247
256
|
], 2),
|
|
248
257
|
createElementVNode("view", _hoisted_6, [
|
|
249
|
-
createElementVNode("view",
|
|
258
|
+
createElementVNode("view", {
|
|
259
|
+
class: normalizeClass(["collapse-content", _ctx.emptyContent]),
|
|
260
|
+
ref: "contentRef"
|
|
261
|
+
}, [
|
|
250
262
|
renderSlot(_ctx.$slots, "default")
|
|
251
|
-
],
|
|
263
|
+
], 2)
|
|
252
264
|
], 512)
|
|
253
265
|
], 2);
|
|
254
266
|
}
|
|
@@ -18,8 +18,8 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
/*!
|
|
21
|
-
* @nutui/nutui v3.1.
|
|
22
|
-
* (c)
|
|
21
|
+
* @nutui/nutui v3.1.19-beta.0 Mon Mar 28 2022 17:50:21 GMT+0800 (中国标准时间)
|
|
22
|
+
* (c) 2022 @jdf2e.
|
|
23
23
|
* Released under the MIT License.
|
|
24
24
|
*/
|
|
25
25
|
import { reactive, computed, watch, toRefs, openBlock, createElementBlock, normalizeClass, renderSlot, toDisplayString, Fragment, createElementVNode, createCommentVNode } from "vue";
|
|
@@ -125,6 +125,8 @@ const _sfc_main = create({
|
|
|
125
125
|
const end = getTimeStamp(props.endTime || curr);
|
|
126
126
|
const diffTime = curr - start;
|
|
127
127
|
state.restTime = end - (start + diffTime);
|
|
128
|
+
clearInterval(state.timer);
|
|
129
|
+
state.timer = null;
|
|
128
130
|
state.timer = setInterval(() => {
|
|
129
131
|
if (!props.paused) {
|
|
130
132
|
let restTime2 = end - (Date.now() - state.p + diffTime);
|
|
@@ -18,11 +18,11 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
/*!
|
|
21
|
-
* @nutui/nutui v3.1.
|
|
22
|
-
* (c)
|
|
21
|
+
* @nutui/nutui v3.1.19-beta.0 Mon Mar 28 2022 17:50:21 GMT+0800 (中国标准时间)
|
|
22
|
+
* (c) 2022 @jdf2e.
|
|
23
23
|
* Released under the MIT License.
|
|
24
24
|
*/
|
|
25
|
-
import { getCurrentInstance, reactive, watch, nextTick, onMounted, onUnmounted, toRefs, openBlock, createElementBlock, Fragment, normalizeStyle, renderList, createCommentVNode, toDisplayString, createTextVNode } from "vue";
|
|
25
|
+
import { getCurrentInstance, ref, reactive, watch, nextTick, onMounted, onUnmounted, toRefs, openBlock, createElementBlock, Fragment, normalizeStyle, renderList, createCommentVNode, toDisplayString, createTextVNode } from "vue";
|
|
26
26
|
import { c as createComponent } from "./component.js";
|
|
27
27
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
28
28
|
function useExtend(apis) {
|
|
@@ -98,7 +98,7 @@ const _sfc_main = create({
|
|
|
98
98
|
type: Number,
|
|
99
99
|
default: 0
|
|
100
100
|
},
|
|
101
|
-
|
|
101
|
+
machineTurnMore: {
|
|
102
102
|
type: Number,
|
|
103
103
|
default: 0
|
|
104
104
|
}
|
|
@@ -106,6 +106,11 @@ const _sfc_main = create({
|
|
|
106
106
|
components: {},
|
|
107
107
|
emits: ["click", "scroll-end"],
|
|
108
108
|
setup(props, { emit }) {
|
|
109
|
+
const runNumberImg = ref(null);
|
|
110
|
+
const numberItemRef = ref([]);
|
|
111
|
+
const setRef = (el) => {
|
|
112
|
+
numberItemRef.value.push(el);
|
|
113
|
+
};
|
|
109
114
|
const data = reactive({
|
|
110
115
|
valFlag: false,
|
|
111
116
|
current: 0,
|
|
@@ -200,21 +205,23 @@ const _sfc_main = create({
|
|
|
200
205
|
let countTimer = setInterval(() => {
|
|
201
206
|
if (initNum > endNum) {
|
|
202
207
|
if (data.current <= endNum || data.current <= speed) {
|
|
203
|
-
data.current =
|
|
208
|
+
data.current = endNum.toFixed(toFixed);
|
|
204
209
|
clearInterval(countTimer);
|
|
205
210
|
emit("scroll-end");
|
|
206
211
|
data.valFlag = false;
|
|
207
212
|
} else {
|
|
208
|
-
|
|
213
|
+
let num = parseFloat(String(data.current)) - parseFloat(String(speed));
|
|
214
|
+
data.current = num.toFixed(toFixed);
|
|
209
215
|
}
|
|
210
216
|
} else {
|
|
211
217
|
if (data.current >= endNum) {
|
|
212
|
-
data.current =
|
|
218
|
+
data.current = endNum.toFixed(toFixed);
|
|
213
219
|
clearInterval(countTimer);
|
|
214
220
|
emit("scroll-end");
|
|
215
221
|
data.valFlag = false;
|
|
216
222
|
} else {
|
|
217
|
-
|
|
223
|
+
let num = parseFloat(String(data.current)) + parseFloat(String(speed));
|
|
224
|
+
data.current = num.toFixed(toFixed);
|
|
218
225
|
}
|
|
219
226
|
}
|
|
220
227
|
}, props.during);
|
|
@@ -295,8 +302,7 @@ const _sfc_main = create({
|
|
|
295
302
|
if (data.sortFlag == "equal") {
|
|
296
303
|
return false;
|
|
297
304
|
}
|
|
298
|
-
let
|
|
299
|
-
let element = refsDom[data.num_total_len - 1];
|
|
305
|
+
let element = numberItemRef.value[data.num_total_len - 1];
|
|
300
306
|
runTurn(element);
|
|
301
307
|
});
|
|
302
308
|
} else {
|
|
@@ -359,8 +365,7 @@ const _sfc_main = create({
|
|
|
359
365
|
Math.pow(10, data.pointNum);
|
|
360
366
|
}
|
|
361
367
|
nextTick(() => {
|
|
362
|
-
|
|
363
|
-
f.addEventListener("webkitTransitionEnd", () => {
|
|
368
|
+
runNumberImg.value.addEventListener("webkitTransitionEnd", () => {
|
|
364
369
|
emit("scroll-end");
|
|
365
370
|
data.valFlag = false;
|
|
366
371
|
});
|
|
@@ -376,14 +381,14 @@ const _sfc_main = create({
|
|
|
376
381
|
}
|
|
377
382
|
};
|
|
378
383
|
const machineLuck = () => {
|
|
379
|
-
const
|
|
384
|
+
const machineTurnMoreNum = props.machineTurnMore < 0 ? 0 : props.machineTurnMore;
|
|
380
385
|
let distance = props.numHeight * props.machinePrizeNum;
|
|
381
386
|
if (data.prizeLevelTrun < 0) {
|
|
382
387
|
generateRandom();
|
|
383
388
|
}
|
|
384
389
|
for (let i = 0; i < props.machineNum; i++) {
|
|
385
390
|
setTimeout(() => {
|
|
386
|
-
let turn = distance * (i + 1 + parseFloat(String(
|
|
391
|
+
let turn = distance * (i + 1 + parseFloat(String(machineTurnMoreNum)));
|
|
387
392
|
if (data.prizeYPrev.length != 0) {
|
|
388
393
|
data.prizeY[i] = data.prizeYPrev[i];
|
|
389
394
|
}
|
|
@@ -443,6 +448,8 @@ const _sfc_main = create({
|
|
|
443
448
|
data.timer = null;
|
|
444
449
|
});
|
|
445
450
|
return __spreadProps(__spreadValues(__spreadValues({}, toRefs(data)), toRefs(reactive(props))), {
|
|
451
|
+
runNumberImg,
|
|
452
|
+
setRef,
|
|
446
453
|
topNumber,
|
|
447
454
|
turnNumber
|
|
448
455
|
});
|
|
@@ -474,6 +481,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
474
481
|
}), 128))
|
|
475
482
|
], 4)) : (openBlock(), createElementBlock("view", {
|
|
476
483
|
key: 1,
|
|
484
|
+
ref: "runNumberImg",
|
|
477
485
|
class: "run-number-img",
|
|
478
486
|
style: normalizeStyle({ height: _ctx.numHeight + "px" })
|
|
479
487
|
}, [
|
|
@@ -486,7 +494,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
486
494
|
height: _ctx.numHeight + "px",
|
|
487
495
|
left: _ctx.numWidth * (index2 > _ctx.num_total_len - _ctx.pointNum - 1 ? index2 == _ctx.num_total_len - _ctx.pointNum ? index2 * 1.5 : index2 * 1.3 : index2) + "px",
|
|
488
496
|
backgroundImage: "url(" + _ctx.customBgImg + ")",
|
|
489
|
-
|
|
497
|
+
backgroundPositionX: "0",
|
|
498
|
+
backgroundPositionY: -(String(_ctx.relNum)[index2] * _ctx.numHeight + _ctx.customSpacNum * String(_ctx.relNum)[index2]) + "px",
|
|
490
499
|
transition: "all linear " + _ctx.during / 10 + "ms"
|
|
491
500
|
})
|
|
492
501
|
}, null, 4);
|
|
@@ -515,7 +524,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
515
524
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.num_total_len, (val, index2) => {
|
|
516
525
|
return openBlock(), createElementBlock("view", {
|
|
517
526
|
ref_for: true,
|
|
518
|
-
ref:
|
|
527
|
+
ref: _ctx.setRef,
|
|
519
528
|
class: "numberItem",
|
|
520
529
|
key: val,
|
|
521
530
|
style: normalizeStyle({
|