@nutui/nutui 4.0.10-beta.1 → 4.0.10
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 +17 -0
- package/dist/nutui.es.js +1 -1
- package/dist/nutui.js +6550 -8291
- package/dist/nutui.umd.js +1 -1
- package/dist/packages/_es/ActionSheet.js +78 -111
- package/dist/packages/_es/Address.js +250 -375
- package/dist/packages/_es/AddressList.js +269 -354
- package/dist/packages/_es/Animate.js +41 -58
- package/dist/packages/_es/Audio.js +128 -197
- package/dist/packages/_es/AudioOperate.js +60 -71
- package/dist/packages/_es/Avatar.js +66 -89
- package/dist/packages/_es/AvatarGroup.js +23 -31
- package/dist/packages/_es/Backtop.js +59 -99
- package/dist/packages/_es/Badge.js +36 -47
- package/dist/packages/_es/Barrage.js +68 -147
- package/dist/packages/_es/Button.js +47 -66
- package/dist/packages/_es/Calendar.js +135 -157
- package/dist/packages/_es/CalendarItem.js +6 -6
- package/dist/packages/_es/Card.js +42 -56
- package/dist/packages/_es/Cascader.js +315 -474
- package/dist/packages/_es/Category.js +29 -39
- package/dist/packages/_es/CategoryPane.js +57 -83
- package/dist/packages/_es/Cell.js +56 -71
- package/dist/packages/_es/CellGroup.js +19 -27
- package/dist/packages/_es/Checkbox.js +109 -156
- package/dist/packages/_es/CheckboxGroup.js +38 -59
- package/dist/packages/_es/CircleProgress.js +67 -96
- package/dist/packages/_es/Col.js +23 -31
- package/dist/packages/_es/Collapse.js +33 -58
- package/dist/packages/_es/CollapseItem.js +78 -108
- package/dist/packages/_es/Comment.js +207 -279
- package/dist/packages/_es/ConfigProvider.js +37 -55
- package/dist/packages/_es/Countdown.js +100 -212
- package/dist/packages/_es/Countup.js +232 -445
- package/dist/packages/_es/DatePicker.js +162 -265
- package/dist/packages/_es/Dialog.js +161 -213
- package/dist/packages/_es/Divider.js +42 -57
- package/dist/packages/_es/Drag.js +70 -153
- package/dist/packages/_es/Ecard.js +64 -104
- package/dist/packages/_es/Elevator.js +143 -219
- package/dist/packages/_es/Ellipsis.js +95 -178
- package/dist/packages/_es/Empty.js +23 -39
- package/dist/packages/_es/FixedNav.js +93 -116
- package/dist/packages/_es/Form.js +107 -178
- package/dist/packages/_es/FormItem.js +48 -61
- package/dist/packages/_es/Grid.js +5 -6
- package/dist/packages/_es/GridItem.js +58 -84
- package/dist/packages/_es/Image.js +90 -129
- package/dist/packages/_es/ImagePreview.js +256 -412
- package/dist/packages/_es/Indicator.js +30 -34
- package/dist/packages/_es/InfiniteLoading.js +83 -136
- package/dist/packages/_es/Input.js +160 -264
- package/dist/packages/_es/InputNumber.js +81 -117
- package/dist/packages/_es/Interceptor-6e26b757.js +18 -0
- package/dist/packages/_es/Invoice.js +104 -130
- package/dist/packages/_es/Layout.js +3 -4
- package/dist/packages/_es/List.js +117 -215
- package/dist/packages/_es/Menu.js +95 -150
- package/dist/packages/_es/MenuItem.js +109 -154
- package/dist/packages/_es/Navbar.js +103 -119
- package/dist/packages/_es/Noticebar.js +197 -312
- package/dist/packages/_es/Notify.js +110 -166
- package/dist/packages/_es/NumberKeyboard.js +127 -202
- package/dist/packages/_es/Overlay.js +52 -80
- package/dist/packages/_es/Pagination.js +70 -100
- package/dist/packages/_es/Picker.js +275 -437
- package/dist/packages/_es/Popover.js +122 -225
- package/dist/packages/_es/Popup.js +4 -4
- package/dist/packages/_es/Price.js +44 -82
- package/dist/packages/_es/Progress.js +63 -79
- package/dist/packages/_es/PullRefresh.js +95 -173
- package/dist/packages/_es/Radio.js +4 -4
- package/dist/packages/_es/RadioGroup.js +3 -3
- package/dist/packages/_es/Range.js +204 -347
- package/dist/packages/_es/Rate.js +92 -141
- package/dist/packages/_es/Row.js +21 -27
- package/dist/packages/_es/Searchbar.js +123 -174
- package/dist/packages/_es/ShortPassword.js +69 -93
- package/dist/packages/_es/SideNavbar.js +49 -80
- package/dist/packages/_es/SideNavbarItem.js +22 -32
- package/dist/packages/_es/Signature.js +83 -146
- package/dist/packages/_es/Skeleton.js +110 -130
- package/dist/packages/_es/Sku.js +250 -343
- package/dist/packages/_es/Step.js +59 -86
- package/dist/packages/_es/Steps.js +26 -31
- package/dist/packages/_es/Sticky.js +4 -4
- package/dist/packages/_es/SubSideNavbar.js +52 -74
- package/dist/packages/_es/Swipe.js +83 -155
- package/dist/packages/_es/Swiper.js +174 -311
- package/dist/packages/_es/SwiperItem.js +28 -44
- package/dist/packages/_es/Switch.js +55 -68
- package/dist/packages/_es/TabPane.js +30 -41
- package/dist/packages/_es/Tabbar.js +41 -52
- package/dist/packages/_es/TabbarItem.js +61 -82
- package/dist/packages/_es/Table.js +109 -165
- package/dist/packages/_es/Tabs.js +240 -388
- package/dist/packages/_es/Tag.js +44 -61
- package/dist/packages/_es/Textarea.js +80 -124
- package/dist/packages/_es/TimeDetail.js +49 -76
- package/dist/packages/_es/TimePannel.js +34 -48
- package/dist/packages/_es/TimeSelect.js +47 -68
- package/dist/packages/_es/Toast.js +144 -218
- package/dist/packages/_es/Tour.js +138 -192
- package/dist/packages/_es/TrendArrow.js +57 -77
- package/dist/packages/_es/Uploader.js +234 -359
- package/dist/packages/_es/Video.js +191 -316
- package/dist/packages/_es/Watermark.js +84 -117
- package/dist/packages/_es/_plugin-vue_export-helper-dad06003.js +9 -0
- package/dist/packages/_es/common-d218746f.js +116 -0
- package/dist/packages/_es/component-234624bc.js +89 -0
- package/dist/packages/_es/index-14dfadc4.js +561 -0
- package/dist/packages/_es/index-192a3ef6.js +29 -0
- package/dist/packages/_es/index-360c5092.js +210 -0
- package/dist/packages/_es/index-496e6e05.js +24 -0
- package/dist/packages/_es/index-50eed3d9.js +7 -0
- package/dist/packages/_es/index-53ec2d4d.js +34 -0
- package/dist/packages/_es/index-fadb0974.js +8 -0
- package/dist/packages/_es/index.vue_vue_type_script_lang-1139b29a.js +43 -0
- package/dist/packages/_es/index.vue_vue_type_script_lang-43b774dd.js +77 -0
- package/dist/packages/_es/index.vue_vue_type_script_lang-f44c159d.js +110 -0
- package/dist/packages/_es/mountComponent-6d4ff200.js +23 -0
- package/dist/packages/_es/pxCheck-38173291.js +4 -0
- package/dist/packages/_es/raf-a74f1a06.js +16 -0
- package/dist/packages/_es/renderIcon-47498b32.js +5 -0
- package/dist/smartips/web-types.json +1 -1
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +154 -51
- package/dist/styles/themes/jdb.scss +154 -51
- package/dist/styles/themes/jddkh.scss +154 -51
- package/dist/styles/themes/jdt.scss +154 -51
- package/dist/types/__VUE/address/index.vue.d.ts +1 -1
- package/dist/types/__VUE/collapseitem/index.vue.d.ts +110 -3
- package/dist/types/__VUE/image/index.vue.d.ts +2 -2
- package/dist/types/__VUE/rate/index.vue.d.ts +110 -3
- package/dist/types/__VUE/searchbar/index.vue.d.ts +110 -3
- package/dist/types/__VUE/skeleton/index.vue.d.ts +2 -2
- package/dist/types/__VUE/swiper/index.vue.d.ts +1 -1
- package/dist/types/__VUE/table/common.d.ts +55 -2
- package/dist/types/__VUE/timeselect/index.vue.d.ts +1 -1
- package/dist/types/__VUE/watermark/index.vue.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +2 -2
- package/dist/packages/_es/Interceptor-956b24fc.js +0 -29
- package/dist/packages/_es/_plugin-vue_export-helper-cc2b3d55.js +0 -10
- package/dist/packages/_es/common-b9a5e726.js +0 -145
- package/dist/packages/_es/component-81a4c1d0.js +0 -145
- package/dist/packages/_es/index-29892cda.js +0 -33
- package/dist/packages/_es/index-43c34ac6.js +0 -30
- package/dist/packages/_es/index-54d03fc1.js +0 -8
- package/dist/packages/_es/index-79c5dc33.js +0 -10
- package/dist/packages/_es/index-7a7385e4.js +0 -67
- package/dist/packages/_es/index-87422be8.js +0 -942
- package/dist/packages/_es/index-da0a7662.js +0 -259
- package/dist/packages/_es/index.vue_vue_type_script_lang-22dfc112.js +0 -46
- package/dist/packages/_es/index.vue_vue_type_script_lang-442e4704.js +0 -98
- package/dist/packages/_es/index.vue_vue_type_script_lang-cc5c4086.js +0 -151
- package/dist/packages/_es/mountComponent-8b24c346.js +0 -39
- package/dist/packages/_es/pxCheck-c6b9f6b7.js +0 -6
- package/dist/packages/_es/raf-729dad54.js +0 -25
- package/dist/packages/_es/renderIcon-3d0fd47c.js +0 -9
|
@@ -1,30 +1,22 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
import { h, ref, reactive, computed, watch, onMounted, onActivated, onDeactivated, onUnmounted, toRefs, resolveComponent, openBlock, createElementBlock, normalizeClass, withDirectives, normalizeStyle, createElementVNode, renderSlot, createBlock, createCommentVNode, createTextVNode, toDisplayString, withModifiers, vShow, Fragment, renderList } from "vue";
|
|
21
|
-
import { Notice, CircleClose } from "@nutui/icons-vue";
|
|
22
|
-
import { c as createComponent } from "./component-81a4c1d0.js";
|
|
23
|
-
import { p as pxCheck } from "./pxCheck-c6b9f6b7.js";
|
|
24
|
-
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
1
|
+
var J = Object.defineProperty, K = Object.defineProperties;
|
|
2
|
+
var P = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var T = Object.getOwnPropertySymbols;
|
|
4
|
+
var Q = Object.prototype.hasOwnProperty, Z = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var B = (e, l, i) => l in e ? J(e, l, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[l] = i, S = (e, l) => {
|
|
6
|
+
for (var i in l || (l = {}))
|
|
7
|
+
Q.call(l, i) && B(e, i, l[i]);
|
|
8
|
+
if (T)
|
|
9
|
+
for (var i of T(l))
|
|
10
|
+
Z.call(l, i) && B(e, i, l[i]);
|
|
11
|
+
return e;
|
|
12
|
+
}, E = (e, l) => K(e, P(l));
|
|
13
|
+
import { h as _, ref as W, reactive as x, computed as d, watch as R, onMounted as ee, onActivated as te, onDeactivated as le, onUnmounted as ne, toRefs as D, resolveComponent as p, openBlock as a, createElementBlock as r, normalizeClass as N, withDirectives as ie, normalizeStyle as c, createElementVNode as u, renderSlot as h, createBlock as b, createCommentVNode as y, createTextVNode as oe, toDisplayString as z, withModifiers as se, vShow as ae, Fragment as L, renderList as V } from "vue";
|
|
14
|
+
import { Notice as re, CircleClose as ce } from "@nutui/icons-vue";
|
|
15
|
+
import { c as ue } from "./component-234624bc.js";
|
|
16
|
+
import { p as de } from "./pxCheck-38173291.js";
|
|
17
|
+
import { _ as me } from "./_plugin-vue_export-helper-dad06003.js";
|
|
25
18
|
import "../locale/lang";
|
|
26
|
-
const { componentName, create } =
|
|
27
|
-
const _sfc_main = create({
|
|
19
|
+
const { componentName: fe, create: he } = ue("noticebar"), ye = he({
|
|
28
20
|
props: {
|
|
29
21
|
// 滚动方向 across 横向 vertical 纵向
|
|
30
22
|
direction: {
|
|
@@ -33,9 +25,7 @@ const _sfc_main = create({
|
|
|
33
25
|
},
|
|
34
26
|
list: {
|
|
35
27
|
type: Array,
|
|
36
|
-
default: () =>
|
|
37
|
-
return [];
|
|
38
|
-
}
|
|
28
|
+
default: () => []
|
|
39
29
|
},
|
|
40
30
|
standTime: {
|
|
41
31
|
type: Number,
|
|
@@ -43,7 +33,7 @@ const _sfc_main = create({
|
|
|
43
33
|
},
|
|
44
34
|
complexAm: {
|
|
45
35
|
type: Boolean,
|
|
46
|
-
default:
|
|
36
|
+
default: !1
|
|
47
37
|
},
|
|
48
38
|
height: {
|
|
49
39
|
type: Number,
|
|
@@ -55,13 +45,13 @@ const _sfc_main = create({
|
|
|
55
45
|
},
|
|
56
46
|
closeMode: {
|
|
57
47
|
type: Boolean,
|
|
58
|
-
default:
|
|
48
|
+
default: !1
|
|
59
49
|
},
|
|
60
50
|
wrapable: {
|
|
61
51
|
type: Boolean,
|
|
62
|
-
default:
|
|
52
|
+
default: !1
|
|
63
53
|
},
|
|
64
|
-
leftIcon: { type: Boolean, default:
|
|
54
|
+
leftIcon: { type: Boolean, default: !0 },
|
|
65
55
|
color: {
|
|
66
56
|
type: String,
|
|
67
57
|
default: ""
|
|
@@ -84,352 +74,247 @@ const _sfc_main = create({
|
|
|
84
74
|
}
|
|
85
75
|
},
|
|
86
76
|
components: {
|
|
87
|
-
ScrollItem: function(
|
|
88
|
-
|
|
89
|
-
props.item.key = props.key;
|
|
90
|
-
return h(props.item);
|
|
77
|
+
ScrollItem: function(e) {
|
|
78
|
+
return e.item.props.style = e.style, e.item.key = e.key, _(e.item);
|
|
91
79
|
},
|
|
92
|
-
Notice,
|
|
93
|
-
CircleClose
|
|
80
|
+
Notice: re,
|
|
81
|
+
CircleClose: ce
|
|
94
82
|
},
|
|
95
83
|
emits: ["click", "close", "across-end"],
|
|
96
|
-
setup(
|
|
97
|
-
const
|
|
98
|
-
const content = ref(null);
|
|
99
|
-
const state = reactive({
|
|
84
|
+
setup(e, { emit: l, slots: i }) {
|
|
85
|
+
const g = W(null), w = W(null), t = x({
|
|
100
86
|
wrapWidth: 0,
|
|
101
|
-
firstRound:
|
|
87
|
+
firstRound: !0,
|
|
102
88
|
duration: 0,
|
|
103
89
|
offsetWidth: 0,
|
|
104
|
-
showNoticebar:
|
|
90
|
+
showNoticebar: !0,
|
|
105
91
|
animationClass: "",
|
|
106
|
-
animate:
|
|
92
|
+
animate: !1,
|
|
107
93
|
scrollList: [],
|
|
108
94
|
distance: 0,
|
|
109
95
|
timer: null,
|
|
110
|
-
keepAlive:
|
|
96
|
+
keepAlive: !1,
|
|
111
97
|
isCanScroll: null,
|
|
112
|
-
showNotica:
|
|
113
|
-
})
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
})
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
}
|
|
126
|
-
})
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
props.background && (style.background = props.background);
|
|
138
|
-
if (props.direction == "vertical") {
|
|
139
|
-
style.height = `${props.height}px`;
|
|
140
|
-
}
|
|
141
|
-
return style;
|
|
142
|
-
});
|
|
143
|
-
const contentStyle = computed(() => {
|
|
144
|
-
return {
|
|
145
|
-
animationDelay: (state.firstRound ? props.delay : 0) + "s",
|
|
146
|
-
animationDuration: state.duration + "s",
|
|
147
|
-
transform: `translateX(${state.firstRound ? 0 : state.wrapWidth + "px"})`
|
|
148
|
-
};
|
|
149
|
-
});
|
|
150
|
-
const horseLampStyle = computed(() => {
|
|
151
|
-
let styles = {};
|
|
152
|
-
if (props.complexAm) {
|
|
153
|
-
styles = {
|
|
154
|
-
transform: `translateY(${state.distance}px)`
|
|
98
|
+
showNotica: !0
|
|
99
|
+
}), k = d(() => ({
|
|
100
|
+
[fe]: !0
|
|
101
|
+
})), m = d(() => t.isCanScroll == null ? e.wrapable : !t.isCanScroll && !e.wrapable), v = d(() => ({
|
|
102
|
+
"nut-noticebar__page-wrap-content": !0,
|
|
103
|
+
"nut-ellipsis": m.value,
|
|
104
|
+
[t.animationClass]: !0
|
|
105
|
+
})), o = d(() => {
|
|
106
|
+
let n = {};
|
|
107
|
+
return e.color && (n.color = e.color), e.background && (n.background = e.background), e.direction == "vertical" && (n.height = `${e.height}px`), n;
|
|
108
|
+
}), f = d(() => ({
|
|
109
|
+
animationDelay: (t.firstRound ? e.delay : 0) + "s",
|
|
110
|
+
animationDuration: t.duration + "s",
|
|
111
|
+
transform: `translateX(${t.firstRound ? 0 : t.wrapWidth + "px"})`
|
|
112
|
+
})), $ = d(() => {
|
|
113
|
+
let n = {};
|
|
114
|
+
if (e.complexAm)
|
|
115
|
+
n = {
|
|
116
|
+
transform: `translateY(${t.distance}px)`
|
|
117
|
+
};
|
|
118
|
+
else if (t.animate) {
|
|
119
|
+
let s = ~~(e.height / e.speed / 4);
|
|
120
|
+
n = {
|
|
121
|
+
transition: `all ${s == 0 ? ~~(e.height / e.speed) : s}s`,
|
|
122
|
+
"margin-top": `-${e.height}px`
|
|
155
123
|
};
|
|
156
|
-
} else {
|
|
157
|
-
if (state.animate) {
|
|
158
|
-
let a = ~~(props.height / props.speed / 4);
|
|
159
|
-
styles = {
|
|
160
|
-
transition: `all ${a == 0 ? ~~(props.height / props.speed) : a}s`,
|
|
161
|
-
"margin-top": `-${props.height}px`
|
|
162
|
-
};
|
|
163
|
-
}
|
|
164
124
|
}
|
|
165
|
-
return
|
|
125
|
+
return n;
|
|
166
126
|
});
|
|
167
|
-
|
|
168
|
-
() =>
|
|
169
|
-
(
|
|
170
|
-
|
|
127
|
+
R(
|
|
128
|
+
() => e.text,
|
|
129
|
+
(n) => {
|
|
130
|
+
A();
|
|
171
131
|
}
|
|
172
|
-
)
|
|
173
|
-
|
|
174
|
-
() =>
|
|
175
|
-
|
|
176
|
-
state.scrollList = [].concat(value);
|
|
132
|
+
), R(
|
|
133
|
+
() => e.list,
|
|
134
|
+
(n) => {
|
|
135
|
+
t.scrollList = [].concat(n);
|
|
177
136
|
}
|
|
178
137
|
);
|
|
179
|
-
const
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
}
|
|
183
|
-
setTimeout(() => {
|
|
184
|
-
if (!wrap.value || !content.value) {
|
|
138
|
+
const A = (n) => {
|
|
139
|
+
t.showNoticebar != !1 && setTimeout(() => {
|
|
140
|
+
if (!g.value || !w.value)
|
|
185
141
|
return;
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
const offsetWidth = content.value.getBoundingClientRect().width;
|
|
189
|
-
state.isCanScroll = props.scrollable == null ? offsetWidth > wrapWidth : props.scrollable;
|
|
190
|
-
if (state.isCanScroll) {
|
|
191
|
-
state.wrapWidth = wrapWidth;
|
|
192
|
-
state.offsetWidth = offsetWidth;
|
|
193
|
-
state.duration = offsetWidth / props.speed;
|
|
194
|
-
state.animationClass = "play";
|
|
195
|
-
} else {
|
|
196
|
-
state.animationClass = "";
|
|
197
|
-
}
|
|
142
|
+
const s = g.value.getBoundingClientRect().width, C = w.value.getBoundingClientRect().width;
|
|
143
|
+
t.isCanScroll = e.scrollable == null ? C > s : e.scrollable, t.isCanScroll ? (t.wrapWidth = s, t.offsetWidth = C, t.duration = C / e.speed, t.animationClass = "play") : t.animationClass = "";
|
|
198
144
|
}, 0);
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
}
|
|
207
|
-
emit("close", event);
|
|
208
|
-
};
|
|
209
|
-
const onAnimationEnd = (event) => {
|
|
210
|
-
state.firstRound = false;
|
|
211
|
-
emit("across-end", event);
|
|
212
|
-
setTimeout(() => {
|
|
213
|
-
state.duration = (state.offsetWidth + state.wrapWidth) / props.speed;
|
|
214
|
-
state.animationClass = "play-infinite";
|
|
145
|
+
}, F = (n) => {
|
|
146
|
+
l("click", n);
|
|
147
|
+
}, H = (n) => {
|
|
148
|
+
e.closeMode && (t.showNoticebar = !e.closeMode), l("close", n);
|
|
149
|
+
}, O = (n) => {
|
|
150
|
+
t.firstRound = !1, l("across-end", n), setTimeout(() => {
|
|
151
|
+
t.duration = (t.offsetWidth + t.wrapWidth) / e.speed, t.animationClass = "play-infinite";
|
|
215
152
|
}, 0);
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
153
|
+
}, U = () => {
|
|
154
|
+
I(), t.timer = setInterval(I, ~~(e.height / e.speed / 4 * 1e3) + e.standTime);
|
|
155
|
+
}, I = () => {
|
|
156
|
+
t.animate = !0, setTimeout(() => {
|
|
157
|
+
t.scrollList.push(t.scrollList[0]), t.scrollList.shift(), t.animate = !1;
|
|
158
|
+
}, ~~(e.height / e.speed / 4 * 1e3));
|
|
159
|
+
}, X = () => {
|
|
160
|
+
t.timer = setInterval(() => {
|
|
161
|
+
let n = 100;
|
|
162
|
+
for (let s = 0; s < n; s++)
|
|
163
|
+
Y(s, !(s < n - 1));
|
|
164
|
+
}, e.standTime + 100 * e.speed);
|
|
165
|
+
}, Y = (n, s) => {
|
|
223
166
|
setTimeout(() => {
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
state.timer = setInterval(() => {
|
|
231
|
-
let chunk = 100;
|
|
232
|
-
for (let i = 0; i < chunk; i++) {
|
|
233
|
-
scroll(i, i < chunk - 1 ? false : true);
|
|
234
|
-
}
|
|
235
|
-
}, props.standTime + 100 * props.speed);
|
|
236
|
-
};
|
|
237
|
-
const scroll = (n, last) => {
|
|
238
|
-
setTimeout(() => {
|
|
239
|
-
state.distance -= props.height / 100;
|
|
240
|
-
if (last) {
|
|
241
|
-
state.scrollList.push(state.scrollList[0]);
|
|
242
|
-
state.scrollList.shift();
|
|
243
|
-
state.distance = 0;
|
|
244
|
-
}
|
|
245
|
-
}, n * props.speed);
|
|
246
|
-
};
|
|
247
|
-
const go = (item) => {
|
|
248
|
-
emit("click", item);
|
|
249
|
-
};
|
|
250
|
-
const handleClickIcon = () => {
|
|
251
|
-
if (props.closeMode) {
|
|
252
|
-
state.showNoticebar = !props.closeMode;
|
|
253
|
-
}
|
|
254
|
-
emit("close", state.scrollList[0]);
|
|
167
|
+
t.distance -= e.height / 100, s && (t.scrollList.push(t.scrollList[0]), t.scrollList.shift(), t.distance = 0);
|
|
168
|
+
}, n * e.speed);
|
|
169
|
+
}, j = (n) => {
|
|
170
|
+
l("click", n);
|
|
171
|
+
}, q = () => {
|
|
172
|
+
e.closeMode && (t.showNoticebar = !e.closeMode), l("close", t.scrollList[0]);
|
|
255
173
|
};
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
watchSlots();
|
|
261
|
-
} else {
|
|
262
|
-
state.scrollList = [].concat(props.list);
|
|
263
|
-
}
|
|
264
|
-
setTimeout(() => {
|
|
265
|
-
props.complexAm ? startRoll() : startRollEasy();
|
|
266
|
-
}, props.standTime);
|
|
267
|
-
} else {
|
|
268
|
-
initScrollWrap(props.text);
|
|
269
|
-
}
|
|
174
|
+
ee(() => {
|
|
175
|
+
e.direction == "vertical" ? (i.default ? (M(), G()) : t.scrollList = [].concat(e.list), setTimeout(() => {
|
|
176
|
+
e.complexAm ? X() : U();
|
|
177
|
+
}, e.standTime)) : A(e.text);
|
|
270
178
|
});
|
|
271
|
-
const
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
};
|
|
275
|
-
const watchSlots = () => {
|
|
179
|
+
const M = () => {
|
|
180
|
+
i.default && (t.scrollList = [].concat(i.default()[0].children));
|
|
181
|
+
}, G = () => {
|
|
276
182
|
setTimeout(() => {
|
|
277
|
-
var
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
183
|
+
var n = new MutationObserver((C) => {
|
|
184
|
+
t.showNotica = !1, setTimeout(() => {
|
|
185
|
+
t.showNotica = !0;
|
|
186
|
+
}), M();
|
|
187
|
+
});
|
|
188
|
+
const s = document.getElementsByClassName("nut-noticebar-custom-item")[0];
|
|
189
|
+
s && n.observe(s, {
|
|
190
|
+
childList: !0,
|
|
191
|
+
subtree: !0
|
|
283
192
|
});
|
|
284
|
-
const ele = document.getElementsByClassName("nut-noticebar-custom-item")[0];
|
|
285
|
-
if (ele) {
|
|
286
|
-
observer.observe(ele, {
|
|
287
|
-
childList: true,
|
|
288
|
-
subtree: true
|
|
289
|
-
});
|
|
290
|
-
}
|
|
291
193
|
}, 100);
|
|
292
194
|
};
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
})
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
onAnimationEnd,
|
|
316
|
-
go,
|
|
317
|
-
handleClickIcon,
|
|
318
|
-
slots,
|
|
319
|
-
pxCheck,
|
|
320
|
-
wrapContentClass
|
|
195
|
+
return te(() => {
|
|
196
|
+
t.keepAlive && (t.keepAlive = !1);
|
|
197
|
+
}), le(() => {
|
|
198
|
+
t.keepAlive = !0, clearInterval(t.timer);
|
|
199
|
+
}), ne(() => {
|
|
200
|
+
clearInterval(t.timer);
|
|
201
|
+
}), E(S(S({}, D(e)), D(t)), {
|
|
202
|
+
isEllipsis: m,
|
|
203
|
+
classes: k,
|
|
204
|
+
barStyle: o,
|
|
205
|
+
contentStyle: f,
|
|
206
|
+
horseLampStyle: $,
|
|
207
|
+
wrap: g,
|
|
208
|
+
content: w,
|
|
209
|
+
handleClick: F,
|
|
210
|
+
onClickIcon: H,
|
|
211
|
+
onAnimationEnd: O,
|
|
212
|
+
go: j,
|
|
213
|
+
handleClickIcon: q,
|
|
214
|
+
slots: i,
|
|
215
|
+
pxCheck: de,
|
|
216
|
+
wrapContentClass: v
|
|
321
217
|
});
|
|
322
218
|
}
|
|
323
|
-
})
|
|
324
|
-
const _hoisted_1 = { class: "nut-noticebar__page-lefticon" };
|
|
325
|
-
const _hoisted_2 = {
|
|
219
|
+
}), ge = { class: "nut-noticebar__page-lefticon" }, we = {
|
|
326
220
|
ref: "wrap",
|
|
327
221
|
class: "nut-noticebar__page-wrap"
|
|
328
|
-
};
|
|
329
|
-
|
|
330
|
-
const
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
const _component_Notice = resolveComponent("Notice");
|
|
334
|
-
const _component_CircleClose = resolveComponent("CircleClose");
|
|
335
|
-
const _component_ScrollItem = resolveComponent("ScrollItem");
|
|
336
|
-
return openBlock(), createElementBlock("view", {
|
|
337
|
-
class: normalizeClass(_ctx.classes)
|
|
222
|
+
}, Ce = { class: "showNotica" }, be = { class: "nut-noticebar-custom-item" }, ke = ["onClick"];
|
|
223
|
+
function ve(e, l, i, g, w, t) {
|
|
224
|
+
const k = p("Notice"), m = p("CircleClose"), v = p("ScrollItem");
|
|
225
|
+
return a(), r("view", {
|
|
226
|
+
class: N(e.classes)
|
|
338
227
|
}, [
|
|
339
|
-
|
|
228
|
+
e.direction == "across" ? ie((a(), r("view", {
|
|
340
229
|
key: 0,
|
|
341
|
-
class:
|
|
342
|
-
"nut-noticebar__page--withicon":
|
|
343
|
-
"nut-noticebar__page--close":
|
|
344
|
-
"nut-noticebar__page--wrapable":
|
|
230
|
+
class: N(["nut-noticebar__page", {
|
|
231
|
+
"nut-noticebar__page--withicon": e.closeMode,
|
|
232
|
+
"nut-noticebar__page--close": e.closeMode,
|
|
233
|
+
"nut-noticebar__page--wrapable": e.wrapable
|
|
345
234
|
}]),
|
|
346
|
-
style:
|
|
347
|
-
onClick:
|
|
235
|
+
style: c(e.barStyle),
|
|
236
|
+
onClick: l[3] || (l[3] = (...o) => e.handleClick && e.handleClick(...o))
|
|
348
237
|
}, [
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
238
|
+
u("view", ge, [
|
|
239
|
+
h(e.$slots, "left-icon", {}, () => [
|
|
240
|
+
e.leftIcon ? (a(), b(k, {
|
|
352
241
|
key: 0,
|
|
353
242
|
size: "16px"
|
|
354
|
-
})) :
|
|
243
|
+
})) : y("", !0)
|
|
355
244
|
])
|
|
356
245
|
]),
|
|
357
|
-
|
|
358
|
-
|
|
246
|
+
u("view", we, [
|
|
247
|
+
u("view", {
|
|
359
248
|
ref: "content",
|
|
360
|
-
class:
|
|
361
|
-
style:
|
|
362
|
-
onAnimationend:
|
|
363
|
-
"on:webkitAnimationEnd":
|
|
249
|
+
class: N(e.wrapContentClass),
|
|
250
|
+
style: c(e.contentStyle),
|
|
251
|
+
onAnimationend: l[0] || (l[0] = (...o) => e.onAnimationEnd && e.onAnimationEnd(...o)),
|
|
252
|
+
"on:webkitAnimationEnd": l[1] || (l[1] = (...o) => e.onAnimationEnd && e.onAnimationEnd(...o))
|
|
364
253
|
}, [
|
|
365
|
-
|
|
366
|
-
|
|
254
|
+
h(e.$slots, "default", {}, () => [
|
|
255
|
+
oe(z(e.text), 1)
|
|
367
256
|
])
|
|
368
257
|
], 38)
|
|
369
258
|
], 512),
|
|
370
|
-
|
|
259
|
+
e.closeMode || e.$slots["right-icon"] ? (a(), r("view", {
|
|
371
260
|
key: 0,
|
|
372
261
|
class: "nut-noticebar__page-righticon",
|
|
373
|
-
onClick:
|
|
262
|
+
onClick: l[2] || (l[2] = se((...o) => e.onClickIcon && e.onClickIcon(...o), ["stop"]))
|
|
374
263
|
}, [
|
|
375
|
-
|
|
376
|
-
])) :
|
|
264
|
+
e.$slots["right-icon"] ? h(e.$slots, "right-icon", { key: 0 }) : (a(), b(m, { key: 1 }))
|
|
265
|
+
])) : y("", !0)
|
|
377
266
|
], 6)), [
|
|
378
|
-
[
|
|
379
|
-
]) :
|
|
380
|
-
|
|
267
|
+
[ae, e.showNoticebar]
|
|
268
|
+
]) : y("", !0),
|
|
269
|
+
e.scrollList.length > 0 && e.direction == "vertical" && e.showNoticebar ? (a(), r("view", {
|
|
381
270
|
key: 1,
|
|
382
271
|
class: "nut-noticebar__vertical",
|
|
383
|
-
style:
|
|
272
|
+
style: c(e.barStyle)
|
|
384
273
|
}, [
|
|
385
|
-
|
|
386
|
-
|
|
274
|
+
e.slots.default ? (a(), r(L, { key: 0 }, [
|
|
275
|
+
u("view", {
|
|
387
276
|
class: "nut-noticebar__vertical-list",
|
|
388
|
-
style:
|
|
277
|
+
style: c(e.horseLampStyle)
|
|
389
278
|
}, [
|
|
390
|
-
|
|
391
|
-
(
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
}, null, 8, ["style", "item"]);
|
|
397
|
-
}), 128))
|
|
279
|
+
u("div", Ce, [
|
|
280
|
+
(a(!0), r(L, null, V(e.scrollList, (o, f) => (a(), b(v, {
|
|
281
|
+
key: f,
|
|
282
|
+
style: c({ height: e.height + "px", "line-height": e.height + "px" }),
|
|
283
|
+
item: o
|
|
284
|
+
}, null, 8, ["style", "item"]))), 128))
|
|
398
285
|
])
|
|
399
286
|
], 4),
|
|
400
|
-
|
|
401
|
-
|
|
287
|
+
u("view", be, [
|
|
288
|
+
h(e.$slots, "default")
|
|
402
289
|
])
|
|
403
|
-
], 64)) : (
|
|
290
|
+
], 64)) : (a(), r("ul", {
|
|
404
291
|
key: 1,
|
|
405
292
|
class: "nut-noticebar__vertical-list",
|
|
406
|
-
style:
|
|
293
|
+
style: c(e.horseLampStyle)
|
|
407
294
|
}, [
|
|
408
|
-
(
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
}, toDisplayString(item), 13, _hoisted_5);
|
|
415
|
-
}), 128))
|
|
295
|
+
(a(!0), r(L, null, V(e.scrollList, (o, f) => (a(), r("li", {
|
|
296
|
+
class: "nut-noticebar__vertical-item",
|
|
297
|
+
key: f,
|
|
298
|
+
style: c({ height: e.pxCheck(e.height), lineHeight: e.pxCheck(e.height) }),
|
|
299
|
+
onClick: ($) => e.go(o)
|
|
300
|
+
}, z(o), 13, ke))), 128))
|
|
416
301
|
], 4)),
|
|
417
|
-
|
|
302
|
+
u("view", {
|
|
418
303
|
class: "go",
|
|
419
|
-
onClick:
|
|
304
|
+
onClick: l[4] || (l[4] = (o) => !e.slots.rightIcon && e.handleClickIcon())
|
|
420
305
|
}, [
|
|
421
|
-
|
|
422
|
-
|
|
306
|
+
h(e.$slots, "right-icon", {}, () => [
|
|
307
|
+
e.closeMode ? (a(), b(m, {
|
|
423
308
|
key: 0,
|
|
424
|
-
color:
|
|
309
|
+
color: e.color,
|
|
425
310
|
size: "11px"
|
|
426
|
-
}, null, 8, ["color"])) :
|
|
311
|
+
}, null, 8, ["color"])) : y("", !0)
|
|
427
312
|
])
|
|
428
313
|
])
|
|
429
|
-
], 4)) :
|
|
314
|
+
], 4)) : y("", !0)
|
|
430
315
|
], 2);
|
|
431
316
|
}
|
|
432
|
-
const
|
|
317
|
+
const Me = /* @__PURE__ */ me(ye, [["render", ve]]);
|
|
433
318
|
export {
|
|
434
|
-
|
|
319
|
+
Me as default
|
|
435
320
|
};
|