@nutui/nutui 3.1.22-beta.3 → 3.1.23-beta.0
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 +48 -0
- package/README.md +3 -4
- package/dist/nutui.es.js +20426 -4050
- package/dist/nutui.umd.js +20529 -4049
- package/dist/packages/_es/ActionSheet.js +149 -36
- package/dist/packages/_es/Address.js +535 -129
- package/dist/packages/_es/AddressList.js +615 -113
- package/dist/packages/_es/Animate.js +64 -0
- package/dist/packages/_es/Audio.js +257 -72
- package/dist/packages/_es/AudioOperate.js +100 -32
- package/dist/packages/_es/Avatar.js +162 -54
- package/dist/packages/_es/AvatarGroup.js +73 -14
- package/dist/packages/_es/BackTop.js +156 -43
- package/dist/packages/_es/Badge.js +86 -14
- package/dist/packages/_es/Barrage.js +120 -41
- package/dist/packages/_es/Button.js +128 -23
- package/dist/packages/_es/Calendar.js +246 -24
- package/dist/packages/_es/CalendarItem.js +2 -1
- package/dist/packages/_es/Card.js +107 -10
- package/dist/packages/_es/Cascader.js +496 -179
- package/dist/packages/_es/Category.js +58 -15
- package/dist/packages/_es/CategoryPane.js +111 -11
- package/dist/packages/_es/Cell.js +108 -21
- package/dist/packages/_es/CellGroup.js +44 -9
- package/dist/packages/_es/Checkbox.js +134 -29
- package/dist/packages/_es/CheckboxGroup.js +79 -29
- package/dist/packages/_es/CircleProgress.js +150 -28
- package/dist/packages/_es/Col.js +56 -14
- package/dist/packages/_es/Collapse.js +110 -24
- package/dist/packages/_es/CollapseItem.js +252 -80
- package/dist/packages/_es/Comment.js +434 -64
- package/dist/packages/_es/ConfigProvider.js +25 -0
- package/dist/packages/_es/CountDown.js +238 -75
- package/dist/packages/_es/CountUp.js +539 -159
- package/dist/packages/_es/DatePicker.js +315 -117
- package/dist/packages/_es/Dialog.js +289 -79
- package/dist/packages/_es/Divider.js +65 -32
- package/dist/packages/_es/Drag.js +197 -56
- package/dist/packages/_es/Ecard.js +159 -24
- package/dist/packages/_es/Elevator.js +255 -77
- package/dist/packages/_es/Ellipsis.js +206 -0
- package/dist/packages/_es/Empty.js +71 -12
- package/dist/packages/_es/FixedNav.js +122 -15
- package/dist/packages/_es/Form.js +151 -64
- package/dist/packages/_es/FormItem.js +114 -15
- package/dist/packages/_es/Grid.js +6 -5
- package/dist/packages/_es/GridItem.js +144 -33
- package/dist/packages/_es/Icon.js +40 -15
- package/dist/packages/_es/Image.js +142 -0
- package/dist/packages/_es/ImagePreview.js +547 -84
- package/dist/packages/_es/Indicator.js +62 -15
- package/dist/packages/_es/InfiniteLoading.js +249 -76
- package/dist/packages/_es/Input.js +433 -51
- package/dist/packages/_es/InputNumber.js +160 -41
- package/dist/packages/_es/Layout.js +5 -4
- package/dist/packages/_es/List.js +106 -37
- package/dist/packages/_es/Menu.js +168 -29
- package/dist/packages/_es/MenuItem.js +173 -34
- package/dist/packages/_es/Navbar.js +192 -30
- package/dist/packages/_es/NoticeBar.js +380 -93
- package/dist/packages/_es/Notify.js +227 -91
- package/dist/packages/_es/NumberKeyboard.js +272 -41
- package/dist/packages/_es/OldPicker.js +457 -149
- package/dist/packages/_es/OverLay.js +98 -40
- package/dist/packages/_es/Pagination.js +157 -39
- package/dist/packages/_es/Picker.js +460 -148
- package/dist/packages/_es/Popover.js +957 -337
- package/dist/packages/_es/Popup.js +299 -74
- package/dist/packages/_es/Price.js +118 -16
- package/dist/packages/_es/Progress.js +146 -14
- package/dist/packages/_es/PullRefresh.js +339 -100
- package/dist/packages/_es/Radio.js +90 -22
- package/dist/packages/_es/RadioGroup.js +37 -8
- package/dist/packages/_es/Range.js +408 -102
- package/dist/packages/_es/Rate.js +193 -16
- package/dist/packages/_es/Row.js +64 -22
- package/dist/packages/_es/SearchBar.js +238 -56
- package/dist/packages/_es/ShortPassword.js +225 -35
- package/dist/packages/_es/SideNavBar.js +81 -43
- package/dist/packages/_es/SideNavBarItem.js +46 -11
- package/dist/packages/_es/Signature.js +160 -60
- package/dist/packages/_es/Skeleton.js +136 -20
- package/dist/packages/_es/Sku.js +491 -103
- package/dist/packages/_es/Step.js +115 -39
- package/dist/packages/_es/Steps.js +53 -18
- package/dist/packages/_es/Sticky.js +138 -53
- package/dist/packages/_es/SubSideNavBar.js +82 -36
- package/dist/packages/_es/Swipe.js +178 -60
- package/dist/packages/_es/Swiper.js +433 -121
- package/dist/packages/_es/SwiperItem.js +53 -22
- package/dist/packages/_es/Switch.js +116 -21
- package/dist/packages/_es/TabPane.js +39 -12
- package/dist/packages/_es/Tabbar.js +72 -17
- package/dist/packages/_es/TabbarItem.js +151 -29
- package/dist/packages/_es/Table.js +178 -37
- package/dist/packages/_es/Tabs.js +202 -59
- package/dist/packages/_es/Tag.js +97 -20
- package/dist/packages/_es/TextArea.js +160 -42
- package/dist/packages/_es/TimeDetail.js +79 -37
- package/dist/packages/_es/TimePannel.js +48 -33
- package/dist/packages/_es/TimeSelect.js +112 -15
- package/dist/packages/_es/Toast.js +310 -90
- package/dist/packages/_es/Uploader.js +455 -120
- package/dist/packages/_es/Video.js +332 -93
- package/dist/packages/_es/common.js +128 -38
- package/dist/packages/_es/component.js +76 -35
- package/dist/packages/_es/index.js +6 -5
- package/dist/packages/_es/index2.js +30 -9
- package/dist/packages/_es/index3.js +8 -6
- package/dist/packages/_es/index4.js +64 -13
- package/dist/packages/_es/index5.js +783 -130
- package/dist/packages/_es/plugin-vue_export-helper.js +8 -7
- package/dist/packages/_es/pxCheck.js +5 -3
- package/dist/packages/_es/raf.js +15 -8
- package/dist/packages/animate/index.scss +299 -0
- package/dist/packages/cell/index.scss +7 -1
- package/dist/packages/checkbox/index.scss +10 -0
- package/dist/packages/configprovider/index.scss +2 -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 +26 -2
- package/dist/packages/input/index.scss +13 -0
- package/dist/packages/inputnumber/index.scss +21 -0
- package/dist/packages/locale/lang/baseLang.js +3 -3
- package/dist/packages/locale/lang/en-US.js +105 -5
- package/dist/packages/locale/lang/id-ID.js +105 -5
- package/dist/packages/locale/lang/index.js +38 -16
- package/dist/packages/locale/lang/zh-CN.js +105 -5
- package/dist/packages/locale/lang/zh-TW.js +105 -5
- 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 +18 -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 +1 -0
- package/dist/packages/tabbar/index.scss +5 -0
- package/dist/packages/tabbaritem/index.scss +7 -0
- package/dist/packages/tabpane/index.scss +5 -0
- package/dist/packages/tabs/index.scss +22 -0
- package/dist/packages/textarea/index.scss +8 -0
- package/dist/smartips/attributes.json +140 -4
- package/dist/smartips/tags.json +55 -6
- package/dist/smartips/web-types.json +6963 -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 +12 -0
- package/dist/styles/variables-jdt.scss +12 -0
- package/dist/styles/variables.scss +12 -0
- package/dist/types/__VUE/actionsheet/index.vue.d.ts +3 -3
- package/dist/types/__VUE/address/index.vue.d.ts +7 -7
- 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/avatar/index.vue.d.ts +3 -3
- package/dist/types/__VUE/calendar/index.vue.d.ts +1 -1
- package/dist/types/__VUE/calendaritem/index.vue.d.ts +10 -2
- package/dist/types/__VUE/cascader/index.vue.d.ts +2 -2
- package/dist/types/__VUE/circleprogress/index.vue.d.ts +2 -2
- package/dist/types/__VUE/collapse/index.vue.d.ts +3 -1
- 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 +2 -2
- package/dist/types/__VUE/dialog/index.vue.d.ts +2 -2
- package/dist/types/__VUE/ellipsis/index.vue.d.ts +72 -0
- package/dist/types/__VUE/fixednav/index.vue.d.ts +2 -2
- package/dist/types/__VUE/grid/index.vue.d.ts +2 -2
- 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/imagePreviewItem.vue.d.ts +95 -0
- package/dist/types/__VUE/imagepreview/index.vue.d.ts +56 -24
- package/dist/types/__VUE/menu/index.vue.d.ts +31 -4
- package/dist/types/__VUE/menuitem/index.vue.d.ts +12 -3
- package/dist/types/__VUE/noticebar/index.vue.d.ts +1 -1
- package/dist/types/__VUE/numberkeyboard/index.vue.d.ts +2 -2
- package/dist/types/__VUE/oldpicker/index.vue.d.ts +4 -4
- package/dist/types/__VUE/picker/index.vue.d.ts +4 -4
- package/dist/types/__VUE/popover/index.vue.d.ts +8 -8
- package/dist/types/__VUE/popup/index.vue.d.ts +4 -4
- 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/row/index.vue.d.ts +2 -2
- package/dist/types/__VUE/shortpassword/index.vue.d.ts +2 -2
- package/dist/types/__VUE/sku/index.vue.d.ts +3 -3
- package/dist/types/__VUE/swipe/index.vue.d.ts +2 -2
- package/dist/types/__VUE/swiper/index.vue.d.ts +2 -2
- package/dist/types/__VUE/switch/index.vue.d.ts +2 -2
- package/dist/types/__VUE/timeselect/index.vue.d.ts +3 -2
- package/dist/types/__VUE/uploader/uploader.d.ts +1 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/nutui.d.ts +5 -1
- package/package.json +5 -4
|
@@ -1,41 +1,231 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.23-beta.0 Mon Jun 27 2022 17:55:50 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { ref
|
|
7
|
-
import { c as
|
|
8
|
-
import { _ as
|
|
6
|
+
import { ref, computed, watch, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, createElementVNode, toDisplayString, withDirectives, normalizeStyle, vModelText, Fragment, renderList, createCommentVNode } from "vue";
|
|
7
|
+
import { c as createComponent } from "./component.js";
|
|
8
|
+
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
9
|
import "../locale/lang";
|
|
10
|
-
const { create
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
const { create, translate } = createComponent("shortpassword");
|
|
11
|
+
const _sfc_main = create({
|
|
12
|
+
props: {
|
|
13
|
+
title: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: ""
|
|
16
|
+
},
|
|
17
|
+
desc: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: ""
|
|
20
|
+
},
|
|
21
|
+
tips: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: ""
|
|
24
|
+
},
|
|
25
|
+
visible: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: false
|
|
28
|
+
},
|
|
29
|
+
modelValue: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: ""
|
|
32
|
+
},
|
|
33
|
+
errorMsg: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: ""
|
|
36
|
+
},
|
|
37
|
+
noButton: {
|
|
38
|
+
type: Boolean,
|
|
39
|
+
default: true
|
|
40
|
+
},
|
|
41
|
+
closeOnClickOverlay: {
|
|
42
|
+
type: Boolean,
|
|
43
|
+
default: true
|
|
44
|
+
},
|
|
45
|
+
length: {
|
|
46
|
+
type: [String, Number],
|
|
47
|
+
default: 6
|
|
48
|
+
},
|
|
49
|
+
isWrapTeleport: {
|
|
50
|
+
type: Boolean,
|
|
51
|
+
default: true
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
emits: ["update:modelValue", "update:visible", "complete", "change", "ok", "tips", "close", "cancel"],
|
|
55
|
+
setup(props, { emit }) {
|
|
56
|
+
const realInput = ref(props.modelValue);
|
|
57
|
+
const realpwd = ref();
|
|
58
|
+
const comLen = computed(() => range(Number(props.length)));
|
|
59
|
+
const show = ref(props.visible);
|
|
60
|
+
function sureClick() {
|
|
61
|
+
emit("ok", realInput.value);
|
|
62
|
+
}
|
|
63
|
+
function focus() {
|
|
64
|
+
realpwd.value.focus();
|
|
65
|
+
}
|
|
66
|
+
watch(() => props.visible, (value) => {
|
|
67
|
+
show.value = value;
|
|
68
|
+
});
|
|
69
|
+
watch(() => props.modelValue, (value) => {
|
|
70
|
+
realInput.value = value;
|
|
71
|
+
emit("update:modelValue", value);
|
|
72
|
+
}, {
|
|
73
|
+
deep: true,
|
|
74
|
+
immediate: true
|
|
75
|
+
});
|
|
76
|
+
function changeValue(e) {
|
|
77
|
+
const input = e.target;
|
|
78
|
+
let val = input.value;
|
|
79
|
+
if (val.length > comLen.value) {
|
|
80
|
+
val = val.slice(0, comLen.value);
|
|
81
|
+
realInput.value = val;
|
|
82
|
+
}
|
|
83
|
+
if (String(realInput.value).length === comLen.value) {
|
|
84
|
+
emit("complete", val);
|
|
85
|
+
}
|
|
86
|
+
emit("change", val);
|
|
87
|
+
emit("update:modelValue", val);
|
|
88
|
+
}
|
|
89
|
+
function close() {
|
|
90
|
+
emit("update:visible", false);
|
|
91
|
+
emit("cancel");
|
|
92
|
+
}
|
|
93
|
+
function closeIcon() {
|
|
94
|
+
emit("update:visible", false);
|
|
95
|
+
emit("close");
|
|
96
|
+
}
|
|
97
|
+
function range(val) {
|
|
98
|
+
return Math.min(Math.max(4, val), 6);
|
|
99
|
+
}
|
|
100
|
+
function onTips() {
|
|
101
|
+
emit("tips");
|
|
102
|
+
}
|
|
103
|
+
function systemStyle() {
|
|
104
|
+
let u = navigator.userAgent;
|
|
105
|
+
let isAndroid = u.indexOf("Android") > -1 || u.indexOf("Linux") > -1;
|
|
106
|
+
let isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
|
|
107
|
+
if (isIOS) {
|
|
108
|
+
return {
|
|
109
|
+
paddingRight: "1200px"
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
if (isAndroid) {
|
|
113
|
+
return {
|
|
114
|
+
opacity: 0,
|
|
115
|
+
zindex: 10
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
return {
|
|
120
|
+
comLen,
|
|
121
|
+
sureClick,
|
|
122
|
+
realInput,
|
|
123
|
+
realpwd,
|
|
124
|
+
focus,
|
|
125
|
+
range,
|
|
126
|
+
changeValue,
|
|
127
|
+
close,
|
|
128
|
+
onTips,
|
|
129
|
+
show,
|
|
130
|
+
systemStyle,
|
|
131
|
+
closeIcon,
|
|
132
|
+
translate
|
|
133
|
+
};
|
|
14
134
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
135
|
+
});
|
|
136
|
+
const _hoisted_1 = { class: "nut-shortpsd-title" };
|
|
137
|
+
const _hoisted_2 = { class: "nut-shortpsd-subtitle" };
|
|
138
|
+
const _hoisted_3 = { class: "nut-input-normalw" };
|
|
139
|
+
const _hoisted_4 = /* @__PURE__ */ createElementVNode("div", { class: "nut-input-site" }, null, -1);
|
|
140
|
+
const _hoisted_5 = {
|
|
141
|
+
key: 0,
|
|
142
|
+
class: "nut-shortpsd-icon"
|
|
143
|
+
};
|
|
144
|
+
const _hoisted_6 = { class: "nut-shortpsd-message" };
|
|
145
|
+
const _hoisted_7 = { class: "nut-shortpsd-error" };
|
|
146
|
+
const _hoisted_8 = {
|
|
147
|
+
key: 0,
|
|
148
|
+
class: "nut-shortpsd-forget"
|
|
149
|
+
};
|
|
150
|
+
const _hoisted_9 = {
|
|
151
|
+
key: 0,
|
|
152
|
+
class: "nut-shortpsd-footer"
|
|
153
|
+
};
|
|
154
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
155
|
+
const _component_nut_icon = resolveComponent("nut-icon");
|
|
156
|
+
const _component_nut_popup = resolveComponent("nut-popup");
|
|
157
|
+
return openBlock(), createElementBlock("view", null, [
|
|
158
|
+
createVNode(_component_nut_popup, {
|
|
159
|
+
style: {
|
|
160
|
+
padding: "32px 24px 28px 24px",
|
|
161
|
+
borderRadius: "12px",
|
|
162
|
+
textAlign: "center"
|
|
163
|
+
},
|
|
164
|
+
visible: _ctx.show,
|
|
165
|
+
"onUpdate:visible": _cache[6] || (_cache[6] = ($event) => _ctx.show = $event),
|
|
166
|
+
closeable: true,
|
|
167
|
+
onClickCloseIcon: _ctx.closeIcon,
|
|
168
|
+
"close-on-click-overlay": _ctx.closeOnClickOverlay,
|
|
169
|
+
onClickOverlay: _ctx.close,
|
|
170
|
+
isWrapTeleport: _ctx.isWrapTeleport
|
|
171
|
+
}, {
|
|
172
|
+
default: withCtx(() => [
|
|
173
|
+
createElementVNode("view", _hoisted_1, toDisplayString(_ctx.title || _ctx.translate("title")), 1),
|
|
174
|
+
createElementVNode("view", _hoisted_2, toDisplayString(_ctx.desc || _ctx.translate("desc")), 1),
|
|
175
|
+
createElementVNode("div", _hoisted_3, [
|
|
176
|
+
withDirectives(createElementVNode("input", {
|
|
177
|
+
ref: "realpwd",
|
|
178
|
+
class: "nut-input-real",
|
|
179
|
+
type: "number",
|
|
180
|
+
maxlength: "6",
|
|
181
|
+
style: normalizeStyle(_ctx.systemStyle()),
|
|
182
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.realInput = $event),
|
|
183
|
+
onInput: _cache[1] || (_cache[1] = (...args) => _ctx.changeValue && _ctx.changeValue(...args))
|
|
184
|
+
}, null, 36), [
|
|
185
|
+
[vModelText, _ctx.realInput]
|
|
186
|
+
]),
|
|
187
|
+
_hoisted_4,
|
|
188
|
+
createElementVNode("view", {
|
|
189
|
+
class: "nut-shortpsd-fake",
|
|
190
|
+
onClick: _cache[2] || (_cache[2] = (...args) => _ctx.focus && _ctx.focus(...args))
|
|
191
|
+
}, [
|
|
192
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(new Array(_ctx.comLen), (sublen, index2) => {
|
|
193
|
+
return openBlock(), createElementBlock("view", {
|
|
194
|
+
class: "nut-shortpsd-li",
|
|
195
|
+
key: index2
|
|
196
|
+
}, [
|
|
197
|
+
String(_ctx.realInput).length > index2 ? (openBlock(), createElementBlock("view", _hoisted_5)) : createCommentVNode("", true)
|
|
198
|
+
]);
|
|
199
|
+
}), 128))
|
|
200
|
+
])
|
|
201
|
+
]),
|
|
202
|
+
createElementVNode("view", _hoisted_6, [
|
|
203
|
+
createElementVNode("view", _hoisted_7, toDisplayString(_ctx.errorMsg), 1),
|
|
204
|
+
_ctx.tips || _ctx.translate("tips") ? (openBlock(), createElementBlock("view", _hoisted_8, [
|
|
205
|
+
createVNode(_component_nut_icon, {
|
|
206
|
+
class: "icon",
|
|
207
|
+
size: "11px",
|
|
208
|
+
name: "tips"
|
|
209
|
+
}),
|
|
210
|
+
createElementVNode("view", {
|
|
211
|
+
onClick: _cache[3] || (_cache[3] = (...args) => _ctx.onTips && _ctx.onTips(...args))
|
|
212
|
+
}, toDisplayString(_ctx.tips || _ctx.translate("tips")), 1)
|
|
213
|
+
])) : createCommentVNode("", true)
|
|
214
|
+
]),
|
|
215
|
+
!_ctx.noButton ? (openBlock(), createElementBlock("view", _hoisted_9, [
|
|
216
|
+
createElementVNode("view", {
|
|
217
|
+
class: "nut-shortpsd-cancle",
|
|
218
|
+
onClick: _cache[4] || (_cache[4] = (...args) => _ctx.close && _ctx.close(...args))
|
|
219
|
+
}, toDisplayString(_ctx.translate("cancel")), 1),
|
|
220
|
+
createElementVNode("view", {
|
|
221
|
+
class: "nut-shortpsd-sure",
|
|
222
|
+
onClick: _cache[5] || (_cache[5] = (...args) => _ctx.sureClick && _ctx.sureClick(...args))
|
|
223
|
+
}, toDisplayString(_ctx.translate("confirm")), 1)
|
|
224
|
+
])) : createCommentVNode("", true)
|
|
225
|
+
]),
|
|
226
|
+
_: 1
|
|
227
|
+
}, 8, ["visible", "onClickCloseIcon", "close-on-click-overlay", "onClickOverlay", "isWrapTeleport"])
|
|
228
|
+
]);
|
|
229
|
+
}
|
|
230
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
231
|
+
export { index as default };
|
|
@@ -1,49 +1,87 @@
|
|
|
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 = (a2, b2) => {
|
|
9
|
-
for (var prop in b2 || (b2 = {}))
|
|
10
|
-
if (__hasOwnProp.call(b2, prop))
|
|
11
|
-
__defNormalProp(a2, prop, b2[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b2)) {
|
|
14
|
-
if (__propIsEnum.call(b2, prop))
|
|
15
|
-
__defNormalProp(a2, prop, b2[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a2;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a2, b2) => __defProps(a2, __getOwnPropDescs(b2));
|
|
20
1
|
/*!
|
|
21
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.23-beta.0 Mon Jun 27 2022 17:55:50 GMT+0800 (中国标准时间)
|
|
22
3
|
* (c) 2022 @jdf2e.
|
|
23
4
|
* Released under the MIT License.
|
|
24
5
|
*/
|
|
25
|
-
import { ref
|
|
26
|
-
import { c as
|
|
27
|
-
import { _ as
|
|
6
|
+
import { ref, reactive, computed, onMounted, toRefs, openBlock, createElementBlock, normalizeClass, createElementVNode, renderSlot } from "vue";
|
|
7
|
+
import { c as createComponent } from "./component.js";
|
|
8
|
+
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
28
9
|
import "../locale/lang";
|
|
29
|
-
const { componentName
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
10
|
+
const { componentName, create } = createComponent("sidenavbar");
|
|
11
|
+
const _sfc_main = create({
|
|
12
|
+
props: {
|
|
13
|
+
offset: {
|
|
14
|
+
type: [String, Number],
|
|
15
|
+
default: 15
|
|
34
16
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
|
|
17
|
+
},
|
|
18
|
+
emits: [],
|
|
19
|
+
setup: (props, context) => {
|
|
20
|
+
const list = ref(null);
|
|
21
|
+
const state = reactive({
|
|
22
|
+
count: 1,
|
|
23
|
+
observer: null
|
|
24
|
+
});
|
|
25
|
+
const classes = computed(() => {
|
|
26
|
+
const prefixCls = componentName;
|
|
27
|
+
return {
|
|
28
|
+
[prefixCls]: true
|
|
29
|
+
};
|
|
30
|
+
});
|
|
31
|
+
const setPaddingLeft = (nodeList, level = 1) => {
|
|
32
|
+
for (let i = 0; i < nodeList.length; i++) {
|
|
33
|
+
let item = nodeList[i];
|
|
34
|
+
item.children[0].style.paddingLeft = props.offset * level + "px";
|
|
35
|
+
if (!item.className.includes("nut-sidenavbaritem")) {
|
|
36
|
+
setPaddingLeft(Array.from(item.children[1].children), ++state.count);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
state.count--;
|
|
40
|
+
};
|
|
41
|
+
const handleSlots = () => {
|
|
42
|
+
let childNodes = list.value.childNodes;
|
|
43
|
+
if (childNodes.length) {
|
|
44
|
+
childNodes = Array.from(childNodes).filter((item) => item.nodeType !== 3).map((item) => {
|
|
45
|
+
return item;
|
|
46
|
+
});
|
|
47
|
+
setPaddingLeft(childNodes);
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
onMounted(() => {
|
|
51
|
+
handleSlots();
|
|
52
|
+
state.observer = new MutationObserver(function() {
|
|
53
|
+
state.count = 1;
|
|
54
|
+
handleSlots();
|
|
55
|
+
});
|
|
56
|
+
state.observer.observe(list.value, {
|
|
57
|
+
attributes: false,
|
|
58
|
+
childList: true,
|
|
59
|
+
characterData: false,
|
|
60
|
+
subtree: false
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
return {
|
|
64
|
+
...toRefs(state),
|
|
65
|
+
list,
|
|
66
|
+
classes
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
const _hoisted_1 = { class: "nut-sidenavbar__content" };
|
|
71
|
+
const _hoisted_2 = {
|
|
72
|
+
class: "nut-sidenavbar__content__list",
|
|
73
|
+
ref: "list"
|
|
74
|
+
};
|
|
75
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
76
|
+
return openBlock(), createElementBlock("view", {
|
|
77
|
+
class: normalizeClass(_ctx.classes)
|
|
78
|
+
}, [
|
|
79
|
+
createElementVNode("view", _hoisted_1, [
|
|
80
|
+
createElementVNode("view", _hoisted_2, [
|
|
81
|
+
renderSlot(_ctx.$slots, "default")
|
|
82
|
+
], 512)
|
|
83
|
+
])
|
|
84
|
+
], 2);
|
|
85
|
+
}
|
|
86
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
87
|
+
export { index as default };
|
|
@@ -1,16 +1,51 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.23-beta.0 Mon Jun 27 2022 17:55:50 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { computed
|
|
7
|
-
import { c as
|
|
8
|
-
import { _ as
|
|
6
|
+
import { computed, openBlock, createElementBlock, withModifiers, createElementVNode, toDisplayString } from "vue";
|
|
7
|
+
import { c as createComponent } from "./component.js";
|
|
8
|
+
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
9
|
import "../locale/lang";
|
|
10
|
-
const { componentName
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
const { componentName, create } = createComponent("sidenavbaritem");
|
|
11
|
+
const _sfc_main = create({
|
|
12
|
+
props: {
|
|
13
|
+
title: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: ""
|
|
16
|
+
},
|
|
17
|
+
ikey: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: ""
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
emits: ["click"],
|
|
23
|
+
setup: (props, context) => {
|
|
24
|
+
const classes = computed(() => {
|
|
25
|
+
const prefixCls = componentName;
|
|
26
|
+
return {
|
|
27
|
+
[prefixCls]: true
|
|
28
|
+
};
|
|
29
|
+
});
|
|
30
|
+
const handleClick = () => {
|
|
31
|
+
context.emit("click");
|
|
32
|
+
};
|
|
33
|
+
return {
|
|
34
|
+
classes,
|
|
35
|
+
handleClick
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
const _hoisted_1 = ["ikey"];
|
|
40
|
+
const _hoisted_2 = { class: "nut-sidenavbaritem__title" };
|
|
41
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
42
|
+
return openBlock(), createElementBlock("view", {
|
|
43
|
+
class: "nut-sidenavbaritem",
|
|
44
|
+
onClick: _cache[0] || (_cache[0] = withModifiers((...args) => _ctx.handleClick && _ctx.handleClick(...args), ["stop"])),
|
|
45
|
+
ikey: _ctx.ikey
|
|
46
|
+
}, [
|
|
47
|
+
createElementVNode("span", _hoisted_2, toDisplayString(_ctx.title), 1)
|
|
48
|
+
], 8, _hoisted_1);
|
|
49
|
+
}
|
|
50
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
51
|
+
export { index as default };
|