@nutui/nutui 3.2.0 → 3.2.2
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 +62 -0
- package/README.md +5 -3
- package/dist/nutui.es.js +1563 -1402
- package/dist/nutui.umd.js +1567 -1405
- package/dist/packages/_es/ActionSheet.js +22 -4
- package/dist/packages/_es/Address.js +39 -20
- package/dist/packages/_es/AddressList.js +2 -4
- package/dist/packages/_es/Animate.js +21 -2
- package/dist/packages/_es/Audio.js +22 -5
- package/dist/packages/_es/AudioOperate.js +22 -5
- package/dist/packages/_es/Avatar.js +23 -9
- package/dist/packages/_es/AvatarGroup.js +1 -1
- package/dist/packages/_es/BackTop.js +2 -2
- package/dist/packages/_es/Badge.js +1 -1
- package/dist/packages/_es/Barrage.js +1 -1
- package/dist/packages/_es/Button.js +6 -5
- package/dist/packages/_es/Calendar.js +10 -4
- package/dist/packages/_es/CalendarItem.js +1 -1
- package/dist/packages/_es/Card.js +1 -1
- package/dist/packages/_es/Cascader.js +46 -19
- package/dist/packages/_es/Category.js +2 -2
- package/dist/packages/_es/CategoryPane.js +10 -10
- package/dist/packages/_es/Cell.js +8 -9
- package/dist/packages/_es/CellGroup.js +1 -1
- package/dist/packages/_es/Checkbox.js +1 -1
- package/dist/packages/_es/CheckboxGroup.js +1 -1
- package/dist/packages/_es/CircleProgress.js +1 -1
- package/dist/packages/_es/Col.js +5 -11
- package/dist/packages/_es/Collapse.js +1 -1
- package/dist/packages/_es/CollapseItem.js +36 -17
- package/dist/packages/_es/Comment.js +1 -1
- package/dist/packages/_es/ConfigProvider.js +1 -1
- package/dist/packages/_es/CountDown.js +23 -5
- package/dist/packages/_es/CountUp.js +22 -5
- package/dist/packages/_es/DatePicker.js +31 -9
- package/dist/packages/_es/Dialog.js +23 -5
- package/dist/packages/_es/Divider.js +24 -7
- package/dist/packages/_es/Drag.js +4 -4
- package/dist/packages/_es/Ecard.js +1 -1
- package/dist/packages/_es/Elevator.js +24 -5
- package/dist/packages/_es/Ellipsis.js +21 -2
- package/dist/packages/_es/Empty.js +1 -1
- package/dist/packages/_es/FixedNav.js +18 -14
- package/dist/packages/_es/Form.js +2 -2
- package/dist/packages/_es/FormItem.js +5 -4
- package/dist/packages/_es/Grid.js +1 -1
- package/dist/packages/_es/GridItem.js +6 -5
- package/dist/packages/_es/Icon.js +1 -1
- package/dist/packages/_es/Image.js +21 -2
- package/dist/packages/_es/ImagePreview.js +28 -13
- package/dist/packages/_es/Indicator.js +1 -1
- package/dist/packages/_es/InfiniteLoading.js +27 -14
- package/dist/packages/_es/Input.js +70 -68
- package/dist/packages/_es/InputNumber.js +20 -14
- package/dist/packages/_es/Invoice.js +156 -0
- package/dist/packages/_es/Layout.js +1 -1
- package/dist/packages/_es/List.js +22 -4
- package/dist/packages/_es/Menu.js +6 -5
- package/dist/packages/_es/MenuItem.js +25 -8
- package/dist/packages/_es/Navbar.js +11 -9
- package/dist/packages/_es/NoticeBar.js +26 -9
- package/dist/packages/_es/Notify.js +34 -13
- package/dist/packages/_es/NumberKeyboard.js +10 -12
- package/dist/packages/_es/OldPicker.js +28 -12
- package/dist/packages/_es/OverLay.js +20 -5
- package/dist/packages/_es/Pagination.js +1 -1
- package/dist/packages/_es/Picker.js +63 -17
- package/dist/packages/_es/Popover.js +25 -10
- package/dist/packages/_es/Popup.js +31 -17
- package/dist/packages/_es/Price.js +1 -1
- package/dist/packages/_es/Progress.js +4 -5
- package/dist/packages/_es/PullRefresh.js +20 -5
- package/dist/packages/_es/Radio.js +3 -3
- package/dist/packages/_es/RadioGroup.js +1 -1
- package/dist/packages/_es/Range.js +24 -5
- package/dist/packages/_es/Rate.js +24 -5
- package/dist/packages/_es/Row.js +5 -11
- package/dist/packages/_es/SearchBar.js +44 -11
- package/dist/packages/_es/ShortPassword.js +1 -1
- package/dist/packages/_es/SideNavBar.js +22 -4
- package/dist/packages/_es/SideNavBarItem.js +1 -1
- package/dist/packages/_es/Signature.js +21 -2
- package/dist/packages/_es/Skeleton.js +1 -1
- package/dist/packages/_es/Sku.js +22 -4
- package/dist/packages/_es/Step.js +27 -8
- package/dist/packages/_es/Steps.js +1 -1
- package/dist/packages/_es/Sticky.js +1 -1
- package/dist/packages/_es/SubSideNavBar.js +22 -4
- package/dist/packages/_es/Swipe.js +24 -5
- package/dist/packages/_es/Swiper.js +1 -1
- package/dist/packages/_es/SwiperItem.js +1 -1
- package/dist/packages/_es/Switch.js +6 -5
- package/dist/packages/_es/TabPane.js +1 -1
- package/dist/packages/_es/Tabbar.js +1 -1
- package/dist/packages/_es/TabbarItem.js +13 -14
- package/dist/packages/_es/Table.js +22 -4
- package/dist/packages/_es/Tabs.js +32 -10
- package/dist/packages/_es/Tag.js +11 -15
- package/dist/packages/_es/TextArea.js +1 -1
- package/dist/packages/_es/TimeDetail.js +24 -5
- package/dist/packages/_es/TimePannel.js +22 -4
- package/dist/packages/_es/TimeSelect.js +1 -1
- package/dist/packages/_es/Toast.js +46 -25
- package/dist/packages/_es/Uploader.js +49 -30
- package/dist/packages/_es/Video.js +24 -6
- package/dist/packages/_es/WaterMark.js +21 -5
- package/dist/packages/_es/common.js +2 -2
- package/dist/packages/_es/component.js +5 -5
- package/dist/packages/_es/index.js +1 -1
- package/dist/packages/_es/index2.js +1 -1
- package/dist/packages/_es/index3.js +1 -1
- package/dist/packages/_es/index4.js +1 -1
- package/dist/packages/_es/index5.js +28 -11
- 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 +1 -111
- package/dist/packages/address/index.scss +17 -0
- package/dist/packages/addresslist/index.scss +57 -17
- package/dist/packages/button/index.scss +1 -0
- package/dist/packages/category/index.scss +25 -4
- package/dist/packages/categorypane/index.scss +18 -65
- package/dist/packages/fixednav/index.scss +7 -0
- package/dist/packages/invoice/index.scss +33 -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/menu/index.scss +14 -2
- package/dist/packages/menuitem/index.scss +11 -1
- package/dist/packages/navbar/index.scss +6 -8
- package/dist/packages/picker/index.scss +8 -0
- package/dist/packages/price/index.scss +1 -1
- package/dist/packages/radio/index.scss +1 -0
- package/dist/packages/searchbar/index.scss +2 -0
- package/dist/packages/step/index.scss +52 -0
- package/dist/packages/swiper/index.scss +2 -0
- package/dist/packages/swiperitem/index.scss +3 -0
- package/dist/packages/tag/index.scss +20 -0
- package/dist/packages/textarea/index.scss +4 -1
- package/dist/packages/toast/index.scss +3 -0
- package/dist/packages/watermark/index.scss +1 -1
- package/dist/smartips/attributes.json +70 -14
- package/dist/smartips/tags.json +34 -15
- package/dist/smartips/web-types.json +150 -16
- package/dist/style.css +1 -1
- package/dist/style.es.js +1 -1
- package/dist/styles/themes/default.scss +55 -54
- package/dist/styles/themes/jdb.scss +55 -54
- package/dist/styles/themes/jdt.scss +55 -54
- package/dist/styles/variables-jdb.scss +26 -8
- package/dist/styles/variables-jdt.scss +26 -8
- package/dist/styles/variables.scss +25 -8
- package/dist/types/__VUE/actionsheet/index.vue.d.ts +3 -3
- package/dist/types/__VUE/address/index.vue.d.ts +4 -4
- package/dist/types/__VUE/audiooperate/index.vue.d.ts +14 -71
- package/dist/types/__VUE/avatar/index.vue.d.ts +4 -4
- package/dist/types/__VUE/avatargroup/index.vue.d.ts +2 -2
- package/dist/types/__VUE/backtop/index.vue.d.ts +5 -8
- package/dist/types/__VUE/badge/index.vue.d.ts +2 -2
- package/dist/types/__VUE/button/index.vue.d.ts +2 -2
- package/dist/types/__VUE/calendar/index.vue.d.ts +8 -1
- package/dist/types/__VUE/calendaritem/index.vue.d.ts +1 -1
- package/dist/types/__VUE/cascader/index.vue.d.ts +2 -2
- package/dist/types/__VUE/cell/index.vue.d.ts +15 -8
- package/dist/types/__VUE/col/index.vue.d.ts +2 -5
- package/dist/types/__VUE/collapse/index.vue.d.ts +2 -2
- package/dist/types/__VUE/collapseitem/index.vue.d.ts +2 -2
- package/dist/types/__VUE/datepicker/index.vue.d.ts +9 -2
- package/dist/types/__VUE/dialog/index.vue.d.ts +2 -2
- package/dist/types/__VUE/divider/index.vue.d.ts +2 -2
- package/dist/types/__VUE/fixednav/common.d.ts +56 -0
- package/dist/types/__VUE/fixednav/index.vue.d.ts +18 -10
- package/dist/types/__VUE/formitem/index.vue.d.ts +1 -0
- package/dist/types/__VUE/grid/index.vue.d.ts +5 -5
- package/dist/types/__VUE/griditem/index.vue.d.ts +1 -1
- package/dist/types/__VUE/imagepreview/index.d.ts +7 -6
- package/dist/types/__VUE/imagepreview/index.vue.d.ts +3 -3
- package/dist/types/__VUE/imagepreview/types.d.ts +7 -0
- package/dist/types/__VUE/input/index.vue.d.ts +8 -14
- package/dist/types/__VUE/inputnumber/index.vue.d.ts +14 -0
- package/dist/types/__VUE/invoice/index.vue.d.ts +48 -0
- package/dist/types/__VUE/menu/index.vue.d.ts +5 -2
- package/dist/types/__VUE/menuitem/index.vue.d.ts +0 -3
- package/dist/types/__VUE/noticebar/index.vue.d.ts +3 -3
- package/dist/types/__VUE/notify/index.d.ts +15 -5
- package/dist/types/__VUE/numberkeyboard/index.vue.d.ts +2 -2
- package/dist/types/__VUE/oldpicker/index.vue.d.ts +3 -3
- package/dist/types/__VUE/picker/Column.vue.d.ts +8 -0
- package/dist/types/__VUE/picker/index.vue.d.ts +20 -3
- package/dist/types/__VUE/popover/index.vue.d.ts +6 -6
- package/dist/types/__VUE/popup/index.vue.d.ts +4 -4
- package/dist/types/__VUE/radio/index.vue.d.ts +3 -3
- package/dist/types/__VUE/range/index.vue.d.ts +1 -1
- package/dist/types/__VUE/rate/index.vue.d.ts +2 -2
- package/dist/types/__VUE/row/index.vue.d.ts +2 -5
- package/dist/types/__VUE/searchbar/index.vue.d.ts +18 -3
- package/dist/types/__VUE/shortpassword/index.vue.d.ts +1 -1
- package/dist/types/__VUE/sku/index.vue.d.ts +3 -3
- package/dist/types/__VUE/step/index.vue.d.ts +2 -2
- package/dist/types/__VUE/swipe/index.vue.d.ts +2 -2
- package/dist/types/__VUE/switch/index.vue.d.ts +2 -2
- package/dist/types/__VUE/tabbaritem/index.vue.d.ts +2 -2
- package/dist/types/__VUE/toast/index.vue.d.ts +5 -2
- package/dist/types/__VUE/uploader/index.vue.d.ts +2 -2
- package/dist/types/__VUE/video/index.vue.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/nutui.d.ts +2 -1
- package/package.json +2 -1
|
@@ -1,9 +1,28 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
1
20
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.
|
|
21
|
+
* @nutui/nutui v3.2.2 Thu Sep 08 2022 22:10:31 GMT+0800 (中国标准时间)
|
|
3
22
|
* (c) 2022 @jdf2e.
|
|
4
23
|
* Released under the MIT License.
|
|
5
24
|
*/
|
|
6
|
-
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";
|
|
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, mergeProps, vShow, Fragment, renderList } from "vue";
|
|
7
26
|
import { c as createComponent } from "./component.js";
|
|
8
27
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
28
|
import "../locale/lang";
|
|
@@ -153,7 +172,7 @@ const _sfc_main = create({
|
|
|
153
172
|
return styles;
|
|
154
173
|
});
|
|
155
174
|
watch(() => props.text, (value) => {
|
|
156
|
-
initScrollWrap();
|
|
175
|
+
initScrollWrap(value);
|
|
157
176
|
});
|
|
158
177
|
watch(() => props.list, (value) => {
|
|
159
178
|
state.scrollList = [].concat(value);
|
|
@@ -258,9 +277,7 @@ const _sfc_main = create({
|
|
|
258
277
|
onUnmounted(() => {
|
|
259
278
|
clearInterval(state.timer);
|
|
260
279
|
});
|
|
261
|
-
return {
|
|
262
|
-
...toRefs(props),
|
|
263
|
-
...toRefs(state),
|
|
280
|
+
return __spreadProps(__spreadValues(__spreadValues({}, toRefs(props)), toRefs(state)), {
|
|
264
281
|
isEllipsis,
|
|
265
282
|
classes,
|
|
266
283
|
iconShow,
|
|
@@ -276,7 +293,7 @@ const _sfc_main = create({
|
|
|
276
293
|
go,
|
|
277
294
|
handleClickIcon,
|
|
278
295
|
slots
|
|
279
|
-
};
|
|
296
|
+
});
|
|
280
297
|
}
|
|
281
298
|
});
|
|
282
299
|
const _hoisted_1 = {
|
|
@@ -329,10 +346,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
329
346
|
onClick: _cache[2] || (_cache[2] = withModifiers((...args) => _ctx.onClickIcon && _ctx.onClickIcon(...args), ["stop"]))
|
|
330
347
|
}, [
|
|
331
348
|
renderSlot(_ctx.$slots, "right-icon", {}, () => [
|
|
332
|
-
createVNode(_component_nut_icon, {
|
|
349
|
+
createVNode(_component_nut_icon, mergeProps(_ctx.$attrs, {
|
|
333
350
|
name: _ctx.rightIcon ? _ctx.rightIcon : "close",
|
|
334
351
|
color: _ctx.color
|
|
335
|
-
}, null,
|
|
352
|
+
}), null, 16, ["name", "color"])
|
|
336
353
|
])
|
|
337
354
|
])) : createCommentVNode("", true)
|
|
338
355
|
], 6)), [
|
|
@@ -1,5 +1,24 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
1
20
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.
|
|
21
|
+
* @nutui/nutui v3.2.2 Thu Sep 08 2022 22:10:31 GMT+0800 (中国标准时间)
|
|
3
22
|
* (c) 2022 @jdf2e.
|
|
4
23
|
* Released under the MIT License.
|
|
5
24
|
*/
|
|
@@ -11,7 +30,7 @@ import "../locale/lang";
|
|
|
11
30
|
import "./OverLay.js";
|
|
12
31
|
import "./Icon.js";
|
|
13
32
|
import "./pxCheck.js";
|
|
14
|
-
const {
|
|
33
|
+
const { create } = createComponent("notify");
|
|
15
34
|
const _sfc_main = create({
|
|
16
35
|
components: {
|
|
17
36
|
[Popup.name]: Popup
|
|
@@ -46,7 +65,7 @@ const _sfc_main = create({
|
|
|
46
65
|
onClick: Function,
|
|
47
66
|
unmount: Function
|
|
48
67
|
},
|
|
49
|
-
setup(props
|
|
68
|
+
setup(props) {
|
|
50
69
|
let timer = null;
|
|
51
70
|
const state = reactive({
|
|
52
71
|
mounted: false
|
|
@@ -121,7 +140,9 @@ const defaultOptions = {
|
|
|
121
140
|
color: void 0,
|
|
122
141
|
background: void 0,
|
|
123
142
|
duration: 3e3,
|
|
124
|
-
className: ""
|
|
143
|
+
className: "",
|
|
144
|
+
teleport: "",
|
|
145
|
+
unmount: new Function()
|
|
125
146
|
};
|
|
126
147
|
let idsMap = [];
|
|
127
148
|
let optsMap = [];
|
|
@@ -149,13 +170,13 @@ const updateNotify = (opts) => {
|
|
|
149
170
|
if (container) {
|
|
150
171
|
const currentOpt = optsMap.find((item) => item.id === opts.id);
|
|
151
172
|
if (currentOpt) {
|
|
152
|
-
opts = {
|
|
173
|
+
opts = __spreadValues(__spreadValues(__spreadValues({}, defaultOptions), currentOpt), opts);
|
|
153
174
|
} else {
|
|
154
|
-
opts = {
|
|
175
|
+
opts = __spreadValues(__spreadValues({}, defaultOptions), opts);
|
|
155
176
|
}
|
|
156
177
|
const instance = createVNode(Notify, opts);
|
|
157
178
|
render(instance, container);
|
|
158
|
-
return instance.component.
|
|
179
|
+
return instance.component.data;
|
|
159
180
|
}
|
|
160
181
|
};
|
|
161
182
|
const mountNotify = (opts) => {
|
|
@@ -169,7 +190,7 @@ const mountNotify = (opts) => {
|
|
|
169
190
|
} else {
|
|
170
191
|
_id = new Date().getTime() + "";
|
|
171
192
|
}
|
|
172
|
-
opts = {
|
|
193
|
+
opts = __spreadValues(__spreadValues({}, defaultOptions), opts);
|
|
173
194
|
opts.id = _id;
|
|
174
195
|
idsMap.push(opts.id);
|
|
175
196
|
optsMap.push(opts);
|
|
@@ -201,23 +222,23 @@ const errorMsg = (msg) => {
|
|
|
201
222
|
const NotifyFunction = {
|
|
202
223
|
text(msg, obj = {}) {
|
|
203
224
|
errorMsg(msg);
|
|
204
|
-
return mountNotify({
|
|
225
|
+
return mountNotify(__spreadProps(__spreadValues({}, obj), { msg }));
|
|
205
226
|
},
|
|
206
227
|
primary(msg, obj = {}) {
|
|
207
228
|
errorMsg(msg);
|
|
208
|
-
return mountNotify({
|
|
229
|
+
return mountNotify(__spreadProps(__spreadValues({}, obj), { msg, type: "primary" }));
|
|
209
230
|
},
|
|
210
231
|
success(msg, obj = {}) {
|
|
211
232
|
errorMsg(msg);
|
|
212
|
-
return mountNotify({
|
|
233
|
+
return mountNotify(__spreadProps(__spreadValues({}, obj), { msg, type: "success" }));
|
|
213
234
|
},
|
|
214
235
|
danger(msg, obj = {}) {
|
|
215
236
|
errorMsg(msg);
|
|
216
|
-
return mountNotify({
|
|
237
|
+
return mountNotify(__spreadProps(__spreadValues({}, obj), { msg, type: "danger" }));
|
|
217
238
|
},
|
|
218
239
|
warn(msg, obj = {}) {
|
|
219
240
|
errorMsg(msg);
|
|
220
|
-
return mountNotify({
|
|
241
|
+
return mountNotify(__spreadProps(__spreadValues({}, obj), { msg, type: "warning" }));
|
|
221
242
|
},
|
|
222
243
|
hide() {
|
|
223
244
|
clearNotify();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.
|
|
2
|
+
* @nutui/nutui v3.2.2 Thu Sep 08 2022 22:10:31 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -96,19 +96,17 @@ const _sfc_main = create({
|
|
|
96
96
|
if (customKeys.length > 2) {
|
|
97
97
|
customKeys = [customKeys[0], customKeys[1]];
|
|
98
98
|
}
|
|
99
|
+
if (customKeys.length == 2 && props.title && props.type != "rightColumn") {
|
|
100
|
+
customKeys = [customKeys[0]];
|
|
101
|
+
}
|
|
99
102
|
if (customKeys.length === 1) {
|
|
100
|
-
if (props.title) {
|
|
103
|
+
if (props.title && props.type != "rightColumn") {
|
|
101
104
|
keys.push({ id: customKeys[0], type: "custom" }, { id: 0, type: "number" }, { id: "delete", type: "delete" });
|
|
102
105
|
} else {
|
|
103
106
|
keys.push({ id: 0, type: "number" }, { id: customKeys[0], type: "custom" });
|
|
104
107
|
}
|
|
105
108
|
} else if (customKeys.length === 2) {
|
|
106
109
|
keys.push({ id: customKeys[0], type: "custom" }, { id: 0, type: "number" }, { id: customKeys[1], type: "custom" });
|
|
107
|
-
if (props.title) {
|
|
108
|
-
keys.push({ id: "delete", type: "delete" });
|
|
109
|
-
}
|
|
110
|
-
} else {
|
|
111
|
-
keys.push({ id: 0, type: "number" });
|
|
112
110
|
}
|
|
113
111
|
return keys;
|
|
114
112
|
}
|
|
@@ -212,10 +210,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
212
210
|
createElementVNode("div", _hoisted_1, [
|
|
213
211
|
_ctx.title ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
214
212
|
createElementVNode("h3", _hoisted_3, toDisplayString(_ctx.title), 1),
|
|
215
|
-
|
|
213
|
+
_ctx.type == "default" ? (openBlock(), createElementBlock("span", {
|
|
214
|
+
key: 0,
|
|
216
215
|
class: "keyboard-close",
|
|
217
216
|
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.closeBoard())
|
|
218
|
-
}, toDisplayString(_ctx.translate("done")), 1)
|
|
217
|
+
}, toDisplayString(_ctx.translate("done")), 1)) : createCommentVNode("", true)
|
|
219
218
|
])) : createCommentVNode("", true),
|
|
220
219
|
createElementVNode("div", _hoisted_4, [
|
|
221
220
|
createElementVNode("div", _hoisted_5, [
|
|
@@ -258,15 +257,14 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
258
257
|
onTouchend: _cache[4] || (_cache[4] = (...args) => _ctx.onTouchEnd && _ctx.onTouchEnd(...args))
|
|
259
258
|
}, _hoisted_12, 34)
|
|
260
259
|
]),
|
|
261
|
-
|
|
262
|
-
key: 0,
|
|
260
|
+
createElementVNode("div", {
|
|
263
261
|
class: "key-board-wrapper key-board-finish",
|
|
264
262
|
onClick: _cache[5] || (_cache[5] = ($event) => _ctx.closeBoard())
|
|
265
263
|
}, [
|
|
266
264
|
createElementVNode("div", {
|
|
267
265
|
class: normalizeClass(["key", "finish", { activeFinsh: _ctx.clickKeyIndex == "finish" }])
|
|
268
266
|
}, toDisplayString(_ctx.confirmText || _ctx.translate("done")), 3)
|
|
269
|
-
])
|
|
267
|
+
])
|
|
270
268
|
])) : createCommentVNode("", true)
|
|
271
269
|
])
|
|
272
270
|
], 512)
|
|
@@ -1,5 +1,24 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
1
20
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.
|
|
21
|
+
* @nutui/nutui v3.2.2 Thu Sep 08 2022 22:10:31 GMT+0800 (中国标准时间)
|
|
3
22
|
* (c) 2022 @jdf2e.
|
|
4
23
|
* Released under the MIT License.
|
|
5
24
|
*/
|
|
@@ -171,9 +190,7 @@ const _sfc_main$1 = create$1({
|
|
|
171
190
|
onMounted(() => {
|
|
172
191
|
modifyStatus(true);
|
|
173
192
|
});
|
|
174
|
-
return {
|
|
175
|
-
...toRefs(state),
|
|
176
|
-
...toRefs(props),
|
|
193
|
+
return __spreadProps(__spreadValues(__spreadValues({}, toRefs(state)), toRefs(props)), {
|
|
177
194
|
wrapper,
|
|
178
195
|
setRollerStyle,
|
|
179
196
|
isHidden,
|
|
@@ -186,7 +203,7 @@ const _sfc_main$1 = create$1({
|
|
|
186
203
|
touchRollerStyle,
|
|
187
204
|
touchListStyle,
|
|
188
205
|
setMove
|
|
189
|
-
};
|
|
206
|
+
});
|
|
190
207
|
}
|
|
191
208
|
});
|
|
192
209
|
const _hoisted_1$1 = { class: "nut-oldpicker-content" };
|
|
@@ -238,8 +255,7 @@ const _sfc_main = create({
|
|
|
238
255
|
[column.name]: column,
|
|
239
256
|
[Popup.name]: Popup
|
|
240
257
|
},
|
|
241
|
-
props: {
|
|
242
|
-
...popupProps,
|
|
258
|
+
props: __spreadProps(__spreadValues({}, popupProps), {
|
|
243
259
|
title: {
|
|
244
260
|
type: String,
|
|
245
261
|
default: ""
|
|
@@ -266,7 +282,7 @@ const _sfc_main = create({
|
|
|
266
282
|
type: [Number, String],
|
|
267
283
|
default: 0
|
|
268
284
|
}
|
|
269
|
-
},
|
|
285
|
+
}),
|
|
270
286
|
emits: ["close", "change", "confirm", "update:visible"],
|
|
271
287
|
setup(props, { emit }) {
|
|
272
288
|
const childrenKey = "children";
|
|
@@ -395,16 +411,16 @@ const _sfc_main = create({
|
|
|
395
411
|
watch(() => props.listData, (val) => {
|
|
396
412
|
state.formattedColumns = val;
|
|
397
413
|
});
|
|
398
|
-
return {
|
|
399
|
-
classes
|
|
400
|
-
|
|
414
|
+
return __spreadProps(__spreadValues({
|
|
415
|
+
classes
|
|
416
|
+
}, toRefs(state)), {
|
|
401
417
|
column,
|
|
402
418
|
dataType,
|
|
403
419
|
columnList,
|
|
404
420
|
close,
|
|
405
421
|
changeHandler,
|
|
406
422
|
confirm
|
|
407
|
-
};
|
|
423
|
+
});
|
|
408
424
|
}
|
|
409
425
|
});
|
|
410
426
|
const _hoisted_1 = { class: "nut-oldpicker__bar" };
|
|
@@ -1,5 +1,21 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __spreadValues = (a, b) => {
|
|
7
|
+
for (var prop in b || (b = {}))
|
|
8
|
+
if (__hasOwnProp.call(b, prop))
|
|
9
|
+
__defNormalProp(a, prop, b[prop]);
|
|
10
|
+
if (__getOwnPropSymbols)
|
|
11
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
+
if (__propIsEnum.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
}
|
|
15
|
+
return a;
|
|
16
|
+
};
|
|
1
17
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.
|
|
18
|
+
* @nutui/nutui v3.2.2 Thu Sep 08 2022 22:10:31 GMT+0800 (中国标准时间)
|
|
3
19
|
* (c) 2022 @jdf2e.
|
|
4
20
|
* Released under the MIT License.
|
|
5
21
|
*/
|
|
@@ -64,11 +80,10 @@ const _sfc_main = create({
|
|
|
64
80
|
onMounted(lock);
|
|
65
81
|
onActivated(lock);
|
|
66
82
|
const style = computed(() => {
|
|
67
|
-
return {
|
|
83
|
+
return __spreadValues({
|
|
68
84
|
animationDuration: `${props.duration}s`,
|
|
69
|
-
zIndex: props.zIndex
|
|
70
|
-
|
|
71
|
-
};
|
|
85
|
+
zIndex: props.zIndex
|
|
86
|
+
}, props.overlayStyle);
|
|
72
87
|
});
|
|
73
88
|
const touchmove = (e) => {
|
|
74
89
|
if (props.lockScroll)
|
|
@@ -1,5 +1,24 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
1
20
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.
|
|
21
|
+
* @nutui/nutui v3.2.2 Thu Sep 08 2022 22:10:31 GMT+0800 (中国标准时间)
|
|
3
22
|
* (c) 2022 @jdf2e.
|
|
4
23
|
* Released under the MIT License.
|
|
5
24
|
*/
|
|
@@ -32,6 +51,10 @@ const _sfc_main$1 = create$1({
|
|
|
32
51
|
threeDimensional: {
|
|
33
52
|
type: Boolean,
|
|
34
53
|
default: true
|
|
54
|
+
},
|
|
55
|
+
swipeDuration: {
|
|
56
|
+
type: [Number, String],
|
|
57
|
+
default: 1e3
|
|
35
58
|
}
|
|
36
59
|
},
|
|
37
60
|
emits: ["click", "change"],
|
|
@@ -59,6 +82,7 @@ const _sfc_main$1 = create$1({
|
|
|
59
82
|
const moving = ref(false);
|
|
60
83
|
const touchDeg = ref(0);
|
|
61
84
|
const touchTime = ref(0);
|
|
85
|
+
const DEFAULT_DURATION = 200;
|
|
62
86
|
const INERTIA_TIME = 300;
|
|
63
87
|
const INERTIA_DISTANCE = 15;
|
|
64
88
|
const touchRollerStyle = computed(() => {
|
|
@@ -107,7 +131,7 @@ const _sfc_main$1 = create$1({
|
|
|
107
131
|
let moveTime = state.touchParams.lastTime - state.touchParams.startTime;
|
|
108
132
|
if (moveTime <= INERTIA_TIME && Math.abs(move) > INERTIA_DISTANCE) {
|
|
109
133
|
const distance = momentum(move, moveTime);
|
|
110
|
-
setMove(distance, "end",
|
|
134
|
+
setMove(distance, "end", +props.swipeDuration);
|
|
111
135
|
return;
|
|
112
136
|
} else {
|
|
113
137
|
setMove(move, "end");
|
|
@@ -129,7 +153,7 @@ const _sfc_main$1 = create$1({
|
|
|
129
153
|
return false;
|
|
130
154
|
}
|
|
131
155
|
};
|
|
132
|
-
const setTransform = (translateY = 0, type, time =
|
|
156
|
+
const setTransform = (translateY = 0, type, time = DEFAULT_DURATION, deg) => {
|
|
133
157
|
if (type === "end") {
|
|
134
158
|
touchTime.value = time;
|
|
135
159
|
} else {
|
|
@@ -184,6 +208,7 @@ const _sfc_main$1 = create$1({
|
|
|
184
208
|
};
|
|
185
209
|
const stopMomentum = () => {
|
|
186
210
|
moving.value = false;
|
|
211
|
+
touchTime.value = 0;
|
|
187
212
|
setChooseValue();
|
|
188
213
|
};
|
|
189
214
|
watch(() => props.column, (val) => {
|
|
@@ -203,9 +228,7 @@ const _sfc_main$1 = create$1({
|
|
|
203
228
|
onMounted(() => {
|
|
204
229
|
modifyStatus(true);
|
|
205
230
|
});
|
|
206
|
-
return {
|
|
207
|
-
...toRefs(state),
|
|
208
|
-
...toRefs(props),
|
|
231
|
+
return __spreadProps(__spreadValues(__spreadValues({}, toRefs(state)), toRefs(props)), {
|
|
209
232
|
wrapper,
|
|
210
233
|
setRollerStyle,
|
|
211
234
|
isHidden,
|
|
@@ -218,7 +241,7 @@ const _sfc_main$1 = create$1({
|
|
|
218
241
|
touchTileStyle,
|
|
219
242
|
setMove,
|
|
220
243
|
stopMomentum
|
|
221
|
-
};
|
|
244
|
+
});
|
|
222
245
|
}
|
|
223
246
|
});
|
|
224
247
|
const _hoisted_1$1 = {
|
|
@@ -273,8 +296,7 @@ const _sfc_main = create({
|
|
|
273
296
|
[column.name]: column,
|
|
274
297
|
[Popup.name]: Popup
|
|
275
298
|
},
|
|
276
|
-
props: {
|
|
277
|
-
...popupProps,
|
|
299
|
+
props: __spreadProps(__spreadValues({}, popupProps), {
|
|
278
300
|
modelValue: {
|
|
279
301
|
type: Array,
|
|
280
302
|
default: () => []
|
|
@@ -304,8 +326,12 @@ const _sfc_main = create({
|
|
|
304
326
|
threeDimensional: {
|
|
305
327
|
type: Boolean,
|
|
306
328
|
default: true
|
|
329
|
+
},
|
|
330
|
+
swipeDuration: {
|
|
331
|
+
type: [Number, String],
|
|
332
|
+
default: 1e3
|
|
307
333
|
}
|
|
308
|
-
},
|
|
334
|
+
}),
|
|
309
335
|
emits: ["close", "change", "confirm", "update:visible", "update:modelValue"],
|
|
310
336
|
setup(props, { emit }) {
|
|
311
337
|
const state = reactive({
|
|
@@ -313,7 +339,12 @@ const _sfc_main = create({
|
|
|
313
339
|
formattedColumns: props.columns
|
|
314
340
|
});
|
|
315
341
|
let defaultValues = ref(props.modelValue);
|
|
316
|
-
ref();
|
|
342
|
+
const pickerColumn = ref([]);
|
|
343
|
+
const swipeRef = (el) => {
|
|
344
|
+
if (el && pickerColumn.value.length < columnsList.value.length) {
|
|
345
|
+
pickerColumn.value.push(el);
|
|
346
|
+
}
|
|
347
|
+
};
|
|
317
348
|
const classes = computed(() => {
|
|
318
349
|
const prefixCls = componentName;
|
|
319
350
|
return {
|
|
@@ -403,6 +434,15 @@ const _sfc_main = create({
|
|
|
403
434
|
}
|
|
404
435
|
};
|
|
405
436
|
const confirmHandler = () => {
|
|
437
|
+
pickerColumn.value.length > 0 && pickerColumn.value.forEach((column2) => {
|
|
438
|
+
column2.stopMomentum();
|
|
439
|
+
});
|
|
440
|
+
if (defaultValues.value && !defaultValues.value.length) {
|
|
441
|
+
columnsList.value.forEach((columns) => {
|
|
442
|
+
defaultValues.value.push(columns[0].value);
|
|
443
|
+
selectedOptions.value.push(columns[0]);
|
|
444
|
+
});
|
|
445
|
+
}
|
|
406
446
|
emit("confirm", {
|
|
407
447
|
selectedValue: defaultValues.value,
|
|
408
448
|
selectedOptions: selectedOptions.value
|
|
@@ -431,14 +471,16 @@ const _sfc_main = create({
|
|
|
431
471
|
}, { immediate: true });
|
|
432
472
|
watch(() => props.visible, (val) => {
|
|
433
473
|
state.show = val;
|
|
474
|
+
if (val)
|
|
475
|
+
pickerColumn.value = [];
|
|
434
476
|
});
|
|
435
477
|
watch(() => props.columns, (val) => {
|
|
436
478
|
if (val.length)
|
|
437
479
|
state.formattedColumns = val;
|
|
438
480
|
});
|
|
439
|
-
return {
|
|
440
|
-
classes
|
|
441
|
-
|
|
481
|
+
return __spreadProps(__spreadValues({
|
|
482
|
+
classes
|
|
483
|
+
}, toRefs(state)), {
|
|
442
484
|
column,
|
|
443
485
|
columnsType,
|
|
444
486
|
columnsList,
|
|
@@ -446,8 +488,10 @@ const _sfc_main = create({
|
|
|
446
488
|
changeHandler,
|
|
447
489
|
confirmHandler,
|
|
448
490
|
defaultValues,
|
|
449
|
-
translate
|
|
450
|
-
|
|
491
|
+
translate,
|
|
492
|
+
pickerColumn,
|
|
493
|
+
swipeRef
|
|
494
|
+
});
|
|
451
495
|
}
|
|
452
496
|
});
|
|
453
497
|
const _hoisted_1 = { class: "nut-picker__bar" };
|
|
@@ -495,16 +539,18 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
495
539
|
key: columnIndex
|
|
496
540
|
}, [
|
|
497
541
|
createVNode(_component_nut_picker_column, {
|
|
542
|
+
ref: _ctx.swipeRef,
|
|
498
543
|
itemShow: _ctx.show,
|
|
499
544
|
column: column2,
|
|
500
545
|
readonly: _ctx.readonly,
|
|
501
546
|
columnsType: _ctx.columnsType,
|
|
502
547
|
value: _ctx.defaultValues[columnIndex],
|
|
503
548
|
threeDimensional: _ctx.threeDimensional,
|
|
549
|
+
swipeDuration: _ctx.swipeDuration,
|
|
504
550
|
onChange: (option) => {
|
|
505
551
|
_ctx.changeHandler(columnIndex, option);
|
|
506
552
|
}
|
|
507
|
-
}, null, 8, ["itemShow", "column", "readonly", "columnsType", "value", "threeDimensional", "onChange"])
|
|
553
|
+
}, null, 8, ["itemShow", "column", "readonly", "columnsType", "value", "threeDimensional", "swipeDuration", "onChange"])
|
|
508
554
|
]);
|
|
509
555
|
}), 128))
|
|
510
556
|
], 512),
|
|
@@ -1,9 +1,28 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
1
20
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.
|
|
21
|
+
* @nutui/nutui v3.2.2 Thu Sep 08 2022 22:10:31 GMT+0800 (中国标准时间)
|
|
3
22
|
* (c) 2022 @jdf2e.
|
|
4
23
|
* Released under the MIT License.
|
|
5
24
|
*/
|
|
6
|
-
import { ref, toRefs, computed, onMounted, onUnmounted, watch, nextTick, resolveComponent, openBlock, createElementBlock, Fragment, createElementVNode, normalizeClass, withModifiers, renderSlot, createVNode, withCtx, createCommentVNode, renderList, toDisplayString } from "vue";
|
|
25
|
+
import { ref, toRefs, computed, onMounted, onUnmounted, watch, nextTick, resolveComponent, openBlock, createElementBlock, Fragment, createElementVNode, normalizeClass, withModifiers, renderSlot, createVNode, withCtx, createCommentVNode, renderList, mergeProps, toDisplayString } from "vue";
|
|
7
26
|
import { c as createComponent } from "./component.js";
|
|
8
27
|
import Popup, { popupProps } from "./Popup.js";
|
|
9
28
|
import Button from "./Button.js";
|
|
@@ -787,8 +806,7 @@ const _sfc_main = create({
|
|
|
787
806
|
[Popup.name]: Popup,
|
|
788
807
|
[Button.name]: Button
|
|
789
808
|
},
|
|
790
|
-
props: {
|
|
791
|
-
...popupProps,
|
|
809
|
+
props: __spreadProps(__spreadValues({}, popupProps), {
|
|
792
810
|
list: {
|
|
793
811
|
type: Array,
|
|
794
812
|
default: []
|
|
@@ -813,7 +831,7 @@ const _sfc_main = create({
|
|
|
813
831
|
type: Boolean,
|
|
814
832
|
default: true
|
|
815
833
|
}
|
|
816
|
-
},
|
|
834
|
+
}),
|
|
817
835
|
emits: ["update", "update:visible", "close", "choose", "open"],
|
|
818
836
|
setup(props, { emit }) {
|
|
819
837
|
let popper;
|
|
@@ -840,7 +858,6 @@ const _sfc_main = create({
|
|
|
840
858
|
};
|
|
841
859
|
});
|
|
842
860
|
const createPopperInstance = () => {
|
|
843
|
-
console.log(reference.value, popoverRef.value);
|
|
844
861
|
if (reference.value && popoverRef.value) {
|
|
845
862
|
return createPopper(reference.value, popoverRef.value.popupRef, {
|
|
846
863
|
placement: props.location,
|
|
@@ -863,7 +880,6 @@ const _sfc_main = create({
|
|
|
863
880
|
return null;
|
|
864
881
|
};
|
|
865
882
|
const clickOverlay = () => {
|
|
866
|
-
console.log("\u5173\u95ED");
|
|
867
883
|
};
|
|
868
884
|
const uploadLocation = () => {
|
|
869
885
|
nextTick(() => {
|
|
@@ -871,7 +887,6 @@ const _sfc_main = create({
|
|
|
871
887
|
return;
|
|
872
888
|
if (!popper) {
|
|
873
889
|
popper = createPopperInstance();
|
|
874
|
-
console.log(popper);
|
|
875
890
|
} else {
|
|
876
891
|
popper.setOptions({
|
|
877
892
|
placement: props.location
|
|
@@ -969,10 +984,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
969
984
|
onClick: withModifiers(($event) => _ctx.chooseItem(item, index2), ["stop"])
|
|
970
985
|
}, [
|
|
971
986
|
item.icon ? renderSlot(_ctx.$slots, "default", { key: 0 }, () => [
|
|
972
|
-
createVNode(_component_nut_icon, {
|
|
987
|
+
createVNode(_component_nut_icon, mergeProps(_ctx.$attrs, {
|
|
973
988
|
class: "item-img",
|
|
974
989
|
name: item.icon
|
|
975
|
-
}, null,
|
|
990
|
+
}), null, 16, ["name"])
|
|
976
991
|
]) : createCommentVNode("", true),
|
|
977
992
|
createElementVNode("view", _hoisted_2, toDisplayString(item.name), 1)
|
|
978
993
|
], 10, _hoisted_1);
|