@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.
Files changed (176) hide show
  1. package/dist/nutui.es.js +4019 -19251
  2. package/dist/nutui.umd.js +4012 -19344
  3. package/dist/packages/_es/ActionSheet.js +26 -157
  4. package/dist/packages/_es/Address.js +119 -542
  5. package/dist/packages/_es/AddressList.js +113 -613
  6. package/dist/packages/_es/Audio.js +62 -264
  7. package/dist/packages/_es/AudioOperate.js +18 -107
  8. package/dist/packages/_es/Avatar.js +42 -165
  9. package/dist/packages/_es/AvatarGroup.js +14 -73
  10. package/dist/packages/_es/BackTop.js +43 -156
  11. package/dist/packages/_es/Badge.js +14 -86
  12. package/dist/packages/_es/Barrage.js +41 -120
  13. package/dist/packages/_es/Button.js +23 -128
  14. package/dist/packages/_es/Calendar.js +24 -237
  15. package/dist/packages/_es/CalendarItem.js +1 -1
  16. package/dist/packages/_es/Card.js +10 -107
  17. package/dist/packages/_es/Cascader.js +156 -500
  18. package/dist/packages/_es/Category.js +15 -58
  19. package/dist/packages/_es/CategoryPane.js +11 -111
  20. package/dist/packages/_es/Cell.js +21 -100
  21. package/dist/packages/_es/CellGroup.js +9 -44
  22. package/dist/packages/_es/Checkbox.js +31 -113
  23. package/dist/packages/_es/CheckboxGroup.js +29 -58
  24. package/dist/packages/_es/CircleProgress.js +28 -151
  25. package/dist/packages/_es/Col.js +14 -56
  26. package/dist/packages/_es/Collapse.js +24 -85
  27. package/dist/packages/_es/CollapseItem.js +70 -261
  28. package/dist/packages/_es/Comment.js +64 -434
  29. package/dist/packages/_es/CountDown.js +61 -242
  30. package/dist/packages/_es/CountUp.js +149 -546
  31. package/dist/packages/_es/DatePicker.js +107 -322
  32. package/dist/packages/_es/Dialog.js +69 -261
  33. package/dist/packages/_es/Divider.js +18 -68
  34. package/dist/packages/_es/Drag.js +56 -197
  35. package/dist/packages/_es/Ecard.js +24 -159
  36. package/dist/packages/_es/Elevator.js +63 -198
  37. package/dist/packages/_es/Empty.js +12 -71
  38. package/dist/packages/_es/FixedNav.js +15 -122
  39. package/dist/packages/_es/Form.js +64 -151
  40. package/dist/packages/_es/FormItem.js +15 -110
  41. package/dist/packages/_es/Grid.js +5 -6
  42. package/dist/packages/_es/GridItem.js +33 -144
  43. package/dist/packages/_es/Icon.js +15 -40
  44. package/dist/packages/_es/ImagePreview.js +74 -298
  45. package/dist/packages/_es/Indicator.js +15 -62
  46. package/dist/packages/_es/InfiniteLoading.js +66 -258
  47. package/dist/packages/_es/Input.js +51 -413
  48. package/dist/packages/_es/InputNumber.js +41 -160
  49. package/dist/packages/_es/Layout.js +4 -5
  50. package/dist/packages/_es/List.js +23 -110
  51. package/dist/packages/_es/Menu.js +30 -118
  52. package/dist/packages/_es/MenuItem.js +34 -162
  53. package/dist/packages/_es/Navbar.js +30 -192
  54. package/dist/packages/_es/NoticeBar.js +83 -387
  55. package/dist/packages/_es/Notify.js +81 -236
  56. package/dist/packages/_es/NumberKeyboard.js +41 -272
  57. package/dist/packages/_es/OldPicker.js +140 -464
  58. package/dist/packages/_es/OverLay.js +32 -105
  59. package/dist/packages/_es/Pagination.js +39 -157
  60. package/dist/packages/_es/Picker.js +138 -459
  61. package/dist/packages/_es/Popover.js +327 -965
  62. package/dist/packages/_es/Popup.js +64 -303
  63. package/dist/packages/_es/Price.js +16 -118
  64. package/dist/packages/_es/Progress.js +14 -146
  65. package/dist/packages/_es/PullRefresh.js +92 -346
  66. package/dist/packages/_es/Radio.js +22 -90
  67. package/dist/packages/_es/RadioGroup.js +8 -37
  68. package/dist/packages/_es/Range.js +92 -417
  69. package/dist/packages/_es/Rate.js +16 -139
  70. package/dist/packages/_es/Row.js +22 -64
  71. package/dist/packages/_es/SearchBar.js +46 -247
  72. package/dist/packages/_es/ShortPassword.js +35 -225
  73. package/dist/packages/_es/SideNavBar.js +33 -89
  74. package/dist/packages/_es/SideNavBarItem.js +11 -46
  75. package/dist/packages/_es/Signature.js +46 -165
  76. package/dist/packages/_es/Skeleton.js +20 -136
  77. package/dist/packages/_es/Sku.js +93 -499
  78. package/dist/packages/_es/Step.js +25 -119
  79. package/dist/packages/_es/Steps.js +18 -53
  80. package/dist/packages/_es/Sticky.js +53 -138
  81. package/dist/packages/_es/SubSideNavBar.js +26 -90
  82. package/dist/packages/_es/Swipe.js +46 -183
  83. package/dist/packages/_es/Swiper.js +121 -433
  84. package/dist/packages/_es/SwiperItem.js +22 -53
  85. package/dist/packages/_es/Switch.js +21 -116
  86. package/dist/packages/_es/TabPane.js +12 -39
  87. package/dist/packages/_es/Tabbar.js +17 -72
  88. package/dist/packages/_es/TabbarItem.js +29 -151
  89. package/dist/packages/_es/Table.js +27 -186
  90. package/dist/packages/_es/Tabs.js +51 -209
  91. package/dist/packages/_es/Tag.js +20 -97
  92. package/dist/packages/_es/TextArea.js +42 -160
  93. package/dist/packages/_es/TimeDetail.js +23 -84
  94. package/dist/packages/_es/TimePannel.js +19 -52
  95. package/dist/packages/_es/TimeSelect.js +15 -103
  96. package/dist/packages/_es/Toast.js +80 -319
  97. package/dist/packages/_es/Uploader.js +112 -460
  98. package/dist/packages/_es/Video.js +83 -340
  99. package/dist/packages/_es/common.js +38 -128
  100. package/dist/packages/_es/component.js +35 -76
  101. package/dist/packages/_es/index.js +5 -6
  102. package/dist/packages/_es/index2.js +9 -30
  103. package/dist/packages/_es/index3.js +6 -8
  104. package/dist/packages/_es/index4.js +13 -58
  105. package/dist/packages/_es/index5.js +120 -675
  106. package/dist/packages/_es/plugin-vue_export-helper.js +7 -8
  107. package/dist/packages/_es/pxCheck.js +3 -5
  108. package/dist/packages/_es/raf.js +8 -15
  109. package/dist/packages/button/index.scss +2 -1
  110. package/dist/packages/cell/index.scss +11 -0
  111. package/dist/packages/checkbox/index.scss +6 -0
  112. package/dist/packages/dialog/index.scss +1 -0
  113. package/dist/packages/elevator/index.scss +21 -0
  114. package/dist/packages/input/index.scss +13 -1
  115. package/dist/packages/locale/lang/baseLang.d.ts +1 -0
  116. package/dist/packages/locale/lang/baseLang.js +3 -3
  117. package/dist/packages/locale/lang/en-US.d.ts +8 -0
  118. package/dist/packages/locale/lang/en-US.js +5 -97
  119. package/dist/packages/locale/lang/id-ID.d.ts +8 -0
  120. package/dist/packages/locale/lang/id-ID.js +5 -97
  121. package/dist/packages/locale/lang/index.js +16 -38
  122. package/dist/packages/locale/lang/zh-CN.d.ts +8 -0
  123. package/dist/packages/locale/lang/zh-CN.js +5 -97
  124. package/dist/packages/locale/lang/zh-TW.d.ts +8 -0
  125. package/dist/packages/locale/lang/zh-TW.js +5 -97
  126. package/dist/packages/radio/index.scss +1 -0
  127. package/dist/packages/switch/index.scss +3 -3
  128. package/dist/packages/tabpane/index.scss +1 -0
  129. package/dist/smartips/attributes.json +62 -10
  130. package/dist/smartips/tags.json +17 -4
  131. package/dist/style.css +1 -1
  132. package/dist/styles/themes/default.scss +49 -49
  133. package/dist/styles/themes/jdb.scss +49 -49
  134. package/dist/styles/themes/jdt.scss +49 -49
  135. package/dist/styles/variables-jdb.scss +10 -1
  136. package/dist/styles/variables-jdt.scss +10 -1
  137. package/dist/styles/variables.scss +10 -1
  138. package/dist/types/__VUE/address/index.vue.d.ts +5 -5
  139. package/dist/types/__VUE/addresslist/components/ItemContents.vue.d.ts +1 -0
  140. package/dist/types/__VUE/audiooperate/index.vue.d.ts +1 -0
  141. package/dist/types/__VUE/avatar/index.vue.d.ts +4 -4
  142. package/dist/types/__VUE/backtop/index.vue.d.ts +2 -2
  143. package/dist/types/__VUE/badge/index.vue.d.ts +2 -2
  144. package/dist/types/__VUE/button/index.vue.d.ts +2 -2
  145. package/dist/types/__VUE/cascader/index.vue.d.ts +1 -1
  146. package/dist/types/__VUE/cell/index.vue.d.ts +11 -4
  147. package/dist/types/__VUE/checkbox/common.d.ts +59 -0
  148. package/dist/types/__VUE/checkbox/index.vue.d.ts +18 -5
  149. package/dist/types/__VUE/checkboxgroup/index.vue.d.ts +7 -0
  150. package/dist/types/__VUE/collapseitem/index.vue.d.ts +2 -2
  151. package/dist/types/__VUE/dialog/index.d.ts +9 -2
  152. package/dist/types/__VUE/dialog/index.vue.d.ts +23 -8
  153. package/dist/types/__VUE/ecard/index.vue.d.ts +3 -3
  154. package/dist/types/__VUE/elevator/index.vue.d.ts +29 -0
  155. package/dist/types/__VUE/empty/index.vue.d.ts +2 -2
  156. package/dist/types/__VUE/formitem/index.vue.d.ts +3 -10
  157. package/dist/types/__VUE/grid/index.vue.d.ts +4 -4
  158. package/dist/types/__VUE/griditem/index.vue.d.ts +1 -1
  159. package/dist/types/__VUE/input/index.vue.d.ts +2 -2
  160. package/dist/types/__VUE/noticebar/index.vue.d.ts +1 -1
  161. package/dist/types/__VUE/oldpicker/index.vue.d.ts +2 -2
  162. package/dist/types/__VUE/picker/index.vue.d.ts +2 -2
  163. package/dist/types/__VUE/popover/index.vue.d.ts +2 -2
  164. package/dist/types/__VUE/range/index.vue.d.ts +1 -1
  165. package/dist/types/__VUE/rate/index.vue.d.ts +2 -2
  166. package/dist/types/__VUE/row/index.vue.d.ts +2 -2
  167. package/dist/types/__VUE/shortpassword/index.vue.d.ts +2 -2
  168. package/dist/types/__VUE/step/index.vue.d.ts +2 -2
  169. package/dist/types/__VUE/switch/index.vue.d.ts +2 -2
  170. package/dist/types/__VUE/tabbaritem/index.vue.d.ts +2 -2
  171. package/dist/types/__VUE/timeselect/index.vue.d.ts +9 -2
  172. package/dist/types/__VUE/toast/index.vue.d.ts +3 -3
  173. package/dist/types/__VUE/uploader/index.vue.d.ts +2 -2
  174. package/dist/types/__VUE/video/index.vue.d.ts +1 -1
  175. package/dist/types/index.d.ts +1 -1
  176. package/package.json +2 -1
