@nutui/nutui 3.1.21 → 3.1.22-beta.5
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 +4203 -19263
- package/dist/nutui.umd.js +4208 -19368
- package/dist/packages/_es/ActionSheet.js +17 -167
- package/dist/packages/_es/Address.js +110 -552
- package/dist/packages/_es/AddressList.js +113 -613
- package/dist/packages/_es/Animate.js +22 -0
- package/dist/packages/_es/Audio.js +53 -274
- package/dist/packages/_es/AudioOperate.js +13 -121
- package/dist/packages/_es/Avatar.js +38 -177
- package/dist/packages/_es/AvatarGroup.js +14 -73
- package/dist/packages/_es/BackTop.js +43 -156
- package/dist/packages/_es/Badge.js +14 -86
- package/dist/packages/_es/Barrage.js +41 -120
- package/dist/packages/_es/Button.js +23 -128
- package/dist/packages/_es/Calendar.js +30 -237
- package/dist/packages/_es/CalendarItem.js +2 -1
- package/dist/packages/_es/Card.js +10 -107
- package/dist/packages/_es/Cascader.js +147 -523
- package/dist/packages/_es/Category.js +15 -58
- package/dist/packages/_es/CategoryPane.js +11 -111
- package/dist/packages/_es/Cell.js +21 -100
- package/dist/packages/_es/CellGroup.js +9 -44
- package/dist/packages/_es/Checkbox.js +31 -113
- package/dist/packages/_es/CheckboxGroup.js +29 -58
- package/dist/packages/_es/CircleProgress.js +28 -151
- package/dist/packages/_es/Col.js +14 -56
- package/dist/packages/_es/Collapse.js +32 -84
- package/dist/packages/_es/CollapseItem.js +59 -272
- package/dist/packages/_es/Comment.js +64 -434
- package/dist/packages/_es/ConfigProvider.js +13 -0
- package/dist/packages/_es/CountDown.js +56 -256
- package/dist/packages/_es/CountUp.js +140 -556
- package/dist/packages/_es/DatePicker.js +98 -332
- package/dist/packages/_es/Dialog.js +60 -271
- package/dist/packages/_es/Divider.js +13 -82
- package/dist/packages/_es/Drag.js +56 -197
- package/dist/packages/_es/Ecard.js +24 -159
- package/dist/packages/_es/Elevator.js +58 -212
- package/dist/packages/_es/Ellipsis.js +64 -0
- package/dist/packages/_es/Empty.js +12 -71
- package/dist/packages/_es/FixedNav.js +15 -122
- package/dist/packages/_es/Form.js +64 -151
- package/dist/packages/_es/FormItem.js +15 -110
- package/dist/packages/_es/Grid.js +5 -6
- package/dist/packages/_es/GridItem.js +33 -144
- package/dist/packages/_es/Icon.js +15 -40
- package/dist/packages/_es/Image.js +31 -0
- package/dist/packages/_es/ImagePreview.js +77 -309
- package/dist/packages/_es/Indicator.js +15 -62
- package/dist/packages/_es/InfiniteLoading.js +57 -268
- package/dist/packages/_es/Input.js +51 -413
- package/dist/packages/_es/InputNumber.js +41 -160
- package/dist/packages/_es/Layout.js +4 -5
- package/dist/packages/_es/List.js +18 -124
- package/dist/packages/_es/Menu.js +45 -118
- package/dist/packages/_es/MenuItem.js +37 -162
- package/dist/packages/_es/Navbar.js +30 -192
- package/dist/packages/_es/NoticeBar.js +74 -397
- package/dist/packages/_es/Notify.js +72 -246
- package/dist/packages/_es/NumberKeyboard.js +41 -272
- package/dist/packages/_es/OldPicker.js +131 -474
- package/dist/packages/_es/OverLay.js +24 -113
- package/dist/packages/_es/Pagination.js +39 -157
- package/dist/packages/_es/Picker.js +129 -469
- package/dist/packages/_es/Popover.js +318 -975
- package/dist/packages/_es/Popup.js +55 -313
- package/dist/packages/_es/Price.js +16 -118
- package/dist/packages/_es/Progress.js +14 -146
- package/dist/packages/_es/PullRefresh.js +84 -354
- package/dist/packages/_es/Radio.js +22 -90
- package/dist/packages/_es/RadioGroup.js +8 -37
- package/dist/packages/_es/Range.js +83 -427
- package/dist/packages/_es/Rate.js +35 -137
- package/dist/packages/_es/Row.js +22 -64
- package/dist/packages/_es/SearchBar.js +37 -257
- package/dist/packages/_es/ShortPassword.js +35 -225
- package/dist/packages/_es/SideNavBar.js +24 -99
- package/dist/packages/_es/SideNavBarItem.js +11 -46
- package/dist/packages/_es/Signature.js +41 -179
- package/dist/packages/_es/Skeleton.js +20 -136
- package/dist/packages/_es/Sku.js +84 -509
- package/dist/packages/_es/Step.js +20 -133
- package/dist/packages/_es/Steps.js +18 -53
- package/dist/packages/_es/Sticky.js +53 -138
- package/dist/packages/_es/SubSideNavBar.js +17 -100
- package/dist/packages/_es/Swipe.js +41 -197
- package/dist/packages/_es/Swiper.js +121 -433
- package/dist/packages/_es/SwiperItem.js +22 -53
- package/dist/packages/_es/Switch.js +21 -116
- package/dist/packages/_es/TabPane.js +12 -39
- package/dist/packages/_es/Tabbar.js +17 -72
- package/dist/packages/_es/TabbarItem.js +29 -151
- package/dist/packages/_es/Table.js +18 -196
- package/dist/packages/_es/Tabs.js +43 -217
- package/dist/packages/_es/Tag.js +20 -97
- package/dist/packages/_es/TextArea.js +42 -160
- package/dist/packages/_es/TimeDetail.js +18 -98
- package/dist/packages/_es/TimePannel.js +14 -66
- package/dist/packages/_es/TimeSelect.js +15 -103
- package/dist/packages/_es/Toast.js +71 -329
- package/dist/packages/_es/Uploader.js +104 -468
- package/dist/packages/_es/Video.js +74 -350
- package/dist/packages/_es/common.js +38 -128
- package/dist/packages/_es/component.js +35 -76
- package/dist/packages/_es/index.js +5 -6
- package/dist/packages/_es/index2.js +9 -30
- package/dist/packages/_es/index3.js +6 -8
- package/dist/packages/_es/index4.js +13 -58
- package/dist/packages/_es/index5.js +164 -682
- package/dist/packages/_es/plugin-vue_export-helper.js +7 -8
- package/dist/packages/_es/pxCheck.js +3 -5
- package/dist/packages/_es/raf.js +8 -15
- package/dist/packages/animate/index.scss +299 -0
- package/dist/packages/button/index.scss +2 -1
- package/dist/packages/cell/index.scss +18 -1
- package/dist/packages/checkbox/index.scss +16 -0
- package/dist/packages/configprovider/index.scss +2 -0
- package/dist/packages/dialog/index.scss +1 -0
- package/dist/packages/elevator/index.scss +21 -0
- package/dist/packages/ellipsis/index.scss +12 -0
- package/dist/packages/formitem/index.scss +12 -0
- package/dist/packages/griditem/index.scss +11 -0
- package/dist/packages/image/index.scss +39 -0
- package/dist/packages/imagepreview/index.scss +21 -2
- package/dist/packages/input/index.scss +26 -1
- package/dist/packages/inputnumber/index.scss +21 -0
- package/dist/packages/locale/lang/baseLang.d.ts +1 -0
- package/dist/packages/locale/lang/baseLang.js +3 -3
- package/dist/packages/locale/lang/en-US.d.ts +8 -0
- package/dist/packages/locale/lang/en-US.js +5 -97
- package/dist/packages/locale/lang/id-ID.d.ts +8 -0
- package/dist/packages/locale/lang/id-ID.js +5 -97
- package/dist/packages/locale/lang/index.js +16 -38
- package/dist/packages/locale/lang/zh-CN.d.ts +8 -0
- package/dist/packages/locale/lang/zh-CN.js +5 -97
- package/dist/packages/locale/lang/zh-TW.d.ts +8 -0
- package/dist/packages/locale/lang/zh-TW.js +5 -97
- package/dist/packages/menu/index.scss +45 -36
- package/dist/packages/menuitem/index.scss +4 -0
- package/dist/packages/navbar/index.scss +9 -0
- package/dist/packages/pagination/index.scss +19 -0
- package/dist/packages/radio/index.scss +19 -0
- package/dist/packages/range/index.scss +19 -0
- package/dist/packages/rate/index.scss +1 -1
- package/dist/packages/searchbar/index.scss +21 -0
- package/dist/packages/switch/index.scss +4 -3
- package/dist/packages/tabbar/index.scss +5 -0
- package/dist/packages/tabbaritem/index.scss +7 -0
- package/dist/packages/tabpane/index.scss +6 -0
- package/dist/packages/tabs/index.scss +22 -0
- package/dist/packages/textarea/index.scss +8 -0
- package/dist/smartips/attributes.json +192 -12
- package/dist/smartips/tags.json +70 -10
- package/dist/smartips/web-types.json +6945 -0
- package/dist/style.css +1 -1
- package/dist/style.es.js +1 -1
- package/dist/styles/font/config.json +3 -1
- package/dist/styles/font/demo_index.html +49 -3
- package/dist/styles/font/iconfont.css +11 -3
- package/dist/styles/font/iconfont.js +15 -15
- package/dist/styles/font/iconfont.json +14 -0
- package/dist/styles/font/iconfont.ttf +0 -0
- package/dist/styles/font/iconfont.woff +0 -0
- package/dist/styles/font/iconfont.woff2 +0 -0
- package/dist/styles/themes/default.scss +54 -50
- package/dist/styles/themes/jdb.scss +54 -50
- package/dist/styles/themes/jdt.scss +54 -50
- package/dist/styles/variables-jdb.scss +19 -1
- package/dist/styles/variables-jdt.scss +19 -1
- package/dist/styles/variables.scss +22 -1
- package/dist/types/__VUE/address/index.vue.d.ts +2 -2
- package/dist/types/__VUE/addresslist/components/ItemContents.vue.d.ts +1 -0
- package/dist/types/__VUE/animate/index.vue.d.ts +48 -0
- package/dist/types/__VUE/animate/type.d.ts +6 -0
- package/dist/types/__VUE/audiooperate/index.vue.d.ts +1 -0
- package/dist/types/__VUE/avatar/index.vue.d.ts +7 -7
- package/dist/types/__VUE/backtop/index.vue.d.ts +2 -2
- 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/calendaritem/index.vue.d.ts +10 -2
- package/dist/types/__VUE/cell/index.vue.d.ts +13 -6
- package/dist/types/__VUE/checkbox/common.d.ts +59 -0
- package/dist/types/__VUE/checkbox/index.vue.d.ts +20 -7
- package/dist/types/__VUE/checkboxgroup/index.vue.d.ts +7 -0
- package/dist/types/__VUE/circleprogress/index.vue.d.ts +2 -2
- package/dist/types/__VUE/collapse/index.vue.d.ts +5 -3
- package/dist/types/__VUE/collapseitem/index.vue.d.ts +2 -2
- package/dist/types/__VUE/configprovider/common.d.ts +20 -0
- package/dist/types/__VUE/configprovider/index.vue.d.ts +33 -0
- package/dist/types/__VUE/datepicker/index.vue.d.ts +5 -5
- package/dist/types/__VUE/datepicker/type.d.ts +6 -0
- package/dist/types/__VUE/dialog/index.d.ts +9 -2
- package/dist/types/__VUE/dialog/index.vue.d.ts +26 -17
- package/dist/types/__VUE/ecard/index.vue.d.ts +3 -3
- package/dist/types/__VUE/elevator/index.vue.d.ts +29 -0
- package/dist/types/__VUE/ellipsis/index.vue.d.ts +72 -0
- package/dist/types/__VUE/empty/index.vue.d.ts +2 -2
- package/dist/types/__VUE/formitem/index.vue.d.ts +3 -10
- package/dist/types/__VUE/grid/common.d.ts +3 -3
- 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/image/index.vue.d.ts +105 -0
- package/dist/types/__VUE/image/type.d.ts +6 -0
- package/dist/types/__VUE/imagepreview/index.vue.d.ts +36 -2
- package/dist/types/__VUE/infiniteloading/index.vue.d.ts +6 -6
- package/dist/types/__VUE/input/index.vue.d.ts +4 -4
- package/dist/types/__VUE/menu/index.vue.d.ts +29 -2
- package/dist/types/__VUE/menuitem/index.vue.d.ts +16 -7
- package/dist/types/__VUE/menuitem/type.d.ts +8 -0
- package/dist/types/__VUE/noticebar/index.vue.d.ts +3 -3
- package/dist/types/__VUE/picker/Column.vue.d.ts +1 -1
- package/dist/types/__VUE/picker/index.vue.d.ts +1 -1
- package/dist/types/__VUE/popover/index.vue.d.ts +2 -2
- package/dist/types/__VUE/range/index.vue.d.ts +1 -1
- package/dist/types/__VUE/rate/common.d.ts +149 -0
- package/dist/types/__VUE/rate/index.vue.d.ts +17 -7
- package/dist/types/__VUE/searchbar/index.vue.d.ts +2 -2
- package/dist/types/__VUE/skeleton/common.d.ts +2 -4
- package/dist/types/__VUE/step/index.vue.d.ts +2 -2
- package/dist/types/__VUE/swiper/index.vue.d.ts +4 -4
- 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/tabs/common.d.ts +2 -2
- package/dist/types/__VUE/textarea/index.vue.d.ts +2 -2
- package/dist/types/__VUE/timeselect/index.vue.d.ts +8 -0
- package/dist/types/__VUE/toast/index.vue.d.ts +2 -2
- package/dist/types/__VUE/uploader/index.vue.d.ts +4 -4
- package/dist/types/__VUE/uploader/type.d.ts +2 -1
- package/dist/types/__VUE/uploader/uploader.d.ts +1 -0
- 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 +5 -1
- package/package.json +7 -3
|
@@ -1,288 +1,77 @@
|
|
|
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));
|
|
20
1
|
/*!
|
|
21
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.22-beta.5 Fri Jun 24 2022 15:10:09 GMT+0800 (中国标准时间)
|
|
22
3
|
* (c) 2022 @jdf2e.
|
|
23
4
|
* Released under the MIT License.
|
|
24
5
|
*/
|
|
25
|
-
import { ref, onMounted, watch, computed, resolveComponent, openBlock, createBlock, normalizeStyle, withCtx, createElementVNode, normalizeClass, createElementBlock, renderSlot, Fragment, createTextVNode, toDisplayString, createCommentVNode, resolveDynamicComponent, createVNode, render, h } from "vue";
|
|
26
|
-
import { c as
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import { _ as
|
|
6
|
+
import { ref as e, onMounted as t, watch as o, computed as l, resolveComponent as s, openBlock as n, createBlock as i, normalizeStyle as a, withCtx as c, createElementVNode as r, normalizeClass as p, createElementBlock as d, renderSlot as u, Fragment as y, createTextVNode as f, toDisplayString as h, createCommentVNode as k, resolveDynamicComponent as m, createVNode as v, render as C, h as g } from "vue";
|
|
7
|
+
import { a as O, c as b } from "./component.js";
|
|
8
|
+
import S, { popupProps as _ } from "./Popup.js";
|
|
9
|
+
import w from "./Button.js";
|
|
10
|
+
import { _ as B } from "./plugin-vue_export-helper.js";
|
|
30
11
|
import "../locale/lang";
|
|
31
12
|
import "./OverLay.js";
|
|
32
13
|
import "./Icon.js";
|
|
33
14
|
import "./pxCheck.js";
|
|
34
|
-
const { componentName, create, translate } =
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
[Button.name]: Button
|
|
40
|
-
},
|
|
41
|
-
props: __spreadProps(__spreadValues({}, popupProps), {
|
|
42
|
-
closeOnClickOverlay: {
|
|
43
|
-
type: Boolean,
|
|
44
|
-
default: false
|
|
45
|
-
},
|
|
46
|
-
title: {
|
|
47
|
-
type: String,
|
|
48
|
-
default: ""
|
|
49
|
-
},
|
|
50
|
-
content: {
|
|
51
|
-
type: [String, Object],
|
|
52
|
-
default: ""
|
|
53
|
-
},
|
|
54
|
-
noFooter: {
|
|
55
|
-
type: Boolean,
|
|
56
|
-
default: false
|
|
57
|
-
},
|
|
58
|
-
noOkBtn: {
|
|
59
|
-
type: Boolean,
|
|
60
|
-
default: false
|
|
61
|
-
},
|
|
62
|
-
noCancelBtn: {
|
|
63
|
-
type: Boolean,
|
|
64
|
-
default: false
|
|
65
|
-
},
|
|
66
|
-
cancelText: {
|
|
67
|
-
type: String,
|
|
68
|
-
default: ""
|
|
69
|
-
},
|
|
70
|
-
okText: {
|
|
71
|
-
type: String,
|
|
72
|
-
default: ""
|
|
73
|
-
},
|
|
74
|
-
cancelAutoClose: {
|
|
75
|
-
type: Boolean,
|
|
76
|
-
default: true
|
|
77
|
-
},
|
|
78
|
-
textAlign: {
|
|
79
|
-
type: String,
|
|
80
|
-
default: "center"
|
|
81
|
-
},
|
|
82
|
-
closeOnPopstate: {
|
|
83
|
-
type: Boolean,
|
|
84
|
-
default: false
|
|
85
|
-
},
|
|
86
|
-
footerDirection: {
|
|
87
|
-
type: String,
|
|
88
|
-
default: "horizontal"
|
|
89
|
-
}
|
|
90
|
-
}),
|
|
91
|
-
emits: ["update", "update:visible", "ok", "cancel", "open", "opened", "close", "closed"],
|
|
92
|
-
setup(props, { emit }) {
|
|
93
|
-
const showPopup = ref(props.visible);
|
|
94
|
-
onMounted(() => {
|
|
95
|
-
if (props.closeOnPopstate) {
|
|
96
|
-
window.addEventListener("popstate", function() {
|
|
97
|
-
closed();
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
});
|
|
101
|
-
watch(() => props.visible, (value) => {
|
|
102
|
-
showPopup.value = value;
|
|
103
|
-
});
|
|
104
|
-
const classes = computed(() => {
|
|
105
|
-
return {
|
|
106
|
-
[componentName]: true
|
|
107
|
-
};
|
|
15
|
+
const { componentName: x, create: j, translate: T } = b("dialog"), D = j({ inheritAttrs: false, components: { [S.name]: S, [w.name]: w }, props: { ..._, closeOnClickOverlay: { type: Boolean, default: false }, title: { type: String, default: "" }, content: { type: [String, Object], default: "" }, noFooter: { type: Boolean, default: false }, noOkBtn: { type: Boolean, default: false }, noCancelBtn: { type: Boolean, default: false }, cancelText: { type: String, default: "" }, okText: { type: String, default: "" }, cancelAutoClose: { type: Boolean, default: true }, textAlign: { type: String, default: "center" }, closeOnPopstate: { type: Boolean, default: false }, footerDirection: { type: String, default: "horizontal" }, customClass: { type: String, default: "" }, popStyle: { type: Object }, beforeClose: { type: Function } }, emits: ["update", "update:visible", "ok", "cancel", "opened", "closed"], setup(s2, { emit: n2 }) {
|
|
16
|
+
const i2 = e(s2.visible);
|
|
17
|
+
t(() => {
|
|
18
|
+
s2.closeOnPopstate && window.addEventListener("popstate", function() {
|
|
19
|
+
r2("page");
|
|
108
20
|
});
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
};
|
|
135
|
-
}
|
|
136
|
-
});
|
|
137
|
-
const _hoisted_1 = {
|
|
138
|
-
key: 0,
|
|
139
|
-
class: "nut-dialog__header"
|
|
140
|
-
};
|
|
141
|
-
const _hoisted_2 = ["innerHTML"];
|
|
142
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
143
|
-
const _component_nut_button = resolveComponent("nut-button");
|
|
144
|
-
const _component_nut_popup = resolveComponent("nut-popup");
|
|
145
|
-
return openBlock(), createBlock(_component_nut_popup, {
|
|
146
|
-
teleport: _ctx.teleport,
|
|
147
|
-
visible: _ctx.showPopup,
|
|
148
|
-
"onUpdate:visible": _cache[0] || (_cache[0] = ($event) => _ctx.showPopup = $event),
|
|
149
|
-
"close-on-click-overlay": _ctx.closeOnClickOverlay,
|
|
150
|
-
"lock-scroll": _ctx.lockScroll,
|
|
151
|
-
"pop-class": _ctx.overlayClass,
|
|
152
|
-
style: normalizeStyle(_ctx.overlayStyle),
|
|
153
|
-
round: "",
|
|
154
|
-
onClickOverlay: _ctx.closed,
|
|
155
|
-
onClickCloseIcon: _ctx.closed
|
|
156
|
-
}, {
|
|
157
|
-
default: withCtx(() => [
|
|
158
|
-
createElementVNode("view", {
|
|
159
|
-
class: normalizeClass(_ctx.classes)
|
|
160
|
-
}, [
|
|
161
|
-
_ctx.title ? (openBlock(), createElementBlock("view", _hoisted_1, [
|
|
162
|
-
_ctx.$slots.header ? renderSlot(_ctx.$slots, "header", { key: 0 }) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
163
|
-
createTextVNode(toDisplayString(_ctx.title), 1)
|
|
164
|
-
], 64))
|
|
165
|
-
])) : createCommentVNode("", true),
|
|
166
|
-
createElementVNode("view", {
|
|
167
|
-
class: "nut-dialog__content",
|
|
168
|
-
style: normalizeStyle({ textAlign: _ctx.textAlign })
|
|
169
|
-
}, [
|
|
170
|
-
_ctx.$slots.default ? renderSlot(_ctx.$slots, "default", { key: 0 }) : typeof _ctx.content === "string" ? (openBlock(), createElementBlock("view", {
|
|
171
|
-
key: 1,
|
|
172
|
-
innerHTML: _ctx.content
|
|
173
|
-
}, null, 8, _hoisted_2)) : (openBlock(), createBlock(resolveDynamicComponent(_ctx.content), { key: 2 }))
|
|
174
|
-
], 4),
|
|
175
|
-
!_ctx.noFooter ? (openBlock(), createElementBlock("view", {
|
|
176
|
-
key: 1,
|
|
177
|
-
class: normalizeClass(["nut-dialog__footer", { [_ctx.footerDirection]: _ctx.footerDirection }])
|
|
178
|
-
}, [
|
|
179
|
-
_ctx.$slots.footer ? renderSlot(_ctx.$slots, "footer", { key: 0 }) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
180
|
-
!_ctx.noCancelBtn ? (openBlock(), createBlock(_component_nut_button, {
|
|
181
|
-
key: 0,
|
|
182
|
-
size: "small",
|
|
183
|
-
plain: "",
|
|
184
|
-
type: "primary",
|
|
185
|
-
class: "nut-dialog__footer-cancel",
|
|
186
|
-
onClick: _ctx.onCancel
|
|
187
|
-
}, {
|
|
188
|
-
default: withCtx(() => [
|
|
189
|
-
createTextVNode(toDisplayString(_ctx.cancelText || _ctx.translate("cancel")), 1)
|
|
190
|
-
]),
|
|
191
|
-
_: 1
|
|
192
|
-
}, 8, ["onClick"])) : createCommentVNode("", true),
|
|
193
|
-
!_ctx.noOkBtn ? (openBlock(), createBlock(_component_nut_button, {
|
|
194
|
-
key: 1,
|
|
195
|
-
size: "small",
|
|
196
|
-
type: "primary",
|
|
197
|
-
class: "nut-dialog__footer-ok",
|
|
198
|
-
onClick: _ctx.onOk
|
|
199
|
-
}, {
|
|
200
|
-
default: withCtx(() => [
|
|
201
|
-
createTextVNode(toDisplayString(_ctx.okText || _ctx.translate("confirm")), 1)
|
|
202
|
-
]),
|
|
203
|
-
_: 1
|
|
204
|
-
}, 8, ["onClick"])) : createCommentVNode("", true)
|
|
205
|
-
], 64))
|
|
206
|
-
], 2)) : createCommentVNode("", true)
|
|
207
|
-
], 2)
|
|
208
|
-
]),
|
|
209
|
-
_: 3
|
|
210
|
-
}, 8, ["teleport", "visible", "close-on-click-overlay", "lock-scroll", "pop-class", "style", "onClickOverlay", "onClickCloseIcon"]);
|
|
211
|
-
}
|
|
212
|
-
var Dialog = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
213
|
-
class DialogOptions {
|
|
21
|
+
}), o(() => s2.visible, (e2) => {
|
|
22
|
+
i2.value = e2, e2 && n2("opened");
|
|
23
|
+
});
|
|
24
|
+
const a2 = l(() => ({ [x]: true, [s2.customClass]: true })), c2 = (e2) => {
|
|
25
|
+
n2("update", e2), n2("update:visible", e2);
|
|
26
|
+
}, r2 = (e2) => {
|
|
27
|
+
if (s2.beforeClose) {
|
|
28
|
+
const t2 = s2.beforeClose(e2);
|
|
29
|
+
O(t2) && t2.then((e3) => {
|
|
30
|
+
e3 && (c2(false), n2("closed"));
|
|
31
|
+
});
|
|
32
|
+
} else
|
|
33
|
+
c2(false), n2("closed");
|
|
34
|
+
};
|
|
35
|
+
return { closed: r2, classes: a2, onCancel: () => {
|
|
36
|
+
n2("cancel"), s2.cancelAutoClose && r2("cancel");
|
|
37
|
+
}, onOk: () => {
|
|
38
|
+
n2("ok"), r2("ok");
|
|
39
|
+
}, showPopup: i2, translate: T };
|
|
40
|
+
} }), P = { key: 0, class: "nut-dialog__header" }, $ = ["innerHTML"];
|
|
41
|
+
var A = B(D, [["render", function(e2, t2, o2, l2, v2, C2) {
|
|
42
|
+
const g2 = s("nut-button"), O2 = s("nut-popup");
|
|
43
|
+
return n(), i(O2, { teleport: e2.teleport, visible: e2.showPopup, "onUpdate:visible": t2[0] || (t2[0] = (t3) => e2.showPopup = t3), "close-on-click-overlay": e2.closeOnClickOverlay, "lock-scroll": e2.lockScroll, "pop-class": e2.popClass, style: a(e2.popStyle), "overlay-class": e2.overlayClass, "overlay-style": e2.overlayStyle, round: "", onClickOverlay: e2.closed, onClickCloseIcon: e2.closed }, { default: c(() => [r("view", { class: p(e2.classes) }, [e2.title ? (n(), d("view", P, [e2.$slots.header ? u(e2.$slots, "header", { key: 0 }) : (n(), d(y, { key: 1 }, [f(h(e2.title), 1)], 64))])) : k("", true), r("view", { class: "nut-dialog__content", style: a({ textAlign: e2.textAlign }) }, [e2.$slots.default ? u(e2.$slots, "default", { key: 0 }) : typeof e2.content == "string" ? (n(), d("view", { key: 1, innerHTML: e2.content }, null, 8, $)) : (n(), i(m(e2.content), { key: 2 }))], 4), e2.noFooter ? k("", true) : (n(), d("view", { key: 1, class: p(["nut-dialog__footer", { [e2.footerDirection]: e2.footerDirection }]) }, [e2.$slots.footer ? u(e2.$slots, "footer", { key: 0 }) : (n(), d(y, { key: 1 }, [e2.noCancelBtn ? k("", true) : (n(), i(g2, { key: 0, size: "small", plain: "", type: "primary", class: "nut-dialog__footer-cancel", onClick: e2.onCancel }, { default: c(() => [f(h(e2.cancelText || e2.translate("cancel")), 1)]), _: 1 }, 8, ["onClick"])), e2.noOkBtn ? k("", true) : (n(), i(g2, { key: 1, size: "small", type: "primary", class: "nut-dialog__footer-ok", onClick: e2.onOk }, { default: c(() => [f(h(e2.okText || e2.translate("confirm")), 1)]), _: 1 }, 8, ["onClick"]))], 64))], 2))], 2)]), _: 3 }, 8, ["teleport", "visible", "close-on-click-overlay", "lock-scroll", "pop-class", "style", "overlay-class", "overlay-style", "onClickOverlay", "onClickCloseIcon"]);
|
|
44
|
+
}]]);
|
|
45
|
+
class z {
|
|
214
46
|
constructor() {
|
|
215
|
-
this.title = ""
|
|
216
|
-
this.
|
|
217
|
-
this.
|
|
218
|
-
this.
|
|
219
|
-
this.
|
|
220
|
-
this.
|
|
221
|
-
this.id = new Date().getTime();
|
|
222
|
-
this.footerDirection = "horizontal";
|
|
223
|
-
this.onUpdate = (value) => {
|
|
224
|
-
};
|
|
225
|
-
this.onOk = () => {
|
|
226
|
-
};
|
|
227
|
-
this.onCancel = () => {
|
|
228
|
-
};
|
|
229
|
-
this.onClose = () => {
|
|
230
|
-
};
|
|
231
|
-
this.onClosed = () => {
|
|
232
|
-
};
|
|
233
|
-
this.visible = true;
|
|
234
|
-
this.noFooter = false;
|
|
235
|
-
this.noOkBtn = false;
|
|
236
|
-
this.noCancelBtn = false;
|
|
237
|
-
this.okBtnDisabled = false;
|
|
238
|
-
this.closeOnPopstate = false;
|
|
239
|
-
this.lockScroll = false;
|
|
47
|
+
this.title = "", this.content = "", this.cancelText = "", this.okText = "", this.textAlign = "center", this.customClass = "", this.overlayStyle = {}, this.overlayClass = "", this.popStyle = {}, this.popClass = "", this.teleport = "body", this.id = new Date().getTime(), this.footerDirection = "horizontal", this.onUpdate = (e2) => {
|
|
48
|
+
}, this.onOk = () => {
|
|
49
|
+
}, this.onCancel = () => {
|
|
50
|
+
}, this.onOpened = () => {
|
|
51
|
+
}, this.onClosed = () => {
|
|
52
|
+
}, this.visible = true, this.noFooter = false, this.noOkBtn = false, this.noCancelBtn = false, this.okBtnDisabled = false, this.closeOnPopstate = false, this.lockScroll = false;
|
|
240
53
|
}
|
|
241
54
|
}
|
|
242
|
-
class
|
|
243
|
-
constructor(
|
|
244
|
-
this.options = new
|
|
245
|
-
this.
|
|
246
|
-
}
|
|
247
|
-
this.setDefaultOptions = (options2) => {
|
|
248
|
-
};
|
|
249
|
-
this.resetDefaultOptions = () => {
|
|
250
|
-
};
|
|
251
|
-
let options = Object.assign(this.options, _options);
|
|
252
|
-
let elWarp = document.body;
|
|
253
|
-
let teleport = options.teleport;
|
|
254
|
-
if (teleport != "body") {
|
|
255
|
-
if (typeof teleport == "string") {
|
|
256
|
-
elWarp = document.querySelector(teleport);
|
|
257
|
-
} else {
|
|
258
|
-
elWarp = options.teleport;
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
const root = document.createElement("view");
|
|
262
|
-
root.id = "dialog-" + options.id;
|
|
263
|
-
const Wrapper = {
|
|
264
|
-
setup() {
|
|
265
|
-
options.onUpdate = (val) => {
|
|
266
|
-
if (val == false) {
|
|
267
|
-
elWarp.removeChild(root);
|
|
268
|
-
}
|
|
269
|
-
};
|
|
270
|
-
options.teleport = `#${root.id}`;
|
|
271
|
-
return () => {
|
|
272
|
-
return h(Dialog, options);
|
|
273
|
-
};
|
|
274
|
-
}
|
|
55
|
+
class F {
|
|
56
|
+
constructor(e2) {
|
|
57
|
+
this.options = new z(), this.close = () => {
|
|
58
|
+
}, this.setDefaultOptions = (e3) => {
|
|
59
|
+
}, this.resetDefaultOptions = () => {
|
|
275
60
|
};
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
61
|
+
let t2 = Object.assign(this.options, e2), o2 = document.body, l2 = t2.teleport;
|
|
62
|
+
l2 != "body" && (o2 = typeof l2 == "string" ? document.querySelector(l2) : t2.teleport);
|
|
63
|
+
const s2 = document.createElement("view");
|
|
64
|
+
s2.id = "dialog-" + t2.id;
|
|
65
|
+
const n2 = { setup: () => (t2.onUpdate = (e3) => {
|
|
66
|
+
e3 == 0 && o2.removeChild(s2);
|
|
67
|
+
}, (t2 == null ? void 0 : t2.onOpened) && (t2 == null ? void 0 : t2.onOpened()), t2.teleport = `#${s2.id}`, () => g(A, t2)) };
|
|
68
|
+
this.instance = v(n2), o2.appendChild(s2), C(this.instance, s2);
|
|
279
69
|
}
|
|
280
70
|
}
|
|
281
|
-
const
|
|
282
|
-
return new
|
|
71
|
+
const L = function(e2) {
|
|
72
|
+
return new F(e2);
|
|
283
73
|
};
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
app.config.globalProperties.$dialog = _Dialog;
|
|
74
|
+
L.install = (e2) => {
|
|
75
|
+
e2.use(A), e2.config.globalProperties.$dialog = L;
|
|
287
76
|
};
|
|
288
|
-
export { Dialog, DialogOptions,
|
|
77
|
+
export { A as Dialog, z as DialogOptions, L as default };
|
|
@@ -1,87 +1,18 @@
|
|
|
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));
|
|
20
1
|
/*!
|
|
21
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.22-beta.5 Fri Jun 24 2022 15:10:09 GMT+0800 (中国标准时间)
|
|
22
3
|
* (c) 2022 @jdf2e.
|
|
23
4
|
* Released under the MIT License.
|
|
24
5
|
*/
|
|
25
|
-
import { computed, openBlock, createElementBlock, normalizeClass, renderSlot } from "vue";
|
|
26
|
-
import { c as
|
|
27
|
-
import { _ as
|
|
6
|
+
import { computed as e, openBlock as t, createElementBlock as o, normalizeClass as n, renderSlot as i } from "vue";
|
|
7
|
+
import { c as r } from "./component.js";
|
|
8
|
+
import { _ as l } from "./plugin-vue_export-helper.js";
|
|
28
9
|
import "../locale/lang";
|
|
29
|
-
const { componentName, create } =
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
default: false
|
|
39
|
-
},
|
|
40
|
-
hairline: {
|
|
41
|
-
type: Boolean,
|
|
42
|
-
default: true
|
|
43
|
-
},
|
|
44
|
-
direction: {
|
|
45
|
-
type: String,
|
|
46
|
-
default: "horizontal"
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
components: {},
|
|
50
|
-
setup(props, context) {
|
|
51
|
-
const classes = computed(() => {
|
|
52
|
-
const prefixCls = componentName;
|
|
53
|
-
let defaultClassesObj = {
|
|
54
|
-
[prefixCls]: true
|
|
55
|
-
};
|
|
56
|
-
let classesObj = {};
|
|
57
|
-
if (props.direction === "horizontal") {
|
|
58
|
-
classesObj = __spreadProps(__spreadValues({}, defaultClassesObj), {
|
|
59
|
-
[`${prefixCls}-center`]: context.slots.default,
|
|
60
|
-
[`${prefixCls}-left`]: props.contentPosition === "left",
|
|
61
|
-
[`${prefixCls}-right`]: props.contentPosition === "right",
|
|
62
|
-
[`${prefixCls}-dashed`]: props.dashed,
|
|
63
|
-
[`${prefixCls}-hairline`]: props.hairline
|
|
64
|
-
});
|
|
65
|
-
} else {
|
|
66
|
-
classesObj = __spreadProps(__spreadValues({}, defaultClassesObj), {
|
|
67
|
-
[`${prefixCls}-vertical`]: props.direction === "vertical"
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
return classesObj;
|
|
71
|
-
});
|
|
72
|
-
return { classes };
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
76
|
-
return _ctx.direction === "horizontal" ? (openBlock(), createElementBlock("view", {
|
|
77
|
-
key: 0,
|
|
78
|
-
class: normalizeClass(_ctx.classes)
|
|
79
|
-
}, [
|
|
80
|
-
renderSlot(_ctx.$slots, "default")
|
|
81
|
-
], 2)) : (openBlock(), createElementBlock("view", {
|
|
82
|
-
key: 1,
|
|
83
|
-
class: normalizeClass(_ctx.classes)
|
|
84
|
-
}, null, 2));
|
|
85
|
-
}
|
|
86
|
-
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
87
|
-
export { index as default };
|
|
10
|
+
const { componentName: a, create: s } = r("divider");
|
|
11
|
+
var c = l(s({ props: { contentPosition: { type: String, default: "center" }, dashed: { type: Boolean, default: false }, hairline: { type: Boolean, default: true }, direction: { type: String, default: "horizontal" } }, components: {}, setup: (t2, o2) => ({ classes: e(() => {
|
|
12
|
+
const e2 = a;
|
|
13
|
+
let n2 = { [e2]: true }, i2 = {};
|
|
14
|
+
return i2 = t2.direction === "horizontal" ? { ...n2, [`${e2}-center`]: o2.slots.default, [`${e2}-left`]: t2.contentPosition === "left", [`${e2}-right`]: t2.contentPosition === "right", [`${e2}-dashed`]: t2.dashed, [`${e2}-hairline`]: t2.hairline } : { ...n2, [`${e2}-vertical`]: t2.direction === "vertical" }, i2;
|
|
15
|
+
}) }) }), [["render", function(e2, r2, l2, a2, s2, c2) {
|
|
16
|
+
return e2.direction === "horizontal" ? (t(), o("view", { key: 0, class: n(e2.classes) }, [i(e2.$slots, "default")], 2)) : (t(), o("view", { key: 1, class: n(e2.classes) }, null, 2));
|
|
17
|
+
}]]);
|
|
18
|
+
export { c as default };
|