@nutui/nutui 3.2.7 → 3.2.8-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/dist/nutui.es.js +1932 -3372
- package/dist/nutui.umd.js +1929 -3370
- package/dist/packages/_es/ActionSheet.js +2 -5
- package/dist/packages/_es/Address.js +162 -250
- package/dist/packages/_es/AddressList.js +229 -307
- package/dist/packages/_es/Animate.js +1 -1
- package/dist/packages/_es/Audio.js +1 -1
- package/dist/packages/_es/AudioOperate.js +1 -1
- package/dist/packages/_es/Avatar.js +1 -1
- package/dist/packages/_es/AvatarGroup.js +1 -1
- package/dist/packages/_es/BackTop.js +1 -1
- package/dist/packages/_es/Badge.js +1 -1
- package/dist/packages/_es/Barrage.js +1 -1
- package/dist/packages/_es/Button.js +1 -1
- package/dist/packages/_es/Calendar.js +1 -1
- package/dist/packages/_es/CalendarItem.js +1 -1
- package/dist/packages/_es/Card.js +1 -1
- package/dist/packages/_es/Cascader.js +2 -5
- package/dist/packages/_es/Category.js +1 -1
- package/dist/packages/_es/CategoryPane.js +1 -1
- package/dist/packages/_es/Cell.js +1 -1
- 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 +2 -2
- package/dist/packages/_es/Col.js +1 -1
- package/dist/packages/_es/Collapse.js +4 -11
- package/dist/packages/_es/CollapseItem.js +8 -5
- package/dist/packages/_es/Comment.js +1 -1
- package/dist/packages/_es/ConfigProvider.js +1 -1
- package/dist/packages/_es/CountDown.js +2 -10
- package/dist/packages/_es/CountUp.js +1 -1
- package/dist/packages/_es/DatePicker.js +8 -17
- package/dist/packages/_es/Dialog.js +38 -63
- package/dist/packages/_es/Divider.js +1 -1
- package/dist/packages/_es/Drag.js +1 -1
- package/dist/packages/_es/Ecard.js +1 -1
- package/dist/packages/_es/Elevator.js +2 -2
- package/dist/packages/_es/Ellipsis.js +1 -1
- package/dist/packages/_es/Empty.js +1 -1
- package/dist/packages/_es/FixedNav.js +1 -1
- package/dist/packages/_es/Form.js +39 -31
- package/dist/packages/_es/FormItem.js +1 -1
- package/dist/packages/_es/Grid.js +2 -2
- package/dist/packages/_es/GridItem.js +1 -1
- package/dist/packages/_es/Icon.js +1 -1
- package/dist/packages/_es/Image.js +1 -1
- package/dist/packages/_es/ImagePreview.js +126 -220
- package/dist/packages/_es/Indicator.js +4 -4
- package/dist/packages/_es/InfiniteLoading.js +1 -1
- package/dist/packages/_es/Input.js +107 -123
- package/dist/packages/_es/InputNumber.js +1 -1
- package/dist/packages/_es/Invoice.js +1 -1
- package/dist/packages/_es/Layout.js +1 -1
- package/dist/packages/_es/List.js +1 -1
- package/dist/packages/_es/Menu.js +14 -1
- package/dist/packages/_es/MenuItem.js +10 -7
- package/dist/packages/_es/Navbar.js +1 -1
- package/dist/packages/_es/NoticeBar.js +1 -1
- package/dist/packages/_es/Notify.js +5 -7
- package/dist/packages/_es/NumberKeyboard.js +4 -4
- package/dist/packages/_es/OverLay.js +60 -63
- package/dist/packages/_es/Pagination.js +1 -1
- package/dist/packages/_es/Picker.js +25 -50
- package/dist/packages/_es/Popover.js +111 -930
- package/dist/packages/_es/Popup.js +105 -217
- package/dist/packages/_es/Price.js +1 -1
- package/dist/packages/_es/Progress.js +1 -1
- package/dist/packages/_es/Radio.js +1 -1
- package/dist/packages/_es/RadioGroup.js +1 -1
- package/dist/packages/_es/Range.js +1 -1
- package/dist/packages/_es/Rate.js +1 -1
- package/dist/packages/_es/Row.js +1 -1
- package/dist/packages/_es/SearchBar.js +1 -1
- package/dist/packages/_es/ShortPassword.js +4 -4
- package/dist/packages/_es/SideNavBar.js +1 -1
- package/dist/packages/_es/SideNavBarItem.js +1 -1
- package/dist/packages/_es/Signature.js +1 -1
- package/dist/packages/_es/Skeleton.js +1 -1
- package/dist/packages/_es/Sku.js +4 -7
- package/dist/packages/_es/Step.js +1 -1
- package/dist/packages/_es/Steps.js +1 -1
- package/dist/packages/_es/Sticky.js +1 -1
- package/dist/packages/_es/SubSideNavBar.js +1 -1
- package/dist/packages/_es/Swipe.js +1 -1
- package/dist/packages/_es/Swiper.js +1 -1
- package/dist/packages/_es/SwiperItem.js +1 -1
- package/dist/packages/_es/Switch.js +1 -1
- package/dist/packages/_es/TabPane.js +1 -1
- package/dist/packages/_es/Tabbar.js +1 -1
- package/dist/packages/_es/TabbarItem.js +2 -2
- package/dist/packages/_es/Table.js +1 -1
- package/dist/packages/_es/Tabs.js +2 -2
- package/dist/packages/_es/Tag.js +1 -1
- package/dist/packages/_es/TextArea.js +1 -1
- package/dist/packages/_es/TimeDetail.js +1 -1
- package/dist/packages/_es/TimePannel.js +1 -1
- package/dist/packages/_es/TimeSelect.js +4 -4
- package/dist/packages/_es/Toast.js +5 -6
- package/dist/packages/_es/TrendArrow.js +1 -1
- package/dist/packages/_es/Uploader.js +2 -2
- package/dist/packages/_es/Video.js +1 -1
- package/dist/packages/_es/WaterMark.js +1 -1
- package/dist/packages/_es/common.js +1 -1
- package/dist/packages/_es/component.js +22 -2
- 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 +1 -1
- package/dist/packages/_es/interceptor.js +32 -0
- package/dist/packages/_es/mountComponent.js +42 -0
- package/dist/packages/_es/plugin-vue_export-helper.js +1 -1
- package/dist/packages/_es/props.js +80 -0
- package/dist/packages/_es/pxCheck.js +1 -1
- package/dist/packages/_es/raf.js +1 -1
- package/dist/packages/_es/style.css +1 -1
- package/dist/packages/address/index.scss +7 -2
- package/dist/packages/addresslist/index.scss +61 -101
- package/dist/packages/imagepreview/index.scss +9 -1
- package/dist/packages/inputnumber/index.scss +5 -1
- 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/menuitem/index.scss +0 -15
- package/dist/packages/notify/index.scss +2 -2
- package/dist/packages/overlay/index.scss +2 -1
- package/dist/packages/picker/index.scss +20 -12
- package/dist/packages/popover/index.scss +191 -363
- package/dist/packages/popup/index.scss +3 -14
- package/dist/smartips/attributes.json +59 -55
- package/dist/smartips/tags.json +16 -19
- package/dist/smartips/web-types.json +115 -113
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +54 -55
- package/dist/styles/themes/jdb.scss +54 -55
- package/dist/styles/themes/jddkh.scss +54 -55
- package/dist/styles/themes/jdt.scss +54 -55
- package/dist/styles/variables.scss +9 -0
- package/dist/types/__VUE/actionsheet/index.vue.d.ts +61 -57
- package/dist/types/__VUE/address/index.vue.d.ts +74 -94
- package/dist/types/__VUE/addresslist/components/GeneralShell.vue.d.ts +29 -9
- package/dist/types/__VUE/addresslist/components/ItemContents.vue.d.ts +4 -13
- package/dist/types/__VUE/addresslist/components/SwipeShell.vue.d.ts +9 -9
- package/dist/types/__VUE/addresslist/index.vue.d.ts +23 -20
- package/dist/types/__VUE/calendar/index.vue.d.ts +1 -1
- package/dist/types/__VUE/cascader/index.vue.d.ts +49 -54
- package/dist/types/__VUE/cell/index.vue.d.ts +1 -1
- package/dist/types/__VUE/countdown/index.vue.d.ts +0 -1
- package/dist/types/__VUE/countdown/util.d.ts +0 -1
- package/dist/types/__VUE/datepicker/index.vue.d.ts +57 -62
- package/dist/types/__VUE/dialog/index.d.ts +0 -3
- package/dist/types/__VUE/dialog/index.vue.d.ts +52 -61
- package/dist/types/__VUE/divider/index.vue.d.ts +1 -1
- package/dist/types/__VUE/fixednav/index.vue.d.ts +1 -1
- package/dist/types/__VUE/form/common.d.ts +4 -2
- package/dist/types/__VUE/form/index.vue.d.ts +4 -4
- package/dist/types/__VUE/grid/index.vue.d.ts +1 -1
- package/dist/types/__VUE/image/index.vue.d.ts +1 -1
- package/dist/types/__VUE/imagepreview/imagePreviewItem.vue.d.ts +27 -20
- package/dist/types/__VUE/imagepreview/index.d.ts +19 -5
- package/dist/types/__VUE/imagepreview/index.vue.d.ts +57 -43
- package/dist/types/__VUE/imagepreview/types.d.ts +44 -0
- package/dist/types/__VUE/indicator/index.vue.d.ts +1 -0
- package/dist/types/__VUE/input/index.vue.d.ts +35 -23
- package/dist/types/__VUE/inputnumber/index.vue.d.ts +1 -1
- package/dist/types/__VUE/invoice/index.vue.d.ts +1 -1
- package/dist/types/__VUE/menu/index.vue.d.ts +1 -1
- package/dist/types/__VUE/menuitem/index.vue.d.ts +3 -3
- package/dist/types/__VUE/notify/index.vue.d.ts +3 -3
- package/dist/types/__VUE/numberkeyboard/index.vue.d.ts +4 -4
- package/dist/types/__VUE/overlay/index.vue.d.ts +12 -13
- package/dist/types/__VUE/picker/Column.vue.d.ts +0 -2
- package/dist/types/__VUE/picker/index.vue.d.ts +59 -66
- package/dist/types/__VUE/popover/index.vue.d.ts +40 -143
- package/dist/types/__VUE/popup/common.d.ts +103 -0
- package/dist/types/__VUE/popup/index.vue.d.ts +57 -1593
- package/dist/types/__VUE/popup/props.d.ts +82 -0
- package/dist/types/__VUE/rate/index.vue.d.ts +1 -1
- package/dist/types/__VUE/shortpassword/index.vue.d.ts +5 -5
- package/dist/types/__VUE/sku/index.vue.d.ts +59 -64
- package/dist/types/__VUE/swipe/index.vue.d.ts +2 -2
- package/dist/types/__VUE/switch/index.vue.d.ts +1 -1
- package/dist/types/__VUE/tabbar/index.vue.d.ts +1 -1
- package/dist/types/__VUE/timeselect/index.vue.d.ts +3 -3
- package/dist/types/__VUE/video/index.vue.d.ts +2 -2
- package/dist/types/index.d.ts +1 -1
- package/dist/types/nutui.d.ts +1 -2
- package/package.json +2 -3
- package/dist/packages/_es/PullRefresh.js +0 -349
- package/dist/packages/pullrefresh/index.scss +0 -71
- package/dist/types/__VUE/addresslist/components/LongPressShell.vue.d.ts +0 -47
- package/dist/types/__VUE/datepicker/utils.d.ts +0 -5
- package/dist/types/__VUE/popup/use-lock-scroll.d.ts +0 -5
- package/dist/types/__VUE/pullrefresh/index.vue.d.ts +0 -128
- package/dist/types/__VUE/pullrefresh/use-touch.d.ts +0 -20
- package/dist/types/__VUE/pullrefresh/util.d.ts +0 -6
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.
|
|
2
|
+
* @nutui/nutui v3.2.8-beta.1 Fri Dec 02 2022 14:18:21 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { computed, ref, watch, resolveComponent, openBlock, createBlock, withCtx, createElementBlock, Fragment, renderList, createElementVNode, normalizeClass, toDisplayString, createCommentVNode, createVNode } from "vue";
|
|
7
|
-
import { popupProps } from "./
|
|
7
|
+
import { p as popupProps } from "./props.js";
|
|
8
8
|
import { c as createComponent } from "./component.js";
|
|
9
9
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
10
|
-
import "./OverLay.js";
|
|
11
10
|
import "../locale/lang";
|
|
12
|
-
import "./Icon.js";
|
|
13
|
-
import "./pxCheck.js";
|
|
14
11
|
const formatTree = (tree, parent, config) => tree.map((node) => {
|
|
15
12
|
const { value: valueKey = "value", text: textKey = "text", children: childrenKey = "children" } = config;
|
|
16
13
|
const { [valueKey]: value, [textKey]: text, [childrenKey]: children, ...others } = node;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.
|
|
2
|
+
* @nutui/nutui v3.2.8-beta.1 Fri Dec 02 2022 14:18:21 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { useSlots, computed, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, Fragment, renderList, renderSlot, toDisplayString, createCommentVNode } from "vue";
|
|
7
|
-
import {
|
|
7
|
+
import { e as isObject, 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("circleprogress");
|
package/dist/packages/_es/Col.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.
|
|
2
|
+
* @nutui/nutui v3.2.8-beta.1 Fri Dec 02 2022 14:18:21 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -59,17 +59,10 @@ const _sfc_main = create({
|
|
|
59
59
|
let doms = collapseChldren.value;
|
|
60
60
|
Array.from(doms).forEach((item) => {
|
|
61
61
|
if (typeof newval == "number" || typeof newval == "string") {
|
|
62
|
-
|
|
63
|
-
item.changeOpen(true);
|
|
64
|
-
} else {
|
|
65
|
-
item.changeOpen(false);
|
|
66
|
-
}
|
|
62
|
+
item.changeOpen(newval == item.name ? true : false);
|
|
67
63
|
} else if (Object.values(newval) instanceof Array) {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
} else {
|
|
71
|
-
item.changeOpen(false);
|
|
72
|
-
}
|
|
64
|
+
const isOpen = newval.indexOf(Number(item.name)) > -1 || newval.indexOf(String(item.name)) > -1;
|
|
65
|
+
item.changeOpen(isOpen);
|
|
73
66
|
}
|
|
74
67
|
item.animation();
|
|
75
68
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.
|
|
2
|
+
* @nutui/nutui v3.2.8-beta.1 Fri Dec 02 2022 14:18:21 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -152,10 +152,13 @@ const _sfc_main = create({
|
|
|
152
152
|
var observer = new MutationObserver(() => {
|
|
153
153
|
animation();
|
|
154
154
|
});
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
155
|
+
const ele = document.getElementsByClassName("collapse-wrapper")[0];
|
|
156
|
+
if (ele) {
|
|
157
|
+
observer.observe(ele, {
|
|
158
|
+
childList: true,
|
|
159
|
+
subtree: true
|
|
160
|
+
});
|
|
161
|
+
}
|
|
159
162
|
init();
|
|
160
163
|
});
|
|
161
164
|
const emptyContent = computed(() => {
|
|
@@ -1,19 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.
|
|
2
|
+
* @nutui/nutui v3.2.8-beta.1 Fri Dec 02 2022 14:18:21 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { reactive, computed, onBeforeMount, watch, toRefs, openBlock, createElementBlock, normalizeClass, renderSlot } from "vue";
|
|
7
|
-
import { c as createComponent } from "./component.js";
|
|
7
|
+
import { p as padZero, c as createComponent } from "./component.js";
|
|
8
8
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
9
|
import "../locale/lang";
|
|
10
|
-
const padZero = (num, length = 2) => {
|
|
11
|
-
num += "";
|
|
12
|
-
while (num.length < length) {
|
|
13
|
-
num = "0" + num;
|
|
14
|
-
}
|
|
15
|
-
return num.toString();
|
|
16
|
-
};
|
|
17
10
|
const getTimeStamp = (timeStr) => {
|
|
18
11
|
if (!timeStr)
|
|
19
12
|
return Date.now();
|
|
@@ -233,7 +226,6 @@ const _sfc_main = create({
|
|
|
233
226
|
...toRefs(props),
|
|
234
227
|
slots,
|
|
235
228
|
classes,
|
|
236
|
-
getTimeStamp,
|
|
237
229
|
start,
|
|
238
230
|
pause,
|
|
239
231
|
renderTime,
|
|
@@ -1,29 +1,20 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.
|
|
2
|
+
* @nutui/nutui v3.2.8-beta.1 Fri Dec 02 2022 14:18:21 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { reactive, computed, onBeforeMount, watch, toRefs, resolveComponent, openBlock, createBlock, withCtx, renderSlot } from "vue";
|
|
7
7
|
import Picker from "./Picker.js";
|
|
8
|
-
import { popupProps } from "./
|
|
9
|
-
import { c as createComponent } from "./component.js";
|
|
8
|
+
import { p as popupProps } from "./props.js";
|
|
9
|
+
import { c as createComponent, i as isDate$1, p as padZero } from "./component.js";
|
|
10
10
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
11
|
-
import "./
|
|
12
|
-
import "./OverLay.js";
|
|
11
|
+
import "./Popup.js";
|
|
13
12
|
import "../locale/lang";
|
|
14
|
-
import "./
|
|
15
|
-
import "./pxCheck.js";
|
|
16
|
-
function padZero(num, targetLength = 2) {
|
|
17
|
-
let str = num + "";
|
|
18
|
-
while (str.length < targetLength) {
|
|
19
|
-
str = "0" + str;
|
|
20
|
-
}
|
|
21
|
-
return str;
|
|
22
|
-
}
|
|
13
|
+
import "./index4.js";
|
|
23
14
|
const { componentName, create, translate } = createComponent("datepicker");
|
|
24
15
|
const currentYear = new Date().getFullYear();
|
|
25
16
|
function isDate(val) {
|
|
26
|
-
return
|
|
17
|
+
return isDate$1(val) && !isNaN(val.getTime());
|
|
27
18
|
}
|
|
28
19
|
const zhCNType = {
|
|
29
20
|
day: translate("day"),
|
|
@@ -348,7 +339,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
348
339
|
onChange: _ctx.changeHandler,
|
|
349
340
|
title: _ctx.title,
|
|
350
341
|
onConfirm: _ctx.confirm,
|
|
351
|
-
|
|
342
|
+
teleportDisable: _ctx.teleportDisable,
|
|
352
343
|
threeDimensional: _ctx.threeDimensional,
|
|
353
344
|
swipeDuration: _ctx.swipeDuration,
|
|
354
345
|
safeAreaInsetBottom: _ctx.safeAreaInsetBottom,
|
|
@@ -361,7 +352,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
361
352
|
renderSlot(_ctx.$slots, "default")
|
|
362
353
|
]),
|
|
363
354
|
_: 3
|
|
364
|
-
}, 8, ["modelValue", "visible", "okText", "cancelText", "onClose", "columns", "onChange", "title", "onConfirm", "
|
|
355
|
+
}, 8, ["modelValue", "visible", "okText", "cancelText", "onClose", "columns", "onChange", "title", "onConfirm", "teleportDisable", "threeDimensional", "swipeDuration", "safeAreaInsetBottom", "destroyOnClose"]);
|
|
365
356
|
}
|
|
366
357
|
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
367
358
|
export { index as default };
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.
|
|
2
|
+
* @nutui/nutui v3.2.8-beta.1 Fri Dec 02 2022 14:18:21 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { ref, onMounted, watch, computed, resolveComponent, openBlock, createBlock, normalizeStyle, withCtx, createElementVNode, normalizeClass, createElementBlock, renderSlot, Fragment, createTextVNode, toDisplayString, createCommentVNode, resolveDynamicComponent,
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import
|
|
6
|
+
import { ref, onMounted, watch, computed, resolveComponent, openBlock, createBlock, normalizeStyle, withCtx, createElementVNode, normalizeClass, createElementBlock, renderSlot, Fragment, createTextVNode, toDisplayString, createCommentVNode, resolveDynamicComponent, h } from "vue";
|
|
7
|
+
import { c as createComponent } from "./component.js";
|
|
8
|
+
import { f as funInterceptor } from "./interceptor.js";
|
|
9
|
+
import { p as popupProps } from "./props.js";
|
|
10
10
|
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
11
|
+
import Popup from "./Popup.js";
|
|
12
|
+
import _sfc_main$1 from "./Icon.js";
|
|
13
|
+
import Button from "./Button.js";
|
|
14
|
+
import OverLay from "./OverLay.js";
|
|
11
15
|
import "../locale/lang";
|
|
12
|
-
import "./
|
|
13
|
-
import "./Icon.js";
|
|
16
|
+
import { C as CreateComponent } from "./mountComponent.js";
|
|
14
17
|
import "./pxCheck.js";
|
|
15
18
|
const { componentName, create, translate } = createComponent("dialog");
|
|
16
19
|
const _sfc_main = create({
|
|
17
20
|
inheritAttrs: false,
|
|
18
|
-
components: {
|
|
19
|
-
[Popup.name]: Popup,
|
|
20
|
-
[Button.name]: Button
|
|
21
|
-
},
|
|
21
|
+
components: {},
|
|
22
22
|
props: {
|
|
23
23
|
...popupProps,
|
|
24
24
|
closeOnClickOverlay: {
|
|
@@ -76,9 +76,7 @@ const _sfc_main = create({
|
|
|
76
76
|
popStyle: {
|
|
77
77
|
type: Object
|
|
78
78
|
},
|
|
79
|
-
beforeClose:
|
|
80
|
-
type: Function
|
|
81
|
-
}
|
|
79
|
+
beforeClose: Function
|
|
82
80
|
},
|
|
83
81
|
emits: ["update", "update:visible", "ok", "cancel", "opened", "closed"],
|
|
84
82
|
setup(props, { emit }) {
|
|
@@ -110,20 +108,13 @@ const _sfc_main = create({
|
|
|
110
108
|
emit("update:visible", val);
|
|
111
109
|
};
|
|
112
110
|
const closed = (action) => {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
update(false);
|
|
119
|
-
emit("closed");
|
|
120
|
-
}
|
|
121
|
-
});
|
|
111
|
+
funInterceptor(props.beforeClose, {
|
|
112
|
+
args: [action],
|
|
113
|
+
done: () => {
|
|
114
|
+
update(false);
|
|
115
|
+
emit("closed");
|
|
122
116
|
}
|
|
123
|
-
}
|
|
124
|
-
update(false);
|
|
125
|
-
emit("closed");
|
|
126
|
-
}
|
|
117
|
+
});
|
|
127
118
|
};
|
|
128
119
|
const onCancel = () => {
|
|
129
120
|
emit("cancel");
|
|
@@ -161,8 +152,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
161
152
|
"lock-scroll": _ctx.lockScroll,
|
|
162
153
|
"pop-class": _ctx.popClass,
|
|
163
154
|
style: normalizeStyle(_ctx.popStyle),
|
|
164
|
-
"overlay-class": _ctx.overlayClass,
|
|
165
|
-
"overlay-style": _ctx.overlayStyle,
|
|
166
155
|
round: "",
|
|
167
156
|
onClickOverlay: _ctx.closed,
|
|
168
157
|
onClickCloseIcon: _ctx.closed
|
|
@@ -220,7 +209,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
220
209
|
], 2)
|
|
221
210
|
]),
|
|
222
211
|
_: 3
|
|
223
|
-
}, 8, ["teleport", "visible", "close-on-click-overlay", "lock-scroll", "pop-class", "style", "
|
|
212
|
+
}, 8, ["teleport", "visible", "close-on-click-overlay", "lock-scroll", "pop-class", "style", "onClickOverlay", "onClickCloseIcon"]);
|
|
224
213
|
}
|
|
225
214
|
var Dialog = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
226
215
|
class DialogOptions {
|
|
@@ -260,43 +249,29 @@ class DialogOptions {
|
|
|
260
249
|
class DialogFunction {
|
|
261
250
|
constructor(_options) {
|
|
262
251
|
this.options = new DialogOptions();
|
|
263
|
-
this.close = () => {
|
|
264
|
-
};
|
|
265
|
-
this.setDefaultOptions = (options2) => {
|
|
266
|
-
};
|
|
267
|
-
this.resetDefaultOptions = () => {
|
|
268
|
-
};
|
|
269
252
|
let options = Object.assign(this.options, _options);
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
253
|
+
const { unmount } = CreateComponent(options, {
|
|
254
|
+
name: "dialog",
|
|
255
|
+
components: [Popup, _sfc_main$1, Button, OverLay],
|
|
256
|
+
wrapper: (elWarp, root) => {
|
|
257
|
+
return {
|
|
258
|
+
setup() {
|
|
259
|
+
options.onUpdate = (val) => {
|
|
260
|
+
if (val == false) {
|
|
261
|
+
unmount();
|
|
262
|
+
}
|
|
263
|
+
};
|
|
264
|
+
if (options == null ? void 0 : options.onOpened) {
|
|
265
|
+
options == null ? void 0 : options.onOpened();
|
|
266
|
+
}
|
|
267
|
+
options.teleport = `#${root.id}`;
|
|
268
|
+
return () => {
|
|
269
|
+
return h(Dialog, options);
|
|
270
|
+
};
|
|
286
271
|
}
|
|
287
272
|
};
|
|
288
|
-
if (options == null ? void 0 : options.onOpened) {
|
|
289
|
-
options == null ? void 0 : options.onOpened();
|
|
290
|
-
}
|
|
291
|
-
options.teleport = `#${root.id}`;
|
|
292
|
-
return () => {
|
|
293
|
-
return h(Dialog, options);
|
|
294
|
-
};
|
|
295
273
|
}
|
|
296
|
-
};
|
|
297
|
-
this.instance = createVNode(Wrapper);
|
|
298
|
-
elWarp.appendChild(root);
|
|
299
|
-
render(this.instance, root);
|
|
274
|
+
});
|
|
300
275
|
}
|
|
301
276
|
}
|
|
302
277
|
const _Dialog = function(options) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.2.
|
|
2
|
+
* @nutui/nutui v3.2.8-beta.1 Fri Dec 02 2022 14:18:21 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -88,7 +88,7 @@ const _sfc_main = create({
|
|
|
88
88
|
state.listHeight.push(height);
|
|
89
89
|
for (let i = 0; i < state.listGroup.length; i++) {
|
|
90
90
|
let item = state.listGroup[i];
|
|
91
|
-
height += item.clientHeight;
|
|
91
|
+
height += Math.floor(item.clientHeight);
|
|
92
92
|
state.listHeight.push(height);
|
|
93
93
|
}
|
|
94
94
|
};
|