@@ -5,197 +5,38 @@ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
6
  var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
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]);
8
+ var __spreadValues = (a2, b2) => {
9
+ for (var prop in b2 || (b2 = {}))
10
+ if (__hasOwnProp.call(b2, prop))
11
+ __defNormalProp(a2, prop, b2[prop]);
12
12
  if (__getOwnPropSymbols)
13
- for (var prop of __getOwnPropSymbols(b)) {
14
- if (__propIsEnum.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
13
+ for (var prop of __getOwnPropSymbols(b2)) {
14
+ if (__propIsEnum.call(b2, prop))
15
+ __defNormalProp(a2, prop, b2[prop]);
16
16
  }
17
- return a;
17
+ return a2;
18
18
  };
19
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
19
+ var __spreadProps = (a2, b2) => __defProps(a2, __getOwnPropDescs(b2));
20
20
  /*!
21
- * @nutui/nutui v3.1.22-beta.0 Tue May 31 2022 21:47:10 GMT+0800 (中国标准时间)
21
+ * @nutui/nutui v3.1.22-beta.3 Wed Jun 15 2022 20:12:30 GMT+0800 (中国标准时间)
22
22
  * (c) 2022 @jdf2e.
23
23
  * Released under the MIT License.
24
24
  */
25
- import { c as createComponent } from "./component.js";
26
- import { h, reactive, computed, watch, toRefs, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, Fragment, renderList, createTextVNode, toDisplayString, renderSlot, createBlock, createCommentVNode } from "vue";
27
- import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
25
+ import { c as t } from "./component.js";
26
+ import { h as e, reactive as a, computed as s, watch as l, toRefs as r, resolveComponent as n, openBlock as o, createElementBlock as _, normalizeClass as u, createElementVNode as c, Fragment as i, renderList as d, createTextVNode as m, toDisplayString as p, renderSlot as y, createBlock as b, createCommentVNode as f } from "vue";
27
+ import { _ as v } from "./plugin-vue_export-helper.js";
28
28
  import "../locale/lang";
29
- var RenderColumn = {
30
- setup(props) {
31
- return () => h(`view`, {}, props.slots[0] ? props.slots[0](props.record) : props.slots[1](props.record));
32
- },
33
- props: {
34
- slots: Array,
35
- record: Object
36
- }
37
- };
38
- const component = (componentName2, translate2) => {
39
- return {
40
- components: {
41
- RenderColumn
42
- },
43
- props: {
44
- bordered: {
45
- type: Boolean,
46
- default: true
47
- },
48
- columns: {
49
- type: Array,
50
- default: () => {
51
- return [];
52
- }
53
- },
54
- data: {
55
- type: Object,
56
- default: () => {
57
- return {};
58
- }
59
- },
60
- summary: {
61
- type: Function,
62
- default: null
63
- },
64
- striped: {
65
- type: Boolean,
66
- default: false
67
- }
68
- },
69
- emits: ["sorter"],
70
- setup(props, { emit, slots }) {
71
- const state = reactive({
72
- curData: props.data
73
- });
74
- const classes = computed(() => {
75
- const prefixCls = componentName2;
76
- return {
77
- [prefixCls]: true
78
- };
79
- });
80
- const cellClasses = (item) => {
81
- return {
82
- "nut-table__main__head__tr--border": props.bordered,
83
- [`nut-table__main__head__tr--align${item.align ? item.align : ""}`]: true
84
- };
85
- };
86
- const getColumnItem = (value) => {
87
- return props.columns.filter((item) => item.key === value)[0];
88
- };
89
- const handleSorterClick = (item) => {
90
- if (item.sorter) {
91
- emit("sorter", item);
92
- state.curData = typeof item.sorter === "function" ? state.curData.sort(item.sorter) : item.sorter === "default" ? state.curData.sort() : state.curData;
93
- }
94
- };
95
- const sortDataItem = () => {
96
- return props.columns.map((columns) => {
97
- return [columns.key, columns.render];
98
- });
99
- };
100
- watch(() => props.data, (val) => {
101
- state.curData = val.slice();
102
- });
103
- return __spreadProps(__spreadValues({}, toRefs(state)), {
104
- classes,
105
- cellClasses,
106
- getColumnItem,
107
- handleSorterClick,
108
- sortDataItem,
109
- translate: translate2
110
- });
111
- }
112
- };
113
- };
114
- const { componentName, create, translate } = createComponent("table");
115
- const _sfc_main = create(component(componentName, translate));
116
- const _hoisted_1 = { class: "nut-table__main__head" };
117
- const _hoisted_2 = { class: "nut-table__main__head__tr" };
118
- const _hoisted_3 = ["onClick"];
119
- const _hoisted_4 = { class: "nut-table__main__body" };
120
- const _hoisted_5 = { key: 1 };
121
- const _hoisted_6 = {
122
- key: 0,
123
- class: "nut-table__summary"
124
- };
125
- const _hoisted_7 = ["innerHTML"];
126
- const _hoisted_8 = {
127
- key: 1,
128
- class: "nut-table__nodata"
129
- };
130
- const _hoisted_9 = {
131
- key: 0,
132
- class: "nut-table__nodata__text"
133
- };
134
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
135
- const _component_nut_icon = resolveComponent("nut-icon");
136
- const _component_RenderColumn = resolveComponent("RenderColumn");
137
- return openBlock(), createElementBlock("view", {
138
- class: normalizeClass(_ctx.classes)
139
- }, [
140
- createElementVNode("view", {
141
- class: normalizeClass(["nut-table__main", { "nut-table__main--striped": _ctx.striped }])
142
- }, [
143
- createElementVNode("view", _hoisted_1, [
144
- createElementVNode("view", _hoisted_2, [
145
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.columns, (item) => {
146
- return openBlock(), createElementBlock("span", {
147
- class: normalizeClass(["nut-table__main__head__tr__th", _ctx.cellClasses(item)]),
148
- key: item.key,
149
- onClick: ($event) => _ctx.handleSorterClick(item)
150
- }, [
151
- createTextVNode(toDisplayString(item.title) + " ", 1),
152
- renderSlot(_ctx.$slots, "icon"),
153
- !_ctx.$slots.icon && item.sorter ? (openBlock(), createBlock(_component_nut_icon, {
154
- key: 0,
155
- name: "down-arrow",
156
- size: "12px"
157
- })) : createCommentVNode("", true)
158
- ], 10, _hoisted_3);
159
- }), 128))
160
- ])
161
- ]),
162
- createElementVNode("view", _hoisted_4, [
163
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.curData, (item) => {
164
- return openBlock(), createElementBlock("view", {
165
- class: "nut-table__main__body__tr",
166
- key: item
167
- }, [
168
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.sortDataItem(), ([value, render]) => {
169
- return openBlock(), createElementBlock("span", {
170
- class: normalizeClass(["nut-table__main__body__tr__td", _ctx.cellClasses(_ctx.getColumnItem(value))]),
171
- key: value
172
- }, [
173
- typeof item[value] === "function" || typeof render === "function" ? (openBlock(), createBlock(_component_RenderColumn, {
174
- key: 0,
175
- slots: [render, item[value]],
176
- record: item
177
- }, null, 8, ["slots", "record"])) : (openBlock(), createElementBlock("view", _hoisted_5, toDisplayString(item[value]), 1))
178
- ], 2);
179
- }), 128))
180
- ]);
181
- }), 128))
182
- ])
183
- ], 2),
184
- _ctx.summary ? (openBlock(), createElementBlock("view", _hoisted_6, [
185
- createElementVNode("span", {
186
- class: "nut-table__summary__text",
187
- innerHTML: _ctx.summary().value
188
- }, null, 8, _hoisted_7)
189
- ])) : createCommentVNode("", true),
190
- !_ctx.curData.length ? (openBlock(), createElementBlock("view", _hoisted_8, [
191
- createElementVNode("div", {
192
- class: normalizeClass(["nut-table__nodata", { "nut-table__nodata--border": _ctx.bordered }])
193
- }, [
194
- renderSlot(_ctx.$slots, "nodata"),
195
- !_ctx.$slots.nodata ? (openBlock(), createElementBlock("div", _hoisted_9, toDisplayString(_ctx.translate("noData")), 1)) : createCommentVNode("", true)
196
- ], 2)
197
- ])) : createCommentVNode("", true)
198
- ], 2);
199
- }
200
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
201
- export { index as default };
29
+ var k = { setup: (t2) => () => e("view", {}, t2.slots[0] ? t2.slots[0](t2.record) : t2.slots[1](t2.record)), props: { slots: Array, record: Object } };
30
+ const { componentName: w, create: C, translate: D } = t("table"), h = C(((t2, e2) => ({ components: { RenderColumn: k }, props: { bordered: { type: Boolean, default: true }, columns: { type: Array, default: () => [] }, data: { type: Object, default: () => ({}) }, summary: { type: Function, default: null }, striped: { type: Boolean, default: false } }, emits: ["sorter"], setup(n2, { emit: o2, slots: _2 }) {
31
+ const u2 = a({ curData: n2.data }), c2 = s(() => ({ [t2]: true }));
32
+ return l(() => n2.data, (t3) => {
33
+ u2.curData = t3.slice();
34
+ }), __spreadProps(__spreadValues({}, r(u2)), { classes: c2, cellClasses: (t3) => ({ "nut-table__main__head__tr--border": n2.bordered, [`nut-table__main__head__tr--align${t3.align ? t3.align : ""}`]: true }), getColumnItem: (t3) => n2.columns.filter((e3) => e3.key === t3)[0], handleSorterClick: (t3) => {
35
+ t3.sorter && (o2("sorter", t3), u2.curData = typeof t3.sorter == "function" ? u2.curData.sort(t3.sorter) : t3.sorter === "default" ? u2.curData.sort() : u2.curData);
36
+ }, sortDataItem: () => n2.columns.map((t3) => [t3.key, t3.render]), translate: e2 });
37
+ } }))(w, D)), g = { class: "nut-table__main__head" }, x = { class: "nut-table__main__head__tr" }, $ = ["onClick"], j = { class: "nut-table__main__body" }, I = { key: 1 }, A = { key: 0, class: "nut-table__summary" }, B = ["innerHTML"], H = { key: 1, class: "nut-table__nodata" }, L = { key: 0, class: "nut-table__nodata__text" };
38
+ var M = v(h, [["render", function(t2, e2, a2, s2, l2, r2) {
39
+ const v2 = n("nut-icon"), k2 = n("RenderColumn");
40
+ return o(), _("view", { class: u(t2.classes) }, [c("view", { class: u(["nut-table__main", { "nut-table__main--striped": t2.striped }]) }, [c("view", g, [c("view", x, [(o(true), _(i, null, d(t2.columns, (e3) => (o(), _("span", { class: u(["nut-table__main__head__tr__th", t2.cellClasses(e3)]), key: e3.key, onClick: (a3) => t2.handleSorterClick(e3) }, [m(p(e3.title) + " ", 1), y(t2.$slots, "icon"), !t2.$slots.icon && e3.sorter ? (o(), b(v2, { key: 0, name: "down-arrow", size: "12px" })) : f("", true)], 10, $))), 128))])]), c("view", j, [(o(true), _(i, null, d(t2.curData, (e3) => (o(), _("view", { class: "nut-table__main__body__tr", key: e3 }, [(o(true), _(i, null, d(t2.sortDataItem(), ([a3, s3]) => (o(), _("span", { class: u(["nut-table__main__body__tr__td", t2.cellClasses(t2.getColumnItem(a3))]), key: a3 }, [typeof e3[a3] == "function" || typeof s3 == "function" ? (o(), b(k2, { key: 0, slots: [s3, e3[a3]], record: e3 }, null, 8, ["slots", "record"])) : (o(), _("view", I, p(e3[a3]), 1))], 2))), 128))]))), 128))])], 2), t2.summary ? (o(), _("view", A, [c("span", { class: "nut-table__summary__text", innerHTML: t2.summary().value }, null, 8, B)])) : f("", true), t2.curData.length ? f("", true) : (o(), _("view", H, [c("div", { class: u(["nut-table__nodata", { "nut-table__nodata--border": t2.bordered }]) }, [y(t2.$slots, "nodata"), t2.$slots.nodata ? f("", true) : (o(), _("div", L, p(t2.translate("noData")), 1))], 2)]))], 2);
41
+ }]]);
42
+ export { M as default };
@@ -3,224 +3,66 @@ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
3
3
  var __hasOwnProp = Object.prototype.hasOwnProperty;
