@nutui/nutui 3.1.19-beta.1 → 3.1.19-beta.4
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/README.md +9 -8
- package/dist/nutui.es.js +3044 -3533
- package/dist/nutui.umd.js +3135 -3536
- package/dist/packages/_es/ActionSheet.js +64 -42
- package/dist/packages/_es/Address.js +69 -78
- package/dist/packages/_es/Audio.js +12 -12
- package/dist/packages/_es/AudioOperate.js +1 -1
- package/dist/packages/_es/Avatar.js +3 -3
- package/dist/packages/_es/BackTop.js +110 -68
- package/dist/packages/_es/Badge.js +3 -3
- package/dist/packages/_es/Barrage.js +55 -62
- package/dist/packages/_es/Button.js +2 -2
- package/dist/packages/_es/Calendar.js +27 -32
- package/dist/packages/_es/CalendarItem.js +3 -3
- package/dist/packages/_es/Card.js +5 -6
- package/dist/packages/_es/Cascader.js +9 -9
- package/dist/packages/_es/Cell.js +11 -4
- package/dist/packages/_es/CellGroup.js +1 -1
- package/dist/packages/_es/Checkbox.js +13 -3
- package/dist/packages/_es/CheckboxGroup.js +2 -2
- package/dist/packages/_es/CircleProgress.js +40 -149
- package/dist/packages/_es/Col.js +1 -1
- package/dist/packages/_es/Collapse.js +8 -34
- package/dist/packages/_es/CollapseItem.js +59 -90
- package/dist/packages/_es/CountDown.js +11 -10
- package/dist/packages/_es/CountUp.js +51 -43
- package/dist/packages/_es/DatePicker.js +22 -23
- package/dist/packages/_es/Dialog.js +91 -12
- package/dist/packages/_es/Divider.js +4 -4
- package/dist/packages/_es/Drag.js +54 -92
- package/dist/packages/_es/Ecard.js +153 -0
- package/dist/packages/_es/Elevator.js +50 -75
- package/dist/packages/_es/Empty.js +8 -7
- package/dist/packages/_es/FixedNav.js +10 -11
- package/dist/packages/_es/Form.js +5 -9
- package/dist/packages/_es/FormItem.js +1 -1
- package/dist/packages/_es/Grid.js +1 -1
- package/dist/packages/_es/GridItem.js +26 -8
- package/dist/packages/_es/Icon.js +1 -1
- package/dist/packages/_es/ImagePreview.js +83 -14
- package/dist/packages/_es/Indicator.js +3 -3
- package/dist/packages/_es/InfiniteLoading.js +107 -93
- package/dist/packages/_es/Input.js +21 -20
- package/dist/packages/_es/InputNumber.js +16 -23
- package/dist/packages/_es/Layout.js +1 -1
- package/dist/packages/_es/List.js +34 -41
- package/dist/packages/_es/Menu.js +12 -15
- package/dist/packages/_es/MenuItem.js +7 -7
- package/dist/packages/_es/Navbar.js +5 -4
- package/dist/packages/_es/NoticeBar.js +40 -47
- package/dist/packages/_es/Notify.js +166 -27
- package/dist/packages/_es/NumberKeyboard.js +22 -11
- package/dist/packages/_es/OldPicker.js +120 -122
- package/dist/packages/_es/OverLay.js +25 -5
- package/dist/packages/_es/Pagination.js +14 -13
- package/dist/packages/_es/Picker.js +23 -45
- package/dist/packages/_es/Popover.js +29 -154
- package/dist/packages/_es/Popup.js +69 -6
- package/dist/packages/_es/Price.js +5 -17
- package/dist/packages/_es/Progress.js +23 -19
- package/dist/packages/_es/PullRefresh.js +1 -1
- package/dist/packages/_es/Radio.js +14 -4
- package/dist/packages/_es/RadioGroup.js +1 -1
- package/dist/packages/_es/Range.js +33 -46
- package/dist/packages/_es/Rate.js +19 -16
- package/dist/packages/_es/Row.js +1 -1
- package/dist/packages/_es/SearchBar.js +11 -12
- package/dist/packages/_es/ShortPassword.js +75 -96
- package/dist/packages/_es/SideNavBar.js +16 -5
- package/dist/packages/_es/SideNavBarItem.js +1 -1
- package/dist/packages/_es/Signature.js +88 -69
- package/dist/packages/_es/Skeleton.js +11 -8
- package/dist/packages/_es/Sku.js +57 -49
- package/dist/packages/_es/Step.js +1 -1
- package/dist/packages/_es/Steps.js +1 -1
- package/dist/packages/_es/Sticky.js +23 -28
- package/dist/packages/_es/SubSideNavBar.js +1 -1
- package/dist/packages/_es/Swipe.js +26 -39
- package/dist/packages/_es/Swiper.js +14 -32
- package/dist/packages/_es/SwiperItem.js +2 -2
- package/dist/packages/_es/Switch.js +3 -3
- package/dist/packages/_es/TabPane.js +1 -1
- package/dist/packages/_es/Tabbar.js +3 -3
- package/dist/packages/_es/TabbarItem.js +21 -11
- package/dist/packages/_es/Table.js +18 -17
- package/dist/packages/_es/Tabs.js +20 -21
- package/dist/packages/_es/Tag.js +4 -4
- package/dist/packages/_es/TextArea.js +47 -48
- package/dist/packages/_es/TimeDetail.js +3 -4
- package/dist/packages/_es/TimePannel.js +3 -3
- package/dist/packages/_es/TimeSelect.js +7 -8
- package/dist/packages/_es/Toast.js +170 -41
- package/dist/packages/_es/Uploader.js +145 -116
- package/dist/packages/_es/Video.js +9 -8
- package/dist/packages/_es/common.js +1 -1
- package/dist/packages/_es/component.js +165 -3
- package/dist/packages/_es/index.js +6 -44
- package/dist/packages/_es/index2.js +31 -8
- package/dist/packages/_es/index3.js +7 -58
- package/dist/packages/_es/index4.js +56 -413
- package/dist/packages/_es/{index.taro.js → index5.js} +113 -140
- 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 +19 -0
- package/dist/packages/actionsheet/index.scss +8 -0
- package/dist/packages/ecard/index.scss +83 -0
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +48 -47
- package/dist/styles/themes/jdt.scss +48 -47
- package/dist/styles/variables-jdt.scss +3 -0
- package/dist/styles/variables.scss +3 -0
- package/dist/types/__VUE/actionsheet/index.d.ts +280 -0
- package/dist/types/__VUE/address/index.d.ts +386 -0
- package/dist/types/__VUE/audio/index.d.ts +92 -0
- package/dist/types/__VUE/audiooperate/index.d.ts +68 -0
- package/dist/types/__VUE/avatar/index.d.ts +66 -0
- package/dist/types/__VUE/backtop/index.d.ts +105 -0
- package/dist/types/__VUE/badge/index.d.ts +94 -0
- package/dist/types/__VUE/barrage/index.d.ts +80 -0
- package/dist/types/__VUE/button/index.d.ts +116 -0
- package/dist/types/__VUE/calendar/index.d.ts +155 -0
- package/dist/types/__VUE/calendaritem/index.d.ts +195 -0
- package/dist/types/__VUE/card/index.d.ts +81 -0
- package/dist/types/__VUE/cascader/cascader-item.d.ts +76 -0
- package/dist/types/__VUE/cascader/helper.d.ts +8 -0
- package/dist/types/__VUE/cascader/index.d.ts +76 -0
- package/dist/types/__VUE/cascader/tree.d.ts +17 -0
- package/dist/types/__VUE/cascader/types.d.ts +30 -0
- package/dist/types/__VUE/cell/index.d.ts +109 -0
- package/dist/types/__VUE/cellgroup/index.d.ts +38 -0
- package/dist/types/__VUE/checkbox/index.d.ts +102 -0
- package/dist/types/__VUE/checkboxgroup/index.d.ts +39 -0
- package/dist/types/__VUE/circleprogress/index.d.ts +66 -0
- package/dist/types/__VUE/col/index.d.ts +42 -0
- package/dist/types/__VUE/collapse/index.d.ts +104 -0
- package/dist/types/__VUE/collapseitem/index.d.ts +83 -0
- package/dist/types/__VUE/countdown/index.d.ts +91 -0
- package/dist/types/__VUE/countup/index.d.ts +216 -0
- package/dist/types/__VUE/datepicker/index.d.ts +347 -0
- package/dist/types/__VUE/datepicker/utils.d.ts +5 -0
- package/dist/types/__VUE/dialog/index.d.ts +306 -0
- package/dist/types/__VUE/divider/index.d.ts +47 -0
- package/dist/types/__VUE/drag/index.d.ts +61 -0
- package/dist/types/__VUE/ecard/index.d.ts +123 -0
- package/dist/types/__VUE/elevator/index.d.ts +71 -0
- package/dist/types/__VUE/empty/index.d.ts +47 -0
- package/dist/types/__VUE/fixednav/index.d.ts +96 -0
- package/dist/types/__VUE/form/common.d.ts +20 -0
- package/dist/types/__VUE/form/index.d.ts +32 -0
- package/dist/types/__VUE/form/types.d.ts +13 -0
- package/dist/types/__VUE/formitem/index.d.ts +120 -0
- package/dist/types/__VUE/formitem/types.d.ts +10 -0
- package/dist/types/__VUE/grid/common.d.ts +91 -0
- package/dist/types/__VUE/grid/index.d.ts +100 -0
- package/dist/types/__VUE/griditem/index.d.ts +80 -0
- package/dist/types/__VUE/icon/index.d.ts +74 -0
- package/dist/types/__VUE/imagepreview/index.d.ts +125 -0
- package/dist/types/__VUE/indicator/index.d.ts +70 -0
- package/dist/types/__VUE/infiniteloading/index.d.ts +140 -0
- package/dist/types/__VUE/input/index.d.ts +337 -0
- package/dist/types/__VUE/input/util.d.ts +5 -0
- package/dist/types/__VUE/inputnumber/index.d.ts +117 -0
- package/dist/types/__VUE/layout/index.d.ts +13 -0
- package/dist/types/__VUE/list/index.d.ts +48 -0
- package/dist/types/__VUE/menu/index.d.ts +51 -0
- package/dist/types/__VUE/menuitem/index.d.ts +77 -0
- package/dist/types/__VUE/navbar/index.d.ts +83 -0
- package/dist/types/__VUE/noticebar/index.d.ts +209 -0
- package/dist/types/__VUE/notify/index.d.ts +103 -0
- package/dist/types/__VUE/numberkeyboard/index.d.ts +124 -0
- package/dist/types/__VUE/oldpicker/Column.d.ts +96 -0
- package/dist/types/__VUE/oldpicker/commonProps.d.ts +22 -0
- package/dist/types/__VUE/oldpicker/index.d.ts +360 -0
- package/dist/types/__VUE/oldpicker/types.d.ts +24 -0
- package/dist/types/__VUE/overlay/index.d.ts +1614 -0
- package/dist/types/__VUE/pagination/index.d.ts +112 -0
- package/dist/types/__VUE/picker/Column.d.ts +90 -0
- package/dist/types/__VUE/picker/index.d.ts +343 -0
- package/dist/types/__VUE/picker/types.d.ts +26 -0
- package/dist/types/__VUE/popover/index.d.ts +233 -0
- package/dist/types/__VUE/popup/index.d.ts +1734 -0
- package/dist/types/__VUE/popup/use-lock-scroll.d.ts +5 -0
- package/dist/types/__VUE/price/index.d.ts +87 -0
- package/dist/types/__VUE/progress/index.d.ts +138 -0
- package/dist/types/__VUE/pullrefresh/index.d.ts +128 -0
- package/dist/types/__VUE/pullrefresh/use-touch.d.ts +20 -0
- package/dist/types/__VUE/pullrefresh/util.d.ts +6 -0
- package/dist/types/__VUE/radio/index.d.ts +90 -0
- package/dist/types/__VUE/radiogroup/index.d.ts +48 -0
- package/dist/types/__VUE/range/index.d.ts +156 -0
- package/dist/types/__VUE/rate/index.d.ts +142 -0
- package/dist/types/__VUE/row/index.d.ts +63 -0
- package/dist/types/__VUE/searchbar/index.d.ts +100 -0
- package/dist/types/__VUE/shortpassword/index.d.ts +137 -0
- package/dist/types/__VUE/sidenavbar/index.d.ts +36 -0
- package/dist/types/__VUE/sidenavbaritem/index.d.ts +41 -0
- package/dist/types/__VUE/signature/index.d.ts +73 -0
- package/dist/types/__VUE/skeleton/common.d.ts +63 -0
- package/dist/types/__VUE/skeleton/index.d.ts +117 -0
- package/dist/types/__VUE/sku/components/SkuHeader.d.ts +27 -0
- package/dist/types/__VUE/sku/components/SkuOperate.d.ts +70 -0
- package/dist/types/__VUE/sku/components/SkuSelect.d.ts +30 -0
- package/dist/types/__VUE/sku/components/SkuStepper.d.ts +67 -0
- package/dist/types/__VUE/sku/index.d.ts +300 -0
- package/dist/types/__VUE/step/index.d.ts +70 -0
- package/dist/types/__VUE/steps/index.d.ts +47 -0
- package/dist/types/__VUE/sticky/index.d.ts +63 -0
- package/dist/types/__VUE/subsidenavbar/index.d.ts +54 -0
- package/dist/types/__VUE/swipe/index.d.ts +69 -0
- package/dist/types/__VUE/swiper/index.d.ts +163 -0
- package/dist/types/__VUE/swiper/use-touch.d.ts +20 -0
- package/dist/types/__VUE/swiperitem/index.d.ts +24 -0
- package/dist/types/__VUE/switch/index.d.ts +136 -0
- package/dist/types/__VUE/tabbar/index.d.ts +84 -0
- package/dist/types/__VUE/tabbaritem/index.d.ts +108 -0
- package/dist/types/__VUE/table/common.d.ts +55 -0
- package/dist/types/__VUE/table/index.d.ts +76 -0
- package/dist/types/__VUE/table/renderColumn.d.ts +20 -0
- package/dist/types/__VUE/table/types.d.ts +19 -0
- package/dist/types/__VUE/tabpane/index.d.ts +47 -0
- package/dist/types/__VUE/tabs/index.d.ts +128 -0
- package/dist/types/__VUE/tag/index.d.ts +89 -0
- package/dist/types/__VUE/textarea/index.d.ts +121 -0
- package/dist/types/__VUE/timedetail/index.d.ts +48 -0
- package/dist/types/__VUE/timepannel/index.d.ts +43 -0
- package/dist/types/__VUE/timeselect/index.d.ts +82 -0
- package/dist/types/__VUE/toast/index.d.ts +149 -0
- package/dist/types/__VUE/uploader/index.d.ts +258 -0
- package/dist/types/__VUE/uploader/uploader.d.ts +25 -0
- package/dist/types/__VUE/video/index.d.ts +123 -0
- package/dist/{index.d.ts → types/index.d.ts} +0 -0
- package/dist/types/nutui.d.ts +93 -0
- package/package.json +14 -5
- package/dist/nutui.d.ts +0 -104
- package/dist/packages/_es/use-lock-scroll.js +0 -23
- package/dist/packages/_es/util.js +0 -47
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.19-beta.
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.4 Tue Apr 12 2022 17:39:20 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { computed, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createVNode,
|
|
6
|
+
import { computed, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createVNode, createElementVNode } from "vue";
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
8
|
import { p as pxCheck } from "./pxCheck.js";
|
|
9
9
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
@@ -61,7 +61,7 @@ const _sfc_main = create({
|
|
|
61
61
|
};
|
|
62
62
|
const change = (event) => {
|
|
63
63
|
const input = event.target;
|
|
64
|
-
emit("update:modelValue", input.
|
|
64
|
+
emit("update:modelValue", input.valueAsNumber, event);
|
|
65
65
|
};
|
|
66
66
|
const emitChange = (value, event) => {
|
|
67
67
|
let output_value = fixedDecimalPlaces(value);
|
|
@@ -92,13 +92,20 @@ const _sfc_main = create({
|
|
|
92
92
|
emit("overlimit", event, "add");
|
|
93
93
|
}
|
|
94
94
|
};
|
|
95
|
+
const focus = (event) => {
|
|
96
|
+
if (props.disabled)
|
|
97
|
+
return;
|
|
98
|
+
if (props.readonly)
|
|
99
|
+
return;
|
|
100
|
+
emit("focus", event);
|
|
101
|
+
};
|
|
95
102
|
const blur = (event) => {
|
|
96
103
|
if (props.disabled)
|
|
97
104
|
return;
|
|
98
105
|
if (props.readonly)
|
|
99
106
|
return;
|
|
100
107
|
const input = event.target;
|
|
101
|
-
let value =
|
|
108
|
+
let value = input.valueAsNumber;
|
|
102
109
|
if (value < Number(props.min)) {
|
|
103
110
|
value = Number(props.min);
|
|
104
111
|
} else if (value > Number(props.max)) {
|
|
@@ -107,15 +114,6 @@ const _sfc_main = create({
|
|
|
107
114
|
emitChange(value, event);
|
|
108
115
|
emit("blur", event);
|
|
109
116
|
};
|
|
110
|
-
const focus = (event) => {
|
|
111
|
-
if (props.disabled)
|
|
112
|
-
return;
|
|
113
|
-
if (props.readonly) {
|
|
114
|
-
blur(event);
|
|
115
|
-
return;
|
|
116
|
-
}
|
|
117
|
-
emit("focus", event);
|
|
118
|
-
};
|
|
119
117
|
return {
|
|
120
118
|
classes,
|
|
121
119
|
change,
|
|
@@ -129,11 +127,7 @@ const _sfc_main = create({
|
|
|
129
127
|
};
|
|
130
128
|
}
|
|
131
129
|
});
|
|
132
|
-
const _hoisted_1 =
|
|
133
|
-
key: 0,
|
|
134
|
-
class: "nut-inputnumber__text--readonly"
|
|
135
|
-
};
|
|
136
|
-
const _hoisted_2 = ["min", "max", "disabled", "readonly", "value"];
|
|
130
|
+
const _hoisted_1 = ["min", "max", "disabled", "readonly", "value"];
|
|
137
131
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
138
132
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
139
133
|
return openBlock(), createElementBlock("view", {
|
|
@@ -146,8 +140,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
146
140
|
size: _ctx.buttonSize,
|
|
147
141
|
onClick: _ctx.reduce
|
|
148
142
|
}, null, 8, ["class", "size", "onClick"]),
|
|
149
|
-
|
|
150
|
-
key: 1,
|
|
143
|
+
createElementVNode("input", {
|
|
151
144
|
type: "number",
|
|
152
145
|
min: _ctx.min,
|
|
153
146
|
max: _ctx.max,
|
|
@@ -158,7 +151,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
158
151
|
onInput: _cache[0] || (_cache[0] = (...args) => _ctx.change && _ctx.change(...args)),
|
|
159
152
|
onBlur: _cache[1] || (_cache[1] = (...args) => _ctx.blur && _ctx.blur(...args)),
|
|
160
153
|
onFocus: _cache[2] || (_cache[2] = (...args) => _ctx.focus && _ctx.focus(...args))
|
|
161
|
-
}, null, 44,
|
|
154
|
+
}, null, 44, _hoisted_1),
|
|
162
155
|
createVNode(_component_nut_icon, {
|
|
163
156
|
name: "plus",
|
|
164
157
|
class: normalizeClass(["nut-inputnumber__icon", { "nut-inputnumber__icon--disabled": !_ctx.addAllow() }]),
|
|
@@ -167,5 +160,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
167
160
|
}, null, 8, ["class", "size", "onClick"])
|
|
168
161
|
], 6);
|
|
169
162
|
}
|
|
170
|
-
var
|
|
171
|
-
export {
|
|
163
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
164
|
+
export { index as default };
|
|
@@ -18,20 +18,19 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
/*!
|
|
21
|
-
* @nutui/nutui v3.1.19-beta.
|
|
21
|
+
* @nutui/nutui v3.1.19-beta.4 Tue Apr 12 2022 17:39:20 GMT+0800 (中国标准时间)
|
|
22
22
|
* (c) 2022 @jdf2e.
|
|
23
23
|
* Released under the MIT License.
|
|
24
24
|
*/
|
|
25
|
-
import { ref, reactive, computed, watch, toRefs,
|
|
25
|
+
import { ref, reactive, computed, watch, toRefs, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, Fragment, renderList, renderSlot } from "vue";
|
|
26
26
|
import { c as createComponent } from "./component.js";
|
|
27
|
-
import Taro from "@tarojs/taro";
|
|
28
27
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
29
28
|
const { componentName, create } = createComponent("list");
|
|
30
29
|
const _sfc_main = create({
|
|
31
30
|
props: {
|
|
32
31
|
height: {
|
|
33
32
|
type: [Number],
|
|
34
|
-
default:
|
|
33
|
+
default: 50
|
|
35
34
|
},
|
|
36
35
|
listData: {
|
|
37
36
|
type: Array,
|
|
@@ -44,7 +43,7 @@ const _sfc_main = create({
|
|
|
44
43
|
setup(props, { emit }) {
|
|
45
44
|
const list = ref(null);
|
|
46
45
|
const state = reactive({
|
|
47
|
-
screenHeight:
|
|
46
|
+
screenHeight: document.documentElement.clientHeight || document.body.clientHeight || 667,
|
|
48
47
|
startOffset: 0,
|
|
49
48
|
start: 0,
|
|
50
49
|
list: props.listData.slice()
|
|
@@ -70,8 +69,9 @@ const _sfc_main = create({
|
|
|
70
69
|
const visibleData = computed(() => {
|
|
71
70
|
return state.list.slice(state.start, Math.min(end.value, state.list.length));
|
|
72
71
|
});
|
|
73
|
-
const handleScrollEvent =
|
|
74
|
-
|
|
72
|
+
const handleScrollEvent = () => {
|
|
73
|
+
var _a;
|
|
74
|
+
const scrollTop = (_a = list.value) == null ? void 0 : _a.scrollTop;
|
|
75
75
|
state.start = Math.floor(scrollTop / props.height);
|
|
76
76
|
if (end.value > state.list.length) {
|
|
77
77
|
emit("scroll");
|
|
@@ -92,40 +92,33 @@ const _sfc_main = create({
|
|
|
92
92
|
}
|
|
93
93
|
});
|
|
94
94
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
95
|
-
|
|
96
|
-
return openBlock(), createBlock(_component_scroll_view, {
|
|
95
|
+
return openBlock(), createElementBlock("view", {
|
|
97
96
|
class: normalizeClass(_ctx.classes),
|
|
98
|
-
|
|
99
|
-
style: normalizeStyle({ height: _ctx.screenHeight + "px" }),
|
|
100
|
-
"scroll-top": "0",
|
|
101
|
-
onScroll: _ctx.handleScrollEvent,
|
|
97
|
+
onScrollPassive: _cache[0] || (_cache[0] = (...args) => _ctx.handleScrollEvent && _ctx.handleScrollEvent(...args)),
|
|
102
98
|
ref: "list"
|
|
103
|
-
},
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
]),
|
|
127
|
-
_: 3
|
|
128
|
-
}, 8, ["class", "style", "onScroll"]);
|
|
99
|
+
}, [
|
|
100
|
+
createElementVNode("div", {
|
|
101
|
+
class: "nut-list-phantom",
|
|
102
|
+
style: normalizeStyle({ height: _ctx.listHeight + "px" })
|
|
103
|
+
}, null, 4),
|
|
104
|
+
createElementVNode("div", {
|
|
105
|
+
class: "nut-list-container",
|
|
106
|
+
style: normalizeStyle({ transform: _ctx.getTransform })
|
|
107
|
+
}, [
|
|
108
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.visibleData, (item, index2) => {
|
|
109
|
+
return openBlock(), createElementBlock("div", {
|
|
110
|
+
class: "nut-list-item",
|
|
111
|
+
style: normalizeStyle({ height: _ctx.height + "px" }),
|
|
112
|
+
key: item
|
|
113
|
+
}, [
|
|
114
|
+
renderSlot(_ctx.$slots, "default", {
|
|
115
|
+
item,
|
|
116
|
+
index: index2
|
|
117
|
+
})
|
|
118
|
+
], 4);
|
|
119
|
+
}), 128))
|
|
120
|
+
], 4)
|
|
121
|
+
], 34);
|
|
129
122
|
}
|
|
130
|
-
var
|
|
131
|
-
export {
|
|
123
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
124
|
+
export { index as default };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.19-beta.
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.4 Tue Apr 12 2022 17:39:20 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { ref, computed, reactive, provide, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, Fragment, renderList, normalizeStyle, toDisplayString, createVNode, renderSlot } from "vue";
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
|
-
import
|
|
8
|
+
import { u as useRect } from "./index2.js";
|
|
9
9
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
10
10
|
const { componentName, create } = createComponent("menu");
|
|
11
11
|
const _sfc_main = create({
|
|
@@ -20,7 +20,7 @@ const _sfc_main = create({
|
|
|
20
20
|
},
|
|
21
21
|
duration: {
|
|
22
22
|
type: [Number, String],
|
|
23
|
-
default: 0
|
|
23
|
+
default: 0
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
setup(props, { emit, slots }) {
|
|
@@ -57,17 +57,14 @@ const _sfc_main = create({
|
|
|
57
57
|
});
|
|
58
58
|
const updateOffset = () => {
|
|
59
59
|
if (barRef.value) {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
offset.value = rect.bottom;
|
|
63
|
-
}).exec();
|
|
64
|
-
}, 100);
|
|
60
|
+
const rect = useRect(barRef);
|
|
61
|
+
offset.value = rect.bottom;
|
|
65
62
|
}
|
|
66
63
|
};
|
|
67
64
|
linkChildren({ props, offset });
|
|
68
65
|
const toggleItem = (active) => {
|
|
69
|
-
children.forEach((item,
|
|
70
|
-
if (
|
|
66
|
+
children.forEach((item, index2) => {
|
|
67
|
+
if (index2 === active) {
|
|
71
68
|
updateOffset();
|
|
72
69
|
item.toggle();
|
|
73
70
|
} else if (item.state.showPopup) {
|
|
@@ -95,11 +92,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
95
92
|
class: normalizeClass(["nut-menu__bar", { opened: _ctx.opened }]),
|
|
96
93
|
ref: "barRef"
|
|
97
94
|
}, [
|
|
98
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.children, (item,
|
|
95
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.children, (item, index2) => {
|
|
99
96
|
return openBlock(), createElementBlock("view", {
|
|
100
|
-
key:
|
|
97
|
+
key: index2,
|
|
101
98
|
class: normalizeClass(["nut-menu__item", { disabled: item.disabled, active: item.state.showPopup }]),
|
|
102
|
-
onClick: ($event) => !item.disabled && _ctx.toggleItem(
|
|
99
|
+
onClick: ($event) => !item.disabled && _ctx.toggleItem(index2),
|
|
103
100
|
style: normalizeStyle({ color: item.state.showPopup ? _ctx.activeColor : "" })
|
|
104
101
|
}, [
|
|
105
102
|
createElementVNode("view", {
|
|
@@ -118,5 +115,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
118
115
|
renderSlot(_ctx.$slots, "default")
|
|
119
116
|
], 2);
|
|
120
117
|
}
|
|
121
|
-
var
|
|
122
|
-
export {
|
|
118
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
119
|
+
export { index as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.19-beta.
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.4 Tue Apr 12 2022 17:39:20 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -9,7 +9,6 @@ import _sfc_main$1 from "./Icon.js";
|
|
|
9
9
|
import Popup from "./Popup.js";
|
|
10
10
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
11
11
|
import "./pxCheck.js";
|
|
12
|
-
import "./use-lock-scroll.js";
|
|
13
12
|
import "./OverLay.js";
|
|
14
13
|
const { componentName, create } = createComponent("menu-item");
|
|
15
14
|
const _sfc_main = create({
|
|
@@ -134,13 +133,14 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
134
133
|
"pop-class": "nut-menu__pop",
|
|
135
134
|
overlayClass: "nut-menu__overlay",
|
|
136
135
|
overlay: _ctx.parent.props.overlay,
|
|
137
|
-
onClosed: _ctx.handleClose
|
|
136
|
+
onClosed: _ctx.handleClose,
|
|
137
|
+
isWrapTeleport: false
|
|
138
138
|
}), {
|
|
139
139
|
default: withCtx(() => [
|
|
140
140
|
createElementVNode("view", _hoisted_1, [
|
|
141
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, (option,
|
|
141
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, (option, index2) => {
|
|
142
142
|
return openBlock(), createElementBlock("view", {
|
|
143
|
-
key:
|
|
143
|
+
key: index2,
|
|
144
144
|
class: normalizeClass(["nut-menu-item__option", { active: option.value === _ctx.modelValue }]),
|
|
145
145
|
style: normalizeStyle({ "flex-basis": 100 / _ctx.cols + "%" }),
|
|
146
146
|
onClick: ($event) => _ctx.onClick(option)
|
|
@@ -164,5 +164,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
164
164
|
[vShow, _ctx.state.showWrapper]
|
|
165
165
|
]);
|
|
166
166
|
}
|
|
167
|
-
var
|
|
168
|
-
export {
|
|
167
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
168
|
+
export { index as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.19-beta.
|
|
2
|
+
* @nutui/nutui v3.1.19-beta.4 Tue Apr 12 2022 17:39:20 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -22,7 +22,7 @@ const _sfc_main = create({
|
|
|
22
22
|
default: false
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
|
-
emits: ["
|
|
25
|
+
emits: ["on-click-back", "on-click-title", "on-click-icon", "on-click-right"],
|
|
26
26
|
setup(props, { emit }) {
|
|
27
27
|
const { fixed, safeAreaInsetTop } = toRefs(props);
|
|
28
28
|
const classes = computed(() => {
|
|
@@ -74,6 +74,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
74
74
|
createElementVNode("view", _hoisted_2, [
|
|
75
75
|
_ctx.title ? (openBlock(), createElementBlock("view", {
|
|
76
76
|
key: 0,
|
|
77
|
+
class: "title",
|
|
77
78
|
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleCenter && _ctx.handleCenter(...args))
|
|
78
79
|
}, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true),
|
|
79
80
|
_ctx.titIcon ? (openBlock(), createBlock(_component_nut_icon, {
|
|
@@ -94,5 +95,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
94
95
|
])
|
|
95
96
|
], 2);
|
|
96
97
|
}
|
|
97
|
-
var
|
|
98
|
-
export {
|
|
98
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
99
|
+
export { index as default };
|
|
@@ -18,13 +18,12 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
/*!
|
|
21
|
-
* @nutui/nutui v3.1.19-beta.
|
|
21
|
+
* @nutui/nutui v3.1.19-beta.4 Tue Apr 12 2022 17:39:20 GMT+0800 (中国标准时间)
|
|
22
22
|
* (c) 2022 @jdf2e.
|
|
23
23
|
* Released under the MIT License.
|
|
24
24
|
*/
|
|
25
25
|
import { h, ref, reactive, computed, watch, onMounted, onActivated, onDeactivated, onUnmounted, toRefs, resolveComponent, openBlock, createElementBlock, normalizeClass, withDirectives, normalizeStyle, renderSlot, createBlock, createCommentVNode, createElementVNode, createTextVNode, toDisplayString, withModifiers, createVNode, vShow, Fragment, renderList } from "vue";
|
|
26
26
|
import { c as createComponent } from "./component.js";
|
|
27
|
-
import Taro from "@tarojs/taro";
|
|
28
27
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
29
28
|
const { componentName, create } = createComponent("noticebar");
|
|
30
29
|
const _sfc_main = create({
|
|
@@ -67,7 +66,7 @@ const _sfc_main = create({
|
|
|
67
66
|
rightIcon: { type: String, default: "" },
|
|
68
67
|
color: {
|
|
69
68
|
type: String,
|
|
70
|
-
default: "
|
|
69
|
+
default: ""
|
|
71
70
|
},
|
|
72
71
|
background: {
|
|
73
72
|
type: String,
|
|
@@ -89,6 +88,7 @@ const _sfc_main = create({
|
|
|
89
88
|
components: {
|
|
90
89
|
ScrollItem: function(props) {
|
|
91
90
|
props.item.props.style = props.style;
|
|
91
|
+
props.item.key = props.key;
|
|
92
92
|
return h(props.item);
|
|
93
93
|
}
|
|
94
94
|
},
|
|
@@ -108,8 +108,7 @@ const _sfc_main = create({
|
|
|
108
108
|
distance: 0,
|
|
109
109
|
timer: null,
|
|
110
110
|
keepAlive: false,
|
|
111
|
-
isCanScroll: null
|
|
112
|
-
id: Math.round(Math.random() * 1e5)
|
|
111
|
+
isCanScroll: null
|
|
113
112
|
});
|
|
114
113
|
const classes = computed(() => {
|
|
115
114
|
const prefixCls = componentName;
|
|
@@ -119,7 +118,7 @@ const _sfc_main = create({
|
|
|
119
118
|
});
|
|
120
119
|
const isEllipsis = computed(() => {
|
|
121
120
|
if (state.isCanScroll == null) {
|
|
122
|
-
return
|
|
121
|
+
return props.wrapable;
|
|
123
122
|
} else {
|
|
124
123
|
return !state.isCanScroll && !props.wrapable;
|
|
125
124
|
}
|
|
@@ -132,10 +131,9 @@ const _sfc_main = create({
|
|
|
132
131
|
}
|
|
133
132
|
});
|
|
134
133
|
const barStyle = computed(() => {
|
|
135
|
-
let style = {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
};
|
|
134
|
+
let style = {};
|
|
135
|
+
props.color && (style.color = props.color);
|
|
136
|
+
props.background && (style.background = props.background);
|
|
139
137
|
if (props.direction == "vertical") {
|
|
140
138
|
style.height = `${props.height}px`;
|
|
141
139
|
}
|
|
@@ -163,8 +161,9 @@ const _sfc_main = create({
|
|
|
163
161
|
};
|
|
164
162
|
} else {
|
|
165
163
|
if (state.animate) {
|
|
164
|
+
let a = ~~(props.height / props.speed / 4);
|
|
166
165
|
styles = {
|
|
167
|
-
transition: `all ${~~(props.height / props.speed
|
|
166
|
+
transition: `all ${a == 0 ? ~~(props.height / props.speed) : a}s`,
|
|
168
167
|
"margin-top": `-${props.height}px`
|
|
169
168
|
};
|
|
170
169
|
}
|
|
@@ -185,26 +184,19 @@ const _sfc_main = create({
|
|
|
185
184
|
if (!wrap.value || !content.value) {
|
|
186
185
|
return;
|
|
187
186
|
}
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
state.duration = offsetWidth / props.speed;
|
|
202
|
-
state.animationClass = "play";
|
|
203
|
-
} else {
|
|
204
|
-
state.animationClass = "";
|
|
205
|
-
}
|
|
206
|
-
}).exec();
|
|
207
|
-
}, 100);
|
|
187
|
+
const wrapWidth = wrap.value.getBoundingClientRect().width;
|
|
188
|
+
const offsetWidth = content.value.getBoundingClientRect().width;
|
|
189
|
+
state.isCanScroll = props.scrollable == null ? offsetWidth > wrapWidth : props.scrollable;
|
|
190
|
+
console.log(111, state.isCanScroll);
|
|
191
|
+
if (state.isCanScroll) {
|
|
192
|
+
state.wrapWidth = wrapWidth;
|
|
193
|
+
state.offsetWidth = offsetWidth;
|
|
194
|
+
state.duration = offsetWidth / props.speed;
|
|
195
|
+
state.animationClass = "play";
|
|
196
|
+
} else {
|
|
197
|
+
state.animationClass = "";
|
|
198
|
+
}
|
|
199
|
+
}, 0);
|
|
208
200
|
};
|
|
209
201
|
const handleClick = (event) => {
|
|
210
202
|
emit("click", event);
|
|
@@ -224,7 +216,7 @@ const _sfc_main = create({
|
|
|
224
216
|
};
|
|
225
217
|
const startRollEasy = () => {
|
|
226
218
|
showhorseLamp();
|
|
227
|
-
state.timer = setInterval(showhorseLamp, ~~(props.height / props.speed / 4
|
|
219
|
+
state.timer = setInterval(showhorseLamp, ~~(props.height / props.speed / 4 * 1e3) + props.standTime);
|
|
228
220
|
};
|
|
229
221
|
const showhorseLamp = () => {
|
|
230
222
|
state.animate = true;
|
|
@@ -232,7 +224,7 @@ const _sfc_main = create({
|
|
|
232
224
|
state.scrollList.push(state.scrollList[0]);
|
|
233
225
|
state.scrollList.shift();
|
|
234
226
|
state.animate = false;
|
|
235
|
-
}, ~~(props.height / props.speed / 4
|
|
227
|
+
}, ~~(props.height / props.speed / 4 * 1e3));
|
|
236
228
|
};
|
|
237
229
|
const startRoll = () => {
|
|
238
230
|
state.timer = setInterval(() => {
|
|
@@ -303,7 +295,11 @@ const _sfc_main = create({
|
|
|
303
295
|
});
|
|
304
296
|
}
|
|
305
297
|
});
|
|
306
|
-
const _hoisted_1 =
|
|
298
|
+
const _hoisted_1 = {
|
|
299
|
+
ref: "wrap",
|
|
300
|
+
class: "wrap"
|
|
301
|
+
};
|
|
302
|
+
const _hoisted_2 = ["onClick"];
|
|
307
303
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
308
304
|
const _component_nut_icon = resolveComponent("nut-icon");
|
|
309
305
|
const _component_ScrollItem = resolveComponent("ScrollItem");
|
|
@@ -330,13 +326,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
330
326
|
}, null, 8, ["color"])) : createCommentVNode("", true)
|
|
331
327
|
])
|
|
332
328
|
], 4)) : createCommentVNode("", true),
|
|
333
|
-
createElementVNode("view",
|
|
334
|
-
ref: "wrap",
|
|
335
|
-
class: normalizeClass(`wrap wrap${_ctx.id}`)
|
|
336
|
-
}, [
|
|
329
|
+
createElementVNode("view", _hoisted_1, [
|
|
337
330
|
createElementVNode("view", {
|
|
338
331
|
ref: "content",
|
|
339
|
-
class: normalizeClass(["content",
|
|
332
|
+
class: normalizeClass(["content", _ctx.animationClass, { "nut-ellipsis": _ctx.isEllipsis }]),
|
|
340
333
|
style: normalizeStyle(_ctx.contentStyle),
|
|
341
334
|
onAnimationend: _cache[0] || (_cache[0] = (...args) => _ctx.onAnimationEnd && _ctx.onAnimationEnd(...args)),
|
|
342
335
|
onWebkitAnimationEnd: _cache[1] || (_cache[1] = (...args) => _ctx.onAnimationEnd && _ctx.onAnimationEnd(...args))
|
|
@@ -345,7 +338,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
345
338
|
createTextVNode(toDisplayString(_ctx.text), 1)
|
|
346
339
|
])
|
|
347
340
|
], 38)
|
|
348
|
-
],
|
|
341
|
+
], 512),
|
|
349
342
|
_ctx.closeMode || _ctx.rightIcon ? (openBlock(), createElementBlock("view", {
|
|
350
343
|
key: 1,
|
|
351
344
|
class: "right-icon",
|
|
@@ -371,9 +364,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
371
364
|
class: "horseLamp_list",
|
|
372
365
|
style: normalizeStyle(_ctx.horseLampStyle)
|
|
373
366
|
}, [
|
|
374
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.scrollList, (item,
|
|
367
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.scrollList, (item, index2) => {
|
|
375
368
|
return openBlock(), createBlock(_component_ScrollItem, {
|
|
376
|
-
key:
|
|
369
|
+
key: index2,
|
|
377
370
|
style: normalizeStyle({ height: _ctx.height + "px", "line-height": _ctx.height + "px" }),
|
|
378
371
|
item
|
|
379
372
|
}, null, 8, ["style", "item"]);
|
|
@@ -383,13 +376,13 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
383
376
|
class: "horseLamp_list",
|
|
384
377
|
style: normalizeStyle(_ctx.horseLampStyle)
|
|
385
378
|
}, [
|
|
386
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.scrollList, (item,
|
|
379
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.scrollList, (item, index2) => {
|
|
387
380
|
return openBlock(), createElementBlock("li", {
|
|
388
381
|
class: "horseLamp_list_item",
|
|
389
|
-
key:
|
|
382
|
+
key: index2,
|
|
390
383
|
style: normalizeStyle({ height: _ctx.height }),
|
|
391
384
|
onClick: ($event) => _ctx.go(item)
|
|
392
|
-
}, toDisplayString(item), 13,
|
|
385
|
+
}, toDisplayString(item), 13, _hoisted_2);
|
|
393
386
|
}), 128))
|
|
394
387
|
], 4)),
|
|
395
388
|
createElementVNode("view", {
|
|
@@ -406,5 +399,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
406
399
|
], 4)) : createCommentVNode("", true)
|
|
407
400
|
], 2);
|
|
408
401
|
}
|
|
409
|
-
var
|
|
410
|
-
export {
|
|
402
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
403
|
+
export { index as default };
|