@nutui/nutui 3.1.21 → 3.1.22-beta.5
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 +4203 -19263
- package/dist/nutui.umd.js +4208 -19368
- package/dist/packages/_es/ActionSheet.js +17 -167
- package/dist/packages/_es/Address.js +110 -552
- package/dist/packages/_es/AddressList.js +113 -613
- package/dist/packages/_es/Animate.js +22 -0
- package/dist/packages/_es/Audio.js +53 -274
- package/dist/packages/_es/AudioOperate.js +13 -121
- package/dist/packages/_es/Avatar.js +38 -177
- 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 +30 -237
- package/dist/packages/_es/CalendarItem.js +2 -1
- package/dist/packages/_es/Card.js +10 -107
- package/dist/packages/_es/Cascader.js +147 -523
- 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 +32 -84
- package/dist/packages/_es/CollapseItem.js +59 -272
- package/dist/packages/_es/Comment.js +64 -434
- package/dist/packages/_es/ConfigProvider.js +13 -0
- package/dist/packages/_es/CountDown.js +56 -256
- package/dist/packages/_es/CountUp.js +140 -556
- package/dist/packages/_es/DatePicker.js +98 -332
- package/dist/packages/_es/Dialog.js +60 -271
- package/dist/packages/_es/Divider.js +13 -82
- package/dist/packages/_es/Drag.js +56 -197
- package/dist/packages/_es/Ecard.js +24 -159
- package/dist/packages/_es/Elevator.js +58 -212
- package/dist/packages/_es/Ellipsis.js +64 -0
- 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/Image.js +31 -0
- package/dist/packages/_es/ImagePreview.js +77 -309
- package/dist/packages/_es/Indicator.js +15 -62
- package/dist/packages/_es/InfiniteLoading.js +57 -268
- 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 +18 -124
- package/dist/packages/_es/Menu.js +45 -118
- package/dist/packages/_es/MenuItem.js +37 -162
- package/dist/packages/_es/Navbar.js +30 -192
- package/dist/packages/_es/NoticeBar.js +74 -397
- package/dist/packages/_es/Notify.js +72 -246
- package/dist/packages/_es/NumberKeyboard.js +41 -272
- package/dist/packages/_es/OldPicker.js +131 -474
- package/dist/packages/_es/OverLay.js +24 -113
- package/dist/packages/_es/Pagination.js +39 -157
- package/dist/packages/_es/Picker.js +129 -469
- package/dist/packages/_es/Popover.js +318 -975
- package/dist/packages/_es/Popup.js +55 -313
- package/dist/packages/_es/Price.js +16 -118
- package/dist/packages/_es/Progress.js +14 -146
- package/dist/packages/_es/PullRefresh.js +84 -354
- package/dist/packages/_es/Radio.js +22 -90
- package/dist/packages/_es/RadioGroup.js +8 -37
- package/dist/packages/_es/Range.js +83 -427
- package/dist/packages/_es/Rate.js +35 -137
- package/dist/packages/_es/Row.js +22 -64
- package/dist/packages/_es/SearchBar.js +37 -257
- package/dist/packages/_es/ShortPassword.js +35 -225
- package/dist/packages/_es/SideNavBar.js +24 -99
- package/dist/packages/_es/SideNavBarItem.js +11 -46
- package/dist/packages/_es/Signature.js +41 -179
- package/dist/packages/_es/Skeleton.js +20 -136
- package/dist/packages/_es/Sku.js +84 -509
- package/dist/packages/_es/Step.js +20 -133
- package/dist/packages/_es/Steps.js +18 -53
- package/dist/packages/_es/Sticky.js +53 -138
- package/dist/packages/_es/SubSideNavBar.js +17 -100
- package/dist/packages/_es/Swipe.js +41 -197
- 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 +18 -196
- package/dist/packages/_es/Tabs.js +43 -217
- package/dist/packages/_es/Tag.js +20 -97
- package/dist/packages/_es/TextArea.js +42 -160
- package/dist/packages/_es/TimeDetail.js +18 -98
- package/dist/packages/_es/TimePannel.js +14 -66
- package/dist/packages/_es/TimeSelect.js +15 -103
- package/dist/packages/_es/Toast.js +71 -329
- package/dist/packages/_es/Uploader.js +104 -468
- package/dist/packages/_es/Video.js +74 -350
- 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 +164 -682
- 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/animate/index.scss +299 -0
- package/dist/packages/button/index.scss +2 -1
- package/dist/packages/cell/index.scss +18 -1
- package/dist/packages/checkbox/index.scss +16 -0
- package/dist/packages/configprovider/index.scss +2 -0
- package/dist/packages/dialog/index.scss +1 -0
- package/dist/packages/elevator/index.scss +21 -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 +21 -2
- package/dist/packages/input/index.scss +26 -1
- package/dist/packages/inputnumber/index.scss +21 -0
- 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/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 +19 -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 +4 -3
- package/dist/packages/tabbar/index.scss +5 -0
- package/dist/packages/tabbaritem/index.scss +7 -0
- package/dist/packages/tabpane/index.scss +6 -0
- package/dist/packages/tabs/index.scss +22 -0
- package/dist/packages/textarea/index.scss +8 -0
- package/dist/smartips/attributes.json +192 -12
- package/dist/smartips/tags.json +70 -10
- package/dist/smartips/web-types.json +6945 -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 +19 -1
- package/dist/styles/variables-jdt.scss +19 -1
- package/dist/styles/variables.scss +22 -1
- package/dist/types/__VUE/address/index.vue.d.ts +2 -2
- package/dist/types/__VUE/addresslist/components/ItemContents.vue.d.ts +1 -0
- 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/audiooperate/index.vue.d.ts +1 -0
- package/dist/types/__VUE/avatar/index.vue.d.ts +7 -7
- 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/calendaritem/index.vue.d.ts +10 -2
- package/dist/types/__VUE/cell/index.vue.d.ts +13 -6
- package/dist/types/__VUE/checkbox/common.d.ts +59 -0
- package/dist/types/__VUE/checkbox/index.vue.d.ts +20 -7
- package/dist/types/__VUE/checkboxgroup/index.vue.d.ts +7 -0
- package/dist/types/__VUE/circleprogress/index.vue.d.ts +2 -2
- package/dist/types/__VUE/collapse/index.vue.d.ts +5 -3
- package/dist/types/__VUE/collapseitem/index.vue.d.ts +2 -2
- 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 +5 -5
- package/dist/types/__VUE/datepicker/type.d.ts +6 -0
- package/dist/types/__VUE/dialog/index.d.ts +9 -2
- package/dist/types/__VUE/dialog/index.vue.d.ts +26 -17
- 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/ellipsis/index.vue.d.ts +72 -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/common.d.ts +3 -3
- package/dist/types/__VUE/grid/index.vue.d.ts +5 -5
- package/dist/types/__VUE/griditem/index.vue.d.ts +1 -1
- 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/index.vue.d.ts +36 -2
- package/dist/types/__VUE/infiniteloading/index.vue.d.ts +6 -6
- package/dist/types/__VUE/input/index.vue.d.ts +4 -4
- package/dist/types/__VUE/menu/index.vue.d.ts +29 -2
- package/dist/types/__VUE/menuitem/index.vue.d.ts +16 -7
- package/dist/types/__VUE/menuitem/type.d.ts +8 -0
- package/dist/types/__VUE/noticebar/index.vue.d.ts +3 -3
- package/dist/types/__VUE/picker/Column.vue.d.ts +1 -1
- package/dist/types/__VUE/picker/index.vue.d.ts +1 -1
- 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/common.d.ts +149 -0
- package/dist/types/__VUE/rate/index.vue.d.ts +17 -7
- package/dist/types/__VUE/searchbar/index.vue.d.ts +2 -2
- package/dist/types/__VUE/skeleton/common.d.ts +2 -4
- package/dist/types/__VUE/step/index.vue.d.ts +2 -2
- package/dist/types/__VUE/swiper/index.vue.d.ts +4 -4
- 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/tabs/common.d.ts +2 -2
- package/dist/types/__VUE/textarea/index.vue.d.ts +2 -2
- package/dist/types/__VUE/timeselect/index.vue.d.ts +8 -0
- package/dist/types/__VUE/toast/index.vue.d.ts +2 -2
- package/dist/types/__VUE/uploader/index.vue.d.ts +4 -4
- package/dist/types/__VUE/uploader/type.d.ts +2 -1
- package/dist/types/__VUE/uploader/uploader.d.ts +1 -0
- package/dist/types/__VUE/video/index.vue.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/nutui.d.ts +5 -1
- package/package.json +7 -3
|
@@ -1,156 +1,33 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.22-beta.5 Fri Jun 24 2022 15:10:09 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.
|
|
2
|
+
* @nutui/nutui v3.1.22-beta.5 Fri Jun 24 2022 15:10:09 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,38 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui v3.1.
|
|
2
|
+
* @nutui/nutui v3.1.22-beta.5 Fri Jun 24 2022 15:10:09 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 { ref as e, watch as t, provide as n, openBlock as a, createElementBlock as o, renderSlot as r } from "vue";
|
|
7
|
+
import { c as i } from "./component.js";
|
|
8
|
+
import { _ as c } from "./plugin-vue_export-helper.js";
|
|
9
9
|
import "../locale/lang";
|
|
10
|
-
const { create } =
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
},
|
|
19
|
-
titleIcon: {
|
|
20
|
-
type: String,
|
|
21
|
-
default: ""
|
|
22
|
-
},
|
|
23
|
-
titleIconSize: {
|
|
24
|
-
type: String,
|
|
25
|
-
default: "16px"
|
|
26
|
-
},
|
|
27
|
-
titleIconColor: {
|
|
28
|
-
type: String,
|
|
29
|
-
default: ""
|
|
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
|
|
10
|
+
const { create: p } = i("collapse"), l = p({ 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(a2, { emit: o2, slots: r2 }) {
|
|
11
|
+
const i2 = e(null);
|
|
12
|
+
t(() => a2.active, (e2, t2) => {
|
|
13
|
+
var _a, _b;
|
|
14
|
+
let n2 = (_a = r2 == null ? void 0 : r2.default) == null ? void 0 : _a.call(r2), a3 = (_b = i2.value) == null ? void 0 : _b.children;
|
|
15
|
+
Array.from(a3).forEach((t3, a4) => {
|
|
16
|
+
const o3 = t3.__vueParentComponent.ctx;
|
|
17
|
+
typeof e2 == "number" || typeof e2 == "string" ? e2 == n2[a4].props.name ? o3.changeOpen(!o3.openExpanded) : o3.changeOpen(false) : Object.values(e2) instanceof Array && (e2.indexOf(Number(n2[a4].props.name)) > -1 || e2.indexOf(String(n2[a4].props.name)) > -1 ? o3.changeOpen(true) : o3.changeOpen(false)), o3.animation();
|
|
81
18
|
});
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
19
|
+
});
|
|
20
|
+
const c2 = (e2) => {
|
|
21
|
+
o2("update:active", e2), o2("change", e2);
|
|
22
|
+
};
|
|
23
|
+
return n("collapseParent", { children: [], props: a2, changeValAry: (e2) => {
|
|
24
|
+
const t2 = a2.active instanceof Object ? Object.values(a2.active) : a2.active;
|
|
25
|
+
let n2 = -1;
|
|
26
|
+
t2.forEach((t3, a3) => {
|
|
27
|
+
String(t3) == String(e2) && (n2 = a3);
|
|
28
|
+
}), n2 > -1 ? t2.splice(n2, 1) : t2.push(e2), c2(t2);
|
|
29
|
+
}, changeVal: c2, isExpanded: (e2) => {
|
|
30
|
+
const { accordion: t2, active: n2 } = a2;
|
|
31
|
+
if (t2)
|
|
32
|
+
return (typeof n2 == "number" || typeof n2 == "string") && n2 == e2;
|
|
33
|
+
} }), { collapseDom: i2 };
|
|
34
|
+
} }), s = { ref: "collapseDom" };
|
|
35
|
+
var u = c(l, [["render", function(e2, t2, n2, i2, c2, p2) {
|
|
36
|
+
return a(), o("view", s, [r(e2.$slots, "default")], 512);
|
|
37
|
+
}]]);
|
|
38
|
+
export { u as default };
|