@nutui/nutui 4.0.0 → 4.0.1-2.beta-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +226 -0
- package/README.md +34 -65
- package/dist/nutui.es.js +10 -17
- package/dist/nutui.js +16202 -0
- package/dist/nutui.umd.js +1 -7
- package/dist/packages/_es/ActionSheet.js +79 -94
- package/dist/packages/_es/Address.js +260 -345
- package/dist/packages/_es/AddressList.js +269 -354
- package/dist/packages/_es/Animate.js +46 -38
- package/dist/packages/_es/Audio.js +128 -180
- package/dist/packages/_es/AudioOperate.js +60 -52
- package/dist/packages/_es/Avatar.js +67 -75
- package/dist/packages/_es/AvatarGroup.js +23 -31
- package/dist/packages/_es/Backtop.js +59 -99
- package/dist/packages/_es/Badge.js +39 -46
- package/dist/packages/_es/Barrage.js +68 -145
- package/dist/packages/_es/Button.js +47 -66
- package/dist/packages/_es/Calendar.js +135 -152
- package/dist/packages/_es/CalendarItem.js +6 -6
- package/dist/packages/_es/Card.js +42 -56
- package/dist/packages/_es/Cascader.js +323 -433
- package/dist/packages/_es/Category.js +29 -39
- package/dist/packages/_es/CategoryPane.js +57 -83
- package/dist/packages/_es/Cell.js +56 -71
- package/dist/packages/_es/CellGroup.js +19 -27
- package/dist/packages/_es/Checkbox.js +109 -138
- package/dist/packages/_es/CheckboxGroup.js +38 -61
- package/dist/packages/_es/CircleProgress.js +67 -96
- package/dist/packages/_es/Col.js +23 -31
- package/dist/packages/_es/Collapse.js +37 -67
- package/dist/packages/_es/CollapseItem.js +91 -184
- package/dist/packages/_es/Comment.js +207 -279
- package/dist/packages/_es/ConfigProvider.js +38 -56
- package/dist/packages/_es/Countdown.js +100 -194
- package/dist/packages/_es/Countup.js +232 -428
- package/dist/packages/_es/DatePicker.js +169 -245
- package/dist/packages/_es/Dialog.js +163 -188
- package/dist/packages/_es/Divider.js +42 -40
- package/dist/packages/_es/Drag.js +70 -153
- package/dist/packages/_es/Ecard.js +64 -104
- package/dist/packages/_es/Elevator.js +144 -201
- package/dist/packages/_es/Ellipsis.js +95 -159
- package/dist/packages/_es/Empty.js +23 -39
- package/dist/packages/_es/FixedNav.js +93 -116
- package/dist/packages/_es/Form.js +108 -164
- package/dist/packages/_es/FormItem.js +48 -61
- package/dist/packages/_es/Grid.js +5 -6
- package/dist/packages/_es/GridItem.js +58 -84
- package/dist/packages/_es/Image.js +98 -88
- package/dist/packages/_es/ImagePreview.js +262 -392
- package/dist/packages/_es/Indicator.js +30 -34
- package/dist/packages/_es/InfiniteLoading.js +83 -117
- package/dist/packages/_es/Input.js +176 -223
- package/dist/packages/_es/InputNumber.js +81 -117
- package/dist/packages/_es/Interceptor-6e26b757.js +18 -0
- package/dist/packages/_es/Invoice.js +105 -113
- package/dist/packages/_es/Layout.js +3 -4
- package/dist/packages/_es/List.js +147 -89
- package/dist/packages/_es/Menu.js +96 -152
- package/dist/packages/_es/MenuItem.js +117 -153
- package/dist/packages/_es/Navbar.js +103 -119
- package/dist/packages/_es/Noticebar.js +207 -273
- package/dist/packages/_es/Notify.js +110 -147
- package/dist/packages/_es/NumberKeyboard.js +127 -202
- package/dist/packages/_es/Overlay.js +53 -66
- package/dist/packages/_es/Pagination.js +70 -100
- package/dist/packages/_es/Picker.js +276 -425
- package/dist/packages/_es/Popover.js +122 -225
- package/dist/packages/_es/Popup.js +4 -4
- package/dist/packages/_es/Price.js +47 -80
- package/dist/packages/_es/Progress.js +63 -79
- package/dist/packages/_es/PullRefresh.js +96 -157
- package/dist/packages/_es/Radio.js +4 -4
- package/dist/packages/_es/RadioGroup.js +3 -3
- package/dist/packages/_es/Range.js +205 -329
- package/dist/packages/_es/Rate.js +93 -122
- package/dist/packages/_es/Row.js +21 -27
- package/dist/packages/_es/Searchbar.js +130 -160
- package/dist/packages/_es/ShortPassword.js +69 -93
- package/dist/packages/_es/SideNavbar.js +49 -59
- package/dist/packages/_es/SideNavbarItem.js +22 -32
- package/dist/packages/_es/Signature.js +83 -128
- package/dist/packages/_es/Skeleton.js +110 -130
- package/dist/packages/_es/Sku.js +251 -326
- package/dist/packages/_es/Step.js +60 -69
- package/dist/packages/_es/Steps.js +26 -31
- package/dist/packages/_es/Sticky.js +4 -4
- package/dist/packages/_es/SubSideNavbar.js +52 -56
- package/dist/packages/_es/Swipe.js +84 -137
- package/dist/packages/_es/Swiper.js +175 -310
- package/dist/packages/_es/SwiperItem.js +28 -44
- package/dist/packages/_es/Switch.js +55 -67
- package/dist/packages/_es/TabPane.js +32 -20
- package/dist/packages/_es/Tabbar.js +41 -52
- package/dist/packages/_es/TabbarItem.js +61 -81
- package/dist/packages/_es/Table.js +110 -148
- package/dist/packages/_es/Tabs.js +284 -205
- package/dist/packages/_es/Tag.js +44 -61
- package/dist/packages/_es/Textarea.js +80 -124
- package/dist/packages/_es/TimeDetail.js +49 -57
- package/dist/packages/_es/TimePannel.js +35 -31
- package/dist/packages/_es/TimeSelect.js +47 -68
- package/dist/packages/_es/Toast.js +150 -203
- package/dist/packages/_es/Tour.js +139 -175
- package/dist/packages/_es/TrendArrow.js +57 -58
- package/dist/packages/_es/Uploader.js +235 -359
- package/dist/packages/_es/Video.js +191 -298
- package/dist/packages/_es/Watermark.js +84 -98
- package/dist/packages/_es/_plugin-vue_export-helper-dad06003.js +9 -0
- package/dist/packages/_es/common-d218746f.js +116 -0
- package/dist/packages/_es/component-234624bc.js +89 -0
- package/dist/packages/_es/index-14dfadc4.js +561 -0
- package/dist/packages/_es/index-192a3ef6.js +29 -0
- package/dist/packages/_es/index-360c5092.js +210 -0
- package/dist/packages/_es/index-496e6e05.js +24 -0
- package/dist/packages/_es/index-50eed3d9.js +7 -0
- package/dist/packages/_es/index-53ec2d4d.js +34 -0
- package/dist/packages/_es/index-fadb0974.js +8 -0
- package/dist/packages/_es/index.vue_vue_type_script_lang-1139b29a.js +43 -0
- package/dist/packages/_es/index.vue_vue_type_script_lang-43b774dd.js +77 -0
- package/dist/packages/_es/index.vue_vue_type_script_lang-f44c159d.js +110 -0
- package/dist/packages/_es/mountComponent-6d4ff200.js +23 -0
- package/dist/packages/_es/pxCheck-38173291.js +4 -0
- package/dist/packages/_es/raf-a74f1a06.js +16 -0
- package/dist/packages/_es/renderIcon-47498b32.js +5 -0
- package/dist/packages/actionsheet/index.scss +2 -0
- package/dist/packages/actionsheet/style.mjs +0 -2
- package/dist/packages/address/index.scss +5 -2
- package/dist/packages/address/style.mjs +0 -3
- package/dist/packages/addresslist/index.scss +3 -0
- package/dist/packages/addresslist/style.mjs +0 -2
- package/dist/packages/audio/index.scss +2 -0
- package/dist/packages/audio/style.mjs +0 -1
- package/dist/packages/audiooperate/index.scss +2 -0
- package/dist/packages/audiooperate/style.mjs +0 -1
- package/dist/packages/badge/index.scss +3 -0
- package/dist/packages/button/index.scss +1 -1
- package/dist/packages/calendar/index.scss +3 -0
- package/dist/packages/calendar/style.mjs +0 -3
- package/dist/packages/card/index.scss +3 -0
- package/dist/packages/card/style.mjs +0 -2
- package/dist/packages/cascader/index.scss +4 -0
- package/dist/packages/cascader/style.mjs +0 -5
- package/dist/packages/cellgroup/index.scss +1 -1
- package/dist/packages/checkbox/index.scss +41 -0
- package/dist/packages/col/index.scss +2 -2
- package/dist/packages/comment/index.scss +2 -0
- package/dist/packages/comment/style.mjs +0 -1
- package/dist/packages/datepicker/index.scss +1 -2
- package/dist/packages/datepicker/style.mjs +0 -3
- package/dist/packages/dialog/index.scss +11 -0
- package/dist/packages/dialog/style.mjs +0 -3
- package/dist/packages/ecard/index.scss +2 -0
- package/dist/packages/ecard/style.mjs +0 -1
- package/dist/packages/fixednav/index.scss +2 -0
- package/dist/packages/fixednav/style.mjs +0 -1
- package/dist/packages/form/index.scss +1 -2
- package/dist/packages/form/style.mjs +0 -1
- package/dist/packages/formitem/index.scss +3 -0
- package/dist/packages/formitem/style.mjs +0 -1
- package/dist/packages/imagepreview/index.scss +5 -5
- package/dist/packages/imagepreview/style.mjs +0 -5
- package/dist/packages/input/index.scss +13 -13
- package/dist/packages/invoice/index.scss +6 -0
- package/dist/packages/invoice/style.mjs +0 -7
- package/dist/packages/list/index.scss +8 -8
- package/dist/packages/menuitem/index.scss +9 -10
- package/dist/packages/menuitem/style.mjs +0 -2
- package/dist/packages/navbar/index.scss +0 -1
- package/dist/packages/noticebar/index.scss +12 -2
- package/dist/packages/notify/index.scss +2 -0
- package/dist/packages/notify/style.mjs +0 -2
- package/dist/packages/numberkeyboard/index.scss +2 -0
- package/dist/packages/numberkeyboard/style.mjs +0 -2
- package/dist/packages/picker/index.scss +4 -9
- package/dist/packages/picker/style.mjs +0 -2
- package/dist/packages/popover/index.scss +2 -0
- package/dist/packages/popover/style.mjs +0 -2
- package/dist/packages/popup/index.scss +2 -0
- package/dist/packages/popup/style.mjs +0 -1
- package/dist/packages/price/index.scss +5 -10
- package/dist/packages/rate/index.scss +6 -9
- package/dist/packages/searchbar/index.scss +4 -0
- package/dist/packages/shortpassword/index.scss +18 -0
- package/dist/packages/shortpassword/style.mjs +0 -2
- package/dist/packages/signature/index.scss +2 -0
- package/dist/packages/signature/style.mjs +0 -1
- package/dist/packages/skeleton/index.scss +2 -0
- package/dist/packages/skeleton/style.mjs +0 -1
- package/dist/packages/sku/index.scss +4 -0
- package/dist/packages/sku/style.mjs +0 -4
- package/dist/packages/tabbaritem/index.scss +2 -0
- package/dist/packages/tabbaritem/style.mjs +0 -1
- package/dist/packages/tabs/index.scss +36 -2
- package/dist/packages/tabs/style.mjs +0 -1
- package/dist/packages/textarea/index.scss +2 -0
- package/dist/packages/timeselect/index.scss +2 -0
- package/dist/packages/timeselect/style.mjs +0 -2
- package/dist/packages/tour/index.scss +2 -0
- package/dist/packages/tour/style.mjs +0 -3
- package/dist/packages/uploader/index.scss +10 -2
- package/dist/packages/uploader/style.mjs +0 -2
- package/dist/resolver/index.d.ts +6 -0
- package/dist/resolver/index.js +1 -0
- package/dist/resolver/index.mjs +24 -0
- package/dist/resolver/package.json +20 -0
- package/dist/smartips/web-types.json +114 -15
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +155 -52
- package/dist/styles/themes/jdb.scss +155 -52
- package/dist/styles/themes/jddkh.scss +155 -52
- package/dist/styles/themes/jdt.scss +155 -52
- package/dist/styles/variables-jdb.scss +9 -1
- package/dist/styles/variables-jddkh.scss +9 -1
- package/dist/styles/variables-jdt.scss +9 -1
- package/dist/styles/variables.scss +8 -0
- package/dist/types/__VUE/address/index.vue.d.ts +2 -1
- package/dist/types/__VUE/addresslist/components/GeneralShell.vue.d.ts +1 -1
- package/dist/types/__VUE/addresslist/components/ItemContents.vue.d.ts +1 -1
- package/dist/types/__VUE/addresslist/index.vue.d.ts +1 -1
- package/dist/types/__VUE/animate/index.vue.d.ts +6 -0
- package/dist/types/__VUE/audiooperate/index.vue.d.ts +4 -4
- package/dist/types/__VUE/badge/index.vue.d.ts +9 -0
- package/dist/types/__VUE/button/type.d.ts +1 -0
- package/dist/types/__VUE/calendaritem/type.d.ts +1 -0
- package/dist/types/__VUE/collapse/index.vue.d.ts +31 -5
- package/dist/types/__VUE/collapseitem/index.vue.d.ts +117 -11
- package/dist/types/__VUE/configprovider/index.vue.d.ts +2 -2
- package/dist/types/__VUE/datepicker/index.vue.d.ts +1 -1
- package/dist/types/__VUE/dialog/index.d.ts +1 -0
- package/dist/types/__VUE/dialog/index.vue.d.ts +1 -0
- package/dist/types/__VUE/grid/index.vue.d.ts +1 -1
- package/dist/types/__VUE/image/index.vue.d.ts +14 -3
- package/dist/types/__VUE/imagepreview/imagePreviewItem.vue.d.ts +9 -0
- package/dist/types/__VUE/imagepreview/index.vue.d.ts +1 -1
- package/dist/types/__VUE/input/index.vue.d.ts +27 -2
- package/dist/types/__VUE/list/index.vue.d.ts +42 -13
- package/dist/types/__VUE/list/type.d.ts +13 -0
- package/dist/types/__VUE/menu/index.vue.d.ts +0 -2
- package/dist/types/__VUE/menuitem/index.vue.d.ts +9 -17
- package/dist/types/__VUE/navbar/index.vue.d.ts +1 -1
- package/dist/types/__VUE/noticebar/index.vue.d.ts +5 -2
- package/dist/types/__VUE/picker/common.d.ts +2 -0
- package/dist/types/__VUE/picker/usePicker.d.ts +1 -1
- package/dist/types/__VUE/price/index.vue.d.ts +9 -0
- package/dist/types/__VUE/rate/index.vue.d.ts +110 -3
- package/dist/types/__VUE/row/index.vue.d.ts +1 -1
- package/dist/types/__VUE/searchbar/index.vue.d.ts +121 -5
- package/dist/types/__VUE/skeleton/index.vue.d.ts +2 -2
- package/dist/types/__VUE/swiper/index.vue.d.ts +9 -2
- package/dist/types/__VUE/switch/index.vue.d.ts +1 -0
- package/dist/types/__VUE/table/common.d.ts +55 -2
- package/dist/types/__VUE/tabpane/index.vue.d.ts +1 -4
- package/dist/types/__VUE/tabs/hooks.d.ts +12 -0
- package/dist/types/__VUE/tabs/index.vue.d.ts +35 -5
- package/dist/types/__VUE/tabs/types.d.ts +12 -0
- package/dist/types/__VUE/timeselect/index.vue.d.ts +1 -1
- package/dist/types/__VUE/toast/index.vue.d.ts +11 -4
- package/dist/types/__VUE/uploader/type.d.ts +2 -1
- package/dist/types/__VUE/watermark/index.vue.d.ts +1 -1
- package/dist/types/index.d.ts +1 -2
- package/dist/types/resolver/index.d.ts +6 -0
- package/dist/types/utils/date.d.ts +4 -0
- package/dist/types/utils/useTaroRect/index.d.ts +1 -1
- package/dist/types/utils/util.d.ts +1 -1
- package/package.json +13 -6
- package/dist/packages/_es/_plugin-vue_export-helper-cc2b3d55.js +0 -10
- package/dist/packages/_es/common-b9a5e726.js +0 -145
- package/dist/packages/_es/component-81a4c1d0.js +0 -145
- package/dist/packages/_es/index-29892cda.js +0 -33
- package/dist/packages/_es/index-2ae3ae87.js +0 -846
- package/dist/packages/_es/index-43c34ac6.js +0 -30
- package/dist/packages/_es/index-54d03fc1.js +0 -8
- package/dist/packages/_es/index-79c5dc33.js +0 -10
- package/dist/packages/_es/index-7a7385e4.js +0 -67
- package/dist/packages/_es/index-991c279f.js +0 -244
- package/dist/packages/_es/index.vue_vue_type_script_lang-22dfc112.js +0 -46
- package/dist/packages/_es/index.vue_vue_type_script_lang-442e4704.js +0 -98
- package/dist/packages/_es/index.vue_vue_type_script_lang-cc5c4086.js +0 -151
- package/dist/packages/_es/interceptor-956b24fc.js +0 -29
- package/dist/packages/_es/mountComponent-1ece4110.js +0 -39
- package/dist/packages/_es/pxCheck-c6b9f6b7.js +0 -6
- package/dist/packages/_es/raf-729dad54.js +0 -25
- package/dist/packages/_es/renderIcon-3d0fd47c.js +0 -9
- /package/dist/types/utils/{interceptor.d.ts → Interceptor.d.ts} +0 -0
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { ref, computed, watch, resolveComponent, openBlock, createElementBlock, createVNode, withCtx
|
|
2
|
-
import { c as
|
|
3
|
-
import { P as
|
|
4
|
-
import { _ as
|
|
1
|
+
import { ref as k, computed as E, watch as B, resolveComponent as A, openBlock as u, createElementBlock as r, createVNode as S, withCtx as $, createElementVNode as i, toDisplayString as p, createCommentVNode as a, Fragment as T, renderList as L, normalizeClass as m, createTextVNode as N } from "vue";
|
|
2
|
+
import { c as j } from "./component-234624bc.js";
|
|
3
|
+
import { P as _ } from "./index-360c5092.js";
|
|
4
|
+
import { _ as I } from "./_plugin-vue_export-helper-dad06003.js";
|
|
5
5
|
import "../locale/lang";
|
|
6
6
|
import "./Overlay.js";
|
|
7
7
|
import "@nutui/icons-vue";
|
|
8
|
-
const { create, translate } =
|
|
9
|
-
const _sfc_main = create({
|
|
8
|
+
const { create: M, translate: P } = j("number-keyboard"), D = M({
|
|
10
9
|
components: {
|
|
11
|
-
[
|
|
10
|
+
[_.name]: _
|
|
12
11
|
},
|
|
13
12
|
props: {
|
|
14
13
|
confirmText: {
|
|
@@ -21,7 +20,7 @@ const _sfc_main = create({
|
|
|
21
20
|
},
|
|
22
21
|
visible: {
|
|
23
22
|
type: Boolean,
|
|
24
|
-
default:
|
|
23
|
+
default: !1
|
|
25
24
|
},
|
|
26
25
|
type: {
|
|
27
26
|
type: String,
|
|
@@ -41,7 +40,7 @@ const _sfc_main = create({
|
|
|
41
40
|
},
|
|
42
41
|
randomKeys: {
|
|
43
42
|
type: Boolean,
|
|
44
|
-
default:
|
|
43
|
+
default: !1
|
|
45
44
|
},
|
|
46
45
|
popClass: {
|
|
47
46
|
type: String,
|
|
@@ -49,231 +48,157 @@ const _sfc_main = create({
|
|
|
49
48
|
}
|
|
50
49
|
},
|
|
51
50
|
emits: ["input", "delete", "close", "blur", "update:modelValue", "update:visible"],
|
|
52
|
-
setup(
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
const { customKey } = props;
|
|
58
|
-
let object = {
|
|
51
|
+
setup(e, { emit: o }) {
|
|
52
|
+
const c = k(void 0), f = k(e.visible), h = k();
|
|
53
|
+
function b() {
|
|
54
|
+
const { customKey: t } = e;
|
|
55
|
+
let l = {
|
|
59
56
|
id: "lock",
|
|
60
57
|
type: "lock"
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
type: "custom"
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
return [...getBasicKeys(), object, { id: 0, type: "number" }, { id: "delete", type: "delete" }];
|
|
58
|
+
}, s = Array.isArray(t) ? t : [t];
|
|
59
|
+
return s.length === 1 && (l = {
|
|
60
|
+
id: s[0],
|
|
61
|
+
type: "custom"
|
|
62
|
+
}), [...y(), l, { id: 0, type: "number" }, { id: "delete", type: "delete" }];
|
|
70
63
|
}
|
|
71
|
-
function
|
|
72
|
-
const
|
|
73
|
-
for (let
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
if (props.randomKeys) {
|
|
77
|
-
return keys.sort(() => Math.random() > 0.5 ? 1 : -1);
|
|
78
|
-
}
|
|
79
|
-
return keys;
|
|
64
|
+
function y() {
|
|
65
|
+
const t = [];
|
|
66
|
+
for (let l = 1; l <= 9; l++)
|
|
67
|
+
t.push({ id: l, type: "number" });
|
|
68
|
+
return e.randomKeys ? t.sort(() => Math.random() > 0.5 ? 1 : -1) : t;
|
|
80
69
|
}
|
|
81
|
-
function
|
|
82
|
-
const
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
customKeys = [customKeys[0]];
|
|
90
|
-
}
|
|
91
|
-
if (customKeys.length === 1) {
|
|
92
|
-
if (props.title && props.type != "rightColumn") {
|
|
93
|
-
keys.push({ id: customKeys[0], type: "custom" }, { id: 0, type: "number" }, { id: "delete", type: "delete" });
|
|
94
|
-
} else {
|
|
95
|
-
keys.push({ id: 0, type: "number" }, { id: customKeys[0], type: "custom" });
|
|
96
|
-
}
|
|
97
|
-
} else if (customKeys.length === 2) {
|
|
98
|
-
keys.push(
|
|
99
|
-
{ id: customKeys[0], type: "custom" },
|
|
100
|
-
{ id: 0, type: "number" },
|
|
101
|
-
{ id: customKeys[1], type: "custom" }
|
|
102
|
-
);
|
|
103
|
-
}
|
|
104
|
-
return keys;
|
|
70
|
+
function n() {
|
|
71
|
+
const t = y(), { customKey: l } = e;
|
|
72
|
+
let s = Array.isArray(l) ? l : [l];
|
|
73
|
+
return s.length > 2 && (s = [s[0], s[1]]), s.length == 2 && e.title && e.type != "rightColumn" && (s = [s[0]]), s.length === 1 ? e.title && e.type != "rightColumn" ? t.push({ id: s[0], type: "custom" }, { id: 0, type: "number" }, { id: "delete", type: "delete" }) : t.push({ id: 0, type: "number" }, { id: s[0], type: "custom" }) : s.length === 2 && t.push(
|
|
74
|
+
{ id: s[0], type: "custom" },
|
|
75
|
+
{ id: 0, type: "number" },
|
|
76
|
+
{ id: s[1], type: "custom" }
|
|
77
|
+
), t;
|
|
105
78
|
}
|
|
106
|
-
const
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
});
|
|
112
|
-
const onBlur = () => {
|
|
113
|
-
if (props.visible) {
|
|
114
|
-
emit("blur");
|
|
115
|
-
}
|
|
116
|
-
};
|
|
117
|
-
const clickAway = (event) => {
|
|
118
|
-
const element = root.value;
|
|
119
|
-
let el = element && !element.contains(event.target);
|
|
120
|
-
if (el) {
|
|
121
|
-
onBlur();
|
|
122
|
-
}
|
|
79
|
+
const d = E(() => e.type == "rightColumn" || e.title != "" ? n() : b()), C = () => {
|
|
80
|
+
e.visible && o("blur");
|
|
81
|
+
}, g = (t) => {
|
|
82
|
+
const l = h.value;
|
|
83
|
+
l && !l.contains(t.target) && C();
|
|
123
84
|
};
|
|
124
|
-
|
|
125
|
-
() =>
|
|
126
|
-
(
|
|
127
|
-
|
|
128
|
-
if (value) {
|
|
129
|
-
window.addEventListener("touchstart", clickAway, false);
|
|
130
|
-
} else {
|
|
131
|
-
window.removeEventListener("touchstart", clickAway, false);
|
|
132
|
-
}
|
|
85
|
+
B(
|
|
86
|
+
() => e.visible,
|
|
87
|
+
(t) => {
|
|
88
|
+
f.value = t, t ? window.addEventListener("touchstart", g, !1) : window.removeEventListener("touchstart", g, !1);
|
|
133
89
|
}
|
|
134
90
|
);
|
|
135
|
-
function
|
|
136
|
-
|
|
137
|
-
clickKeyIndex.value = item.id;
|
|
138
|
-
if (item.type == "number" || item.type == "custom") {
|
|
139
|
-
emit("input", item.id);
|
|
140
|
-
if (props.modelValue.length < props.maxlength) {
|
|
141
|
-
emit("update:modelValue", props.modelValue + item.id);
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
if (item.type == "lock") {
|
|
145
|
-
closeBoard();
|
|
146
|
-
}
|
|
147
|
-
if (item.type == "delete") {
|
|
148
|
-
emit("delete");
|
|
149
|
-
emit("update:modelValue", props.modelValue.slice(0, props.modelValue.length - 1));
|
|
150
|
-
}
|
|
91
|
+
function w(t, l) {
|
|
92
|
+
l.stopPropagation(), c.value = t.id, (t.type == "number" || t.type == "custom") && (o("input", t.id), e.modelValue.length < e.maxlength && o("update:modelValue", e.modelValue + t.id)), t.type == "lock" && v(), t.type == "delete" && (o("delete"), o("update:modelValue", e.modelValue.slice(0, e.modelValue.length - 1)));
|
|
151
93
|
}
|
|
152
|
-
function
|
|
153
|
-
|
|
94
|
+
function K(t) {
|
|
95
|
+
t.stopPropagation();
|
|
154
96
|
}
|
|
155
|
-
function
|
|
156
|
-
|
|
157
|
-
clickKeyIndex.value = void 0;
|
|
97
|
+
function V(t) {
|
|
98
|
+
t.preventDefault(), c.value = void 0;
|
|
158
99
|
}
|
|
159
|
-
function
|
|
160
|
-
|
|
161
|
-
emit("close");
|
|
100
|
+
function v() {
|
|
101
|
+
o("update:visible", !1), o("close");
|
|
162
102
|
}
|
|
163
103
|
return {
|
|
164
|
-
clickKeyIndex,
|
|
165
|
-
defaultKey,
|
|
166
|
-
closeBoard,
|
|
167
|
-
onTouchEnd,
|
|
168
|
-
onTouchMove,
|
|
169
|
-
onTouchstart,
|
|
170
|
-
keysList,
|
|
171
|
-
genCustomKeys,
|
|
172
|
-
getBasicKeys,
|
|
173
|
-
root,
|
|
174
|
-
show,
|
|
175
|
-
translate
|
|
104
|
+
clickKeyIndex: c,
|
|
105
|
+
defaultKey: b,
|
|
106
|
+
closeBoard: v,
|
|
107
|
+
onTouchEnd: V,
|
|
108
|
+
onTouchMove: K,
|
|
109
|
+
onTouchstart: w,
|
|
110
|
+
keysList: d,
|
|
111
|
+
genCustomKeys: n,
|
|
112
|
+
getBasicKeys: y,
|
|
113
|
+
root: h,
|
|
114
|
+
show: f,
|
|
115
|
+
translate: P
|
|
176
116
|
};
|
|
177
117
|
}
|
|
178
|
-
})
|
|
179
|
-
const _hoisted_1 = { ref: "root" };
|
|
180
|
-
const _hoisted_2 = { class: "nut-number-keyboard" };
|
|
181
|
-
const _hoisted_3 = {
|
|
118
|
+
}), F = { ref: "root" }, z = { class: "nut-number-keyboard" }, U = {
|
|
182
119
|
key: 0,
|
|
183
120
|
class: "nut-number-keyboard__header"
|
|
184
|
-
}
|
|
185
|
-
const _hoisted_4 = { class: "nut-number-keyboard__title" };
|
|
186
|
-
const _hoisted_5 = { class: "nut-number-keyboard__body" };
|
|
187
|
-
const _hoisted_6 = { class: "nut-number-keyboard__keys" };
|
|
188
|
-
const _hoisted_7 = ["onTouchstart"];
|
|
189
|
-
const _hoisted_8 = {
|
|
121
|
+
}, q = { class: "nut-number-keyboard__title" }, G = { class: "nut-number-keyboard__body" }, H = { class: "nut-number-keyboard__keys" }, J = ["onTouchstart"], O = {
|
|
190
122
|
key: 1,
|
|
191
123
|
src: "https://img11.360buyimg.com/imagetools/jfs/t1/146371/38/8485/738/5f606425Eca239740/14f4b4f5f20d8a68.png"
|
|
192
|
-
}
|
|
193
|
-
const _hoisted_9 = {
|
|
124
|
+
}, Q = {
|
|
194
125
|
key: 2,
|
|
195
126
|
src: "https://img11.360buyimg.com/imagetools/jfs/t1/129395/8/12735/2030/5f61ac37E70cab338/fb477dc11f46056c.png"
|
|
196
|
-
}
|
|
197
|
-
const _hoisted_10 = {
|
|
127
|
+
}, R = {
|
|
198
128
|
key: 0,
|
|
199
129
|
class: "nut-number-keyboard__sidebar"
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
const _hoisted_12 = /* @__PURE__ */ createElementVNode("img", { src: "https://img11.360buyimg.com/imagetools/jfs/t1/129395/8/12735/2030/5f61ac37E70cab338/fb477dc11f46056c.png" }, null, -1);
|
|
203
|
-
const _hoisted_13 = [
|
|
204
|
-
_hoisted_12
|
|
130
|
+
}, W = { class: "nut-key__wrapper" }, X = /* @__PURE__ */ i("img", { src: "https://img11.360buyimg.com/imagetools/jfs/t1/129395/8/12735/2030/5f61ac37E70cab338/fb477dc11f46056c.png" }, null, -1), Y = [
|
|
131
|
+
X
|
|
205
132
|
];
|
|
206
|
-
function
|
|
207
|
-
const
|
|
208
|
-
return
|
|
209
|
-
|
|
210
|
-
visible:
|
|
211
|
-
"onUpdate:visible":
|
|
133
|
+
function Z(e, o, c, f, h, b) {
|
|
134
|
+
const y = A("nut-popup");
|
|
135
|
+
return u(), r("div", F, [
|
|
136
|
+
S(y, {
|
|
137
|
+
visible: e.show,
|
|
138
|
+
"onUpdate:visible": o[7] || (o[7] = (n) => e.show = n),
|
|
212
139
|
position: "bottom",
|
|
213
|
-
popClass:
|
|
214
|
-
overlay:
|
|
215
|
-
teleportDisable:
|
|
140
|
+
popClass: e.popClass,
|
|
141
|
+
overlay: !1,
|
|
142
|
+
teleportDisable: !1
|
|
216
143
|
}, {
|
|
217
|
-
default:
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
144
|
+
default: $(() => [
|
|
145
|
+
i("div", z, [
|
|
146
|
+
e.title ? (u(), r("div", U, [
|
|
147
|
+
i("h3", q, p(e.title), 1),
|
|
148
|
+
e.type == "default" ? (u(), r("span", {
|
|
222
149
|
key: 0,
|
|
223
150
|
class: "nut-number-keyboard__close",
|
|
224
|
-
onClick:
|
|
225
|
-
},
|
|
226
|
-
])) :
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
(
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
151
|
+
onClick: o[0] || (o[0] = (n) => e.closeBoard())
|
|
152
|
+
}, p(e.translate("done")), 1)) : a("", !0)
|
|
153
|
+
])) : a("", !0),
|
|
154
|
+
i("div", G, [
|
|
155
|
+
i("div", H, [
|
|
156
|
+
(u(!0), r(T, null, L(e.keysList, (n) => (u(), r("div", {
|
|
157
|
+
key: "key" + n.id,
|
|
158
|
+
class: m([
|
|
159
|
+
"nut-key__wrapper",
|
|
160
|
+
{
|
|
161
|
+
"nut-key__wrapper--wider": n.id == 0 && e.type == "rightColumn" && Array.isArray(e.customKey) && e.customKey.length == 1
|
|
162
|
+
}
|
|
163
|
+
])
|
|
164
|
+
}, [
|
|
165
|
+
i("div", {
|
|
166
|
+
class: m([
|
|
167
|
+
"nut-key",
|
|
168
|
+
{ "nut-key--active": n.id == e.clickKeyIndex },
|
|
169
|
+
{ "nut-key--lock": n.type == "lock" },
|
|
170
|
+
{ "nut-key--delete": n.type == "delete" }
|
|
171
|
+
]),
|
|
172
|
+
onTouchstart: (d) => e.onTouchstart(n, d),
|
|
173
|
+
onTouchmove: o[1] || (o[1] = (d) => e.onTouchMove(d)),
|
|
174
|
+
onTouchend: o[2] || (o[2] = (d) => e.onTouchEnd(d))
|
|
238
175
|
}, [
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
onTouchstart: (event) => _ctx.onTouchstart(item, event),
|
|
247
|
-
onTouchmove: _cache[1] || (_cache[1] = (event) => _ctx.onTouchMove(event)),
|
|
248
|
-
onTouchend: _cache[2] || (_cache[2] = (event) => _ctx.onTouchEnd(event))
|
|
249
|
-
}, [
|
|
250
|
-
item.type == "number" || item.type == "custom" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
251
|
-
createTextVNode(toDisplayString(item.id), 1)
|
|
252
|
-
], 64)) : createCommentVNode("", true),
|
|
253
|
-
item.type == "lock" ? (openBlock(), createElementBlock("img", _hoisted_8)) : createCommentVNode("", true),
|
|
254
|
-
item.type == "delete" ? (openBlock(), createElementBlock("img", _hoisted_9)) : createCommentVNode("", true)
|
|
255
|
-
], 42, _hoisted_7)
|
|
256
|
-
], 2);
|
|
257
|
-
}), 128))
|
|
176
|
+
n.type == "number" || n.type == "custom" ? (u(), r(T, { key: 0 }, [
|
|
177
|
+
N(p(n.id), 1)
|
|
178
|
+
], 64)) : a("", !0),
|
|
179
|
+
n.type == "lock" ? (u(), r("img", O)) : a("", !0),
|
|
180
|
+
n.type == "delete" ? (u(), r("img", Q)) : a("", !0)
|
|
181
|
+
], 42, J)
|
|
182
|
+
], 2))), 128))
|
|
258
183
|
]),
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
class:
|
|
263
|
-
onTouchstart:
|
|
264
|
-
onTouchmove:
|
|
265
|
-
onTouchend:
|
|
266
|
-
},
|
|
184
|
+
e.type == "rightColumn" ? (u(), r("div", R, [
|
|
185
|
+
i("div", W, [
|
|
186
|
+
i("div", {
|
|
187
|
+
class: m(["nut-key", { active: e.clickKeyIndex == "delete" }]),
|
|
188
|
+
onTouchstart: o[3] || (o[3] = (n) => e.onTouchstart({ id: "delete", type: "delete" }, n)),
|
|
189
|
+
onTouchmove: o[4] || (o[4] = (n) => e.onTouchMove(n)),
|
|
190
|
+
onTouchend: o[5] || (o[5] = (...n) => e.onTouchEnd && e.onTouchEnd(...n))
|
|
191
|
+
}, Y, 34)
|
|
267
192
|
]),
|
|
268
|
-
|
|
193
|
+
i("div", {
|
|
269
194
|
class: "nut-key__wrapper nut-key__wrapper--finish",
|
|
270
|
-
onClick:
|
|
195
|
+
onClick: o[6] || (o[6] = (n) => e.closeBoard())
|
|
271
196
|
}, [
|
|
272
|
-
|
|
273
|
-
class:
|
|
274
|
-
},
|
|
197
|
+
i("div", {
|
|
198
|
+
class: m(["nut-key", "nut-key--finish ", { activeFinsh: e.clickKeyIndex == "finish" }])
|
|
199
|
+
}, p(e.confirmText || e.translate("done")), 3)
|
|
275
200
|
])
|
|
276
|
-
])) :
|
|
201
|
+
])) : a("", !0)
|
|
277
202
|
])
|
|
278
203
|
])
|
|
279
204
|
]),
|
|
@@ -281,7 +206,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
281
206
|
}, 8, ["visible", "popClass"])
|
|
282
207
|
], 512);
|
|
283
208
|
}
|
|
284
|
-
const
|
|
209
|
+
const ie = /* @__PURE__ */ I(D, [["render", Z]]);
|
|
285
210
|
export {
|
|
286
|
-
|
|
211
|
+
ie as default
|
|
287
212
|
};
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
var m = Object.defineProperty;
|
|
2
|
+
var i = Object.getOwnPropertySymbols;
|
|
3
|
+
var v = Object.prototype.hasOwnProperty, p = Object.prototype.propertyIsEnumerable;
|
|
4
|
+
var u = (e, t, l) => t in e ? m(e, t, { enumerable: !0, configurable: !0, writable: !0, value: l }) : e[t] = l, d = (e, t) => {
|
|
5
|
+
for (var l in t || (t = {}))
|
|
6
|
+
v.call(t, l) && u(e, l, t[l]);
|
|
7
|
+
if (i)
|
|
8
|
+
for (var l of i(t))
|
|
9
|
+
p.call(t, l) && u(e, l, t[l]);
|
|
10
|
+
return e;
|
|
11
|
+
};
|
|
12
|
+
import { computed as f, watchEffect as C, openBlock as S, createBlock as b, Transition as h, withCtx as w, withDirectives as O, createElementVNode as $, normalizeClass as z, withModifiers as B, normalizeStyle as N, renderSlot as g, vShow as x } from "vue";
|
|
13
|
+
import { b as y, c as E } from "./component-234624bc.js";
|
|
14
|
+
import { _ as I } from "./_plugin-vue_export-helper-dad06003.js";
|
|
4
15
|
import "../locale/lang";
|
|
5
|
-
let
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
!count && body.classList.add(CLSNAME);
|
|
12
|
-
count++;
|
|
13
|
-
} catch (error) {
|
|
14
|
-
}
|
|
16
|
+
let o = 0;
|
|
17
|
+
const k = "nut-overflow-hidden", L = (e) => [() => {
|
|
18
|
+
if (e())
|
|
19
|
+
try {
|
|
20
|
+
!o && y.classList.add(k), o++;
|
|
21
|
+
} catch (r) {
|
|
15
22
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
!count && body.classList.remove(CLSNAME);
|
|
22
|
-
} catch (error) {
|
|
23
|
-
}
|
|
23
|
+
}, () => {
|
|
24
|
+
if (e() && o)
|
|
25
|
+
try {
|
|
26
|
+
o--, !o && y.classList.remove(k);
|
|
27
|
+
} catch (r) {
|
|
24
28
|
}
|
|
25
|
-
|
|
26
|
-
return [lock, unlock];
|
|
27
|
-
};
|
|
28
|
-
const { componentName, create } = createComponent("overlay");
|
|
29
|
-
const _sfc_main = create({
|
|
29
|
+
}], { componentName: D, create: M } = E("overlay"), _ = M({
|
|
30
30
|
props: {
|
|
31
31
|
visible: {
|
|
32
32
|
type: Boolean,
|
|
33
|
-
default:
|
|
33
|
+
default: !1
|
|
34
34
|
},
|
|
35
35
|
zIndex: {
|
|
36
36
|
type: [Number, String],
|
|
@@ -42,7 +42,7 @@ const _sfc_main = create({
|
|
|
42
42
|
},
|
|
43
43
|
lockScroll: {
|
|
44
44
|
type: Boolean,
|
|
45
|
-
default:
|
|
45
|
+
default: !0
|
|
46
46
|
},
|
|
47
47
|
overlayClass: {
|
|
48
48
|
type: String,
|
|
@@ -53,55 +53,42 @@ const _sfc_main = create({
|
|
|
53
53
|
},
|
|
54
54
|
closeOnClickOverlay: {
|
|
55
55
|
type: Boolean,
|
|
56
|
-
default:
|
|
56
|
+
default: !0
|
|
57
57
|
}
|
|
58
58
|
},
|
|
59
59
|
emits: ["click", "update:visible"],
|
|
60
|
-
setup(
|
|
61
|
-
const [
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
...props.overlayStyle
|
|
74
|
-
};
|
|
75
|
-
});
|
|
76
|
-
watchEffect(() => {
|
|
77
|
-
props.visible ? lock() : unlock();
|
|
78
|
-
});
|
|
79
|
-
const onClick = (e) => {
|
|
80
|
-
if (props.closeOnClickOverlay) {
|
|
81
|
-
emit("update:visible", false);
|
|
82
|
-
emit("click", e);
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
return { classes, style, onClick };
|
|
60
|
+
setup(e, { emit: t }) {
|
|
61
|
+
const [l, r] = L(() => e.lockScroll), n = f(() => ({
|
|
62
|
+
[D]: !0,
|
|
63
|
+
[e.overlayClass]: !0
|
|
64
|
+
})), s = f(() => d({
|
|
65
|
+
transitionDuration: `${e.duration}s`,
|
|
66
|
+
zIndex: e.zIndex
|
|
67
|
+
}, e.overlayStyle));
|
|
68
|
+
return C(() => {
|
|
69
|
+
e.visible ? l() : r();
|
|
70
|
+
}), { classes: n, style: s, onClick: (c) => {
|
|
71
|
+
t("click", c), e.closeOnClickOverlay && t("update:visible", !1);
|
|
72
|
+
} };
|
|
86
73
|
}
|
|
87
74
|
});
|
|
88
|
-
function
|
|
89
|
-
return
|
|
90
|
-
default:
|
|
91
|
-
|
|
92
|
-
class:
|
|
93
|
-
onClick:
|
|
94
|
-
style:
|
|
75
|
+
function j(e, t, l, r, n, s) {
|
|
76
|
+
return S(), b(h, { name: "overlay-fade" }, {
|
|
77
|
+
default: w(() => [
|
|
78
|
+
O($("view", {
|
|
79
|
+
class: z(e.classes),
|
|
80
|
+
onClick: t[0] || (t[0] = B((...a) => e.onClick && e.onClick(...a), ["stop"])),
|
|
81
|
+
style: N(e.style)
|
|
95
82
|
}, [
|
|
96
|
-
|
|
83
|
+
g(e.$slots, "default")
|
|
97
84
|
], 6), [
|
|
98
|
-
[
|
|
85
|
+
[x, e.visible]
|
|
99
86
|
])
|
|
100
87
|
]),
|
|
101
88
|
_: 3
|
|
102
89
|
});
|
|
103
90
|
}
|
|
104
|
-
const
|
|
91
|
+
const G = /* @__PURE__ */ I(_, [["render", j]]);
|
|
105
92
|
export {
|
|
106
|
-
|
|
93
|
+
G as default
|
|
107
94
|
};
|