@nutui/nutui 4.0.12-beta.1 → 4.0.12
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 +1 -1
- package/dist/nutui.js +1 -1
- package/dist/nutui.umd.js +1 -1
- package/dist/packages/_es/ActionSheet.js +111 -78
- package/dist/packages/_es/Address.js +375 -250
- package/dist/packages/_es/AddressList.js +354 -269
- package/dist/packages/_es/Animate.js +58 -41
- package/dist/packages/_es/Audio.js +197 -128
- package/dist/packages/_es/AudioOperate.js +71 -60
- package/dist/packages/_es/Avatar.js +89 -66
- package/dist/packages/_es/AvatarGroup.js +31 -23
- package/dist/packages/_es/Backtop.js +99 -59
- package/dist/packages/_es/Badge.js +47 -36
- package/dist/packages/_es/Barrage.js +147 -68
- package/dist/packages/_es/Button.js +66 -47
- package/dist/packages/_es/Calendar.js +157 -135
- package/dist/packages/_es/CalendarItem.js +6 -6
- package/dist/packages/_es/Card.js +56 -42
- package/dist/packages/_es/Cascader.js +474 -315
- package/dist/packages/_es/Category.js +39 -29
- package/dist/packages/_es/CategoryPane.js +83 -57
- package/dist/packages/_es/Cell.js +71 -56
- package/dist/packages/_es/CellGroup.js +27 -19
- package/dist/packages/_es/Checkbox.js +156 -109
- package/dist/packages/_es/CheckboxGroup.js +59 -38
- package/dist/packages/_es/CircleProgress.js +96 -67
- package/dist/packages/_es/Col.js +31 -23
- package/dist/packages/_es/Collapse.js +58 -33
- package/dist/packages/_es/CollapseItem.js +108 -78
- package/dist/packages/_es/Comment.js +279 -207
- package/dist/packages/_es/ConfigProvider.js +55 -37
- package/dist/packages/_es/Countdown.js +212 -100
- package/dist/packages/_es/Countup.js +445 -232
- package/dist/packages/_es/DatePicker.js +265 -162
- package/dist/packages/_es/Dialog.js +213 -161
- package/dist/packages/_es/Divider.js +57 -42
- package/dist/packages/_es/Drag.js +153 -70
- package/dist/packages/_es/Ecard.js +104 -64
- package/dist/packages/_es/Elevator.js +219 -143
- package/dist/packages/_es/Ellipsis.js +178 -95
- package/dist/packages/_es/Empty.js +39 -23
- package/dist/packages/_es/FixedNav.js +116 -93
- package/dist/packages/_es/Form.js +178 -107
- package/dist/packages/_es/FormItem.js +61 -48
- package/dist/packages/_es/Grid.js +6 -5
- package/dist/packages/_es/GridItem.js +84 -58
- package/dist/packages/_es/Image.js +130 -90
- package/dist/packages/_es/ImagePreview.js +412 -256
- package/dist/packages/_es/Indicator.js +34 -30
- package/dist/packages/_es/InfiniteLoading.js +136 -83
- package/dist/packages/_es/Input.js +264 -160
- package/dist/packages/_es/InputNumber.js +117 -81
- package/dist/packages/_es/Interceptor-956b24fc.js +29 -0
- package/dist/packages/_es/Invoice.js +130 -104
- package/dist/packages/_es/Layout.js +4 -3
- package/dist/packages/_es/List.js +215 -117
- package/dist/packages/_es/Menu.js +150 -95
- package/dist/packages/_es/MenuItem.js +154 -109
- package/dist/packages/_es/Navbar.js +119 -103
- package/dist/packages/_es/Noticebar.js +312 -197
- package/dist/packages/_es/Notify.js +166 -110
- package/dist/packages/_es/NumberKeyboard.js +202 -127
- package/dist/packages/_es/Overlay.js +80 -52
- package/dist/packages/_es/Pagination.js +100 -70
- package/dist/packages/_es/Picker.js +437 -275
- package/dist/packages/_es/Popover.js +225 -122
- package/dist/packages/_es/Popup.js +4 -4
- package/dist/packages/_es/Price.js +82 -44
- package/dist/packages/_es/Progress.js +79 -63
- package/dist/packages/_es/PullRefresh.js +173 -95
- package/dist/packages/_es/Radio.js +4 -4
- package/dist/packages/_es/RadioGroup.js +3 -3
- package/dist/packages/_es/Range.js +347 -204
- package/dist/packages/_es/Rate.js +141 -92
- package/dist/packages/_es/Row.js +27 -21
- package/dist/packages/_es/Searchbar.js +174 -123
- package/dist/packages/_es/ShortPassword.js +93 -69
- package/dist/packages/_es/SideNavbar.js +80 -49
- package/dist/packages/_es/SideNavbarItem.js +32 -22
- package/dist/packages/_es/Signature.js +146 -83
- package/dist/packages/_es/Skeleton.js +130 -110
- package/dist/packages/_es/Sku.js +343 -250
- package/dist/packages/_es/Step.js +86 -59
- package/dist/packages/_es/Steps.js +31 -26
- package/dist/packages/_es/Sticky.js +4 -4
- package/dist/packages/_es/SubSideNavbar.js +74 -52
- package/dist/packages/_es/Swipe.js +155 -83
- package/dist/packages/_es/Swiper.js +311 -174
- package/dist/packages/_es/SwiperItem.js +44 -28
- package/dist/packages/_es/Switch.js +68 -55
- package/dist/packages/_es/TabPane.js +41 -30
- package/dist/packages/_es/Tabbar.js +52 -41
- package/dist/packages/_es/TabbarItem.js +82 -61
- package/dist/packages/_es/Table.js +165 -109
- package/dist/packages/_es/Tabs.js +388 -240
- package/dist/packages/_es/Tag.js +61 -44
- package/dist/packages/_es/Textarea.js +124 -80
- package/dist/packages/_es/TimeDetail.js +76 -49
- package/dist/packages/_es/TimePannel.js +48 -34
- package/dist/packages/_es/TimeSelect.js +68 -47
- package/dist/packages/_es/Toast.js +218 -144
- package/dist/packages/_es/Tour.js +192 -138
- package/dist/packages/_es/TrendArrow.js +77 -57
- package/dist/packages/_es/Uploader.js +359 -234
- package/dist/packages/_es/Video.js +316 -191
- package/dist/packages/_es/Watermark.js +117 -84
- package/dist/packages/_es/_plugin-vue_export-helper-cc2b3d55.js +10 -0
- package/dist/packages/_es/common-b9a5e726.js +145 -0
- package/dist/packages/_es/component-81a4c1d0.js +145 -0
- package/dist/packages/_es/index-29892cda.js +33 -0
- package/dist/packages/_es/index-43c34ac6.js +30 -0
- package/dist/packages/_es/index-54d03fc1.js +8 -0
- package/dist/packages/_es/index-79c5dc33.js +10 -0
- package/dist/packages/_es/index-7a7385e4.js +67 -0
- package/dist/packages/_es/index-87422be8.js +942 -0
- package/dist/packages/_es/index-da0a7662.js +259 -0
- package/dist/packages/_es/index.vue_vue_type_script_lang-22dfc112.js +46 -0
- package/dist/packages/_es/index.vue_vue_type_script_lang-a8856969.js +97 -0
- package/dist/packages/_es/index.vue_vue_type_script_lang-cc5c4086.js +151 -0
- package/dist/packages/_es/mountComponent-8b24c346.js +39 -0
- package/dist/packages/_es/pxCheck-c6b9f6b7.js +6 -0
- package/dist/packages/_es/raf-729dad54.js +25 -0
- package/dist/packages/_es/renderIcon-3d0fd47c.js +9 -0
- package/dist/packages/locale/lang/baseLang-3a8457ac.js +5 -0
- package/dist/packages/locale/lang/en-US.js +39 -36
- package/dist/packages/locale/lang/id-ID.js +39 -36
- package/dist/packages/locale/lang/index.js +44 -22
- package/dist/packages/locale/lang/zh-CN.js +38 -35
- package/dist/packages/locale/lang/zh-TW.js +38 -35
- package/dist/resolver/index.js +26 -1
- package/dist/resolver/index.mjs +17 -14
- package/dist/smartips/web-types.json +1 -1
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +50 -50
- package/dist/styles/themes/jdb.scss +50 -50
- package/dist/styles/themes/jddkh.scss +50 -50
- package/dist/styles/themes/jdt.scss +50 -50
- package/dist/types/index.d.ts +1 -1
- package/package.json +2 -2
- package/dist/packages/_es/Interceptor-6e26b757.js +0 -18
- package/dist/packages/_es/_plugin-vue_export-helper-dad06003.js +0 -9
- package/dist/packages/_es/common-d218746f.js +0 -116
- package/dist/packages/_es/component-234624bc.js +0 -89
- package/dist/packages/_es/index-14dfadc4.js +0 -561
- package/dist/packages/_es/index-192a3ef6.js +0 -29
- package/dist/packages/_es/index-360c5092.js +0 -210
- package/dist/packages/_es/index-496e6e05.js +0 -24
- package/dist/packages/_es/index-50eed3d9.js +0 -7
- package/dist/packages/_es/index-53ec2d4d.js +0 -34
- package/dist/packages/_es/index-fadb0974.js +0 -8
- package/dist/packages/_es/index.vue_vue_type_script_lang-1139b29a.js +0 -43
- package/dist/packages/_es/index.vue_vue_type_script_lang-43b774dd.js +0 -77
- package/dist/packages/_es/index.vue_vue_type_script_lang-f44c159d.js +0 -110
- package/dist/packages/_es/mountComponent-6d4ff200.js +0 -23
- package/dist/packages/_es/pxCheck-38173291.js +0 -4
- package/dist/packages/_es/raf-a74f1a06.js +0 -16
- package/dist/packages/_es/renderIcon-47498b32.js +0 -5
- package/dist/packages/locale/lang/baseLang-0bdc6353.js +0 -5
|
@@ -1,20 +1,28 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
+
import { getCurrentInstance, inject, reactive, computed, toRefs, openBlock, createElementBlock, normalizeClass, createElementVNode, renderSlot, Fragment, toDisplayString, createCommentVNode } from "vue";
|
|
21
|
+
import { c as createComponent } from "./component-81a4c1d0.js";
|
|
22
|
+
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
16
23
|
import "../locale/lang";
|
|
17
|
-
const { create
|
|
24
|
+
const { create, componentName } = createComponent("step");
|
|
25
|
+
const _sfc_main = create({
|
|
18
26
|
props: {
|
|
19
27
|
title: {
|
|
20
28
|
type: String,
|
|
@@ -27,68 +35,87 @@ const { create: T, componentName: V } = L("step"), j = T({
|
|
|
27
35
|
},
|
|
28
36
|
emits: ["click-step"],
|
|
29
37
|
setup() {
|
|
30
|
-
const { proxy
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
const
|
|
38
|
+
const { proxy } = getCurrentInstance();
|
|
39
|
+
const parent = inject("parent");
|
|
40
|
+
parent["relation"](proxy);
|
|
41
|
+
const state = reactive({
|
|
42
|
+
dot: parent.props.progressDot
|
|
43
|
+
});
|
|
44
|
+
const index2 = computed(() => parent.state.children.indexOf(proxy) + 1);
|
|
45
|
+
const getCurrentStatus = () => {
|
|
46
|
+
const activeIndex = index2.value;
|
|
47
|
+
if (activeIndex < +parent.props.current)
|
|
48
|
+
return "finish";
|
|
49
|
+
return activeIndex === +parent.props.current ? "process" : "wait";
|
|
50
|
+
};
|
|
51
|
+
const status = computed(() => {
|
|
52
|
+
return getCurrentStatus();
|
|
53
|
+
});
|
|
54
|
+
const classes = computed(() => {
|
|
55
|
+
const prefixCls = componentName;
|
|
39
56
|
return {
|
|
40
|
-
[
|
|
41
|
-
[`${
|
|
57
|
+
[prefixCls]: true,
|
|
58
|
+
[`${prefixCls}-${status.value}`]: true
|
|
42
59
|
};
|
|
43
|
-
})
|
|
44
|
-
|
|
60
|
+
});
|
|
61
|
+
const handleClickStep = () => {
|
|
62
|
+
parent["onEmit"](index2.value);
|
|
45
63
|
};
|
|
46
|
-
return
|
|
47
|
-
index:
|
|
48
|
-
classes
|
|
49
|
-
handleClickStep
|
|
64
|
+
return __spreadProps(__spreadValues({}, toRefs(state)), {
|
|
65
|
+
index: index2,
|
|
66
|
+
classes,
|
|
67
|
+
handleClickStep
|
|
50
68
|
});
|
|
51
69
|
}
|
|
52
|
-
})
|
|
70
|
+
});
|
|
71
|
+
const _hoisted_1 = { class: "nut-step-head" };
|
|
72
|
+
const _hoisted_2 = /* @__PURE__ */ createElementVNode("view", { class: "nut-step-line" }, null, -1);
|
|
73
|
+
const _hoisted_3 = { class: "nut-step-icon-inner" };
|
|
74
|
+
const _hoisted_4 = {
|
|
53
75
|
key: 1,
|
|
54
76
|
class: "nut-step-inner"
|
|
55
|
-
}
|
|
77
|
+
};
|
|
78
|
+
const _hoisted_5 = { class: "nut-step-main" };
|
|
79
|
+
const _hoisted_6 = { class: "nut-step-title" };
|
|
80
|
+
const _hoisted_7 = { key: 0 };
|
|
81
|
+
const _hoisted_8 = {
|
|
56
82
|
key: 0,
|
|
57
83
|
class: "nut-step-content"
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
84
|
+
};
|
|
85
|
+
const _hoisted_9 = ["innerHTML"];
|
|
86
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
87
|
+
return openBlock(), createElementBlock("view", {
|
|
88
|
+
class: normalizeClass(_ctx.classes),
|
|
89
|
+
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClickStep && _ctx.handleClickStep(...args))
|
|
63
90
|
}, [
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
class:
|
|
91
|
+
createElementVNode("view", _hoisted_1, [
|
|
92
|
+
_hoisted_2,
|
|
93
|
+
createElementVNode("view", {
|
|
94
|
+
class: normalizeClass(["nut-step-icon", [!_ctx.dot ? "is-icon" : ""]])
|
|
68
95
|
}, [
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
96
|
+
createElementVNode("view", _hoisted_3, [
|
|
97
|
+
renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
98
|
+
_ctx.dot ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [], 64)) : (openBlock(), createElementBlock("view", _hoisted_4, toDisplayString(_ctx.index), 1))
|
|
72
99
|
])
|
|
73
100
|
])
|
|
74
101
|
], 2)
|
|
75
102
|
]),
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
103
|
+
createElementVNode("view", _hoisted_5, [
|
|
104
|
+
createElementVNode("view", _hoisted_6, [
|
|
105
|
+
!_ctx.$slots.title ? (openBlock(), createElementBlock("span", _hoisted_7, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true),
|
|
106
|
+
renderSlot(_ctx.$slots, "title")
|
|
80
107
|
]),
|
|
81
|
-
|
|
82
|
-
|
|
108
|
+
_ctx.content || _ctx.$slots.content ? (openBlock(), createElementBlock("view", _hoisted_8, [
|
|
109
|
+
!_ctx.$slots.content ? (openBlock(), createElementBlock("span", {
|
|
83
110
|
key: 0,
|
|
84
|
-
innerHTML:
|
|
85
|
-
}, null, 8,
|
|
86
|
-
|
|
87
|
-
])) :
|
|
111
|
+
innerHTML: _ctx.content
|
|
112
|
+
}, null, 8, _hoisted_9)) : createCommentVNode("", true),
|
|
113
|
+
renderSlot(_ctx.$slots, "content")
|
|
114
|
+
])) : createCommentVNode("", true)
|
|
88
115
|
])
|
|
89
116
|
], 2);
|
|
90
117
|
}
|
|
91
|
-
const
|
|
118
|
+
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
92
119
|
export {
|
|
93
|
-
|
|
120
|
+
index as default
|
|
94
121
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { reactive
|
|
2
|
-
import { c as
|
|
1
|
+
import { reactive, computed, provide, h } from "vue";
|
|
2
|
+
import { c as createComponent } from "./component-81a4c1d0.js";
|
|
3
3
|
import "../locale/lang";
|
|
4
|
-
const { create
|
|
4
|
+
const { create, componentName } = createComponent("steps");
|
|
5
|
+
const _sfc_main = create({
|
|
5
6
|
props: {
|
|
6
7
|
direction: {
|
|
7
8
|
type: String,
|
|
@@ -13,42 +14,46 @@ const { create: m, componentName: l } = u("steps"), y = m({
|
|
|
13
14
|
},
|
|
14
15
|
progressDot: {
|
|
15
16
|
type: Boolean,
|
|
16
|
-
default:
|
|
17
|
+
default: false
|
|
17
18
|
}
|
|
18
19
|
},
|
|
19
20
|
emits: ["click-step"],
|
|
20
|
-
setup(
|
|
21
|
-
const
|
|
21
|
+
setup(props, { emit, slots }) {
|
|
22
|
+
const state = reactive({
|
|
22
23
|
children: []
|
|
23
|
-
})
|
|
24
|
-
|
|
24
|
+
});
|
|
25
|
+
const classes = computed(() => {
|
|
26
|
+
const prefixCls = componentName;
|
|
25
27
|
return {
|
|
26
|
-
[
|
|
27
|
-
[`${
|
|
28
|
-
[`${
|
|
28
|
+
[prefixCls]: true,
|
|
29
|
+
[`${prefixCls}-${props.direction}`]: true,
|
|
30
|
+
[`${prefixCls}-dot`]: !!props.progressDot
|
|
29
31
|
};
|
|
30
32
|
});
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
33
|
+
const relation = (child) => {
|
|
34
|
+
child && state.children.push(child);
|
|
35
|
+
};
|
|
36
|
+
const onEmit = (index) => {
|
|
37
|
+
emit("click-step", index);
|
|
38
|
+
};
|
|
39
|
+
provide("parent", {
|
|
40
|
+
relation,
|
|
41
|
+
state,
|
|
42
|
+
props,
|
|
43
|
+
onEmit
|
|
44
|
+
});
|
|
45
|
+
return () => {
|
|
46
|
+
var _a;
|
|
47
|
+
return h(
|
|
43
48
|
"view",
|
|
44
49
|
{
|
|
45
|
-
class:
|
|
50
|
+
class: classes.value
|
|
46
51
|
},
|
|
47
|
-
(
|
|
52
|
+
(_a = slots.default) == null ? void 0 : _a.call(slots)
|
|
48
53
|
);
|
|
49
54
|
};
|
|
50
55
|
}
|
|
51
56
|
});
|
|
52
57
|
export {
|
|
53
|
-
|
|
58
|
+
_sfc_main as default
|
|
54
59
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { _ as
|
|
1
|
+
import { _ as _sfc_main } from "./index.vue_vue_type_script_lang-cc5c4086.js";
|
|
2
2
|
import "vue";
|
|
3
|
-
import "./component-
|
|
3
|
+
import "./component-81a4c1d0.js";
|
|
4
4
|
import "../locale/lang";
|
|
5
|
-
import "./index-
|
|
5
|
+
import "./index-29892cda.js";
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
_sfc_main as default
|
|
8
8
|
};
|
|
@@ -1,21 +1,29 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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
|
+
import { reactive, computed, onMounted, toRefs, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, withModifiers, toDisplayString, createBlock, withDirectives, normalizeStyle, renderSlot, vShow } from "vue";
|
|
21
|
+
import { c as createComponent } from "./component-81a4c1d0.js";
|
|
22
|
+
import { ArrowDown2, ArrowUp2 } from "@nutui/icons-vue";
|
|
23
|
+
import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
|
|
17
24
|
import "../locale/lang";
|
|
18
|
-
const { componentName
|
|
25
|
+
const { componentName, create } = createComponent("sub-side-navbar");
|
|
26
|
+
const _sfc_main = create({
|
|
19
27
|
props: {
|
|
20
28
|
title: {
|
|
21
29
|
type: String,
|
|
@@ -27,56 +35,70 @@ const { componentName: V, create: j } = M("sub-side-navbar"), q = j({
|
|
|
27
35
|
},
|
|
28
36
|
open: {
|
|
29
37
|
type: Boolean,
|
|
30
|
-
default:
|
|
38
|
+
default: true
|
|
31
39
|
}
|
|
32
40
|
},
|
|
33
|
-
components: { ArrowDown2
|
|
41
|
+
components: { ArrowDown2, ArrowUp2 },
|
|
34
42
|
emits: ["title-click"],
|
|
35
|
-
setup: (
|
|
36
|
-
const
|
|
43
|
+
setup: (props, context) => {
|
|
44
|
+
const state = reactive({
|
|
37
45
|
direction: ""
|
|
38
|
-
})
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
46
|
+
});
|
|
47
|
+
const classes = computed(() => {
|
|
48
|
+
const prefixCls = componentName;
|
|
49
|
+
return {
|
|
50
|
+
[prefixCls]: true
|
|
51
|
+
};
|
|
52
|
+
});
|
|
53
|
+
const style = computed(() => {
|
|
54
|
+
return {
|
|
55
|
+
height: !state.direction ? "auto" : "0px"
|
|
56
|
+
};
|
|
57
|
+
});
|
|
58
|
+
const handleClick = () => {
|
|
59
|
+
context.emit("title-click");
|
|
60
|
+
state.direction = !state.direction ? "up" : "";
|
|
44
61
|
};
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
})
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
62
|
+
onMounted(() => {
|
|
63
|
+
state.direction = props.open ? "" : "up";
|
|
64
|
+
});
|
|
65
|
+
return __spreadProps(__spreadValues({}, toRefs(state)), {
|
|
66
|
+
classes,
|
|
67
|
+
style,
|
|
68
|
+
handleClick
|
|
51
69
|
});
|
|
52
70
|
}
|
|
53
|
-
})
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
71
|
+
});
|
|
72
|
+
const _hoisted_1 = ["ikey"];
|
|
73
|
+
const _hoisted_2 = { class: "nut-sub-side-navbar__title__text" };
|
|
74
|
+
const _hoisted_3 = { class: "nut-sub-side-navbar__title__icon" };
|
|
75
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
76
|
+
const _component_ArrowDown2 = resolveComponent("ArrowDown2");
|
|
77
|
+
const _component_ArrowUp2 = resolveComponent("ArrowUp2");
|
|
78
|
+
return openBlock(), createElementBlock("view", {
|
|
79
|
+
class: normalizeClass(_ctx.classes),
|
|
80
|
+
ikey: _ctx.ikey
|
|
59
81
|
}, [
|
|
60
|
-
|
|
82
|
+
createElementVNode("view", {
|
|
61
83
|
class: "nut-sub-side-navbar__title",
|
|
62
|
-
onClick:
|
|
84
|
+
onClick: _cache[0] || (_cache[0] = withModifiers((...args) => _ctx.handleClick && _ctx.handleClick(...args), ["stop"]))
|
|
63
85
|
}, [
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
86
|
+
createElementVNode("span", _hoisted_2, toDisplayString(_ctx.title), 1),
|
|
87
|
+
createElementVNode("span", _hoisted_3, [
|
|
88
|
+
!_ctx.direction ? (openBlock(), createBlock(_component_ArrowDown2, { key: 0 })) : (openBlock(), createBlock(_component_ArrowUp2, { key: 1 }))
|
|
67
89
|
])
|
|
68
90
|
]),
|
|
69
|
-
|
|
70
|
-
class:
|
|
71
|
-
style:
|
|
91
|
+
withDirectives(createElementVNode("view", {
|
|
92
|
+
class: normalizeClass(["nut-sub-side-navbar__list", !_ctx.direction ? "nutFadeIn" : "nutFadeOut"]),
|
|
93
|
+
style: normalizeStyle(_ctx.style)
|
|
72
94
|
}, [
|
|
73
|
-
|
|
95
|
+
renderSlot(_ctx.$slots, "default")
|
|
74
96
|
], 6), [
|
|
75
|
-
[
|
|
97
|
+
[vShow, !_ctx.direction]
|
|
76
98
|
])
|
|
77
|
-
], 10,
|
|
99
|
+
], 10, _hoisted_1);
|
|
78
100
|
}
|
|
79
|
-
const
|
|
101
|
+
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
80
102
|
export {
|
|
81
|
-
|
|
103
|
+
index as default
|
|
82
104
|
};
|