@nutui/nutui 3.2.5 → 3.2.6-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 +12 -0
- package/dist/nutui.es.js +4214 -4444
- package/dist/nutui.umd.js +4213 -4543
- package/dist/packages/_es/ActionSheet.js +18 -19
- package/dist/packages/_es/Address.js +94 -85
- package/dist/packages/_es/AddressList.js +25 -12
- package/dist/packages/_es/Animate.js +3 -3
- package/dist/packages/_es/Audio.js +9 -2
- package/dist/packages/_es/AudioOperate.js +5 -1
- package/dist/packages/_es/Avatar.js +10 -10
- package/dist/packages/_es/AvatarGroup.js +5 -5
- package/dist/packages/_es/BackTop.js +55 -108
- package/dist/packages/_es/Badge.js +6 -4
- package/dist/packages/_es/Barrage.js +79 -103
- package/dist/packages/_es/Button.js +5 -3
- package/dist/packages/_es/Calendar.js +36 -23
- package/dist/packages/_es/CalendarItem.js +4 -3
- package/dist/packages/_es/Card.js +15 -5
- package/dist/packages/_es/Cascader.js +12 -11
- package/dist/packages/_es/Category.js +13 -12
- package/dist/packages/_es/CategoryPane.js +17 -13
- package/dist/packages/_es/Cell.js +9 -12
- package/dist/packages/_es/CellGroup.js +4 -2
- package/dist/packages/_es/Checkbox.js +1 -1
- package/dist/packages/_es/CheckboxGroup.js +2 -2
- package/dist/packages/_es/CircleProgress.js +98 -82
- package/dist/packages/_es/Col.js +1 -1
- package/dist/packages/_es/Collapse.js +65 -34
- package/dist/packages/_es/CollapseItem.js +93 -60
- package/dist/packages/_es/Comment.js +43 -19
- package/dist/packages/_es/ConfigProvider.js +1 -1
- package/dist/packages/_es/CountDown.js +3 -3
- package/dist/packages/_es/CountUp.js +47 -52
- package/dist/packages/_es/DatePicker.js +37 -54
- package/dist/packages/_es/Dialog.js +9 -88
- package/dist/packages/_es/Divider.js +3 -3
- package/dist/packages/_es/Drag.js +75 -49
- package/dist/packages/_es/Ecard.js +20 -18
- package/dist/packages/_es/Elevator.js +101 -76
- package/dist/packages/_es/Ellipsis.js +140 -100
- package/dist/packages/_es/Empty.js +6 -4
- package/dist/packages/_es/FixedNav.js +11 -6
- package/dist/packages/_es/Form.js +4 -4
- package/dist/packages/_es/FormItem.js +3 -1
- package/dist/packages/_es/Grid.js +1 -1
- package/dist/packages/_es/GridItem.js +10 -27
- package/dist/packages/_es/Icon.js +1 -1
- package/dist/packages/_es/Image.js +13 -114
- package/dist/packages/_es/ImagePreview.js +154 -400
- package/dist/packages/_es/Indicator.js +3 -3
- package/dist/packages/_es/InfiniteLoading.js +103 -115
- package/dist/packages/_es/Input.js +54 -26
- package/dist/packages/_es/InputNumber.js +25 -16
- package/dist/packages/_es/Invoice.js +6 -5
- package/dist/packages/_es/Layout.js +1 -1
- package/dist/packages/_es/List.js +47 -34
- package/dist/packages/_es/Menu.js +35 -35
- package/dist/packages/_es/MenuItem.js +56 -29
- package/dist/packages/_es/Navbar.js +49 -39
- package/dist/packages/_es/NoticeBar.js +52 -41
- package/dist/packages/_es/Notify.js +37 -166
- package/dist/packages/_es/NumberKeyboard.js +15 -20
- package/dist/packages/_es/OldPicker.js +130 -116
- package/dist/packages/_es/OverLay.js +5 -28
- package/dist/packages/_es/Pagination.js +8 -5
- package/dist/packages/_es/Picker.js +196 -65
- package/dist/packages/_es/Popover.js +201 -881
- package/dist/packages/_es/Popup.js +28 -84
- package/dist/packages/_es/Price.js +22 -6
- package/dist/packages/_es/Progress.js +18 -11
- package/dist/packages/_es/PullRefresh.js +4 -2
- package/dist/packages/_es/Radio.js +3 -3
- package/dist/packages/_es/RadioGroup.js +1 -1
- package/dist/packages/_es/Range.js +48 -34
- package/dist/packages/_es/Rate.js +15 -14
- package/dist/packages/_es/Row.js +1 -1
- package/dist/packages/_es/SearchBar.js +39 -36
- package/dist/packages/_es/ShortPassword.js +97 -66
- package/dist/packages/_es/SideNavBar.js +7 -18
- package/dist/packages/_es/SideNavBarItem.js +1 -1
- package/dist/packages/_es/Signature.js +113 -80
- package/dist/packages/_es/Skeleton.js +12 -11
- package/dist/packages/_es/Sku.js +63 -38
- package/dist/packages/_es/Step.js +7 -2
- package/dist/packages/_es/Steps.js +1 -1
- package/dist/packages/_es/Sticky.js +33 -23
- package/dist/packages/_es/SubSideNavBar.js +4 -2
- package/dist/packages/_es/Swipe.js +41 -26
- package/dist/packages/_es/Swiper.js +38 -21
- package/dist/packages/_es/SwiperItem.js +2 -2
- package/dist/packages/_es/Switch.js +8 -8
- package/dist/packages/_es/TabPane.js +1 -1
- package/dist/packages/_es/Tabbar.js +40 -9
- package/dist/packages/_es/TabbarItem.js +24 -30
- package/dist/packages/_es/Table.js +22 -17
- package/dist/packages/_es/Tabs.js +49 -16
- package/dist/packages/_es/Tag.js +6 -5
- package/dist/packages/_es/TextArea.js +114 -49
- package/dist/packages/_es/TimeDetail.js +4 -3
- package/dist/packages/_es/TimePannel.js +3 -3
- package/dist/packages/_es/TimeSelect.js +12 -10
- package/dist/packages/_es/Toast.js +53 -164
- package/dist/packages/_es/TrendArrow.js +6 -4
- package/dist/packages/_es/Uploader.js +141 -140
- package/dist/packages/_es/Video.js +72 -5
- package/dist/packages/_es/WaterMark.js +22 -14
- package/dist/packages/_es/common.js +1 -1
- package/dist/packages/_es/component.js +1 -1
- package/dist/packages/_es/index.js +44 -6
- package/dist/packages/_es/{index5.js → index.taro.js} +167 -154
- package/dist/packages/_es/index2.js +8 -31
- package/dist/packages/_es/index3.js +64 -7
- package/dist/packages/_es/index4.js +424 -62
- 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/_es/style.css +21 -3
- package/dist/packages/_es/use-lock-scroll.js +23 -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/signature/index.scss +4 -1
- package/dist/packages/swiperitem/index.scss +1 -1
- package/dist/smartips/attributes.json +4 -0
- package/dist/smartips/tags.json +2 -1
- package/dist/smartips/web-types.json +10 -1
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +44 -44
- package/dist/styles/themes/jdb.scss +44 -44
- package/dist/styles/themes/jddkh.scss +44 -44
- package/dist/styles/themes/jdt.scss +44 -44
- package/dist/types/__VUE/actionsheet/{index.vue.d.ts → index.taro.vue.d.ts} +11 -11
- package/dist/types/__VUE/address/{index.vue.d.ts → index.taro.vue.d.ts} +74 -34
- package/dist/types/__VUE/addresslist/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/animate/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/avatar/{index.vue.d.ts → index.taro.vue.d.ts} +5 -5
- package/dist/types/__VUE/avatargroup/{index.vue.d.ts → index.taro.vue.d.ts} +1 -1
- package/dist/types/__VUE/backtop/{index.vue.d.ts → index.taro.vue.d.ts} +14 -36
- package/dist/types/__VUE/badge/{index.vue.d.ts → index.taro.vue.d.ts} +1 -1
- package/dist/types/__VUE/barrage/{index.vue.d.ts → index.taro.vue.d.ts} +2 -2
- package/dist/types/__VUE/button/index.taro.vue.d.ts +116 -0
- package/dist/types/__VUE/calendar/{index.vue.d.ts → index.taro.vue.d.ts} +14 -2
- package/dist/types/__VUE/calendaritem/{index.vue.d.ts → index.taro.vue.d.ts} +17 -17
- package/dist/types/__VUE/card/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/cascader/{index.vue.d.ts → index.taro.vue.d.ts} +2 -2
- package/dist/types/__VUE/category/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/categorypane/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/cell/{index.vue.d.ts → index.taro.vue.d.ts} +12 -5
- package/dist/types/__VUE/checkbox/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/circleprogress/{index.vue.d.ts → index.taro.vue.d.ts} +14 -15
- package/dist/types/__VUE/collapse/{index.vue.d.ts → index.taro.vue.d.ts} +1 -1
- package/dist/types/__VUE/collapseitem/{index.vue.d.ts → index.taro.vue.d.ts} +1 -9
- package/dist/types/__VUE/comment/{index.vue.d.ts → index.taro.vue.d.ts} +1 -2
- package/dist/types/__VUE/configprovider/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/countdown/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/countup/{index.vue.d.ts → index.taro.vue.d.ts} +5 -7
- package/dist/types/__VUE/datepicker/{index.vue.d.ts → index.taro.vue.d.ts} +6 -6
- package/dist/types/__VUE/dialog/{index.vue.d.ts → index.taro.vue.d.ts} +10 -13
- package/dist/types/__VUE/divider/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/drag/{index.vue.d.ts → index.taro.vue.d.ts} +2 -1
- package/dist/types/__VUE/ecard/{index.vue.d.ts → index.taro.vue.d.ts} +3 -3
- package/dist/types/__VUE/elevator/{index.vue.d.ts → index.taro.vue.d.ts} +11 -2
- package/dist/types/__VUE/ellipsis/{index.vue.d.ts → index.taro.vue.d.ts} +4 -0
- package/dist/types/__VUE/empty/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/fixednav/{index.vue.d.ts → index.taro.vue.d.ts} +1 -1
- package/dist/types/__VUE/form/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/grid/{index.vue.d.ts → index.taro.vue.d.ts} +1 -1
- package/dist/types/__VUE/griditem/{index.vue.d.ts → index.taro.vue.d.ts} +2 -27
- package/dist/types/__VUE/icon/index.taro.vue.d.ts +74 -0
- package/dist/types/__VUE/image/index.taro.vue.d.ts +33 -0
- package/dist/types/__VUE/imagepreview/{index.vue.d.ts → index.taro.vue.d.ts} +41 -43
- package/dist/types/__VUE/indicator/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/infiniteloading/{index.vue.d.ts → index.taro.vue.d.ts} +15 -8
- package/dist/types/__VUE/input/{index.vue.d.ts → index.taro.vue.d.ts} +34 -16
- package/dist/types/__VUE/inputnumber/{index.vue.d.ts → index.taro.vue.d.ts} +2 -2
- package/dist/types/__VUE/invoice/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/layout/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/list/{index.vue.d.ts → index.taro.vue.d.ts} +2 -2
- package/dist/types/__VUE/menu/{index.vue.d.ts → index.taro.vue.d.ts} +2 -1
- package/dist/types/__VUE/menuitem/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/navbar/{index.vue.d.ts → index.taro.vue.d.ts} +1 -2
- package/dist/types/__VUE/noticebar/{index.vue.d.ts → index.taro.vue.d.ts} +6 -5
- package/dist/types/__VUE/notify/{index.vue.d.ts → index.taro.vue.d.ts} +10 -25
- package/dist/types/__VUE/numberkeyboard/{index.vue.d.ts → index.taro.vue.d.ts} +6 -30
- package/dist/types/__VUE/oldpicker/{Column.vue.d.ts → ColumnTaro.vue.d.ts} +28 -17
- package/dist/types/__VUE/oldpicker/{index.vue.d.ts → index.taro.vue.d.ts} +65 -45
- package/dist/types/__VUE/overlay/index.taro.vue.d.ts +85 -0
- package/dist/types/__VUE/pagination/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/picker/{Column.vue.d.ts → ColumnTaro.vue.d.ts} +16 -4
- package/dist/types/__VUE/picker/{index.vue.d.ts → index.taro.vue.d.ts} +54 -29
- package/dist/types/__VUE/popover/{index.vue.d.ts → index.taro.vue.d.ts} +18 -16
- package/dist/types/__VUE/popup/index.taro.vue.d.ts +1728 -0
- package/dist/types/__VUE/popup/index.vue.d.ts +4 -4
- package/dist/types/__VUE/price/{index.vue.d.ts → index.taro.vue.d.ts} +1 -0
- package/dist/types/__VUE/progress/{index.vue.d.ts → index.taro.vue.d.ts} +1 -1
- package/dist/types/__VUE/radio/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/range/{index.vue.d.ts → index.taro.vue.d.ts} +7 -6
- package/dist/types/__VUE/rate/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/searchbar/{index.vue.d.ts → index.taro.vue.d.ts} +19 -19
- package/dist/types/__VUE/shortpassword/{index.vue.d.ts → index.taro.vue.d.ts} +6 -21
- package/dist/types/__VUE/sidenavbar/{index.vue.d.ts → index.taro.vue.d.ts} +0 -5
- package/dist/types/__VUE/signature/{index.vue.d.ts → index.taro.vue.d.ts} +8 -5
- package/dist/types/__VUE/skeleton/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/sku/{index.vue.d.ts → index.taro.vue.d.ts} +55 -183
- package/dist/types/__VUE/step/index.vue.d.ts +1 -1
- package/dist/types/__VUE/steps/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/sticky/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/swipe/{index.vue.d.ts → index.taro.vue.d.ts} +4 -3
- package/dist/types/__VUE/swiper/{index.vue.d.ts → index.taro.vue.d.ts} +2 -1
- package/dist/types/__VUE/swiperitem/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/switch/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/tabbar/{index.vue.d.ts → index.taro.vue.d.ts} +10 -0
- package/dist/types/__VUE/tabbaritem/{index.vue.d.ts → index.taro.vue.d.ts} +8 -8
- package/dist/types/__VUE/table/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/tabs/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/tag/{index.vue.d.ts → index.taro.vue.d.ts} +4 -4
- package/dist/types/__VUE/textarea/{index.vue.d.ts → index.taro.vue.d.ts} +5 -3
- package/dist/types/__VUE/timedetail/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/timepannel/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/timeselect/{index.vue.d.ts → index.taro.vue.d.ts} +7 -8
- package/dist/types/__VUE/toast/{index.vue.d.ts → index.taro.vue.d.ts} +44 -22
- package/dist/types/__VUE/trendarrow/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
- package/dist/types/__VUE/uploader/{index.vue.d.ts → index.taro.vue.d.ts} +22 -13
- package/dist/types/__VUE/video/index.vue.d.ts +4 -2
- package/dist/types/__VUE/watermark/{index.vue.d.ts → index.taro.vue.d.ts} +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/nutui.d.ts +89 -89
- package/package.json +1 -1
- package/dist/types/__VUE/dialog/index.d.ts +0 -48
- package/dist/types/__VUE/image/index.vue.d.ts +0 -117
- package/dist/types/__VUE/image/type.d.ts +0 -6
- package/dist/types/__VUE/imagepreview/imagePreviewItem.vue.d.ts +0 -108
- package/dist/types/__VUE/imagepreview/index.d.ts +0 -25
- package/dist/types/__VUE/notify/index.d.ts +0 -26
- package/dist/types/__VUE/tag/type.d.ts +0 -5
- package/dist/types/__VUE/toast/index.d.ts +0 -16
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.
|
|
2
|
+
* @nutui/nutui v3.2.6-beta.1 Mon Oct 31 2022 19:38:22 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { ref, reactive, onMounted, watch, provide, toRefs, resolveComponent, openBlock, createElementBlock, createElementVNode, toDisplayString, createVNode, withCtx, createCommentVNode, normalizeClass, createBlock, renderSlot } from "vue";
|
|
6
|
+
import { ref, reactive, onMounted, watch, provide, toRefs, resolveComponent, openBlock, createElementBlock, createElementVNode, toDisplayString, createTextVNode, createVNode, withCtx, createCommentVNode, normalizeClass, createBlock, renderSlot } from "vue";
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
8
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
9
|
import "../locale/lang";
|
|
@@ -192,6 +192,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
192
192
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
193
193
|
_ctx.type == "progress" ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
194
194
|
createElementVNode("div", _hoisted_3, toDisplayString(_ctx.currentDuration), 1),
|
|
195
|
+
createTextVNode(),
|
|
195
196
|
createElementVNode("div", _hoisted_4, [
|
|
196
197
|
createVNode(_component_nut_range, {
|
|
197
198
|
modelValue: _ctx.percent,
|
|
@@ -207,8 +208,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
207
208
|
_: 1
|
|
208
209
|
}, 8, ["modelValue", "onChange"])
|
|
209
210
|
]),
|
|
211
|
+
createTextVNode(),
|
|
210
212
|
createElementVNode("div", _hoisted_6, toDisplayString(_ctx.duration), 1)
|
|
211
213
|
])) : createCommentVNode("", true),
|
|
214
|
+
createTextVNode(),
|
|
212
215
|
_ctx.type == "icon" ? (openBlock(), createElementBlock("div", _hoisted_7, [
|
|
213
216
|
createElementVNode("div", {
|
|
214
217
|
class: normalizeClass(["nut-audio-icon-box", _ctx.playing ? "nut-audio-icon-play" : "nut-audio-icon-stop"]),
|
|
@@ -219,19 +222,23 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
219
222
|
name: "service",
|
|
220
223
|
class: "nut-icon-am-rotate nut-icon-am-infinite"
|
|
221
224
|
})) : createCommentVNode("", true),
|
|
225
|
+
createTextVNode(),
|
|
222
226
|
!_ctx.playing ? (openBlock(), createBlock(_component_nut_icon, {
|
|
223
227
|
key: 1,
|
|
224
228
|
name: "service"
|
|
225
229
|
})) : createCommentVNode("", true)
|
|
226
230
|
], 2)
|
|
227
231
|
])) : createCommentVNode("", true),
|
|
232
|
+
createTextVNode(),
|
|
228
233
|
_ctx.type == "none" ? (openBlock(), createElementBlock("div", {
|
|
229
234
|
key: 2,
|
|
230
235
|
onClick: _cache[2] || (_cache[2] = (...args) => _ctx.changeStatus && _ctx.changeStatus(...args))
|
|
231
236
|
}, [
|
|
232
237
|
renderSlot(_ctx.$slots, "default")
|
|
233
238
|
])) : createCommentVNode("", true),
|
|
239
|
+
createTextVNode(),
|
|
234
240
|
_ctx.type != "none" ? renderSlot(_ctx.$slots, "default", { key: 3 }) : createCommentVNode("", true),
|
|
241
|
+
createTextVNode(),
|
|
235
242
|
createElementVNode("audio", {
|
|
236
243
|
class: "audioMain",
|
|
237
244
|
controls: _ctx.type == "controls",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.
|
|
2
|
+
* @nutui/nutui v3.2.6-beta.1 Mon Oct 31 2022 19:38:22 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -45,6 +45,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
45
45
|
})) : createCommentVNode("", true),
|
|
46
46
|
renderSlot(_ctx.$slots, "default")
|
|
47
47
|
])) : createCommentVNode("", true),
|
|
48
|
+
createTextVNode(),
|
|
48
49
|
_ctx.type == "play" ? (openBlock(), createElementBlock("div", {
|
|
49
50
|
key: 1,
|
|
50
51
|
class: "nut-audio-operate-item",
|
|
@@ -60,8 +61,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
60
61
|
]),
|
|
61
62
|
_: 1
|
|
62
63
|
})) : createCommentVNode("", true),
|
|
64
|
+
createTextVNode(),
|
|
63
65
|
renderSlot(_ctx.$slots, "default")
|
|
64
66
|
])) : createCommentVNode("", true),
|
|
67
|
+
createTextVNode(),
|
|
65
68
|
_ctx.type == "forward" ? (openBlock(), createElementBlock("div", {
|
|
66
69
|
key: 2,
|
|
67
70
|
class: "nut-audio-operate-item",
|
|
@@ -79,6 +82,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
79
82
|
})) : createCommentVNode("", true),
|
|
80
83
|
renderSlot(_ctx.$slots, "default")
|
|
81
84
|
])) : createCommentVNode("", true),
|
|
85
|
+
createTextVNode(),
|
|
82
86
|
_ctx.type == "mute" ? (openBlock(), createElementBlock("div", {
|
|
83
87
|
key: 3,
|
|
84
88
|
class: "nut-audio-operate-item",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.
|
|
2
|
+
* @nutui/nutui v3.2.6-beta.1 Mon Oct 31 2022 19:38:22 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { toRefs, inject, ref, reactive, onMounted, computed, resolveComponent, openBlock, createElementBlock, normalizeStyle, normalizeClass, Fragment, createBlock, mergeProps, createCommentVNode, renderSlot, toDisplayString } from "vue";
|
|
6
|
+
import { toRefs, inject, ref, reactive, onMounted, computed, resolveComponent, openBlock, createElementBlock, normalizeStyle, normalizeClass, Fragment, createBlock, mergeProps, createCommentVNode, createTextVNode, renderSlot, toDisplayString } from "vue";
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
8
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
9
|
import "../locale/lang";
|
|
@@ -94,15 +94,13 @@ const _sfc_main = create({
|
|
|
94
94
|
return slots.default;
|
|
95
95
|
});
|
|
96
96
|
const avatarLength = (children) => {
|
|
97
|
-
var _a, _b
|
|
97
|
+
var _a, _b;
|
|
98
98
|
state.maxIndex = children.length;
|
|
99
99
|
for (let i = 0; i < children.length; i++) {
|
|
100
|
-
|
|
101
|
-
children[i].setAttribute("data-index", i + 1);
|
|
102
|
-
}
|
|
100
|
+
children[i].setAttribute("data-index", i + 1);
|
|
103
101
|
}
|
|
104
|
-
state.index = (
|
|
105
|
-
if (state.index == state.maxIndex && state.index != ((
|
|
102
|
+
state.index = (_a = avatarRef == null ? void 0 : avatarRef.value) == null ? void 0 : _a.props["data-index"];
|
|
103
|
+
if (state.index == state.maxIndex && state.index != ((_b = avatarGroup == null ? void 0 : avatarGroup.props) == null ? void 0 : _b.maxCount)) {
|
|
106
104
|
state.showMax = true;
|
|
107
105
|
}
|
|
108
106
|
};
|
|
@@ -156,12 +154,14 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
156
154
|
class: "icon",
|
|
157
155
|
name: _ctx.iconStyles
|
|
158
156
|
}), null, 16, ["name"])) : createCommentVNode("", true),
|
|
157
|
+
createTextVNode(),
|
|
159
158
|
_ctx.isShowText ? (openBlock(), createElementBlock("view", _hoisted_2, [
|
|
160
159
|
renderSlot(_ctx.$slots, "default")
|
|
161
160
|
])) : createCommentVNode("", true)
|
|
162
161
|
], 64)) : createCommentVNode("", true),
|
|
162
|
+
createTextVNode(),
|
|
163
163
|
_ctx.showMax ? (openBlock(), createElementBlock("view", _hoisted_3, toDisplayString(((_j = (_i = _ctx.avatarGroup) == null ? void 0 : _i.props) == null ? void 0 : _j.maxContent) ? (_l = (_k = _ctx.avatarGroup) == null ? void 0 : _k.props) == null ? void 0 : _l.maxContent : `+ ${_ctx.maxIndex - ((_n = (_m = _ctx.avatarGroup) == null ? void 0 : _m.props) == null ? void 0 : _n.maxCount)}`), 1)) : createCommentVNode("", true)
|
|
164
164
|
], 6)) : createCommentVNode("", true);
|
|
165
165
|
}
|
|
166
|
-
var
|
|
167
|
-
export {
|
|
166
|
+
var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
167
|
+
export { index_taro as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.
|
|
2
|
+
* @nutui/nutui v3.2.6-beta.1 Mon Oct 31 2022 19:38:22 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -46,7 +46,7 @@ const _sfc_main = create({
|
|
|
46
46
|
setup(props, { emit, slots }) {
|
|
47
47
|
toRefs(props);
|
|
48
48
|
const avatarGroupRef = ref(null);
|
|
49
|
-
const
|
|
49
|
+
const index = ref(0);
|
|
50
50
|
const classes = computed(() => {
|
|
51
51
|
const prefixCls = componentName;
|
|
52
52
|
return {
|
|
@@ -58,7 +58,7 @@ const _sfc_main = create({
|
|
|
58
58
|
provide("avatarGroup", {
|
|
59
59
|
props,
|
|
60
60
|
avatarGroupRef,
|
|
61
|
-
index
|
|
61
|
+
index
|
|
62
62
|
});
|
|
63
63
|
return {
|
|
64
64
|
classes,
|
|
@@ -74,5 +74,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
74
74
|
renderSlot(_ctx.$slots, "default")
|
|
75
75
|
], 2);
|
|
76
76
|
}
|
|
77
|
-
var
|
|
78
|
-
export {
|
|
77
|
+
var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
78
|
+
export { index_taro as default };
|
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.
|
|
2
|
+
* @nutui/nutui v3.2.6-beta.1 Mon Oct 31 2022 19:38:22 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { reactive, computed,
|
|
6
|
+
import { reactive, computed, toRefs, resolveComponent, openBlock, createElementBlock, createVNode, normalizeStyle, withCtx, renderSlot, createTextVNode, createElementVNode, normalizeClass, withModifiers } from "vue";
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
8
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
9
|
import "../locale/lang";
|
|
10
10
|
const { componentName, create } = createComponent("backtop");
|
|
11
11
|
const _sfc_main = create({
|
|
12
12
|
props: {
|
|
13
|
+
height: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: "100vh"
|
|
16
|
+
},
|
|
13
17
|
bottom: {
|
|
14
18
|
type: Number,
|
|
15
19
|
default: 20
|
|
@@ -18,35 +22,20 @@ const _sfc_main = create({
|
|
|
18
22
|
type: Number,
|
|
19
23
|
default: 10
|
|
20
24
|
},
|
|
21
|
-
elId: {
|
|
22
|
-
type: [String],
|
|
23
|
-
default: "body"
|
|
24
|
-
},
|
|
25
|
-
distance: {
|
|
26
|
-
type: Number,
|
|
27
|
-
default: 200
|
|
28
|
-
},
|
|
29
25
|
zIndex: {
|
|
30
26
|
type: Number,
|
|
31
27
|
default: 10
|
|
32
28
|
},
|
|
33
|
-
|
|
34
|
-
type: Boolean,
|
|
35
|
-
default: true
|
|
36
|
-
},
|
|
37
|
-
duration: {
|
|
29
|
+
distance: {
|
|
38
30
|
type: Number,
|
|
39
|
-
default:
|
|
31
|
+
default: 200
|
|
40
32
|
}
|
|
41
33
|
},
|
|
42
34
|
emits: ["click"],
|
|
43
35
|
setup(props, { emit }) {
|
|
44
36
|
const state = reactive({
|
|
45
37
|
backTop: false,
|
|
46
|
-
scrollTop:
|
|
47
|
-
scrollEl: window,
|
|
48
|
-
startTime: 0,
|
|
49
|
-
keepAlive: false
|
|
38
|
+
scrollTop: 1
|
|
50
39
|
});
|
|
51
40
|
const classes = computed(() => {
|
|
52
41
|
const prefixCls = componentName;
|
|
@@ -62,102 +51,60 @@ const _sfc_main = create({
|
|
|
62
51
|
zIndex: props.zIndex
|
|
63
52
|
};
|
|
64
53
|
});
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
state.backTop = state.scrollTop >= props.distance;
|
|
72
|
-
}
|
|
73
|
-
function scroll(y = 0) {
|
|
74
|
-
if (state.scrollEl instanceof Window) {
|
|
75
|
-
window.scrollTo(0, y);
|
|
76
|
-
} else {
|
|
77
|
-
state.scrollEl.scrollTop = y;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
function scrollAnimation() {
|
|
81
|
-
let cid = requestAniFrame()(function fn() {
|
|
82
|
-
var t = props.duration - Math.max(0, state.startTime - +new Date() + props.duration);
|
|
83
|
-
var y = t * -state.scrollTop / props.duration + state.scrollTop;
|
|
84
|
-
scroll(y);
|
|
85
|
-
cid = requestAniFrame()(fn);
|
|
86
|
-
if (t == props.duration || y == 0) {
|
|
87
|
-
window.cancelAnimationFrame(cid);
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
function addEventListener() {
|
|
92
|
-
state.scrollEl.addEventListener("scroll", scrollListener, false);
|
|
93
|
-
state.scrollEl.addEventListener("resize", scrollListener, false);
|
|
94
|
-
}
|
|
95
|
-
function removeEventListener() {
|
|
96
|
-
state.scrollEl.removeEventListener("scroll", scrollListener, false);
|
|
97
|
-
state.scrollEl.removeEventListener("resize", scrollListener, false);
|
|
98
|
-
}
|
|
99
|
-
function initCancelAniFrame() {
|
|
100
|
-
window.cancelAnimationFrame = window.webkitCancelAnimationFrame;
|
|
101
|
-
}
|
|
102
|
-
function requestAniFrame() {
|
|
103
|
-
return window.requestAnimationFrame || window.webkitRequestAnimationFrame || function(callback) {
|
|
104
|
-
window.setTimeout(callback, 1e3 / 60);
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
|
-
function click(e) {
|
|
108
|
-
state.startTime = +new Date();
|
|
109
|
-
props.isAnimation && props.duration > 0 ? scrollAnimation() : scroll();
|
|
54
|
+
const scroll = (e) => {
|
|
55
|
+
state.scrollTop = 2;
|
|
56
|
+
state.backTop = e.detail.scrollTop >= props.distance;
|
|
57
|
+
};
|
|
58
|
+
const click = (e) => {
|
|
59
|
+
state.scrollTop = 1;
|
|
110
60
|
emit("click", e);
|
|
111
|
-
}
|
|
112
|
-
function init() {
|
|
113
|
-
if (props.elId && document.getElementById(props.elId)) {
|
|
114
|
-
state.scrollEl = document.getElementById(props.elId);
|
|
115
|
-
}
|
|
116
|
-
addEventListener();
|
|
117
|
-
initCancelAniFrame();
|
|
118
|
-
}
|
|
119
|
-
onMounted(() => {
|
|
120
|
-
if (props.distance == 0) {
|
|
121
|
-
state.backTop = true;
|
|
122
|
-
}
|
|
123
|
-
init();
|
|
124
|
-
});
|
|
125
|
-
onUnmounted(() => {
|
|
126
|
-
removeEventListener();
|
|
127
|
-
});
|
|
128
|
-
onActivated(() => {
|
|
129
|
-
if (state.keepAlive) {
|
|
130
|
-
state.keepAlive = false;
|
|
131
|
-
init();
|
|
132
|
-
}
|
|
133
|
-
});
|
|
134
|
-
onDeactivated(() => {
|
|
135
|
-
state.keepAlive = true;
|
|
136
|
-
removeEventListener();
|
|
137
|
-
});
|
|
61
|
+
};
|
|
138
62
|
return {
|
|
139
|
-
state,
|
|
63
|
+
...toRefs(state),
|
|
140
64
|
classes,
|
|
141
65
|
style,
|
|
66
|
+
scroll,
|
|
142
67
|
click
|
|
143
68
|
};
|
|
144
69
|
}
|
|
145
70
|
});
|
|
146
71
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
72
|
+
const _component_scroll_view = resolveComponent(function() {
|
|
73
|
+
if (process.env.TARO_ENV === "h5") {
|
|
74
|
+
return "taro-scroll-view";
|
|
75
|
+
} else {
|
|
76
|
+
return "scroll-view";
|
|
77
|
+
}
|
|
78
|
+
}());
|
|
147
79
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
148
|
-
return openBlock(), createElementBlock("
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
80
|
+
return openBlock(), createElementBlock("view", null, [
|
|
81
|
+
createVNode(_component_scroll_view, {
|
|
82
|
+
"scroll-y": true,
|
|
83
|
+
style: normalizeStyle({ height: _ctx.height }),
|
|
84
|
+
onScroll: _ctx.scroll,
|
|
85
|
+
"scroll-top": _ctx.scrollTop,
|
|
86
|
+
"scroll-with-animation": "true"
|
|
87
|
+
}, {
|
|
88
|
+
default: withCtx(() => [
|
|
89
|
+
renderSlot(_ctx.$slots, "content")
|
|
90
|
+
]),
|
|
91
|
+
_: 3
|
|
92
|
+
}, 8, ["style", "onScroll", "scroll-top"]),
|
|
93
|
+
createTextVNode(),
|
|
94
|
+
createElementVNode("view", {
|
|
95
|
+
class: normalizeClass(_ctx.classes),
|
|
96
|
+
style: normalizeStyle(_ctx.style),
|
|
97
|
+
onClick: _cache[0] || (_cache[0] = withModifiers((...args) => _ctx.click && _ctx.click(...args), ["stop"]))
|
|
98
|
+
}, [
|
|
99
|
+
renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
100
|
+
createVNode(_component_nut_icon, {
|
|
101
|
+
size: "19px",
|
|
102
|
+
class: "nut-backtop-main",
|
|
103
|
+
name: "top"
|
|
104
|
+
})
|
|
105
|
+
])
|
|
106
|
+
], 6)
|
|
107
|
+
]);
|
|
161
108
|
}
|
|
162
|
-
var
|
|
163
|
-
export {
|
|
109
|
+
var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
110
|
+
export { index_taro as default };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.
|
|
2
|
+
* @nutui/nutui v3.2.6-beta.1 Mon Oct 31 2022 19:38:22 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { reactive, computed, openBlock, createElementBlock, createElementVNode, renderSlot, withDirectives, toDisplayString, normalizeClass, normalizeStyle, vShow } from "vue";
|
|
6
|
+
import { reactive, computed, openBlock, createElementBlock, createElementVNode, renderSlot, createTextVNode, withDirectives, toDisplayString, normalizeClass, normalizeStyle, vShow } from "vue";
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
8
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
9
|
import "../locale/lang";
|
|
@@ -77,7 +77,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
77
77
|
createElementVNode("view", _hoisted_2, [
|
|
78
78
|
renderSlot(_ctx.$slots, "icons")
|
|
79
79
|
]),
|
|
80
|
+
createTextVNode(),
|
|
80
81
|
renderSlot(_ctx.$slots, "default"),
|
|
82
|
+
createTextVNode(),
|
|
81
83
|
withDirectives(createElementVNode("view", {
|
|
82
84
|
textContent: toDisplayString(_ctx.content),
|
|
83
85
|
class: normalizeClass(["nut-badge__content sup", { "is-dot": _ctx.dot }]),
|
|
@@ -87,5 +89,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
87
89
|
])
|
|
88
90
|
]);
|
|
89
91
|
}
|
|
90
|
-
var
|
|
91
|
-
export {
|
|
92
|
+
var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
93
|
+
export { index_taro as default };
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.
|
|
2
|
+
* @nutui/nutui v3.2.6-beta.1 Mon Oct 31 2022 19:38:22 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { useSlots,
|
|
6
|
+
import { useSlots, ref, computed, onMounted, onUnmounted, onDeactivated, watch, reactive, useCssVars, openBlock, createElementBlock, normalizeClass, createElementVNode, Fragment, renderList, normalizeStyle, toDisplayString, createTextVNode } from "vue";
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
|
+
import Taro from "@tarojs/taro";
|
|
8
9
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
10
|
import "../locale/lang";
|
|
10
|
-
var
|
|
11
|
+
var index_taro_vue_vue_type_style_index_0_lang = "";
|
|
11
12
|
const { componentName, create } = createComponent("barrage");
|
|
12
13
|
const __default__ = create({
|
|
13
|
-
name: "barrage",
|
|
14
14
|
props: {
|
|
15
15
|
danmu: {
|
|
16
16
|
type: Array,
|
|
@@ -18,11 +18,11 @@ const __default__ = create({
|
|
|
18
18
|
},
|
|
19
19
|
frequency: {
|
|
20
20
|
type: Number,
|
|
21
|
-
default:
|
|
21
|
+
default: 200
|
|
22
22
|
},
|
|
23
23
|
speeds: {
|
|
24
24
|
type: Number,
|
|
25
|
-
default:
|
|
25
|
+
default: 800
|
|
26
26
|
},
|
|
27
27
|
rows: {
|
|
28
28
|
type: Number,
|
|
@@ -41,126 +41,97 @@ const __default__ = create({
|
|
|
41
41
|
setup(props, { slots }) {
|
|
42
42
|
const classTime = new Date().getTime();
|
|
43
43
|
const slotDefault = !!useSlots().default;
|
|
44
|
+
const timeId = ref(new Date().getTime());
|
|
45
|
+
const danmuList = ref(props.danmu);
|
|
46
|
+
const danmuListSlots = ref([]);
|
|
47
|
+
const rows = ref(props.rows);
|
|
48
|
+
const top = ref(props.top);
|
|
49
|
+
const speeds = props.speeds;
|
|
44
50
|
const classes = computed(() => {
|
|
45
51
|
const prefixCls = componentName;
|
|
46
52
|
return {
|
|
47
|
-
[prefixCls]: true
|
|
53
|
+
[prefixCls]: true,
|
|
54
|
+
["dmBody" + timeId.value]: true
|
|
48
55
|
};
|
|
49
56
|
});
|
|
50
|
-
let dmBody = ref(document.createElement("div"));
|
|
51
|
-
let dmContainer = ref(document.createElement("div"));
|
|
52
|
-
let timer = 0;
|
|
53
|
-
const danmuList = ref(props.danmu);
|
|
54
|
-
const rows = ref(props.rows);
|
|
55
|
-
const top = ref(props.top);
|
|
56
|
-
const index2 = ref(0);
|
|
57
|
-
const speeds = props.speeds;
|
|
58
|
-
const danmuCWidth = ref(0);
|
|
59
57
|
onMounted(() => {
|
|
60
58
|
var _a;
|
|
61
|
-
danmuCWidth.value = dmBody.value.offsetWidth;
|
|
62
59
|
if (slotDefault) {
|
|
63
|
-
const list = document.getElementsByClassName("slotBody" + classTime);
|
|
60
|
+
const list = document.getElementsByClassName("slotBody" + classTime)[0].getElementsByClassName("dmitem");
|
|
61
|
+
console.log(list);
|
|
64
62
|
let childrens = ((_a = list == null ? void 0 : list[0]) == null ? void 0 : _a.children) || [];
|
|
65
|
-
|
|
66
|
-
if (childrens) {
|
|
67
|
-
Array.from(childrens).forEach((item) => {
|
|
68
|
-
item.style.opacity = "0";
|
|
69
|
-
dmList.push(item);
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
danmuList.value = dmList;
|
|
63
|
+
danmuList.value = childrens;
|
|
73
64
|
}
|
|
74
|
-
|
|
75
|
-
run();
|
|
76
|
-
}, 300);
|
|
65
|
+
runStep();
|
|
77
66
|
});
|
|
78
67
|
onUnmounted(() => {
|
|
79
68
|
danmuList.value = [];
|
|
80
|
-
clearInterval(timer);
|
|
81
|
-
timer = 0;
|
|
82
69
|
});
|
|
83
70
|
onDeactivated(() => {
|
|
84
71
|
danmuList.value = [];
|
|
85
|
-
clearInterval(timer);
|
|
86
|
-
timer = 0;
|
|
87
72
|
});
|
|
88
73
|
watch(
|
|
89
74
|
() => props.danmu,
|
|
90
75
|
(newValue) => {
|
|
91
|
-
|
|
92
|
-
danmuList.value = [...newValue];
|
|
93
|
-
}
|
|
76
|
+
danmuList.value = [...newValue];
|
|
94
77
|
}
|
|
95
78
|
);
|
|
96
79
|
const add = (word) => {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
danmuList.value.splice(danmuList.value.length, 0, word);
|
|
100
|
-
} else {
|
|
101
|
-
danmuList.value.splice(_index, 0, word);
|
|
102
|
-
}
|
|
80
|
+
danmuList.value = [...danmuList.value, word];
|
|
81
|
+
runStep();
|
|
103
82
|
};
|
|
104
|
-
const
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
83
|
+
const getNode = (index) => {
|
|
84
|
+
const query = Taro.createSelectorQuery();
|
|
85
|
+
setTimeout(() => {
|
|
86
|
+
let width = 100;
|
|
87
|
+
query.select(".dmBody" + timeId.value).boundingClientRect((rec) => {
|
|
88
|
+
width = rec.width || 300;
|
|
89
|
+
});
|
|
90
|
+
query.select(".dmitem" + index).boundingClientRect((recs) => {
|
|
91
|
+
let height = recs.height;
|
|
92
|
+
let nodeTop = index % rows.value * (height + top.value) + 20 + "px";
|
|
93
|
+
styleInfo(index, nodeTop, width);
|
|
94
|
+
}).exec();
|
|
95
|
+
}, 500);
|
|
111
96
|
};
|
|
112
|
-
const
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
return;
|
|
117
|
-
}
|
|
118
|
-
const _index = props.loop ? index2.value % danmuList.value.length : index2.value;
|
|
119
|
-
let el = document.createElement(`view`);
|
|
120
|
-
if (slotDefault && typeof danmuList.value[_index] == "object") {
|
|
121
|
-
el = danmuList.value[_index];
|
|
122
|
-
if ((_a = el == null ? void 0 : el.classList) == null ? void 0 : _a.contains("dmitem")) {
|
|
123
|
-
el.classList.remove("dmitem");
|
|
124
|
-
}
|
|
125
|
-
if ((_b = el == null ? void 0 : el.classList) == null ? void 0 : _b.contains("move")) {
|
|
126
|
-
el.classList.remove("move");
|
|
127
|
-
}
|
|
128
|
-
(_c = el == null ? void 0 : el.classList) == null ? void 0 : _c.add("dmitem");
|
|
129
|
-
} else {
|
|
130
|
-
el.innerHTML = danmuList.value[_index];
|
|
131
|
-
el.classList.add("dmitem");
|
|
132
|
-
dmContainer.value.appendChild(el);
|
|
133
|
-
}
|
|
134
|
-
nextTick(() => {
|
|
135
|
-
var _a2;
|
|
136
|
-
const height = el.offsetHeight;
|
|
137
|
-
(_a2 = el == null ? void 0 : el.classList) == null ? void 0 : _a2.add("move");
|
|
138
|
-
el.style.animationDuration = `${speeds}ms`;
|
|
139
|
-
el.style.top = _index % rows.value * (height + top.value) + 20 + "px";
|
|
140
|
-
el.style.opacity = "1";
|
|
141
|
-
if (!slotDefault) {
|
|
142
|
-
const width = el.offsetWidth;
|
|
143
|
-
el.style.width = width + 20 + "px";
|
|
144
|
-
}
|
|
145
|
-
el.style.setProperty("--move-distance", `-${danmuCWidth.value}px`);
|
|
146
|
-
distance.value = "-" + speeds / 1e3 * 150 + "%";
|
|
147
|
-
el.dataset.index = `${_index}`;
|
|
148
|
-
if (slotDefault) {
|
|
149
|
-
index2.value++;
|
|
97
|
+
const runStep = () => {
|
|
98
|
+
danmuList.value.forEach((item, index) => {
|
|
99
|
+
if (typeof danmuList.value[index] == "object") {
|
|
100
|
+
getNode(index);
|
|
150
101
|
} else {
|
|
151
|
-
|
|
152
|
-
dmContainer.value.removeChild(el);
|
|
153
|
-
});
|
|
154
|
-
index2.value++;
|
|
102
|
+
getNode(index);
|
|
155
103
|
}
|
|
156
104
|
});
|
|
157
105
|
};
|
|
158
|
-
|
|
106
|
+
const distance = ref("0");
|
|
107
|
+
let styleList = reactive([]);
|
|
108
|
+
const styleInfo = (index, nodeTop, width) => {
|
|
109
|
+
var _a;
|
|
110
|
+
let timeIndex = index - rows.value > 0 ? index - rows.value : 0;
|
|
111
|
+
let list = styleList;
|
|
112
|
+
let time = list[timeIndex] ? Number(list[timeIndex]["--time"]) : 0;
|
|
113
|
+
distance.value = "-" + speeds / 1e3 * 200 + "%";
|
|
114
|
+
let obj = {
|
|
115
|
+
top: nodeTop,
|
|
116
|
+
"--time": `${props.frequency * index + time}`,
|
|
117
|
+
animationDuration: `${speeds}ms`,
|
|
118
|
+
animationIterationCount: `${props.loop ? "infinite" : 1}`,
|
|
119
|
+
animationDelay: `${props.frequency * index + time}ms`,
|
|
120
|
+
"--move-distance": `-${width}px`
|
|
121
|
+
};
|
|
122
|
+
if (slotDefault && ((_a = danmuList.value[index]) == null ? void 0 : _a.el)) {
|
|
123
|
+
let orginalSty = danmuList.value[index].el.style;
|
|
124
|
+
danmuList.value[index].el.style = Object.assign(orginalSty, obj);
|
|
125
|
+
} else {
|
|
126
|
+
styleList.push(obj);
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
return { classTime, classes, danmuList, add, styleList, distance, danmuListSlots };
|
|
159
130
|
}
|
|
160
131
|
});
|
|
161
132
|
const __injectCSSVars__ = () => {
|
|
162
133
|
useCssVars((_ctx) => ({
|
|
163
|
-
"
|
|
134
|
+
"9732a304": _ctx.distance
|
|
164
135
|
}));
|
|
165
136
|
};
|
|
166
137
|
const __setup__ = __default__.setup;
|
|
@@ -170,22 +141,27 @@ __default__.setup = __setup__ ? (props, ctx) => {
|
|
|
170
141
|
} : __injectCSSVars__;
|
|
171
142
|
const _sfc_main = __default__;
|
|
172
143
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
173
|
-
return openBlock(), createElementBlock("
|
|
174
|
-
|
|
175
|
-
class: normalizeClass(_ctx.classes)
|
|
144
|
+
return openBlock(), createElementBlock("view", {
|
|
145
|
+
class: normalizeClass(["dmBody", _ctx.classes])
|
|
176
146
|
}, [
|
|
177
147
|
createElementVNode("div", {
|
|
178
148
|
ref: "dmContainer",
|
|
179
149
|
class: normalizeClass(["dmContainer", _ctx.$slots.default && "slotContainer"])
|
|
180
150
|
}, [
|
|
181
|
-
|
|
182
|
-
key: 0,
|
|
151
|
+
createElementVNode("div", {
|
|
183
152
|
class: normalizeClass(["slotBody", "slotBody" + _ctx.classTime])
|
|
184
153
|
}, [
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
154
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.danmuList, (item, index) => {
|
|
155
|
+
return openBlock(), createElementBlock("view", {
|
|
156
|
+
key: "danmu" + index,
|
|
157
|
+
class: normalizeClass(["dmitem", "dmitem" + index, "move"]),
|
|
158
|
+
style: normalizeStyle(_ctx.styleList[index])
|
|
159
|
+
}, toDisplayString(item.length > 8 ? item.substr(0, 8) + "..." : item), 7);
|
|
160
|
+
}), 128))
|
|
161
|
+
], 2)
|
|
162
|
+
], 2),
|
|
163
|
+
createTextVNode()
|
|
188
164
|
], 2);
|
|
189
165
|
}
|
|
190
|
-
var
|
|
191
|
-
export {
|
|
166
|
+
var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
167
|
+
export { index_taro as default };
|