@nutui/nutui 3.1.10-beta.1 → 3.1.11-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 +26 -0
- package/README.md +2 -2
- package/dist/nutui.d.ts +6 -6
- package/dist/nutui.es.js +1643 -1116
- package/dist/nutui.umd.js +1708 -1181
- package/dist/packages/_es/ActionSheet.js +10 -12
- package/dist/packages/_es/Address.js +31 -33
- package/dist/packages/_es/Avatar.js +5 -4
- package/dist/packages/_es/BackTop.js +5 -4
- package/dist/packages/_es/Badge.js +5 -4
- package/dist/packages/_es/Barrage.js +9 -8
- package/dist/packages/_es/Button.js +6 -5
- package/dist/packages/_es/Calendar.js +14 -16
- package/dist/packages/_es/Cell.js +5 -4
- package/dist/packages/_es/CellGroup.js +8 -7
- package/dist/packages/_es/Checkbox.js +3 -3
- package/dist/packages/_es/CheckboxGroup.js +2 -2
- package/dist/packages/_es/CircleProgress.js +5 -4
- package/dist/packages/_es/Col.js +5 -4
- package/dist/packages/_es/Collapse.js +8 -7
- package/dist/packages/_es/CollapseItem.js +6 -8
- package/dist/packages/_es/CountDown.js +5 -7
- package/dist/packages/_es/CountUp.js +26 -28
- package/dist/packages/_es/DatePicker.js +11 -13
- package/dist/packages/_es/Dialog.js +14 -25
- package/dist/packages/_es/Divider.js +5 -4
- package/dist/packages/_es/Drag.js +5 -4
- package/dist/packages/_es/Elevator.js +19 -21
- package/dist/packages/_es/FixedNav.js +9 -8
- package/dist/packages/_es/Icon.js +40 -6
- package/dist/packages/_es/ImagePreview.js +12 -13
- package/dist/packages/_es/InfiniteLoading.js +5 -7
- package/dist/packages/_es/Input.js +10 -9
- package/dist/packages/_es/InputNumber.js +8 -15
- package/dist/packages/_es/Layout.js +2 -2
- package/dist/packages/_es/Menu.js +203 -0
- package/dist/packages/_es/MenuItem.js +18 -171
- package/dist/packages/_es/Navbar.js +7 -6
- package/dist/packages/_es/NoticeBar.js +9 -11
- package/dist/packages/_es/Notify.js +10 -12
- package/dist/packages/_es/NumberKeyboard.js +5 -4
- package/dist/packages/_es/OverLay.js +5 -7
- package/dist/packages/_es/Pagination.js +7 -6
- package/dist/packages/_es/Picker.js +12 -14
- package/dist/packages/_es/Popover.js +10 -12
- package/dist/packages/_es/Popup.js +9 -11
- package/dist/packages/_es/Price.js +33 -14
- package/dist/packages/_es/Progress.js +5 -4
- package/dist/packages/_es/Radio.js +20 -7
- package/dist/packages/_es/RadioGroup.js +7 -3
- package/dist/packages/_es/Range.js +13 -15
- package/dist/packages/_es/Rate.js +8 -7
- package/dist/packages/_es/Row.js +5 -4
- package/dist/packages/_es/SearchBar.js +56 -55
- package/dist/packages/_es/ShortPassword.js +8 -7
- package/dist/packages/_es/Signature.js +5 -4
- package/dist/packages/_es/Sku.js +533 -0
- package/dist/packages/_es/Step.js +14 -11
- package/dist/packages/_es/Steps.js +2 -2
- package/dist/packages/_es/Swipe.js +5 -7
- package/dist/packages/_es/Swiper.js +12 -11
- package/dist/packages/_es/SwiperItem.js +5 -4
- package/dist/packages/_es/Switch.js +5 -4
- package/dist/packages/_es/TabPane.js +5 -4
- package/dist/packages/_es/Tabbar.js +5 -4
- package/dist/packages/_es/TabbarItem.js +9 -8
- package/dist/packages/_es/Tabs.js +43 -18
- package/dist/packages/_es/Tag.js +16 -18
- package/dist/packages/_es/TextArea.js +6 -5
- package/dist/packages/_es/TimeDetail.js +5 -7
- package/dist/packages/_es/TimePannel.js +5 -7
- package/dist/packages/_es/TimeSelect.js +5 -4
- package/dist/packages/_es/Toast.js +10 -12
- package/dist/packages/_es/Uploader.js +165 -89
- package/dist/packages/_es/Video.js +5 -7
- package/dist/packages/_es/component.js +1 -1
- package/dist/packages/_es/index.js +1 -1
- package/dist/packages/_es/index2.js +1 -1
- package/dist/packages/_es/plugin-vue_export-helper.js +12 -0
- package/dist/packages/_es/pxCheck.js +1 -1
- package/dist/packages/_es/raf.js +1 -1
- package/dist/packages/_es/style.css +160 -0
- package/dist/packages/button/index.scss +3 -0
- package/dist/packages/checkbox/index.scss +2 -0
- package/dist/packages/dialog/index.scss +2 -1
- package/dist/packages/menu/index.scss +70 -4
- package/dist/packages/price/index.scss +40 -3
- package/dist/packages/progress/index.scss +2 -0
- package/dist/packages/radio/index.scss +34 -4
- package/dist/packages/radiogroup/index.scss +20 -0
- package/dist/packages/searchbar/index.scss +35 -30
- package/dist/packages/sku/index.scss +147 -0
- package/dist/packages/tabs/index.scss +47 -19
- package/dist/packages/tag/index.scss +2 -1
- package/dist/packages/uploader/index.scss +94 -8
- package/dist/style.css +1 -1
- package/dist/style.es.js +2 -1
- package/dist/styles/mixins/index.scss +0 -4
- package/dist/styles/themes/default.scss +29 -30
- package/dist/styles/variables.scss +46 -6
- package/package.json +1 -1
- package/dist/packages/_es/Tab.js +0 -178
- package/dist/packages/_es/TabPanel.js +0 -29
- package/dist/packages/_es/index.vue_vue&type=script&lang.js +0 -44
- package/dist/packages/tab/index.scss +0 -182
- package/dist/packages/tabpanel/index.scss +0 -2
|
@@ -17,22 +17,20 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
var __require = typeof require !== "undefined" ? require : (x) => {
|
|
21
|
-
throw new Error('Dynamic require of "' + x + '" is not supported');
|
|
22
|
-
};
|
|
23
20
|
/*!
|
|
24
|
-
* @nutui/nutui v3.1.
|
|
21
|
+
* @nutui/nutui v3.1.11-beta.0 Sat Nov 13 2021 21:43:55 GMT+0800 (中国标准时间)
|
|
25
22
|
* (c) 2021 @jdf2e.
|
|
26
23
|
* Released under the MIT License.
|
|
27
24
|
*/
|
|
28
25
|
import { toRefs, reactive, watch, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, createBlock, Fragment, renderList, createElementVNode, createCommentVNode, toDisplayString } from "vue";
|
|
29
26
|
import { c as createComponent } from "./component.js";
|
|
30
|
-
import
|
|
27
|
+
import Popup from "./Popup.js";
|
|
28
|
+
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
31
29
|
import "./OverLay.js";
|
|
32
|
-
import "./
|
|
30
|
+
import "./Icon.js";
|
|
33
31
|
import "./pxCheck.js";
|
|
34
32
|
const { componentName, create } = createComponent("imagepreview");
|
|
35
|
-
|
|
33
|
+
const _sfc_main = create({
|
|
36
34
|
props: {
|
|
37
35
|
show: {
|
|
38
36
|
type: Boolean,
|
|
@@ -44,7 +42,7 @@ var _sfc_main = create({
|
|
|
44
42
|
}
|
|
45
43
|
},
|
|
46
44
|
components: {
|
|
47
|
-
[
|
|
45
|
+
[Popup.name]: Popup
|
|
48
46
|
},
|
|
49
47
|
setup(props, { emit }) {
|
|
50
48
|
const { show, images } = toRefs(props);
|
|
@@ -90,11 +88,12 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
90
88
|
class: "nut-imagepreview-swiper",
|
|
91
89
|
loop: true,
|
|
92
90
|
direction: "horizontal",
|
|
93
|
-
onChange: _ctx.slideChangeEnd
|
|
91
|
+
onChange: _ctx.slideChangeEnd,
|
|
92
|
+
"is-preventDefault": false
|
|
94
93
|
}, {
|
|
95
94
|
default: withCtx(() => [
|
|
96
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.images, (item,
|
|
97
|
-
return openBlock(), createBlock(_component_nut_swiper_item, { key:
|
|
95
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.images, (item, index2) => {
|
|
96
|
+
return openBlock(), createBlock(_component_nut_swiper_item, { key: index2 }, {
|
|
98
97
|
default: withCtx(() => [
|
|
99
98
|
createElementVNode("img", {
|
|
100
99
|
src: item.imgSrc,
|
|
@@ -113,5 +112,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
113
112
|
}, 8, ["visible", "onClick"])
|
|
114
113
|
]);
|
|
115
114
|
}
|
|
116
|
-
_sfc_main
|
|
117
|
-
export {
|
|
115
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
116
|
+
export { index as default };
|
|
@@ -17,18 +17,16 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
var __require = typeof require !== "undefined" ? require : (x) => {
|
|
21
|
-
throw new Error('Dynamic require of "' + x + '" is not supported');
|
|
22
|
-
};
|
|
23
20
|
/*!
|
|
24
|
-
* @nutui/nutui v3.1.
|
|
21
|
+
* @nutui/nutui v3.1.11-beta.0 Sat Nov 13 2021 21:43:55 GMT+0800 (中国标准时间)
|
|
25
22
|
* (c) 2021 @jdf2e.
|
|
26
23
|
* Released under the MIT License.
|
|
27
24
|
*/
|
|
28
25
|
import { reactive, computed, onMounted, onUnmounted, ref, onActivated, onDeactivated, toRefs, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, createVNode, toDisplayString, renderSlot, createCommentVNode } from "vue";
|
|
29
26
|
import { c as createComponent } from "./component.js";
|
|
27
|
+
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
30
28
|
const { componentName, create } = createComponent("infiniteloading");
|
|
31
|
-
|
|
29
|
+
const _sfc_main = create({
|
|
32
30
|
props: {
|
|
33
31
|
hasMore: {
|
|
34
32
|
type: Boolean,
|
|
@@ -263,5 +261,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
263
261
|
])
|
|
264
262
|
], 34);
|
|
265
263
|
}
|
|
266
|
-
_sfc_main
|
|
267
|
-
export {
|
|
264
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
265
|
+
export { index as default };
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.11-beta.0 Sat Nov 13 2021 21:43:55 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2021 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { ref, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, toDisplayString, createCommentVNode, normalizeStyle, withDirectives, createVNode, vShow } from "vue";
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
|
+
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
8
9
|
function trimExtraChar(value, char, regExp) {
|
|
9
|
-
const
|
|
10
|
-
if (
|
|
10
|
+
const index2 = value.indexOf(char);
|
|
11
|
+
if (index2 === -1) {
|
|
11
12
|
return value;
|
|
12
13
|
}
|
|
13
|
-
if (char === "-" &&
|
|
14
|
-
return value.slice(0,
|
|
14
|
+
if (char === "-" && index2 !== 0) {
|
|
15
|
+
return value.slice(0, index2);
|
|
15
16
|
}
|
|
16
|
-
return value.slice(0,
|
|
17
|
+
return value.slice(0, index2 + 1) + value.slice(index2).replace(regExp, "");
|
|
17
18
|
}
|
|
18
19
|
function formatNumber(value, allowDot = true, allowMinus = true) {
|
|
19
20
|
if (allowDot) {
|
|
@@ -30,7 +31,7 @@ function formatNumber(value, allowDot = true, allowMinus = true) {
|
|
|
30
31
|
return value.replace(regExp, "");
|
|
31
32
|
}
|
|
32
33
|
const { componentName, create } = createComponent("input");
|
|
33
|
-
|
|
34
|
+
const _sfc_main = create({
|
|
34
35
|
props: {
|
|
35
36
|
type: {
|
|
36
37
|
type: String,
|
|
@@ -178,5 +179,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
178
179
|
]) : createCommentVNode("", true)
|
|
179
180
|
], 2);
|
|
180
181
|
}
|
|
181
|
-
_sfc_main
|
|
182
|
-
export {
|
|
182
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
183
|
+
export { index as default };
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.11-beta.0 Sat Nov 13 2021 21:43:55 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2021 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { computed, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createVNode, createElementVNode } from "vue";
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
8
|
import { p as pxCheck } from "./pxCheck.js";
|
|
9
|
+
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
10
|
const { componentName, create } = createComponent("inputnumber");
|
|
10
|
-
|
|
11
|
+
const _sfc_main = create({
|
|
11
12
|
props: {
|
|
12
13
|
modelValue: {
|
|
13
14
|
type: [Number, String],
|
|
@@ -46,15 +47,7 @@ var _sfc_main = create({
|
|
|
46
47
|
default: false
|
|
47
48
|
}
|
|
48
49
|
},
|
|
49
|
-
emits: [
|
|
50
|
-
"update:modelValue",
|
|
51
|
-
"change",
|
|
52
|
-
"blur",
|
|
53
|
-
"focus",
|
|
54
|
-
"reduce",
|
|
55
|
-
"add",
|
|
56
|
-
"overlimit"
|
|
57
|
-
],
|
|
50
|
+
emits: ["update:modelValue", "change", "blur", "focus", "reduce", "add", "overlimit"],
|
|
58
51
|
setup(props, { emit }) {
|
|
59
52
|
const classes = computed(() => {
|
|
60
53
|
const prefixCls = componentName;
|
|
@@ -87,7 +80,7 @@ var _sfc_main = create({
|
|
|
87
80
|
let output_value = Number(props.modelValue) - Number(props.step);
|
|
88
81
|
emitChange(output_value, event);
|
|
89
82
|
} else {
|
|
90
|
-
emit("overlimit", event);
|
|
83
|
+
emit("overlimit", event, "reduce");
|
|
91
84
|
}
|
|
92
85
|
};
|
|
93
86
|
const add = (event) => {
|
|
@@ -96,7 +89,7 @@ var _sfc_main = create({
|
|
|
96
89
|
let output_value = Number(props.modelValue) + Number(props.step);
|
|
97
90
|
emitChange(output_value, event);
|
|
98
91
|
} else {
|
|
99
|
-
emit("overlimit", event);
|
|
92
|
+
emit("overlimit", event, "add");
|
|
100
93
|
}
|
|
101
94
|
};
|
|
102
95
|
const focus = (event) => {
|
|
@@ -167,5 +160,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
167
160
|
}, null, 8, ["class", "size", "onClick"])
|
|
168
161
|
], 6);
|
|
169
162
|
}
|
|
170
|
-
_sfc_main
|
|
171
|
-
export {
|
|
163
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
164
|
+
export { index as default };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.11-beta.0 Sat Nov 13 2021 21:43:55 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2021 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { c as createComponent } from "./component.js";
|
|
7
7
|
import "vue";
|
|
8
8
|
const { create } = createComponent("layout");
|
|
9
|
-
|
|
9
|
+
const _sfc_main = create({});
|
|
10
10
|
export { _sfc_main as default };
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* @nutui/nutui v3.1.11-beta.0 Sat Nov 13 2021 21:43:55 GMT+0800 (中国标准时间)
|
|
3
|
+
* (c) 2021 @jdf2e.
|
|
4
|
+
* Released under the MIT License.
|
|
5
|
+
*/
|
|
6
|
+
import { reactive, ref, computed, resolveComponent, openBlock, createElementBlock, createVNode, mergeProps, createElementVNode, normalizeClass, normalizeStyle, Fragment, renderList, createTextVNode, toDisplayString, createBlock, withDirectives, createCommentVNode, vShow, renderSlot } from "vue";
|
|
7
|
+
import { c as createComponent } from "./component.js";
|
|
8
|
+
import _sfc_main$1 from "./Icon.js";
|
|
9
|
+
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
10
|
+
import "./pxCheck.js";
|
|
11
|
+
var index_vue_vue_type_style_index_0_lang = "";
|
|
12
|
+
const { componentName, create } = createComponent("menu");
|
|
13
|
+
const _sfc_main = create({
|
|
14
|
+
components: {
|
|
15
|
+
[_sfc_main$1.name]: _sfc_main$1
|
|
16
|
+
},
|
|
17
|
+
props: {
|
|
18
|
+
col: {
|
|
19
|
+
type: [String, Number],
|
|
20
|
+
default: 1
|
|
21
|
+
},
|
|
22
|
+
activeColor: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: "#f00"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
emits: ["choose"],
|
|
28
|
+
setup(props, { slots, emit }) {
|
|
29
|
+
const menuList = reactive([]);
|
|
30
|
+
let activeTitle = ref("");
|
|
31
|
+
let showMask = ref(false);
|
|
32
|
+
let styleObj = reactive({
|
|
33
|
+
flexBasis: 100 / Number(props.col) + "%"
|
|
34
|
+
});
|
|
35
|
+
let nutMenuIndex = ref("auto");
|
|
36
|
+
let hasOptions = ref(true);
|
|
37
|
+
let isShowCustomer = ref(false);
|
|
38
|
+
if (slots.default) {
|
|
39
|
+
for (let i = 0; i < slots.default().length; i++) {
|
|
40
|
+
if (slots.default()[i].type["name"] === "nut-menu-item") {
|
|
41
|
+
let item = {
|
|
42
|
+
title: slots.default()[i].props["title"],
|
|
43
|
+
disabled: !!slots.default()[i].props["disabled"]
|
|
44
|
+
};
|
|
45
|
+
if (slots.default()[i].props["options"]) {
|
|
46
|
+
item["options"] = slots.default()[i].props["options"];
|
|
47
|
+
} else {
|
|
48
|
+
hasOptions.value = false;
|
|
49
|
+
}
|
|
50
|
+
menuList.push(item);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
const handleClickTitle = (title, index2) => {
|
|
55
|
+
if (!hasOptions.value) {
|
|
56
|
+
if (activeTitle.value) {
|
|
57
|
+
activeTitle.value = "";
|
|
58
|
+
isShowCustomer.value = false;
|
|
59
|
+
showMask.value = false;
|
|
60
|
+
nutMenuIndex.value = "auto";
|
|
61
|
+
} else {
|
|
62
|
+
activeTitle.value = title;
|
|
63
|
+
isShowCustomer.value = true;
|
|
64
|
+
showMask.value = true;
|
|
65
|
+
nutMenuIndex.value = 2001;
|
|
66
|
+
}
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
if (menuList.length > 1) {
|
|
70
|
+
if (activeTitle.value === title) {
|
|
71
|
+
activeTitle.value = "";
|
|
72
|
+
nutMenuIndex.value = "auto";
|
|
73
|
+
showMask.value = false;
|
|
74
|
+
} else {
|
|
75
|
+
activeTitle.value = title;
|
|
76
|
+
nutMenuIndex.value = 2001;
|
|
77
|
+
showMask.value = true;
|
|
78
|
+
}
|
|
79
|
+
} else {
|
|
80
|
+
if (activeTitle.value) {
|
|
81
|
+
activeTitle.value = "";
|
|
82
|
+
nutMenuIndex.value = "auto";
|
|
83
|
+
showMask.value = false;
|
|
84
|
+
} else {
|
|
85
|
+
activeTitle.value = title;
|
|
86
|
+
nutMenuIndex.value = 2001;
|
|
87
|
+
showMask.value = true;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
const handleClickOption = (text, index2, value) => {
|
|
92
|
+
menuList[index2].title = text;
|
|
93
|
+
activeTitle.value = "";
|
|
94
|
+
showMask.value = false;
|
|
95
|
+
nutMenuIndex.value = "auto";
|
|
96
|
+
emit("choose", text, value);
|
|
97
|
+
};
|
|
98
|
+
const classes = computed(() => {
|
|
99
|
+
const prefixCls = componentName;
|
|
100
|
+
return {
|
|
101
|
+
[prefixCls]: true
|
|
102
|
+
};
|
|
103
|
+
});
|
|
104
|
+
const handleClose = () => {
|
|
105
|
+
activeTitle.value = "";
|
|
106
|
+
nutMenuIndex.value = "auto";
|
|
107
|
+
if (isShowCustomer.value) {
|
|
108
|
+
isShowCustomer.value = false;
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
return {
|
|
112
|
+
menuList,
|
|
113
|
+
activeTitle,
|
|
114
|
+
classes,
|
|
115
|
+
showMask,
|
|
116
|
+
styleObj,
|
|
117
|
+
nutMenuIndex,
|
|
118
|
+
hasOptions,
|
|
119
|
+
isShowCustomer,
|
|
120
|
+
handleClickTitle,
|
|
121
|
+
handleClickOption,
|
|
122
|
+
handleClose
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
const _hoisted_1 = { class: "title-list" };
|
|
127
|
+
const _hoisted_2 = ["onClick"];
|
|
128
|
+
const _hoisted_3 = ["onClick"];
|
|
129
|
+
const _hoisted_4 = { class: "customer-item" };
|
|
130
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
131
|
+
const _component_nut_popup = resolveComponent("nut-popup");
|
|
132
|
+
const _component_nut_icon = resolveComponent("nut-icon");
|
|
133
|
+
return openBlock(), createElementBlock("view", null, [
|
|
134
|
+
createVNode(_component_nut_popup, mergeProps(_ctx.$attrs, {
|
|
135
|
+
visible: _ctx.showMask,
|
|
136
|
+
"onUpdate:visible": _cache[0] || (_cache[0] = ($event) => _ctx.showMask = $event),
|
|
137
|
+
onClose: _ctx.handleClose
|
|
138
|
+
}), null, 16, ["visible", "onClose"]),
|
|
139
|
+
createElementVNode("div", {
|
|
140
|
+
class: normalizeClass(_ctx.classes),
|
|
141
|
+
style: normalizeStyle({ "z-index": _ctx.nutMenuIndex })
|
|
142
|
+
}, [
|
|
143
|
+
createElementVNode("div", _hoisted_1, [
|
|
144
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.menuList, (menu, index2) => {
|
|
145
|
+
return openBlock(), createElementBlock("div", {
|
|
146
|
+
key: index2,
|
|
147
|
+
class: normalizeClass(["title", {
|
|
148
|
+
"is-active": _ctx.activeTitle === menu.title,
|
|
149
|
+
disabled: menu.disabled
|
|
150
|
+
}]),
|
|
151
|
+
onClick: ($event) => !menu.disabled && _ctx.handleClickTitle(menu.title, index2)
|
|
152
|
+
}, [
|
|
153
|
+
createTextVNode(toDisplayString(menu.title) + " ", 1),
|
|
154
|
+
_ctx.activeTitle === menu.title ? (openBlock(), createBlock(_component_nut_icon, {
|
|
155
|
+
key: 0,
|
|
156
|
+
size: "10",
|
|
157
|
+
color: "#333",
|
|
158
|
+
name: "arrow-up"
|
|
159
|
+
})) : (openBlock(), createBlock(_component_nut_icon, {
|
|
160
|
+
key: 1,
|
|
161
|
+
size: "10",
|
|
162
|
+
color: "#999",
|
|
163
|
+
name: "arrow-down"
|
|
164
|
+
}))
|
|
165
|
+
], 10, _hoisted_2);
|
|
166
|
+
}), 128))
|
|
167
|
+
]),
|
|
168
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.menuList, (menu, index2) => {
|
|
169
|
+
return withDirectives((openBlock(), createElementBlock("div", {
|
|
170
|
+
key: index2,
|
|
171
|
+
class: "option-list"
|
|
172
|
+
}, [
|
|
173
|
+
createElementVNode("ul", null, [
|
|
174
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(menu.options, (option, index22) => {
|
|
175
|
+
return openBlock(), createElementBlock("li", {
|
|
176
|
+
key: index22,
|
|
177
|
+
onClick: ($event) => _ctx.handleClickOption(option.text, index2, option.value),
|
|
178
|
+
style: normalizeStyle(_ctx.styleObj)
|
|
179
|
+
}, [
|
|
180
|
+
menu.title === option.text ? (openBlock(), createBlock(_component_nut_icon, {
|
|
181
|
+
key: 0,
|
|
182
|
+
size: "20",
|
|
183
|
+
color: _ctx.activeColor,
|
|
184
|
+
name: "Check"
|
|
185
|
+
}, null, 8, ["color"])) : createCommentVNode("", true),
|
|
186
|
+
createTextVNode(toDisplayString(option.text), 1)
|
|
187
|
+
], 12, _hoisted_3);
|
|
188
|
+
}), 128))
|
|
189
|
+
])
|
|
190
|
+
], 512)), [
|
|
191
|
+
[vShow, _ctx.hasOptions && _ctx.activeTitle === menu.title]
|
|
192
|
+
]);
|
|
193
|
+
}), 128)),
|
|
194
|
+
withDirectives(createElementVNode("view", _hoisted_4, [
|
|
195
|
+
renderSlot(_ctx.$slots, "default")
|
|
196
|
+
], 512), [
|
|
197
|
+
[vShow, !_ctx.hasOptions && _ctx.isShowCustomer]
|
|
198
|
+
])
|
|
199
|
+
], 6)
|
|
200
|
+
]);
|
|
201
|
+
}
|
|
202
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
203
|
+
export { index as default };
|
|
@@ -1,182 +1,29 @@
|
|
|
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
|
-
var __require = typeof require !== "undefined" ? require : (x) => {
|
|
21
|
-
throw new Error('Dynamic require of "' + x + '" is not supported');
|
|
22
|
-
};
|
|
23
1
|
/*!
|
|
24
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.11-beta.0 Sat Nov 13 2021 21:43:55 GMT+0800 (中国标准时间)
|
|
25
3
|
* (c) 2021 @jdf2e.
|
|
26
4
|
* Released under the MIT License.
|
|
27
5
|
*/
|
|
28
|
-
import {
|
|
6
|
+
import { getCurrentInstance, openBlock, createElementBlock, renderSlot } from "vue";
|
|
29
7
|
import { c as createComponent } from "./component.js";
|
|
8
|
+
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
9
|
+
var index_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
30
10
|
const { create, componentName } = createComponent("menu-item");
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
default: false
|
|
40
|
-
},
|
|
41
|
-
menuList: {
|
|
42
|
-
type: Array,
|
|
43
|
-
default: () => {
|
|
44
|
-
return [];
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
autoClose: {
|
|
48
|
-
type: Boolean,
|
|
49
|
-
default: true
|
|
50
|
-
},
|
|
51
|
-
multiStyle: {
|
|
52
|
-
type: [String, Number],
|
|
53
|
-
default: 1
|
|
54
|
-
},
|
|
55
|
-
maxHeight: {
|
|
56
|
-
type: [String, Number],
|
|
57
|
-
default: ""
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
emits: ["change", "menu-click"],
|
|
61
|
-
setup(props, { emit }) {
|
|
62
|
-
const menuTitle = ref(props.title);
|
|
63
|
-
const menu = inject("menuRelation");
|
|
64
|
-
const parent = reactive(menu);
|
|
65
|
-
const state = reactive({
|
|
66
|
-
showPanel: false,
|
|
67
|
-
currMenu: 0,
|
|
68
|
-
showMask: false
|
|
69
|
-
});
|
|
70
|
-
const classes = computed(() => {
|
|
71
|
-
const prefixCls = componentName;
|
|
72
|
-
return {
|
|
73
|
-
[prefixCls]: true,
|
|
74
|
-
disabled: props.disabled,
|
|
75
|
-
[`${prefixCls}-active`]: state.showPanel
|
|
76
|
-
};
|
|
77
|
-
});
|
|
78
|
-
const handleMenuPanel = () => {
|
|
79
|
-
emit("menu-click", menuTitle.value);
|
|
80
|
-
if (props.disabled) {
|
|
81
|
-
return;
|
|
82
|
-
}
|
|
83
|
-
state.showPanel = !state.showPanel;
|
|
84
|
-
if (parent.hasMask) {
|
|
85
|
-
state.showMask = !state.showMask;
|
|
86
|
-
parent.handleMaskShow(state.showPanel);
|
|
87
|
-
}
|
|
11
|
+
const _sfc_main = create({
|
|
12
|
+
setup() {
|
|
13
|
+
let pro = getCurrentInstance().proxy;
|
|
14
|
+
pro.toggle = () => {
|
|
15
|
+
pro.$parent.activeTitle = "";
|
|
16
|
+
pro.$parent.isShowCustomer = false;
|
|
17
|
+
pro.$parent.showMask = false;
|
|
18
|
+
pro.$parent.nutMenuIndex = "auto";
|
|
88
19
|
};
|
|
89
|
-
|
|
90
|
-
const menuBox = document.querySelectorAll(".nut-menu-active")[0];
|
|
91
|
-
if (menuBox && state.showPanel) {
|
|
92
|
-
if (!menuBox.contains(event.target)) {
|
|
93
|
-
state.showPanel = false;
|
|
94
|
-
state.showMask = false;
|
|
95
|
-
parent.handleMaskShow(false);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
};
|
|
99
|
-
const checkMenus = (item, index) => {
|
|
100
|
-
menuTitle.value = item.value;
|
|
101
|
-
state.currMenu = index;
|
|
102
|
-
if (props.autoClose) {
|
|
103
|
-
state.showPanel = false;
|
|
104
|
-
state.showMask = false;
|
|
105
|
-
parent.handleMaskShow(false);
|
|
106
|
-
}
|
|
107
|
-
emit("change", item, menuTitle.value);
|
|
108
|
-
};
|
|
109
|
-
onMounted(() => {
|
|
110
|
-
document.addEventListener("mouseup", (event) => {
|
|
111
|
-
handleShowAndHide(event);
|
|
112
|
-
}, false);
|
|
113
|
-
});
|
|
114
|
-
onUnmounted(() => {
|
|
115
|
-
document.removeEventListener("mouseup", (event) => {
|
|
116
|
-
handleShowAndHide(event);
|
|
117
|
-
});
|
|
118
|
-
});
|
|
119
|
-
return __spreadProps(__spreadValues({
|
|
120
|
-
classes
|
|
121
|
-
}, toRefs(state)), {
|
|
122
|
-
handleMenuPanel,
|
|
123
|
-
checkMenus,
|
|
124
|
-
menuTitle
|
|
125
|
-
});
|
|
20
|
+
return {};
|
|
126
21
|
}
|
|
127
22
|
});
|
|
128
|
-
const _hoisted_1 = ["innerHTML"];
|
|
129
|
-
const _hoisted_2 = ["onClick"];
|
|
130
23
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
class: normalizeClass(_ctx.classes)
|
|
135
|
-
}, [
|
|
136
|
-
createVNode(_component_nut_popup, {
|
|
137
|
-
visible: _ctx.showMask,
|
|
138
|
-
"onUpdate:visible": _cache[0] || (_cache[0] = ($event) => _ctx.showMask = $event)
|
|
139
|
-
}, null, 8, ["visible"]),
|
|
140
|
-
createElementVNode("view", {
|
|
141
|
-
class: "nut-menu-title",
|
|
142
|
-
onClick: _cache[1] || (_cache[1] = (...args) => _ctx.handleMenuPanel && _ctx.handleMenuPanel(...args))
|
|
143
|
-
}, [
|
|
144
|
-
createElementVNode("view", {
|
|
145
|
-
class: "title-name",
|
|
146
|
-
innerHTML: _ctx.menuTitle
|
|
147
|
-
}, null, 8, _hoisted_1),
|
|
148
|
-
createVNode(_component_nut_icon, { "class-prefix": "icon" })
|
|
149
|
-
]),
|
|
150
|
-
createElementVNode("view", {
|
|
151
|
-
class: "nut-menu-panel",
|
|
152
|
-
style: normalizeStyle(`max-height:${_ctx.maxHeight}px`)
|
|
153
|
-
}, [
|
|
154
|
-
_ctx.menuList && _ctx.menuList.length ? (openBlock(), createElementBlock("view", {
|
|
155
|
-
key: 0,
|
|
156
|
-
class: normalizeClass(["menu-list", [
|
|
157
|
-
{ "bubble-line": _ctx.multiStyle == 2 },
|
|
158
|
-
{ "three-line": _ctx.multiStyle == 3 }
|
|
159
|
-
]])
|
|
160
|
-
}, [
|
|
161
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.menuList, (item, index) => {
|
|
162
|
-
return openBlock(), createElementBlock("view", {
|
|
163
|
-
class: normalizeClass(["menu-option", { checked: _ctx.currMenu === index }]),
|
|
164
|
-
key: index,
|
|
165
|
-
onClick: ($event) => _ctx.checkMenus(item, index)
|
|
166
|
-
}, [
|
|
167
|
-
_ctx.currMenu === index ? (openBlock(), createBlock(_component_nut_icon, {
|
|
168
|
-
key: 0,
|
|
169
|
-
class: "check-icon",
|
|
170
|
-
name: "Check",
|
|
171
|
-
size: "14px"
|
|
172
|
-
})) : createCommentVNode("", true),
|
|
173
|
-
createTextVNode(toDisplayString(item.value), 1)
|
|
174
|
-
], 10, _hoisted_2);
|
|
175
|
-
}), 128))
|
|
176
|
-
], 2)) : createCommentVNode("", true),
|
|
177
|
-
renderSlot(_ctx.$slots, "default")
|
|
178
|
-
], 4)
|
|
179
|
-
], 2);
|
|
24
|
+
return openBlock(), createElementBlock("div", null, [
|
|
25
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
26
|
+
]);
|
|
180
27
|
}
|
|
181
|
-
_sfc_main
|
|
182
|
-
export {
|
|
28
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-02edb907"]]);
|
|
29
|
+
export { index as default };
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.11-beta.0 Sat Nov 13 2021 21:43:55 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2021 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import { ref, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, createBlock, createCommentVNode, toDisplayString, Fragment, renderList, normalizeStyle, renderSlot } from "vue";
|
|
7
7
|
import { c as createComponent } from "./component.js";
|
|
8
|
+
import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
|
|
8
9
|
const { componentName, create } = createComponent("navbar");
|
|
9
|
-
|
|
10
|
+
const _sfc_main = create({
|
|
10
11
|
props: {
|
|
11
12
|
leftShow: { type: Boolean, default: true },
|
|
12
13
|
title: { type: String, default: "" },
|
|
@@ -117,11 +118,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
117
118
|
onClick: _ctx.handleCenterIcon
|
|
118
119
|
}, null, 8, ["name", "onClick"])) : createCommentVNode("", true),
|
|
119
120
|
createElementVNode("view", _hoisted_2, [
|
|
120
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.tabs, (item,
|
|
121
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.tabs, (item, index2) => {
|
|
121
122
|
return openBlock(), createElementBlock("view", {
|
|
122
123
|
class: normalizeClass([
|
|
123
124
|
"tab-title-box",
|
|
124
|
-
{ "nut-tab-active": _ctx.activeIndex == item.id || _ctx.activeIndex ==
|
|
125
|
+
{ "nut-tab-active": _ctx.activeIndex == item.id || _ctx.activeIndex == index2 }
|
|
125
126
|
]),
|
|
126
127
|
onClick: ($event) => _ctx.switchTitle(item.id, item.name),
|
|
127
128
|
key: item.id
|
|
@@ -155,5 +156,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
155
156
|
], 2)) : createCommentVNode("", true)
|
|
156
157
|
], 2);
|
|
157
158
|
}
|
|
158
|
-
_sfc_main
|
|
159
|
-
export {
|
|
159
|
+
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
160
|
+
export { index as default };
|