@nutui/nutui 3.1.22-beta.0 → 3.1.22-beta.3
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 +4019 -19251
- package/dist/nutui.umd.js +4012 -19344
- package/dist/packages/_es/ActionSheet.js +26 -157
- package/dist/packages/_es/Address.js +119 -542
- package/dist/packages/_es/AddressList.js +113 -613
- package/dist/packages/_es/Audio.js +62 -264
- package/dist/packages/_es/AudioOperate.js +18 -107
- package/dist/packages/_es/Avatar.js +42 -165
- package/dist/packages/_es/AvatarGroup.js +14 -73
- package/dist/packages/_es/BackTop.js +43 -156
- package/dist/packages/_es/Badge.js +14 -86
- package/dist/packages/_es/Barrage.js +41 -120
- package/dist/packages/_es/Button.js +23 -128
- package/dist/packages/_es/Calendar.js +24 -237
- package/dist/packages/_es/CalendarItem.js +1 -1
- package/dist/packages/_es/Card.js +10 -107
- package/dist/packages/_es/Cascader.js +156 -500
- package/dist/packages/_es/Category.js +15 -58
- package/dist/packages/_es/CategoryPane.js +11 -111
- package/dist/packages/_es/Cell.js +21 -100
- package/dist/packages/_es/CellGroup.js +9 -44
- package/dist/packages/_es/Checkbox.js +31 -113
- package/dist/packages/_es/CheckboxGroup.js +29 -58
- package/dist/packages/_es/CircleProgress.js +28 -151
- package/dist/packages/_es/Col.js +14 -56
- package/dist/packages/_es/Collapse.js +24 -85
- package/dist/packages/_es/CollapseItem.js +70 -261
- package/dist/packages/_es/Comment.js +64 -434
- package/dist/packages/_es/CountDown.js +61 -242
- package/dist/packages/_es/CountUp.js +149 -546
- package/dist/packages/_es/DatePicker.js +107 -322
- package/dist/packages/_es/Dialog.js +69 -261
- package/dist/packages/_es/Divider.js +18 -68
- package/dist/packages/_es/Drag.js +56 -197
- package/dist/packages/_es/Ecard.js +24 -159
- package/dist/packages/_es/Elevator.js +63 -198
- package/dist/packages/_es/Empty.js +12 -71
- package/dist/packages/_es/FixedNav.js +15 -122
- package/dist/packages/_es/Form.js +64 -151
- package/dist/packages/_es/FormItem.js +15 -110
- package/dist/packages/_es/Grid.js +5 -6
- package/dist/packages/_es/GridItem.js +33 -144
- package/dist/packages/_es/Icon.js +15 -40
- package/dist/packages/_es/ImagePreview.js +74 -298
- package/dist/packages/_es/Indicator.js +15 -62
- package/dist/packages/_es/InfiniteLoading.js +66 -258
- package/dist/packages/_es/Input.js +51 -413
- package/dist/packages/_es/InputNumber.js +41 -160
- package/dist/packages/_es/Layout.js +4 -5
- package/dist/packages/_es/List.js +23 -110
- package/dist/packages/_es/Menu.js +30 -118
- package/dist/packages/_es/MenuItem.js +34 -162
- package/dist/packages/_es/Navbar.js +30 -192
- package/dist/packages/_es/NoticeBar.js +83 -387
- package/dist/packages/_es/Notify.js +81 -236
- package/dist/packages/_es/NumberKeyboard.js +41 -272
- package/dist/packages/_es/OldPicker.js +140 -464
- package/dist/packages/_es/OverLay.js +32 -105
- package/dist/packages/_es/Pagination.js +39 -157
- package/dist/packages/_es/Picker.js +138 -459
- package/dist/packages/_es/Popover.js +327 -965
- package/dist/packages/_es/Popup.js +64 -303
- package/dist/packages/_es/Price.js +16 -118
- package/dist/packages/_es/Progress.js +14 -146
- package/dist/packages/_es/PullRefresh.js +92 -346
- package/dist/packages/_es/Radio.js +22 -90
- package/dist/packages/_es/RadioGroup.js +8 -37
- package/dist/packages/_es/Range.js +92 -417
- package/dist/packages/_es/Rate.js +16 -139
- package/dist/packages/_es/Row.js +22 -64
- package/dist/packages/_es/SearchBar.js +46 -247
- package/dist/packages/_es/ShortPassword.js +35 -225
- package/dist/packages/_es/SideNavBar.js +33 -89
- package/dist/packages/_es/SideNavBarItem.js +11 -46
- package/dist/packages/_es/Signature.js +46 -165
- package/dist/packages/_es/Skeleton.js +20 -136
- package/dist/packages/_es/Sku.js +93 -499
- package/dist/packages/_es/Step.js +25 -119
- package/dist/packages/_es/Steps.js +18 -53
- package/dist/packages/_es/Sticky.js +53 -138
- package/dist/packages/_es/SubSideNavBar.js +26 -90
- package/dist/packages/_es/Swipe.js +46 -183
- package/dist/packages/_es/Swiper.js +121 -433
- package/dist/packages/_es/SwiperItem.js +22 -53
- package/dist/packages/_es/Switch.js +21 -116
- package/dist/packages/_es/TabPane.js +12 -39
- package/dist/packages/_es/Tabbar.js +17 -72
- package/dist/packages/_es/TabbarItem.js +29 -151
- package/dist/packages/_es/Table.js +27 -186
- package/dist/packages/_es/Tabs.js +51 -209
- package/dist/packages/_es/Tag.js +20 -97
- package/dist/packages/_es/TextArea.js +42 -160
- package/dist/packages/_es/TimeDetail.js +23 -84
- package/dist/packages/_es/TimePannel.js +19 -52
- package/dist/packages/_es/TimeSelect.js +15 -103
- package/dist/packages/_es/Toast.js +80 -319
- package/dist/packages/_es/Uploader.js +112 -460
- package/dist/packages/_es/Video.js +83 -340
- package/dist/packages/_es/common.js +38 -128
- package/dist/packages/_es/component.js +35 -76
- package/dist/packages/_es/index.js +5 -6
- package/dist/packages/_es/index2.js +9 -30
- package/dist/packages/_es/index3.js +6 -8
- package/dist/packages/_es/index4.js +13 -58
- package/dist/packages/_es/index5.js +120 -675
- package/dist/packages/_es/plugin-vue_export-helper.js +7 -8
- package/dist/packages/_es/pxCheck.js +3 -5
- package/dist/packages/_es/raf.js +8 -15
- package/dist/packages/button/index.scss +2 -1
- package/dist/packages/cell/index.scss +11 -0
- package/dist/packages/checkbox/index.scss +6 -0
- package/dist/packages/dialog/index.scss +1 -0
- package/dist/packages/elevator/index.scss +21 -0
- package/dist/packages/input/index.scss +13 -1
- package/dist/packages/locale/lang/baseLang.d.ts +1 -0
- package/dist/packages/locale/lang/baseLang.js +3 -3
- package/dist/packages/locale/lang/en-US.d.ts +8 -0
- package/dist/packages/locale/lang/en-US.js +5 -97
- package/dist/packages/locale/lang/id-ID.d.ts +8 -0
- package/dist/packages/locale/lang/id-ID.js +5 -97
- package/dist/packages/locale/lang/index.js +16 -38
- package/dist/packages/locale/lang/zh-CN.d.ts +8 -0
- package/dist/packages/locale/lang/zh-CN.js +5 -97
- package/dist/packages/locale/lang/zh-TW.d.ts +8 -0
- package/dist/packages/locale/lang/zh-TW.js +5 -97
- package/dist/packages/radio/index.scss +1 -0
- package/dist/packages/switch/index.scss +3 -3
- package/dist/packages/tabpane/index.scss +1 -0
- package/dist/smartips/attributes.json +62 -10
- package/dist/smartips/tags.json +17 -4
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +49 -49
- package/dist/styles/themes/jdb.scss +49 -49
- package/dist/styles/themes/jdt.scss +49 -49
- package/dist/styles/variables-jdb.scss +10 -1
- package/dist/styles/variables-jdt.scss +10 -1
- package/dist/styles/variables.scss +10 -1
- package/dist/types/__VUE/address/index.vue.d.ts +5 -5
- package/dist/types/__VUE/addresslist/components/ItemContents.vue.d.ts +1 -0
- package/dist/types/__VUE/audiooperate/index.vue.d.ts +1 -0
- package/dist/types/__VUE/avatar/index.vue.d.ts +4 -4
- package/dist/types/__VUE/backtop/index.vue.d.ts +2 -2
- package/dist/types/__VUE/badge/index.vue.d.ts +2 -2
- package/dist/types/__VUE/button/index.vue.d.ts +2 -2
- package/dist/types/__VUE/cascader/index.vue.d.ts +1 -1
- package/dist/types/__VUE/cell/index.vue.d.ts +11 -4
- package/dist/types/__VUE/checkbox/common.d.ts +59 -0
- package/dist/types/__VUE/checkbox/index.vue.d.ts +18 -5
- package/dist/types/__VUE/checkboxgroup/index.vue.d.ts +7 -0
- package/dist/types/__VUE/collapseitem/index.vue.d.ts +2 -2
- package/dist/types/__VUE/dialog/index.d.ts +9 -2
- package/dist/types/__VUE/dialog/index.vue.d.ts +23 -8
- package/dist/types/__VUE/ecard/index.vue.d.ts +3 -3
- package/dist/types/__VUE/elevator/index.vue.d.ts +29 -0
- package/dist/types/__VUE/empty/index.vue.d.ts +2 -2
- package/dist/types/__VUE/formitem/index.vue.d.ts +3 -10
- package/dist/types/__VUE/grid/index.vue.d.ts +4 -4
- package/dist/types/__VUE/griditem/index.vue.d.ts +1 -1
- package/dist/types/__VUE/input/index.vue.d.ts +2 -2
- package/dist/types/__VUE/noticebar/index.vue.d.ts +1 -1
- package/dist/types/__VUE/oldpicker/index.vue.d.ts +2 -2
- package/dist/types/__VUE/picker/index.vue.d.ts +2 -2
- package/dist/types/__VUE/popover/index.vue.d.ts +2 -2
- package/dist/types/__VUE/range/index.vue.d.ts +1 -1
- package/dist/types/__VUE/rate/index.vue.d.ts +2 -2
- 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/step/index.vue.d.ts +2 -2
- package/dist/types/__VUE/switch/index.vue.d.ts +2 -2
- package/dist/types/__VUE/tabbaritem/index.vue.d.ts +2 -2
- package/dist/types/__VUE/timeselect/index.vue.d.ts +9 -2
- package/dist/types/__VUE/toast/index.vue.d.ts +3 -3
- package/dist/types/__VUE/uploader/index.vue.d.ts +2 -2
- package/dist/types/__VUE/video/index.vue.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +2 -1
|
@@ -1,156 +1,33 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.22-beta.
|
|
2
|
+
* @nutui/nutui v3.1.22-beta.3 Wed Jun 15 2022 20:12:30 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { useSlots, computed, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, Fragment, renderList, renderSlot, toDisplayString, createCommentVNode } from "vue";
|
|
7
|
-
import { i as
|
|
8
|
-
import { _ as
|
|
6
|
+
import { useSlots as e, computed as t, openBlock as r, createElementBlock as o, normalizeClass as s, normalizeStyle as l, createElementVNode as a, Fragment as p, renderList as i, renderSlot as n, toDisplayString as c, createCommentVNode as u } from "vue";
|
|
7
|
+
import { i as d, c as h } from "./component.js";
|
|
8
|
+
import { _ as f } from "./plugin-vue_export-helper.js";
|
|
9
9
|
import "../locale/lang";
|
|
10
|
-
const { componentName, create } =
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
type: String,
|
|
35
|
-
default: ""
|
|
36
|
-
},
|
|
37
|
-
clockwise: {
|
|
38
|
-
type: Boolean,
|
|
39
|
-
default: true
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
setup(props, { emit }) {
|
|
43
|
-
const slotDefault = !!useSlots().default;
|
|
44
|
-
const refRandomId = Math.random().toString(36).slice(-8);
|
|
45
|
-
const classes = computed(() => {
|
|
46
|
-
const prefixCls = componentName;
|
|
47
|
-
return {
|
|
48
|
-
[prefixCls]: true
|
|
49
|
-
};
|
|
50
|
-
});
|
|
51
|
-
const path = computed(() => {
|
|
52
|
-
const isWise = props.clockwise ? 1 : 0;
|
|
53
|
-
return `M 50 50 m -45 0 a 45 45 0 1 ${isWise} 90 0 a 45 45 0 1 ${isWise} -90 0`;
|
|
54
|
-
});
|
|
55
|
-
const hoverColor = computed(() => {
|
|
56
|
-
return isObject(props.color) ? `url(#${refRandomId})` : props.color;
|
|
57
|
-
});
|
|
58
|
-
const hoverStyle = computed(() => {
|
|
59
|
-
let perimeter = 283;
|
|
60
|
-
let offset = perimeter * Number(props.progress) / 100;
|
|
61
|
-
return {
|
|
62
|
-
stroke: isObject(props.color) ? `url(#${refRandomId})` : props.color,
|
|
63
|
-
strokeDasharray: `${offset}px ${perimeter}px`
|
|
64
|
-
};
|
|
65
|
-
});
|
|
66
|
-
const pathStyle = computed(() => {
|
|
67
|
-
return {
|
|
68
|
-
stroke: props.pathColor
|
|
69
|
-
};
|
|
70
|
-
});
|
|
71
|
-
const stop = computed(() => {
|
|
72
|
-
if (!isObject(props.color)) {
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
|
-
let color = props.color;
|
|
76
|
-
const colorArr = Object.keys(color).sort((a, b) => parseFloat(a) - parseFloat(b));
|
|
77
|
-
let stopArr = [];
|
|
78
|
-
colorArr.map((item, index2) => {
|
|
79
|
-
let obj = {
|
|
80
|
-
key: "",
|
|
81
|
-
value: ""
|
|
82
|
-
};
|
|
83
|
-
obj.key = item;
|
|
84
|
-
obj.value = color[item];
|
|
85
|
-
stopArr.push(obj);
|
|
86
|
-
});
|
|
87
|
-
return stopArr;
|
|
88
|
-
});
|
|
89
|
-
return {
|
|
90
|
-
classes,
|
|
91
|
-
hoverStyle,
|
|
92
|
-
pathStyle,
|
|
93
|
-
path,
|
|
94
|
-
hoverColor,
|
|
95
|
-
stop,
|
|
96
|
-
slotDefault,
|
|
97
|
-
refRandomId
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
});
|
|
101
|
-
const _hoisted_1 = { viewBox: "0 0 100 100" };
|
|
102
|
-
const _hoisted_2 = ["id"];
|
|
103
|
-
const _hoisted_3 = ["offset", "stop-color"];
|
|
104
|
-
const _hoisted_4 = ["d", "stroke-width"];
|
|
105
|
-
const _hoisted_5 = ["d", "stroke", "stroke-linecap", "stroke-width"];
|
|
106
|
-
const _hoisted_6 = { class: "nut-circleprogress-text" };
|
|
107
|
-
const _hoisted_7 = { key: 0 };
|
|
108
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
109
|
-
return openBlock(), createElementBlock("div", {
|
|
110
|
-
class: normalizeClass(_ctx.classes),
|
|
111
|
-
style: normalizeStyle({ height: _ctx.radius * 2 + "px", width: _ctx.radius * 2 + "px" })
|
|
112
|
-
}, [
|
|
113
|
-
(openBlock(), createElementBlock("svg", _hoisted_1, [
|
|
114
|
-
createElementVNode("defs", null, [
|
|
115
|
-
createElementVNode("linearGradient", {
|
|
116
|
-
id: _ctx.refRandomId,
|
|
117
|
-
x1: "100%",
|
|
118
|
-
y1: "0%",
|
|
119
|
-
x2: "0%",
|
|
120
|
-
y2: "0%"
|
|
121
|
-
}, [
|
|
122
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.stop, (item, index2) => {
|
|
123
|
-
return openBlock(), createElementBlock("stop", {
|
|
124
|
-
key: index2,
|
|
125
|
-
offset: item.key,
|
|
126
|
-
"stop-color": item.value
|
|
127
|
-
}, null, 8, _hoisted_3);
|
|
128
|
-
}), 128))
|
|
129
|
-
], 8, _hoisted_2)
|
|
130
|
-
]),
|
|
131
|
-
createElementVNode("path", {
|
|
132
|
-
class: "nut-circleprogress-path",
|
|
133
|
-
style: normalizeStyle(_ctx.pathStyle),
|
|
134
|
-
d: _ctx.path,
|
|
135
|
-
fill: "none",
|
|
136
|
-
"stroke-width": _ctx.strokeWidth
|
|
137
|
-
}, " > ", 12, _hoisted_4),
|
|
138
|
-
createElementVNode("path", {
|
|
139
|
-
class: "nut-circleprogress-hover",
|
|
140
|
-
style: normalizeStyle(_ctx.hoverStyle),
|
|
141
|
-
d: _ctx.path,
|
|
142
|
-
fill: "none",
|
|
143
|
-
stroke: _ctx.hoverColor,
|
|
144
|
-
"stroke-linecap": _ctx.strokeLinecap,
|
|
145
|
-
transform: "rotate(90,50,50)",
|
|
146
|
-
"stroke-width": _ctx.strokeWidth
|
|
147
|
-
}, null, 12, _hoisted_5)
|
|
148
|
-
])),
|
|
149
|
-
createElementVNode("div", _hoisted_6, [
|
|
150
|
-
renderSlot(_ctx.$slots, "default"),
|
|
151
|
-
!_ctx.slotDefault ? (openBlock(), createElementBlock("div", _hoisted_7, toDisplayString(_ctx.progress) + "%", 1)) : createCommentVNode("", true)
|
|
152
|
-
])
|
|
153
|
-
], 6);
|
|
154
|
-
}
|
|
155
|
-
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
156
|
-
export { index as default };
|
|
10
|
+
const { componentName: k, create: y } = h("circleprogress"), m = y({ props: { progress: { type: [Number, String], required: true }, strokeWidth: { type: [Number, String], default: 5 }, radius: { type: [Number, String], default: 50 }, strokeLinecap: { type: String, default: "round" }, color: { type: [String, Object], default: "" }, pathColor: { type: String, default: "" }, clockwise: { type: Boolean, default: true } }, setup(r2, { emit: o2 }) {
|
|
11
|
+
const s2 = !!e().default, l2 = Math.random().toString(36).slice(-8), a2 = t(() => ({ [k]: true })), p2 = t(() => {
|
|
12
|
+
const e2 = r2.clockwise ? 1 : 0;
|
|
13
|
+
return `M 50 50 m 0 -45 a 45 45 0 1 ${e2} 0 90 a 45 45 0 1, ${e2} 0 -90`;
|
|
14
|
+
}), i2 = t(() => d(r2.color) ? `url(#${l2})` : r2.color);
|
|
15
|
+
return { classes: a2, hoverStyle: t(() => {
|
|
16
|
+
let e2 = 283 * Number(r2.progress) / 100;
|
|
17
|
+
return { stroke: d(r2.color) ? `url(#${l2})` : r2.color, strokeDasharray: `${e2}px 283px` };
|
|
18
|
+
}), pathStyle: t(() => ({ stroke: r2.pathColor })), path: p2, hoverColor: i2, stop: t(() => {
|
|
19
|
+
if (!d(r2.color))
|
|
20
|
+
return;
|
|
21
|
+
let e2 = r2.color;
|
|
22
|
+
const t2 = Object.keys(e2).sort((e3, t3) => parseFloat(e3) - parseFloat(t3));
|
|
23
|
+
let o3 = [];
|
|
24
|
+
return t2.map((t3, r3) => {
|
|
25
|
+
let s3 = { key: "", value: "" };
|
|
26
|
+
s3.key = t3, s3.value = e2[t3], o3.push(s3);
|
|
27
|
+
}), o3;
|
|
28
|
+
}), slotDefault: s2, refRandomId: l2 };
|
|
29
|
+
} }), g = { viewBox: "0 0 100 100" }, v = ["id"], S = ["offset", "stop-color"], x = ["d", "stroke-width"], w = ["d", "stroke", "stroke-linecap", "stroke-width"], b = { class: "nut-circleprogress-text" }, $ = { key: 0 };
|
|
30
|
+
var N = f(m, [["render", function(e2, t2, d2, h2, f2, k2) {
|
|
31
|
+
return r(), o("div", { class: s(e2.classes), style: l({ height: 2 * e2.radius + "px", width: 2 * e2.radius + "px" }) }, [(r(), o("svg", g, [a("defs", null, [a("linearGradient", { id: e2.refRandomId, x1: "100%", y1: "0%", x2: "0%", y2: "0%" }, [(r(true), o(p, null, i(e2.stop, (e3, t3) => (r(), o("stop", { key: t3, offset: e3.key, "stop-color": e3.value }, null, 8, S))), 128))], 8, v)]), a("path", { class: "nut-circleprogress-path", style: l(e2.pathStyle), d: e2.path, fill: "none", "stroke-width": e2.strokeWidth }, " > ", 12, x), a("path", { class: "nut-circleprogress-hover", style: l(e2.hoverStyle), d: e2.path, fill: "none", stroke: e2.hoverColor, "stroke-linecap": e2.strokeLinecap, "stroke-width": e2.strokeWidth }, null, 12, w)])), a("div", b, [n(e2.$slots, "default"), e2.slotDefault ? u("", true) : (r(), o("div", $, c(e2.progress) + "%", 1))])], 6);
|
|
32
|
+
}]]);
|
|
33
|
+
export { N as default };
|
package/dist/packages/_es/Col.js
CHANGED
|
@@ -1,61 +1,19 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.22-beta.
|
|
2
|
+
* @nutui/nutui v3.1.22-beta.3 Wed Jun 15 2022 20:12:30 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { inject, computed, openBlock, createElementBlock, normalizeClass, normalizeStyle, renderSlot } from "vue";
|
|
7
|
-
import { c as
|
|
8
|
-
import { _ as
|
|
6
|
+
import { inject as e, computed as t, openBlock as o, createElementBlock as s, normalizeClass as l, normalizeStyle as n, renderSlot as r } from "vue";
|
|
7
|
+
import { c as a } from "./component.js";
|
|
8
|
+
import { _ as p } from "./plugin-vue_export-helper.js";
|
|
9
9
|
import "../locale/lang";
|
|
10
|
-
const { componentName, create } =
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
emits: ["click"],
|
|
23
|
-
setup(props, { emit }) {
|
|
24
|
-
const prefixCls = componentName;
|
|
25
|
-
const gutter = inject("gutter");
|
|
26
|
-
const classes = computed(() => {
|
|
27
|
-
return {
|
|
28
|
-
[prefixCls]: true,
|
|
29
|
-
[prefixCls + "-gutter"]: gutter,
|
|
30
|
-
["nut-col-" + props.span]: true,
|
|
31
|
-
["nut-col-offset-" + props.offset]: true
|
|
32
|
-
};
|
|
33
|
-
});
|
|
34
|
-
const style = computed(() => {
|
|
35
|
-
return {
|
|
36
|
-
paddingLeft: gutter / 2 + "px",
|
|
37
|
-
paddingRight: gutter / 2 + "px"
|
|
38
|
-
};
|
|
39
|
-
});
|
|
40
|
-
const handleClick = (evt) => {
|
|
41
|
-
evt.stopPropagation();
|
|
42
|
-
emit("click", evt);
|
|
43
|
-
};
|
|
44
|
-
return {
|
|
45
|
-
classes,
|
|
46
|
-
style,
|
|
47
|
-
handleClick
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
52
|
-
return openBlock(), createElementBlock("view", {
|
|
53
|
-
class: normalizeClass(_ctx.classes),
|
|
54
|
-
style: normalizeStyle(_ctx.style),
|
|
55
|
-
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))
|
|
56
|
-
}, [
|
|
57
|
-
renderSlot(_ctx.$slots, "default")
|
|
58
|
-
], 6);
|
|
59
|
-
}
|
|
60
|
-
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
61
|
-
export { index as default };
|
|
10
|
+
const { componentName: c, create: i } = a("col");
|
|
11
|
+
var u = p(i({ props: { span: { type: [String, Number], default: "24" }, offset: { type: [String, Number], default: "0" } }, emits: ["click"], setup(o2, { emit: s2 }) {
|
|
12
|
+
const l2 = c, n2 = e("gutter");
|
|
13
|
+
return { classes: t(() => ({ [l2]: true, [l2 + "-gutter"]: n2, ["nut-col-" + o2.span]: true, ["nut-col-offset-" + o2.offset]: true })), style: t(() => ({ paddingLeft: n2 / 2 + "px", paddingRight: n2 / 2 + "px" })), handleClick: (e2) => {
|
|
14
|
+
e2.stopPropagation(), s2("click", e2);
|
|
15
|
+
} };
|
|
16
|
+
} }), [["render", function(e2, t2, a2, p2, c2, i2) {
|
|
17
|
+
return o(), s("view", { class: l(e2.classes), style: n(e2.style), onClick: t2[0] || (t2[0] = (...t3) => e2.handleClick && e2.handleClick(...t3)) }, [r(e2.$slots, "default")], 6);
|
|
18
|
+
}]]);
|
|
19
|
+
export { u as default };
|
|
@@ -1,90 +1,29 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.22-beta.
|
|
2
|
+
* @nutui/nutui v3.1.22-beta.3 Wed Jun 15 2022 20:12:30 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { provide, openBlock, createElementBlock, renderSlot } from "vue";
|
|
7
|
-
import { c as
|
|
8
|
-
import { _ as
|
|
6
|
+
import { provide as t, openBlock as e, createElementBlock as n, renderSlot as i } from "vue";
|
|
7
|
+
import { c as o } from "./component.js";
|
|
8
|
+
import { _ as r } from "./plugin-vue_export-helper.js";
|
|
9
9
|
import "../locale/lang";
|
|
10
|
-
const { create } =
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
},
|
|
31
|
-
titleIconPosition: {
|
|
32
|
-
type: String,
|
|
33
|
-
default: "left"
|
|
34
|
-
},
|
|
35
|
-
icon: {
|
|
36
|
-
type: String,
|
|
37
|
-
default: ""
|
|
38
|
-
},
|
|
39
|
-
iconSize: {
|
|
40
|
-
type: String,
|
|
41
|
-
default: "16px"
|
|
42
|
-
},
|
|
43
|
-
iconColor: {
|
|
44
|
-
type: String,
|
|
45
|
-
default: ""
|
|
46
|
-
},
|
|
47
|
-
rotate: {
|
|
48
|
-
type: [String, Number],
|
|
49
|
-
default: 180
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
emits: ["update:active", "change"],
|
|
53
|
-
setup(props, { emit }) {
|
|
54
|
-
const changeVal = (val) => {
|
|
55
|
-
emit("update:active", val);
|
|
56
|
-
emit("change", val);
|
|
57
|
-
};
|
|
58
|
-
const changeValAry = (name) => {
|
|
59
|
-
const activeItem = props.active instanceof Object ? Object.values(props.active) : props.active;
|
|
60
|
-
let index2 = -1;
|
|
61
|
-
activeItem.forEach((item, idx) => {
|
|
62
|
-
if (String(item) == String(name)) {
|
|
63
|
-
index2 = idx;
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
index2 > -1 ? activeItem.splice(index2, 1) : activeItem.push(name);
|
|
67
|
-
changeVal(activeItem);
|
|
68
|
-
};
|
|
69
|
-
const isExpanded = (name) => {
|
|
70
|
-
const { accordion, active } = props;
|
|
71
|
-
if (accordion) {
|
|
72
|
-
return typeof active === "number" || typeof active === "string" ? active == name : false;
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
provide("collapseParent", {
|
|
76
|
-
children: [],
|
|
77
|
-
props,
|
|
78
|
-
changeValAry,
|
|
79
|
-
changeVal,
|
|
80
|
-
isExpanded
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
85
|
-
return openBlock(), createElementBlock("view", null, [
|
|
86
|
-
renderSlot(_ctx.$slots, "default")
|
|
87
|
-
]);
|
|
88
|
-
}
|
|
89
|
-
var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
90
|
-
export { index as default };
|
|
10
|
+
const { create: a } = o("collapse"), c = a({ props: { active: { type: [String, Number, Array] }, accordion: { type: Boolean }, titleIcon: { type: String, default: "" }, titleIconSize: { type: String, default: "16px" }, titleIconColor: { type: String, default: "" }, titleIconPosition: { type: String, default: "left" }, icon: { type: String, default: "" }, iconSize: { type: String, default: "16px" }, iconColor: { type: String, default: "" }, rotate: { type: [String, Number], default: 180 } }, emits: ["update:active", "change"], setup(e2, { emit: n2 }) {
|
|
11
|
+
const i2 = (t2) => {
|
|
12
|
+
n2("update:active", t2), n2("change", t2);
|
|
13
|
+
};
|
|
14
|
+
t("collapseParent", { children: [], props: e2, changeValAry: (t2) => {
|
|
15
|
+
const n3 = e2.active instanceof Object ? Object.values(e2.active) : e2.active;
|
|
16
|
+
let o2 = -1;
|
|
17
|
+
n3.forEach((e3, n4) => {
|
|
18
|
+
String(e3) == String(t2) && (o2 = n4);
|
|
19
|
+
}), o2 > -1 ? n3.splice(o2, 1) : n3.push(t2), i2(n3);
|
|
20
|
+
}, changeVal: i2, isExpanded: (t2) => {
|
|
21
|
+
const { accordion: n3, active: i3 } = e2;
|
|
22
|
+
if (n3)
|
|
23
|
+
return (typeof i3 == "number" || typeof i3 == "string") && i3 == t2;
|
|
24
|
+
} });
|
|
25
|
+
} });
|
|
26
|
+
var l = r(c, [["render", function(t2, o2, r2, a2, c2, l2) {
|
|
27
|
+
return e(), n("view", null, [i(t2.$slots, "default")]);
|
|
28
|
+
}]]);
|
|
29
|
+
export { l as default };
|