@nutui/nutui 3.1.22-beta.5 → 3.1.23-beta.1

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.
Files changed (168) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/README.md +3 -4
  3. package/dist/nutui.es.js +20412 -4214
  4. package/dist/nutui.umd.js +20518 -4216
  5. package/dist/packages/_es/ActionSheet.js +149 -17
  6. package/dist/packages/_es/Address.js +535 -110
  7. package/dist/packages/_es/AddressList.js +615 -113
  8. package/dist/packages/_es/Animate.js +59 -17
  9. package/dist/packages/_es/Audio.js +257 -53
  10. package/dist/packages/_es/AudioOperate.js +100 -13
  11. package/dist/packages/_es/Avatar.js +162 -38
  12. package/dist/packages/_es/AvatarGroup.js +73 -14
  13. package/dist/packages/_es/BackTop.js +156 -43
  14. package/dist/packages/_es/Badge.js +86 -14
  15. package/dist/packages/_es/Barrage.js +120 -41
  16. package/dist/packages/_es/Button.js +128 -23
  17. package/dist/packages/_es/Calendar.js +246 -30
  18. package/dist/packages/_es/CalendarItem.js +1 -1
  19. package/dist/packages/_es/Card.js +107 -10
  20. package/dist/packages/_es/Cascader.js +496 -147
  21. package/dist/packages/_es/Category.js +58 -15
  22. package/dist/packages/_es/CategoryPane.js +111 -11
  23. package/dist/packages/_es/Cell.js +108 -21
  24. package/dist/packages/_es/CellGroup.js +44 -9
  25. package/dist/packages/_es/Checkbox.js +134 -29
  26. package/dist/packages/_es/CheckboxGroup.js +79 -29
  27. package/dist/packages/_es/CircleProgress.js +150 -28
  28. package/dist/packages/_es/Col.js +56 -14
  29. package/dist/packages/_es/Collapse.js +109 -32
  30. package/dist/packages/_es/CollapseItem.js +253 -59
  31. package/dist/packages/_es/Comment.js +434 -64
  32. package/dist/packages/_es/ConfigProvider.js +20 -8
  33. package/dist/packages/_es/CountDown.js +238 -56
  34. package/dist/packages/_es/CountUp.js +539 -140
  35. package/dist/packages/_es/DatePicker.js +315 -98
  36. package/dist/packages/_es/Dialog.js +289 -60
  37. package/dist/packages/_es/Divider.js +65 -13
  38. package/dist/packages/_es/Drag.js +197 -56
  39. package/dist/packages/_es/Ecard.js +159 -24
  40. package/dist/packages/_es/Elevator.js +255 -58
  41. package/dist/packages/_es/Ellipsis.js +200 -58
  42. package/dist/packages/_es/Empty.js +71 -12
  43. package/dist/packages/_es/FixedNav.js +122 -15
  44. package/dist/packages/_es/Form.js +151 -64
  45. package/dist/packages/_es/FormItem.js +114 -15
  46. package/dist/packages/_es/Grid.js +6 -5
  47. package/dist/packages/_es/GridItem.js +144 -33
  48. package/dist/packages/_es/Icon.js +40 -15
  49. package/dist/packages/_es/Image.js +137 -26
  50. package/dist/packages/_es/ImagePreview.js +547 -76
  51. package/dist/packages/_es/Indicator.js +62 -15
  52. package/dist/packages/_es/InfiniteLoading.js +249 -57
  53. package/dist/packages/_es/Input.js +433 -51
  54. package/dist/packages/_es/InputNumber.js +160 -41
  55. package/dist/packages/_es/Layout.js +5 -4
  56. package/dist/packages/_es/List.js +106 -18
  57. package/dist/packages/_es/Menu.js +168 -44
  58. package/dist/packages/_es/MenuItem.js +173 -37
  59. package/dist/packages/_es/Navbar.js +192 -30
  60. package/dist/packages/_es/NoticeBar.js +380 -74
  61. package/dist/packages/_es/Notify.js +227 -72
  62. package/dist/packages/_es/NumberKeyboard.js +272 -41
  63. package/dist/packages/_es/OldPicker.js +457 -130
  64. package/dist/packages/_es/OverLay.js +98 -24
  65. package/dist/packages/_es/Pagination.js +157 -39
  66. package/dist/packages/_es/Picker.js +454 -129
  67. package/dist/packages/_es/Popover.js +957 -318
  68. package/dist/packages/_es/Popup.js +299 -55
  69. package/dist/packages/_es/Price.js +118 -16
  70. package/dist/packages/_es/Progress.js +146 -14
  71. package/dist/packages/_es/PullRefresh.js +339 -84
  72. package/dist/packages/_es/Radio.js +90 -22
  73. package/dist/packages/_es/RadioGroup.js +37 -8
  74. package/dist/packages/_es/Range.js +408 -83
  75. package/dist/packages/_es/Rate.js +192 -36
  76. package/dist/packages/_es/Row.js +64 -22
  77. package/dist/packages/_es/SearchBar.js +238 -37
  78. package/dist/packages/_es/ShortPassword.js +225 -35
  79. package/dist/packages/_es/SideNavBar.js +81 -24
  80. package/dist/packages/_es/SideNavBarItem.js +46 -11
  81. package/dist/packages/_es/Signature.js +160 -41
  82. package/dist/packages/_es/Skeleton.js +136 -20
  83. package/dist/packages/_es/Sku.js +491 -84
  84. package/dist/packages/_es/Step.js +115 -20
  85. package/dist/packages/_es/Steps.js +53 -18
  86. package/dist/packages/_es/Sticky.js +138 -53
  87. package/dist/packages/_es/SubSideNavBar.js +82 -17
  88. package/dist/packages/_es/Swipe.js +178 -41
  89. package/dist/packages/_es/Swiper.js +433 -121
  90. package/dist/packages/_es/SwiperItem.js +53 -22
  91. package/dist/packages/_es/Switch.js +116 -21
  92. package/dist/packages/_es/TabPane.js +39 -12
  93. package/dist/packages/_es/Tabbar.js +72 -17
  94. package/dist/packages/_es/TabbarItem.js +151 -29
  95. package/dist/packages/_es/Table.js +178 -18
  96. package/dist/packages/_es/Tabs.js +202 -43
  97. package/dist/packages/_es/Tag.js +97 -20
  98. package/dist/packages/_es/TextArea.js +160 -42
  99. package/dist/packages/_es/TimeDetail.js +79 -18
  100. package/dist/packages/_es/TimePannel.js +48 -14
  101. package/dist/packages/_es/TimeSelect.js +112 -15
  102. package/dist/packages/_es/Toast.js +310 -71
  103. package/dist/packages/_es/Uploader.js +455 -104
  104. package/dist/packages/_es/Video.js +332 -74
  105. package/dist/packages/_es/common.js +128 -38
  106. package/dist/packages/_es/component.js +76 -35
  107. package/dist/packages/_es/index.js +6 -5
  108. package/dist/packages/_es/index2.js +30 -9
  109. package/dist/packages/_es/index3.js +8 -6
  110. package/dist/packages/_es/index4.js +64 -13
  111. package/dist/packages/_es/index5.js +780 -164
  112. package/dist/packages/_es/plugin-vue_export-helper.js +8 -7
  113. package/dist/packages/_es/pxCheck.js +5 -3
  114. package/dist/packages/_es/raf.js +15 -8
  115. package/dist/packages/imagepreview/index.scss +6 -1
  116. package/dist/packages/locale/lang/baseLang.js +3 -3
  117. package/dist/packages/locale/lang/en-US.js +105 -5
  118. package/dist/packages/locale/lang/id-ID.js +105 -5
  119. package/dist/packages/locale/lang/index.js +38 -16
  120. package/dist/packages/locale/lang/zh-CN.js +105 -5
  121. package/dist/packages/locale/lang/zh-TW.js +105 -5
  122. package/dist/packages/picker/index.scss +13 -0
  123. package/dist/smartips/attributes.json +8 -0
  124. package/dist/smartips/tags.json +3 -1
  125. package/dist/smartips/web-types.json +19 -1
  126. package/dist/style.css +1 -1
  127. package/dist/style.es.js +1 -1
  128. package/dist/styles/themes/default.scss +49 -49
  129. package/dist/styles/themes/jdb.scss +49 -49
  130. package/dist/styles/themes/jdt.scss +49 -49
  131. package/dist/styles/variables-jdb.scss +4 -1
  132. package/dist/styles/variables-jdt.scss +4 -1
  133. package/dist/styles/variables.scss +1 -1
  134. package/dist/types/__VUE/actionsheet/index.vue.d.ts +3 -3
  135. package/dist/types/__VUE/address/index.vue.d.ts +4 -4
  136. package/dist/types/__VUE/calendar/index.vue.d.ts +1 -1
  137. package/dist/types/__VUE/cascader/index.vue.d.ts +3 -3
  138. package/dist/types/__VUE/cell/index.vue.d.ts +2 -2
  139. package/dist/types/__VUE/checkbox/index.vue.d.ts +2 -2
  140. package/dist/types/__VUE/collapse/index.vue.d.ts +2 -2
  141. package/dist/types/__VUE/datepicker/index.vue.d.ts +2 -2
  142. package/dist/types/__VUE/dialog/index.vue.d.ts +2 -2
  143. package/dist/types/__VUE/ecard/index.vue.d.ts +2 -2
  144. package/dist/types/__VUE/fixednav/index.vue.d.ts +2 -2
  145. package/dist/types/__VUE/grid/index.vue.d.ts +3 -3
  146. package/dist/types/__VUE/imagepreview/imagePreviewItem.vue.d.ts +95 -0
  147. package/dist/types/__VUE/imagepreview/index.vue.d.ts +23 -25
  148. package/dist/types/__VUE/infiniteloading/index.vue.d.ts +6 -6
  149. package/dist/types/__VUE/input/index.vue.d.ts +2 -2
  150. package/dist/types/__VUE/menu/index.vue.d.ts +4 -4
  151. package/dist/types/__VUE/menuitem/index.vue.d.ts +1 -1
  152. package/dist/types/__VUE/numberkeyboard/index.vue.d.ts +2 -2
  153. package/dist/types/__VUE/oldpicker/index.vue.d.ts +3 -3
  154. package/dist/types/__VUE/picker/index.vue.d.ts +3 -3
  155. package/dist/types/__VUE/popover/index.vue.d.ts +6 -6
  156. package/dist/types/__VUE/popup/index.vue.d.ts +4 -4
  157. package/dist/types/__VUE/range/index.vue.d.ts +1 -1
  158. package/dist/types/__VUE/rate/index.vue.d.ts +2 -2
  159. package/dist/types/__VUE/searchbar/index.vue.d.ts +2 -2
  160. package/dist/types/__VUE/shortpassword/index.vue.d.ts +1 -1
  161. package/dist/types/__VUE/sku/index.vue.d.ts +3 -3
  162. package/dist/types/__VUE/swipe/index.vue.d.ts +2 -2
  163. package/dist/types/__VUE/switch/index.vue.d.ts +2 -2
  164. package/dist/types/__VUE/tabbar/index.vue.d.ts +2 -2
  165. package/dist/types/__VUE/textarea/index.vue.d.ts +2 -2
  166. package/dist/types/__VUE/toast/index.vue.d.ts +1 -1
  167. package/dist/types/index.d.ts +1 -1
  168. package/package.json +1 -2