4
4
  var __propIsEnum = Object.prototype.propertyIsEnumerable;
5
5
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6
- var __spreadValues = (a, b) => {
7
- for (var prop in b || (b = {}))
8
- if (__hasOwnProp.call(b, prop))
9
- __defNormalProp(a, prop, b[prop]);
6
+ var __spreadValues = (a2, b2) => {
7
+ for (var prop in b2 || (b2 = {}))
8
+ if (__hasOwnProp.call(b2, prop))
9
+ __defNormalProp(a2, prop, b2[prop]);
10
10
  if (__getOwnPropSymbols)
11
- for (var prop of __getOwnPropSymbols(b)) {
12
- if (__propIsEnum.call(b, prop))
13
- __defNormalProp(a, prop, b[prop]);
11
+ for (var prop of __getOwnPropSymbols(b2)) {
12
+ if (__propIsEnum.call(b2, prop))
13
+ __defNormalProp(a2, prop, b2[prop]);
14
14
  }
15
- return a;
15
+ return a2;
16
16
  };
17
17
  /*!
18
- * @nutui/nutui v3.1.22-beta.0 Tue May 31 2022 21:47:10 GMT+0800 (中国标准时间)
18
+ * @nutui/nutui v3.1.22-beta.3 Wed Jun 15 2022 20:12:30 GMT+0800 (中国标准时间)
19
19
  * (c) 2022 @jdf2e.
20
20
  * Released under the MIT License.
21
21
  */
22
- import { c as createComponent } from "./component.js";
23
- import { p as pxCheck } from "./pxCheck.js";
24
- import { provide, computed, ref, watch, onMounted, onActivated, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, renderSlot, Fragment, renderList, createCommentVNode, createVNode, toDisplayString } from "vue";
25
- import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
22
+ import { c as e } from "./component.js";
23
+ import { p as t } from "./pxCheck.js";
24
+ import { provide as l, computed as a, ref as i, watch as s, onMounted as n, onActivated as o, resolveComponent as r, openBlock as u, createElementBlock as p, normalizeClass as c, createElementVNode as d, normalizeStyle as y, renderSlot as m, Fragment as b, renderList as g, createCommentVNode as v, createVNode as f, toDisplayString as h } from "vue";
25
+ import { _ } from "./plugin-vue_export-helper.js";
26
26
  import "../locale/lang";
27
- class Title {
27
+ class S {
28
28
  constructor() {
29
- this.title = "";
30
- this.paneKey = "";
31
- this.disabled = false;
29
+ this.title = "", this.paneKey = "", this.disabled = false;
32
30
  }
33
31
  }
34
- const component = {
35
- props: {
36
- modelValue: {
37
- type: [String, Number],
38
- default: 0
39
- },
40
- color: {
41
- type: String,
42
- default: ""
43
- },
44
- direction: {
45
- type: String,
46
- default: "horizontal"
47
- },
48
- size: {
49
- type: String,
50
- default: "normal"
51
- },
52
- type: {
53
- type: String,
54
- default: "line"
55
- },
56
- titleScroll: {
57
- type: Boolean,
58
- default: false
59
- },
60
- ellipsis: {
61
- type: Boolean,
62
- default: true
63
- },
64
- autoHeight: {
65
- type: Boolean,
66
- default: false
67
- },
68
- background: {
69
- type: String,
70
- default: ""
71
- },
72
- animatedTime: {
73
- type: [Number, String],
74
- default: 300
75
- },
76
- titleGutter: {
77
- type: [Number, String],
78
- default: 0
79
- }
80
- },
81
- components: {},
82
- emits: ["update:modelValue", "click", "change"],
83
- setup(props, { emit, slots }) {
84
- provide("activeKey", { activeKey: computed(() => props.modelValue) });
85
- provide("autoHeight", { autoHeight: computed(() => props.autoHeight) });
86
- const titles = ref([]);
87
- const renderTitles = (vnodes) => {
88
- vnodes.forEach((vnode, index2) => {
89
- var _a, _b, _c, _d, _e, _f, _g;
90
- let type = vnode.type;
91
- type = type.name || type;
92
- if (type == "nut-tabpane") {
93
- let title = new Title();
94
- if (((_a = vnode.props) == null ? void 0 : _a.title) || ((_b = vnode.props) == null ? void 0 : _b["pane-key"]) || ((_c = vnode.props) == null ? void 0 : _c["paneKey"])) {
95
- title.title = (_d = vnode.props) == null ? void 0 : _d.title;
96
- title.paneKey = ((_e = vnode.props) == null ? void 0 : _e["pane-key"]) || ((_f = vnode.props) == null ? void 0 : _f["paneKey"]) || index2;
97
- title.disabled = (_g = vnode.props) == null ? void 0 : _g.disabled;
98
- }
99
- titles.value.push(title);
100
- } else {
101
- renderTitles(vnode.children);
102
- }
103
- });
104
- };
105
- const currentIndex = ref(props.modelValue || 0);
106
- const findTabsIndex = (value) => {
107
- let index2 = titles.value.findIndex((item) => item.paneKey == value);
108
- if (titles.value.length == 0) {
109
- console.error("[NutUI] <Tabs> \u5F53\u524D\u672A\u627E\u5230 TabPane \u7EC4\u4EF6\u5143\u7D20 , \u8BF7\u68C0\u67E5 .");
110
- } else if (index2 == -1) {
111
- console.error("[NutUI] <Tabs> \u8BF7\u68C0\u67E5 v-model \u503C\u662F\u5426\u4E3A paneKey ,\u5982 paneKey \u672A\u8BBE\u7F6E\uFF0C\u8BF7\u91C7\u7528\u4E0B\u6807\u63A7\u5236 .");
112
- } else {
113
- currentIndex.value = index2;
114
- }
115
- };
116
- const init = (vnodes = ((_a) => (_a = slots.default) == null ? void 0 : _a.call(slots))()) => {
117
- titles.value = [];
118
- if (vnodes && vnodes.length) {
119
- renderTitles(vnodes);
120
- }
121
- findTabsIndex(props.modelValue);
122
- };
123
- watch(() => {
124
- var _a;
125
- return (_a = slots.default) == null ? void 0 : _a.call(slots);
126
- }, (vnodes) => {
127
- init(vnodes);
128
- });
129
- watch(() => props.modelValue, (value) => {
130
- findTabsIndex(value);
131
- });
132
- onMounted(init);
133
- onActivated(init);
134
- const contentStyle = computed(() => {
135
- return {
136
- transform: props.direction == "horizontal" ? `translate3d(-${currentIndex.value * 100}%, 0, 0)` : `translate3d( 0,-${currentIndex.value * 100}%, 0)`,
137
- transitionDuration: `${props.animatedTime}ms`
138
- };
139
- });
140
- const tabsNavStyle = computed(() => {
141
- return {
142
- background: props.background
143
- };
144
- });
145
- const tabsActiveStyle = computed(() => {
146
- return {
147
- color: props.type == "smile" ? props.color : "",
148
- background: props.type == "line" ? props.color : ""
149
- };
32
+ const k = { props: { modelValue: { type: [String, Number], default: 0 }, color: { type: String, default: "" }, direction: { type: String, default: "horizontal" }, size: { type: String, default: "normal" }, type: { type: String, default: "line" }, titleScroll: { type: Boolean, default: false }, ellipsis: { type: Boolean, default: true }, autoHeight: { type: Boolean, default: false }, background: { type: String, default: "" }, animatedTime: { type: [Number, String], default: 300 }, titleGutter: { type: [Number, String], default: 0 } }, components: {}, emits: ["update:modelValue", "click", "change"], setup(e2, { emit: r2, slots: u2 }) {
33
+ l("activeKey", { activeKey: a(() => e2.modelValue) }), l("autoHeight", { autoHeight: a(() => e2.autoHeight) });
34
+ const p2 = i([]), c2 = (e3) => {
35
+ e3.forEach((e4, t2) => {
36
+ var _a, _b, _c, _d, _e, _f, _g;
37
+ let l2 = e4.type;
38
+ if (l2 = l2.name || l2, l2 == "nut-tabpane") {
39
+ let l3 = new S();
40
+ (((_a = e4.props) == null ? void 0 : _a.title) || ((_b = e4.props) == null ? void 0 : _b["pane-key"]) || ((_c = e4.props) == null ? void 0 : _c.paneKey)) && (l3.title = (_d = e4.props) == null ? void 0 : _d.title, l3.paneKey = ((_e = e4.props) == null ? void 0 : _e["pane-key"]) || ((_f = e4.props) == null ? void 0 : _f.paneKey) || t2, l3.disabled = (_g = e4.props) == null ? void 0 : _g.disabled), p2.value.push(l3);
41
+ } else
42
+ c2(e4.children);
150
43
  });
151
- const titleStyle = computed(() => {
152
- return {
153
- marginLeft: pxCheck(props.titleGutter),
154
- marginRight: pxCheck(props.titleGutter)
155
- };
156
- });
157
- const methods = {
158
- tabChange: (item, index2) => {
159
- emit("click", item);
160
- if (item.disabled) {
161
- return;
162
- }
163
- currentIndex.value = index2;
164
- emit("update:modelValue", item.paneKey);
165
- emit("change", item);
166
- }
167
- };
168
- return __spreadValues({
169
- titles,
170
- contentStyle,
171
- tabsNavStyle,
172
- titleStyle,
173
- tabsActiveStyle
174
- }, methods);
175
- }
176
- };
177
- const _hoisted_1 = ["onClick"];
178
- function render(_ctx, _cache, $props, $setup, $data, $options) {
179
- const _component_nut_icon = resolveComponent("nut-icon");
180
- return openBlock(), createElementBlock("view", {
181
- class: normalizeClass(["nut-tabs", [_ctx.direction]])
182
- }, [
183
- createElementVNode("view", {
184
- class: normalizeClass(["nut-tabs__titles", { [_ctx.type]: _ctx.type, scrollable: _ctx.titleScroll, [_ctx.size]: _ctx.size }]),
185
- style: normalizeStyle(_ctx.tabsNavStyle)
186
- }, [
187
- _ctx.$slots.titles ? renderSlot(_ctx.$slots, "titles", { key: 0 }) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.titles, (item, index2) => {
188
- return openBlock(), createElementBlock("view", {
189
- class: normalizeClass(["nut-tabs__titles-item", { active: item.paneKey == _ctx.modelValue, disabled: item.disabled }]),
190
- style: normalizeStyle(_ctx.titleStyle),
191
- onClick: ($event) => _ctx.tabChange(item, index2),
192
- key: item.paneKey
193
- }, [
194
- _ctx.type == "line" ? (openBlock(), createElementBlock("view", {
195
- key: 0,
196
- class: "nut-tabs__titles-item__line",
197
- style: normalizeStyle(_ctx.tabsActiveStyle)
198
- }, null, 4)) : createCommentVNode("", true),
199
- _ctx.type == "smile" ? (openBlock(), createElementBlock("view", {
200
- key: 1,
201
- class: "nut-tabs__titles-item__smile",
202
- style: normalizeStyle(_ctx.tabsActiveStyle)
203
- }, [
204
- createVNode(_component_nut_icon, {
205
- color: _ctx.color,
206
- name: "joy-smile"
207
- }, null, 8, ["color"])
208
- ], 4)) : createCommentVNode("", true),
209
- createElementVNode("view", {
210
- class: normalizeClass(["nut-tabs__titles-item__text", { ellipsis: _ctx.ellipsis }])
211
- }, toDisplayString(item.title), 3)
212
- ], 14, _hoisted_1);
213
- }), 128))
214
- ], 6),
215
- createElementVNode("view", {
216
- class: "nut-tabs__content",
217
- style: normalizeStyle(_ctx.contentStyle)
218
- }, [
219
- renderSlot(_ctx.$slots, "default")
220
- ], 4)
221
- ], 2);
222
- }
223
- const { create } = createComponent("tabs");
224
- const _sfc_main = create(component);
225
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", render]]);
226
- export { index as default };
44
+ }, d2 = i(e2.modelValue || 0), y2 = (e3) => {
45
+ let t2 = p2.value.findIndex((t3) => t3.paneKey == e3);
46
+ p2.value.length == 0 || t2 == -1 || (d2.value = t2);
47
+ }, m2 = (t2 = ((_a) => (_a = u2.default) == null ? void 0 : _a.call(u2))()) => {
48
+ p2.value = [], t2 && t2.length && c2(t2), y2(e2.modelValue);
49
+ };
50
+ s(() => {
51
+ var _a;
52
+ return (_a = u2.default) == null ? void 0 : _a.call(u2);
53
+ }, (e3) => {
54
+ m2(e3);
55
+ }), s(() => e2.modelValue, (e3) => {
56
+ y2(e3);
57
+ }), n(m2), o(m2);
58
+ const b2 = a(() => ({ transform: e2.direction == "horizontal" ? `translate3d(-${100 * d2.value}%, 0, 0)` : `translate3d( 0,-${100 * d2.value}%, 0)`, transitionDuration: `${e2.animatedTime}ms` })), g2 = a(() => ({ background: e2.background })), v2 = a(() => ({ color: e2.type == "smile" ? e2.color : "", background: e2.type == "line" ? e2.color : "" })), f2 = a(() => ({ marginLeft: t(e2.titleGutter), marginRight: t(e2.titleGutter) })), h2 = { tabChange: (e3, t2) => {
59
+ r2("click", e3), e3.disabled || (d2.value = t2, r2("update:modelValue", e3.paneKey), r2("change", e3));
60
+ } };
61
+ return __spreadValues({ titles: p2, contentStyle: b2, tabsNavStyle: g2, titleStyle: f2, tabsActiveStyle: v2 }, h2);
62
+ } }, K = ["onClick"];
63
+ const { create: w } = e("tabs");
64
+ var V = _(w(k), [["render", function(e2, t2, l2, a2, i2, s2) {
65
+ const n2 = r("nut-icon");
66
+ return u(), p("view", { class: c(["nut-tabs", [e2.direction]]) }, [d("view", { class: c(["nut-tabs__titles", { [e2.type]: e2.type, scrollable: e2.titleScroll, [e2.size]: e2.size }]), style: y(e2.tabsNavStyle) }, [e2.$slots.titles ? m(e2.$slots, "titles", { key: 0 }) : (u(true), p(b, { key: 1 }, g(e2.titles, (t3, l3) => (u(), p("view", { class: c(["nut-tabs__titles-item", { active: t3.paneKey == e2.modelValue, disabled: t3.disabled }]), style: y(e2.titleStyle), onClick: (a3) => e2.tabChange(t3, l3), key: t3.paneKey }, [e2.type == "line" ? (u(), p("view", { key: 0, class: "nut-tabs__titles-item__line", style: y(e2.tabsActiveStyle) }, null, 4)) : v("", true), e2.type == "smile" ? (u(), p("view", { key: 1, class: "nut-tabs__titles-item__smile", style: y(e2.tabsActiveStyle) }, [f(n2, { color: e2.color, name: "joy-smile" }, null, 8, ["color"])], 4)) : v("", true), d("view", { class: c(["nut-tabs__titles-item__text", { ellipsis: e2.ellipsis }]) }, h(t3.title), 3)], 14, K))), 128))], 6), d("view", { class: "nut-tabs__content", style: y(e2.contentStyle) }, [m(e2.$slots, "default")], 4)], 2);
67
+ }]]);
68
+ export { V as default };
@@ -1,102 +1,25 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.22-beta.0 Tue May 31 2022 21:47:10 GMT+0800 (中国标准时间)
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 { toRefs, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, renderSlot, createBlock, createCommentVNode } from "vue";
7
- import { c as createComponent } from "./component.js";
8
- import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
6
+ import { toRefs as e, computed as o, resolveComponent as l, openBlock as t, createElementBlock as a, normalizeClass as n, normalizeStyle as r, renderSlot as c, createBlock as s, createCommentVNode as u } from "vue";
7
+ import { c as p } from "./component.js";
8
+ import { _ as i } from "./plugin-vue_export-helper.js";
9
9
  import "../locale/lang";
10
- const { componentName, create } = createComponent("tag");
11
- const _sfc_main = create({
12
- props: {
13
- color: { type: String, default: "" },
14
- textColor: { type: String, default: "" },
15
- type: {
16
- type: String,
17
- default: "default"
18
- },
19
- plain: {
20
- type: Boolean,
21
- default: false
22
- },
23
- round: {
24
- type: Boolean,
25
- default: false
26
- },
27
- mark: {
28
- type: Boolean,
29
- default: false
30
- },
31
- closeable: {
32
- type: Boolean,
33
- default: false
34
- }
35
- },
36
- emits: ["close", "click"],
37
- setup(props, { emit }) {
38
- const { type, color, plain, round, mark, textColor } = toRefs(props);
39
- const classes = computed(() => {
40
- const prefixCls = componentName;
41
- return {
42
- [prefixCls]: true,
43
- [`${prefixCls}--${type.value}`]: type.value,
44
- [`${prefixCls}--plain`]: plain.value,
45
- [`${prefixCls}--round`]: round.value,
46
- [`${prefixCls}--mark`]: mark.value
47
- };
48
- });
49
- const getStyle = () => {
50
- if (color == null ? void 0 : color.value) {
51
- return {
52
- background: color.value,
53
- color: textColor.value
54
- };
55
- }
56
- if (plain.value) {
57
- return {
58
- color: "#FA2400",
59
- background: "#fff",
60
- border: "1px solid rgba(250,36,0,1)"
61
- };
62
- }
63
- return {
64
- color: "",
65
- background: ""
66
- };
67
- };
68
- const onClose = (event) => {
69
- event.stopPropagation();
70
- emit("close", event);
71
- };
72
- const onClick = (event) => {
73
- event.stopPropagation();
74
- emit("click", event);
75
- };
76
- return {
77
- classes,
78
- getStyle,
79
- onClose,
80
- onClick
81
- };
82
- }
83
- });
84
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
85
- const _component_nut_icon = resolveComponent("nut-icon");
86
- return openBlock(), createElementBlock("view", {
87
- class: normalizeClass(_ctx.classes),
88
- style: normalizeStyle(_ctx.getStyle()),
89
- onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClick && _ctx.onClick(...args))
90
- }, [
91
- renderSlot(_ctx.$slots, "default"),
92
- _ctx.closeable ? (openBlock(), createBlock(_component_nut_icon, {
93
- key: 0,
94
- class: "nut-tag--close",
95
- name: "close",
96
- size: "12",
97
- onClick: _ctx.onClose
98
- }, null, 8, ["onClick"])) : createCommentVNode("", true)
99
- ], 6);
100
- }
101
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
102
- export { index as default };
10
+ const { componentName: d, create: f } = p("tag");
11
+ var m = i(f({ props: { color: { type: String, default: "" }, textColor: { type: String, default: "" }, type: { type: String, default: "default" }, plain: { type: Boolean, default: false }, round: { type: Boolean, default: false }, mark: { type: Boolean, default: false }, closeable: { type: Boolean, default: false } }, emits: ["close", "click"], setup(l2, { emit: t2 }) {
12
+ const { type: a2, color: n2, plain: r2, round: c2, mark: s2, textColor: u2 } = e(l2);
13
+ return { classes: o(() => {
14
+ const e2 = d;
15
+ return { [e2]: true, [`${e2}--${a2.value}`]: a2.value, [`${e2}--plain`]: r2.value, [`${e2}--round`]: c2.value, [`${e2}--mark`]: s2.value };
16
+ }), getStyle: () => (n2 == null ? void 0 : n2.value) ? { background: n2.value, color: u2.value } : r2.value ? { color: "#FA2400", background: "#fff", border: "1px solid rgba(250,36,0,1)" } : { color: "", background: "" }, onClose: (e2) => {
17
+ e2.stopPropagation(), t2("close", e2);
18
+ }, onClick: (e2) => {
19
+ e2.stopPropagation(), t2("click", e2);
20
+ } };
21
+ } }), [["render", function(e2, o2, p2, i2, d2, f2) {
22
+ const m2 = l("nut-icon");
23
+ return t(), a("view", { class: n(e2.classes), style: r(e2.getStyle()), onClick: o2[0] || (o2[0] = (...o3) => e2.onClick && e2.onClick(...o3)) }, [c(e2.$slots, "default"), e2.closeable ? (t(), s(m2, { key: 0, class: "nut-tag--close", name: "close", size: "12", onClick: e2.onClose }, null, 8, ["onClick"])) : u("", true)], 6);
24
+ }]]);
25
+ export { m as default };