@@ -1,34 +1,84 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.22-beta.5 Fri Jun 24 2022 15:10:09 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.23-beta.1 Mon Jun 27 2022 21:39:05 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
- import { reactive as e, provide as l, computed as a, watch as o, h as d } from "vue";
7
- import { c as t } from "./component.js";
8
- import { u } from "./index3.js";
6
+ import { reactive, provide, computed, watch, h } from "vue";
7
+ import { c as createComponent } from "./component.js";
8
+ import { u as useExpose } from "./index3.js";
9
9
  import "../locale/lang";
10
- const { create: r, componentName: p } = t("checkboxgroup"), s = r({ props: { modelValue: { type: Array, default: () => [] }, disabled: { type: Boolean, default: false }, max: { type: Number, default: 0 } }, emits: ["change", "update:modelValue"], setup(t2, { slots: r2, emit: s2 }) {
11
- const m = e({ children: [] });
12
- return l("parent", { value: a(() => t2.modelValue), disabled: a(() => t2.disabled), max: a(() => t2.max), updateValue: (e2) => {
13
- s2("update:modelValue", e2), s2("change", e2);
14
- }, relation: (e2) => {
15
- e2.proxy && m.children.push(e2.proxy);
16
- } }), o(() => t2.modelValue, (e2) => {
17
- s2("change", e2);
18
- }), u({ toggleAll: (e2) => {
19
- let l2 = [];
20
- e2 && m.children.forEach((e3) => {
21
- (e3 == null ? void 0 : e3.disabled) || l2.push(e3 == null ? void 0 : e3.label);
22
- }), s2("update:modelValue", l2);
23
- }, toggleReverse: () => {
24
- let e2 = t2.modelValue.slice();
25
- m.children.forEach((l2) => {
26
- let a2 = e2.findIndex((e3) => e3 === l2.label);
27
- a2 > -1 ? e2.splice(a2, 1) : (l2 == null ? void 0 : l2.disabled) || e2.push(l2 == null ? void 0 : l2.label);
28
- }), s2("update:modelValue", e2);
29
- } }), () => {
30
- var _a;
31
- return d("view", { class: `${p}` }, (_a = r2.default) == null ? void 0 : _a.call(r2));
32
- };
33
- } });
34
- export { s as default };
10
+ const { create, componentName } = createComponent("checkboxgroup");
11
+ const _sfc_main = create({
12
+ props: {
13
+ modelValue: {
14
+ type: Array,
15
+ default: () => []
16
+ },
17
+ disabled: {
18
+ type: Boolean,
19
+ default: false
20
+ },
21
+ max: {
22
+ type: Number,
23
+ default: 0
24
+ }
25
+ },
26
+ emits: ["change", "update:modelValue"],
27
+ setup(props, { slots, emit }) {
28
+ const state = reactive({
29
+ children: []
30
+ });
31
+ const relation = (child) => {
32
+ if (child.proxy) {
33
+ state.children.push(child.proxy);
34
+ }
35
+ };
36
+ const updateValue = (value) => {
37
+ emit("update:modelValue", value);
38
+ emit("change", value);
39
+ };
40
+ const toggleAll = (checked) => {
41
+ let values = [];
42
+ if (!!checked) {
43
+ state.children.forEach((item) => {
44
+ if (!(item == null ? void 0 : item.disabled)) {
45
+ values.push(item == null ? void 0 : item.label);
46
+ }
47
+ });
48
+ }
49
+ emit("update:modelValue", values);
50
+ };
51
+ const toggleReverse = () => {
52
+ let values = props.modelValue.slice();
53
+ state.children.forEach((item) => {
54
+ let findIndex = values.findIndex((value) => value === item.label);
55
+ if (findIndex > -1) {
56
+ values.splice(findIndex, 1);
57
+ } else {
58
+ if (!(item == null ? void 0 : item.disabled)) {
59
+ values.push(item == null ? void 0 : item.label);
60
+ }
61
+ }
62
+ });
63
+ emit("update:modelValue", values);
64
+ };
65
+ provide("parent", {
66
+ value: computed(() => props.modelValue),
67
+ disabled: computed(() => props.disabled),
68
+ max: computed(() => props.max),
69
+ updateValue,
70
+ relation
71
+ });
72
+ watch(() => props.modelValue, (value) => {
73
+ emit("change", value);
74
+ });
75
+ useExpose({ toggleAll, toggleReverse });
76
+ return () => {
77
+ var _a;
78
+ return h("view", {
79
+ class: `${componentName}`
80
+ }, (_a = slots.default) == null ? void 0 : _a.call(slots));
81
+ };
82
+ }
83
+ });
84
+ export { _sfc_main as default };
@@ -1,33 +1,155 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.22-beta.5 Fri Jun 24 2022 15:10:09 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.23-beta.1 Mon Jun 27 2022 21:39:05 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
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";
6
+ import { useSlots, computed, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, Fragment, renderList, renderSlot, toDisplayString, createCommentVNode } from "vue";
7
+ import { i as isObject, c as createComponent } from "./component.js";
8
+ import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
9
9
  import "../locale/lang";
10
- const { componentName: 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 };
10
+ const { componentName, create } = createComponent("circleprogress");
11
+ const _sfc_main = create({
12
+ props: {
13
+ progress: {
14
+ type: [Number, String],
15
+ required: true
16
+ },
17
+ strokeWidth: {
18
+ type: [Number, String],
19
+ default: 5
20
+ },
21
+ radius: {
22
+ type: [Number, String],
23
+ default: 50
24
+ },
25
+ strokeLinecap: {
26
+ type: String,
27
+ default: "round"
28
+ },
29
+ color: {
30
+ type: [String, Object],
31
+ default: ""
32
+ },
33
+ pathColor: {
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 0 -45 a 45 45 0 1 ${isWise} 0 90 a 45 45 0 1, ${isWise} 0 -90`;
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
+ "stroke-width": _ctx.strokeWidth
146
+ }, null, 12, _hoisted_5)
147
+ ])),
148
+ createElementVNode("div", _hoisted_6, [
149
+ renderSlot(_ctx.$slots, "default"),
150
+ !_ctx.slotDefault ? (openBlock(), createElementBlock("div", _hoisted_7, toDisplayString(_ctx.progress) + "%", 1)) : createCommentVNode("", true)
151
+ ])
152
+ ], 6);
153
+ }
154
+ var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
155
+ export { index as default };
@@ -1,19 +1,61 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.22-beta.5 Fri Jun 24 2022 15:10:09 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.23-beta.1 Mon Jun 27 2022 21:39:05 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
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";
6
+ import { inject, computed, openBlock, createElementBlock, normalizeClass, normalizeStyle, renderSlot } from "vue";
7
+ import { c as createComponent } from "./component.js";
8
+ import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
9
9
  import "../locale/lang";
10
- const { componentName: 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 };
10
+ const { componentName, create } = createComponent("col");
11
+ const _sfc_main = create({
12
+ props: {
13
+ span: {
14
+ type: [String, Number],
15
+ default: "24"
16
+ },
17
+ offset: {
18
+ type: [String, Number],
19
+ default: "0"
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 };
@@ -1,38 +1,115 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.22-beta.5 Fri Jun 24 2022 15:10:09 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.23-beta.1 Mon Jun 27 2022 21:39:05 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
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";
6
+ import { ref, watch, provide, openBlock, createElementBlock, renderSlot } from "vue";
7
+ import { c as createComponent } from "./component.js";
8
+ import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
9
9
  import "../locale/lang";
10
- const { create: 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();
10
+ const { create } = createComponent("collapse");
11
+ const _sfc_main = create({
12
+ props: {
13
+ active: {
14
+ type: [String, Number, Array]
15
+ },
16
+ accordion: {
17
+ type: Boolean
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, slots }) {
54
+ const collapseDom = ref(null);
55
+ watch(() => props.active, (newval, oldval) => {
56
+ var _a, _b;
57
+ let domsProps = (_a = slots == null ? void 0 : slots.default) == null ? void 0 : _a.call(slots);
58
+ let doms = (_b = collapseDom.value) == null ? void 0 : _b.children;
59
+ Array.from(doms).forEach((dom, index2) => {
60
+ const item = dom["__vueParentComponent"]["ctx"];
61
+ if (typeof newval == "number" || typeof newval == "string") {
62
+ if (newval == domsProps[index2].props.name) {
63
+ item.changeOpen(!item.openExpanded);
64
+ } else {
65
+ item.changeOpen(false);
66
+ }
67
+ } else if (Object.values(newval) instanceof Array) {
68
+ if (newval.indexOf(Number(domsProps[index2].props.name)) > -1 || newval.indexOf(String(domsProps[index2].props.name)) > -1) {
69
+ item.changeOpen(true);
70
+ } else {
71
+ item.changeOpen(false);
72
+ }
73
+ }
74
+ item.animation();
75
+ });
18
76
  });
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 };
77
+ const changeVal = (val) => {
78
+ emit("update:active", val);
79
+ emit("change", val);
80
+ };
81
+ const changeValAry = (name) => {
82
+ const activeItem = props.active instanceof Object ? Object.values(props.active) : props.active;
83
+ let index2 = -1;
84
+ activeItem.forEach((item, idx) => {
85
+ if (String(item) == String(name)) {
86
+ index2 = idx;
87
+ }
88
+ });
89
+ index2 > -1 ? activeItem.splice(index2, 1) : activeItem.push(name);
90
+ changeVal(activeItem);
91
+ };
92
+ const isExpanded = (name) => {
93
+ const { accordion, active } = props;
94
+ if (accordion) {
95
+ return typeof active === "number" || typeof active === "string" ? active == name : false;
96
+ }
97
+ };
98
+ provide("collapseParent", {
99
+ children: [],
100
+ props,
101
+ changeValAry,
102
+ changeVal,
103
+ isExpanded
104
+ });
105
+ return { collapseDom };
106
+ }
107
+ });
108
+ const _hoisted_1 = { ref: "collapseDom" };
109
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
110
+ return openBlock(), createElementBlock("view", _hoisted_1, [
111
+ renderSlot(_ctx.$slots, "default")
112
+ ], 512);
113
+ }
114
+ var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
115
+ export { index as default };