@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.
Files changed (233) hide show
  1. package/dist/nutui.es.js +4203 -19263
  2. package/dist/nutui.umd.js +4208 -19368
  3. package/dist/packages/_es/ActionSheet.js +17 -167
  4. package/dist/packages/_es/Address.js +110 -552
  5. package/dist/packages/_es/AddressList.js +113 -613
  6. package/dist/packages/_es/Animate.js +22 -0
  7. package/dist/packages/_es/Audio.js +53 -274
  8. package/dist/packages/_es/AudioOperate.js +13 -121
  9. package/dist/packages/_es/Avatar.js +38 -177
  10. package/dist/packages/_es/AvatarGroup.js +14 -73
  11. package/dist/packages/_es/BackTop.js +43 -156
  12. package/dist/packages/_es/Badge.js +14 -86
  13. package/dist/packages/_es/Barrage.js +41 -120
  14. package/dist/packages/_es/Button.js +23 -128
  15. package/dist/packages/_es/Calendar.js +30 -237
  16. package/dist/packages/_es/CalendarItem.js +2 -1
  17. package/dist/packages/_es/Card.js +10 -107
  18. package/dist/packages/_es/Cascader.js +147 -523
  19. package/dist/packages/_es/Category.js +15 -58
  20. package/dist/packages/_es/CategoryPane.js +11 -111
  21. package/dist/packages/_es/Cell.js +21 -100
  22. package/dist/packages/_es/CellGroup.js +9 -44
  23. package/dist/packages/_es/Checkbox.js +31 -113
  24. package/dist/packages/_es/CheckboxGroup.js +29 -58
  25. package/dist/packages/_es/CircleProgress.js +28 -151
  26. package/dist/packages/_es/Col.js +14 -56
  27. package/dist/packages/_es/Collapse.js +32 -84
  28. package/dist/packages/_es/CollapseItem.js +59 -272
  29. package/dist/packages/_es/Comment.js +64 -434
  30. package/dist/packages/_es/ConfigProvider.js +13 -0
  31. package/dist/packages/_es/CountDown.js +56 -256
  32. package/dist/packages/_es/CountUp.js +140 -556
  33. package/dist/packages/_es/DatePicker.js +98 -332
  34. package/dist/packages/_es/Dialog.js +60 -271
  35. package/dist/packages/_es/Divider.js +13 -82
  36. package/dist/packages/_es/Drag.js +56 -197
  37. package/dist/packages/_es/Ecard.js +24 -159
  38. package/dist/packages/_es/Elevator.js +58 -212
  39. package/dist/packages/_es/Ellipsis.js +64 -0
  40. package/dist/packages/_es/Empty.js +12 -71
  41. package/dist/packages/_es/FixedNav.js +15 -122
  42. package/dist/packages/_es/Form.js +64 -151
  43. package/dist/packages/_es/FormItem.js +15 -110
  44. package/dist/packages/_es/Grid.js +5 -6
  45. package/dist/packages/_es/GridItem.js +33 -144
  46. package/dist/packages/_es/Icon.js +15 -40
  47. package/dist/packages/_es/Image.js +31 -0
  48. package/dist/packages/_es/ImagePreview.js +77 -309
  49. package/dist/packages/_es/Indicator.js +15 -62
  50. package/dist/packages/_es/InfiniteLoading.js +57 -268
  51. package/dist/packages/_es/Input.js +51 -413
  52. package/dist/packages/_es/InputNumber.js +41 -160
  53. package/dist/packages/_es/Layout.js +4 -5
  54. package/dist/packages/_es/List.js +18 -124
  55. package/dist/packages/_es/Menu.js +45 -118
  56. package/dist/packages/_es/MenuItem.js +37 -162
  57. package/dist/packages/_es/Navbar.js +30 -192
  58. package/dist/packages/_es/NoticeBar.js +74 -397
  59. package/dist/packages/_es/Notify.js +72 -246
  60. package/dist/packages/_es/NumberKeyboard.js +41 -272
  61. package/dist/packages/_es/OldPicker.js +131 -474
  62. package/dist/packages/_es/OverLay.js +24 -113
  63. package/dist/packages/_es/Pagination.js +39 -157
  64. package/dist/packages/_es/Picker.js +129 -469
  65. package/dist/packages/_es/Popover.js +318 -975
  66. package/dist/packages/_es/Popup.js +55 -313
  67. package/dist/packages/_es/Price.js +16 -118
  68. package/dist/packages/_es/Progress.js +14 -146
  69. package/dist/packages/_es/PullRefresh.js +84 -354
  70. package/dist/packages/_es/Radio.js +22 -90
  71. package/dist/packages/_es/RadioGroup.js +8 -37
  72. package/dist/packages/_es/Range.js +83 -427
  73. package/dist/packages/_es/Rate.js +35 -137
  74. package/dist/packages/_es/Row.js +22 -64
  75. package/dist/packages/_es/SearchBar.js +37 -257
  76. package/dist/packages/_es/ShortPassword.js +35 -225
  77. package/dist/packages/_es/SideNavBar.js +24 -99
  78. package/dist/packages/_es/SideNavBarItem.js +11 -46
  79. package/dist/packages/_es/Signature.js +41 -179
  80. package/dist/packages/_es/Skeleton.js +20 -136
  81. package/dist/packages/_es/Sku.js +84 -509
  82. package/dist/packages/_es/Step.js +20 -133
  83. package/dist/packages/_es/Steps.js +18 -53
  84. package/dist/packages/_es/Sticky.js +53 -138
  85. package/dist/packages/_es/SubSideNavBar.js +17 -100
  86. package/dist/packages/_es/Swipe.js +41 -197
  87. package/dist/packages/_es/Swiper.js +121 -433
  88. package/dist/packages/_es/SwiperItem.js +22 -53
  89. package/dist/packages/_es/Switch.js +21 -116
  90. package/dist/packages/_es/TabPane.js +12 -39
  91. package/dist/packages/_es/Tabbar.js +17 -72
  92. package/dist/packages/_es/TabbarItem.js +29 -151
  93. package/dist/packages/_es/Table.js +18 -196
  94. package/dist/packages/_es/Tabs.js +43 -217
  95. package/dist/packages/_es/Tag.js +20 -97
  96. package/dist/packages/_es/TextArea.js +42 -160
  97. package/dist/packages/_es/TimeDetail.js +18 -98
  98. package/dist/packages/_es/TimePannel.js +14 -66
  99. package/dist/packages/_es/TimeSelect.js +15 -103
  100. package/dist/packages/_es/Toast.js +71 -329
  101. package/dist/packages/_es/Uploader.js +104 -468
  102. package/dist/packages/_es/Video.js +74 -350
  103. package/dist/packages/_es/common.js +38 -128
  104. package/dist/packages/_es/component.js +35 -76
  105. package/dist/packages/_es/index.js +5 -6
  106. package/dist/packages/_es/index2.js +9 -30
  107. package/dist/packages/_es/index3.js +6 -8
  108. package/dist/packages/_es/index4.js +13 -58
  109. package/dist/packages/_es/index5.js +164 -682
  110. package/dist/packages/_es/plugin-vue_export-helper.js +7 -8
  111. package/dist/packages/_es/pxCheck.js +3 -5
  112. package/dist/packages/_es/raf.js +8 -15
  113. package/dist/packages/animate/index.scss +299 -0
  114. package/dist/packages/button/index.scss +2 -1
  115. package/dist/packages/cell/index.scss +18 -1
  116. package/dist/packages/checkbox/index.scss +16 -0
  117. package/dist/packages/configprovider/index.scss +2 -0
  118. package/dist/packages/dialog/index.scss +1 -0
  119. package/dist/packages/elevator/index.scss +21 -0
  120. package/dist/packages/ellipsis/index.scss +12 -0
  121. package/dist/packages/formitem/index.scss +12 -0
  122. package/dist/packages/griditem/index.scss +11 -0
  123. package/dist/packages/image/index.scss +39 -0
  124. package/dist/packages/imagepreview/index.scss +21 -2
  125. package/dist/packages/input/index.scss +26 -1
  126. package/dist/packages/inputnumber/index.scss +21 -0
  127. package/dist/packages/locale/lang/baseLang.d.ts +1 -0
  128. package/dist/packages/locale/lang/baseLang.js +3 -3
  129. package/dist/packages/locale/lang/en-US.d.ts +8 -0
  130. package/dist/packages/locale/lang/en-US.js +5 -97
  131. package/dist/packages/locale/lang/id-ID.d.ts +8 -0
  132. package/dist/packages/locale/lang/id-ID.js +5 -97
  133. package/dist/packages/locale/lang/index.js +16 -38
  134. package/dist/packages/locale/lang/zh-CN.d.ts +8 -0
  135. package/dist/packages/locale/lang/zh-CN.js +5 -97
  136. package/dist/packages/locale/lang/zh-TW.d.ts +8 -0
  137. package/dist/packages/locale/lang/zh-TW.js +5 -97
  138. package/dist/packages/menu/index.scss +45 -36
  139. package/dist/packages/menuitem/index.scss +4 -0
  140. package/dist/packages/navbar/index.scss +9 -0
  141. package/dist/packages/pagination/index.scss +19 -0
  142. package/dist/packages/radio/index.scss +19 -0
  143. package/dist/packages/range/index.scss +19 -0
  144. package/dist/packages/rate/index.scss +1 -1
  145. package/dist/packages/searchbar/index.scss +21 -0
  146. package/dist/packages/switch/index.scss +4 -3
  147. package/dist/packages/tabbar/index.scss +5 -0
  148. package/dist/packages/tabbaritem/index.scss +7 -0
  149. package/dist/packages/tabpane/index.scss +6 -0
  150. package/dist/packages/tabs/index.scss +22 -0
  151. package/dist/packages/textarea/index.scss +8 -0
  152. package/dist/smartips/attributes.json +192 -12
  153. package/dist/smartips/tags.json +70 -10
  154. package/dist/smartips/web-types.json +6945 -0
  155. package/dist/style.css +1 -1
  156. package/dist/style.es.js +1 -1
  157. package/dist/styles/font/config.json +3 -1
  158. package/dist/styles/font/demo_index.html +49 -3
  159. package/dist/styles/font/iconfont.css +11 -3
  160. package/dist/styles/font/iconfont.js +15 -15
  161. package/dist/styles/font/iconfont.json +14 -0
  162. package/dist/styles/font/iconfont.ttf +0 -0
  163. package/dist/styles/font/iconfont.woff +0 -0
  164. package/dist/styles/font/iconfont.woff2 +0 -0
  165. package/dist/styles/themes/default.scss +54 -50
  166. package/dist/styles/themes/jdb.scss +54 -50
  167. package/dist/styles/themes/jdt.scss +54 -50
  168. package/dist/styles/variables-jdb.scss +19 -1
  169. package/dist/styles/variables-jdt.scss +19 -1
  170. package/dist/styles/variables.scss +22 -1
  171. package/dist/types/__VUE/address/index.vue.d.ts +2 -2
  172. package/dist/types/__VUE/addresslist/components/ItemContents.vue.d.ts +1 -0
  173. package/dist/types/__VUE/animate/index.vue.d.ts +48 -0
  174. package/dist/types/__VUE/animate/type.d.ts +6 -0
  175. package/dist/types/__VUE/audiooperate/index.vue.d.ts +1 -0
  176. package/dist/types/__VUE/avatar/index.vue.d.ts +7 -7
  177. package/dist/types/__VUE/backtop/index.vue.d.ts +2 -2
  178. package/dist/types/__VUE/badge/index.vue.d.ts +2 -2
  179. package/dist/types/__VUE/button/index.vue.d.ts +2 -2
  180. package/dist/types/__VUE/calendaritem/index.vue.d.ts +10 -2
  181. package/dist/types/__VUE/cell/index.vue.d.ts +13 -6
  182. package/dist/types/__VUE/checkbox/common.d.ts +59 -0
  183. package/dist/types/__VUE/checkbox/index.vue.d.ts +20 -7
  184. package/dist/types/__VUE/checkboxgroup/index.vue.d.ts +7 -0
  185. package/dist/types/__VUE/circleprogress/index.vue.d.ts +2 -2
  186. package/dist/types/__VUE/collapse/index.vue.d.ts +5 -3
  187. package/dist/types/__VUE/collapseitem/index.vue.d.ts +2 -2
  188. package/dist/types/__VUE/configprovider/common.d.ts +20 -0
  189. package/dist/types/__VUE/configprovider/index.vue.d.ts +33 -0
  190. package/dist/types/__VUE/datepicker/index.vue.d.ts +5 -5
  191. package/dist/types/__VUE/datepicker/type.d.ts +6 -0
  192. package/dist/types/__VUE/dialog/index.d.ts +9 -2
  193. package/dist/types/__VUE/dialog/index.vue.d.ts +26 -17
  194. package/dist/types/__VUE/ecard/index.vue.d.ts +3 -3
  195. package/dist/types/__VUE/elevator/index.vue.d.ts +29 -0
  196. package/dist/types/__VUE/ellipsis/index.vue.d.ts +72 -0
  197. package/dist/types/__VUE/empty/index.vue.d.ts +2 -2
  198. package/dist/types/__VUE/formitem/index.vue.d.ts +3 -10
  199. package/dist/types/__VUE/grid/common.d.ts +3 -3
  200. package/dist/types/__VUE/grid/index.vue.d.ts +5 -5
  201. package/dist/types/__VUE/griditem/index.vue.d.ts +1 -1
  202. package/dist/types/__VUE/image/index.vue.d.ts +105 -0
  203. package/dist/types/__VUE/image/type.d.ts +6 -0
  204. package/dist/types/__VUE/imagepreview/index.vue.d.ts +36 -2
  205. package/dist/types/__VUE/infiniteloading/index.vue.d.ts +6 -6
  206. package/dist/types/__VUE/input/index.vue.d.ts +4 -4
  207. package/dist/types/__VUE/menu/index.vue.d.ts +29 -2
  208. package/dist/types/__VUE/menuitem/index.vue.d.ts +16 -7
  209. package/dist/types/__VUE/menuitem/type.d.ts +8 -0
  210. package/dist/types/__VUE/noticebar/index.vue.d.ts +3 -3
  211. package/dist/types/__VUE/picker/Column.vue.d.ts +1 -1
  212. package/dist/types/__VUE/picker/index.vue.d.ts +1 -1
  213. package/dist/types/__VUE/popover/index.vue.d.ts +2 -2
  214. package/dist/types/__VUE/range/index.vue.d.ts +1 -1
  215. package/dist/types/__VUE/rate/common.d.ts +149 -0
  216. package/dist/types/__VUE/rate/index.vue.d.ts +17 -7
  217. package/dist/types/__VUE/searchbar/index.vue.d.ts +2 -2
  218. package/dist/types/__VUE/skeleton/common.d.ts +2 -4
  219. package/dist/types/__VUE/step/index.vue.d.ts +2 -2
  220. package/dist/types/__VUE/swiper/index.vue.d.ts +4 -4
  221. package/dist/types/__VUE/switch/index.vue.d.ts +2 -2
  222. package/dist/types/__VUE/tabbaritem/index.vue.d.ts +2 -2
  223. package/dist/types/__VUE/tabs/common.d.ts +2 -2
  224. package/dist/types/__VUE/textarea/index.vue.d.ts +2 -2
  225. package/dist/types/__VUE/timeselect/index.vue.d.ts +8 -0
  226. package/dist/types/__VUE/toast/index.vue.d.ts +2 -2
  227. package/dist/types/__VUE/uploader/index.vue.d.ts +4 -4
  228. package/dist/types/__VUE/uploader/type.d.ts +2 -1
  229. package/dist/types/__VUE/uploader/uploader.d.ts +1 -0
  230. package/dist/types/__VUE/video/index.vue.d.ts +1 -1
  231. package/dist/types/index.d.ts +1 -1
  232. package/dist/types/nutui.d.ts +5 -1
  233. package/package.json +7 -3
@@ -1,126 +1,47 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.21 Mon May 30 2022 20:20:01 GMT+0800 (中国标准时间)
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 { computed, ref, onMounted, onUnmounted, onDeactivated, watch, nextTick, openBlock, createElementBlock, normalizeClass, createElementVNode } from "vue";
7
- import { c as createComponent } from "./component.js";
8
- import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
6
+ import { computed as e, ref as t, onMounted as a, onUnmounted as l, onDeactivated as n, watch as o, nextTick as r, openBlock as s, createElementBlock as u, normalizeClass as d, createElementVNode as i } from "vue";
7
+ import { c as m } from "./component.js";
8
+ import { _ as v } from "./plugin-vue_export-helper.js";
9
9
  import "../locale/lang";
10
- const { componentName, create } = createComponent("barrage");
11
- const _sfc_main = create({
12
- props: {
13
- danmu: {
14
- type: Array,
15
- default: () => []
16
- },
17
- frequency: {
18
- type: Number,
19
- default: 500
20
- },
21
- speeds: {
22
- type: Number,
23
- default: 2e3
24
- },
25
- rows: {
26
- type: Number,
27
- default: 3
28
- },
29
- top: {
30
- type: Number,
31
- default: 10
32
- },
33
- loop: {
34
- type: Boolean,
35
- default: true
36
- }
37
- },
38
- emits: ["click"],
39
- setup(props, { emit }) {
40
- const classes = computed(() => {
41
- const prefixCls = componentName;
42
- return {
43
- [prefixCls]: true
44
- };
10
+ const { componentName: p, create: c } = m("barrage"), f = c({ props: { danmu: { type: Array, default: () => [] }, frequency: { type: Number, default: 500 }, speeds: { type: Number, default: 2e3 }, rows: { type: Number, default: 3 }, top: { type: Number, default: 10 }, loop: { type: Boolean, default: true } }, emits: ["click"], setup(s2, { emit: u2 }) {
11
+ const d2 = e(() => ({ [p]: true }));
12
+ let i2 = t(document.createElement("div")), m2 = t(document.createElement("div")), v2 = 0;
13
+ const c2 = t(s2.danmu), f2 = t(s2.rows), y2 = t(s2.top), h2 = t(0), g = s2.speeds, w = t(0);
14
+ a(() => {
15
+ w.value = i2.value.offsetWidth, x();
16
+ }), l(() => {
17
+ clearInterval(v2), v2 = 0;
18
+ }), n(() => {
19
+ clearInterval(v2), v2 = 0;
20
+ }), o(() => s2.danmu, (e2, t2) => {
21
+ c2.value = [...e2];
22
+ });
23
+ const x = () => {
24
+ clearInterval(v2), v2 = 0, v2 = setInterval(() => {
25
+ b(), x();
26
+ }, s2.frequency);
27
+ }, b = () => {
28
+ if (!s2.loop && h2.value >= c2.value.length)
29
+ return;
30
+ const e2 = s2.loop ? h2.value % c2.value.length : h2.value;
31
+ let t2 = document.createElement("view");
32
+ t2.innerHTML = c2.value[e2], t2.classList.add("dmitem"), m2.value.appendChild(t2), r(() => {
33
+ const a2 = t2.offsetWidth, l2 = t2.offsetHeight;
34
+ t2.classList.add("move"), t2.style.animationDuration = `${g}ms`, t2.style.top = e2 % f2.value * (l2 + y2.value) + 20 + "px", t2.style.width = a2 + 20 + "px", t2.style.setProperty("--move-distance", `-${w.value}px`), t2.dataset.index = `${e2}`, t2.addEventListener("animationend", () => {
35
+ m2.value.removeChild(t2);
36
+ }), h2.value++;
45
37
  });
46
- let dmBody = ref(document.createElement("div"));
47
- let dmContainer = ref(document.createElement("div"));
48
- let timer = 0;
49
- const danmuList = ref(props.danmu);
50
- const rows = ref(props.rows);
51
- const top = ref(props.top);
52
- const index2 = ref(0);
53
- const speeds = props.speeds;
54
- const danmuCWidth = ref(0);
55
- onMounted(() => {
56
- danmuCWidth.value = dmBody.value.offsetWidth;
57
- run();
58
- });
59
- onUnmounted(() => {
60
- clearInterval(timer);
61
- timer = 0;
62
- });
63
- onDeactivated(() => {
64
- clearInterval(timer);
65
- timer = 0;
66
- });
67
- watch(() => props.danmu, (newValue, oldVlaue) => {
68
- danmuList.value = [...newValue];
69
- });
70
- const add = (word) => {
71
- const _index = index2.value % danmuList.value.length;
72
- if (!props.loop && index2.value === danmuList.value.length) {
73
- danmuList.value.splice(danmuList.value.length, 0, word);
74
- } else {
75
- danmuList.value.splice(_index, 0, word);
76
- }
77
- };
78
- const run = () => {
79
- clearInterval(timer);
80
- timer = 0;
81
- timer = setInterval(() => {
82
- play();
83
- run();
84
- }, props.frequency);
85
- };
86
- const play = () => {
87
- if (!props.loop && index2.value >= danmuList.value.length) {
88
- return;
89
- }
90
- const _index = props.loop ? index2.value % danmuList.value.length : index2.value;
91
- let el = document.createElement(`view`);
92
- el.innerHTML = danmuList.value[_index];
93
- el.classList.add("dmitem");
94
- dmContainer.value.appendChild(el);
95
- nextTick(() => {
96
- const width = el.offsetWidth;
97
- const height = el.offsetHeight;
98
- el.classList.add("move");
99
- el.style.animationDuration = `${speeds}ms`;
100
- el.style.top = _index % rows.value * (height + top.value) + 20 + "px";
101
- el.style.width = width + 20 + "px";
102
- el.style.setProperty("--move-distance", `-${danmuCWidth.value}px`);
103
- el.dataset.index = `${_index}`;
104
- el.addEventListener("animationend", () => {
105
- dmContainer.value.removeChild(el);
106
- });
107
- index2.value++;
108
- });
109
- };
110
- return { classes, danmuList, dmBody, dmContainer, add };
111
- }
112
- });
113
- const _hoisted_1 = {
114
- ref: "dmContainer",
115
- class: "dmContainer"
116
- };
117
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
118
- return openBlock(), createElementBlock("view", {
119
- ref: "dmBody",
120
- class: normalizeClass(_ctx.classes)
121
- }, [
122
- createElementVNode("view", _hoisted_1, null, 512)
123
- ], 2);
124
- }
125
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
126
- export { index as default };
38
+ };
39
+ return { classes: d2, danmuList: c2, dmBody: i2, dmContainer: m2, add: (e2) => {
40
+ const t2 = h2.value % c2.value.length;
41
+ s2.loop || h2.value !== c2.value.length ? c2.value.splice(t2, 0, e2) : c2.value.splice(c2.value.length, 0, e2);
42
+ } };
43
+ } }), y = { ref: "dmContainer", class: "dmContainer" };
44
+ var h = v(f, [["render", function(e2, t2, a2, l2, n2, o2) {
45
+ return s(), u("view", { ref: "dmBody", class: d(e2.classes) }, [i("view", y, null, 512)], 2);
46
+ }]]);
47
+ export { h as default };
@@ -1,134 +1,29 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.21 Mon May 30 2022 20:20:01 GMT+0800 (中国标准时间)
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 { toRefs, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, createBlock, createCommentVNode, renderSlot } from "vue";
7
- import { c as createComponent } from "./component.js";
8
- import _sfc_main$1 from "./Icon.js";
9
- import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
6
+ import { toRefs as e, computed as l, resolveComponent as a, openBlock as o, createElementBlock as t, normalizeClass as n, normalizeStyle as s, createElementVNode as i, createBlock as c, createCommentVNode as u, renderSlot as r } from "vue";
7
+ import { c as d } from "./component.js";
8
+ import p from "./Icon.js";
9
+ import { _ as f } from "./plugin-vue_export-helper.js";
10
10
  import "../locale/lang";
11
11
  import "./pxCheck.js";
12
- const { componentName, create } = createComponent("button");
13
- const _sfc_main = create({
14
- components: {
15
- [_sfc_main$1.name]: _sfc_main$1
16
- },
17
- props: {
18
- color: String,
19
- shape: {
20
- type: String,
21
- default: "round"
22
- },
23
- plain: {
24
- type: Boolean,
25
- default: false
26
- },
27
- loading: {
28
- type: Boolean,
29
- default: false
30
- },
31
- disabled: {
32
- type: Boolean,
33
- default: false
34
- },
35
- type: {
36
- type: String,
37
- default: "default"
38
- },
39
- size: {
40
- type: String,
41
- default: "normal"
42
- },
43
- block: {
44
- type: Boolean,
45
- default: false
46
- },
47
- icon: {
48
- type: String,
49
- default: ""
50
- },
51
- iconClassPrefix: {
52
- type: String,
53
- default: "nut-icon"
54
- },
55
- iconFontClassName: {
56
- type: String,
57
- default: "nutui-iconfont"
58
- }
59
- },
60
- emits: ["click"],
61
- setup(props, { emit, slots }) {
62
- const { type, size, shape, disabled, loading, color, plain, block } = toRefs(props);
63
- const handleClick = (event) => {
64
- if (!loading.value && !disabled.value) {
65
- emit("click", event);
66
- }
67
- };
68
- const classes = computed(() => {
69
- const prefixCls = componentName;
70
- return {
71
- [prefixCls]: true,
72
- [`${prefixCls}--${type.value}`]: type.value,
73
- [`${prefixCls}--${size.value}`]: size.value,
74
- [`${prefixCls}--${shape.value}`]: shape.value,
75
- [`${prefixCls}--plain`]: plain.value,
76
- [`${prefixCls}--block`]: block.value,
77
- [`${prefixCls}--disabled`]: disabled.value,
78
- [`${prefixCls}--loading`]: loading.value
79
- };
80
- });
81
- const getStyle = computed(() => {
82
- var _a;
83
- const style = {};
84
- if (color == null ? void 0 : color.value) {
85
- if (plain.value) {
86
- style.color = color.value;
87
- style.background = "#fff";
88
- if (!((_a = color.value) == null ? void 0 : _a.includes("gradient"))) {
89
- style.borderColor = color.value;
90
- }
91
- } else {
92
- style.color = "#fff";
93
- style.background = color.value;
94
- }
95
- }
96
- return style;
97
- });
98
- return {
99
- handleClick,
100
- classes,
101
- getStyle
102
- };
103
- }
104
- });
105
- const _hoisted_1 = { class: "nut-button__warp" };
106
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
107
- const _component_nut_icon = resolveComponent("nut-icon");
108
- return openBlock(), createElementBlock("view", {
109
- class: normalizeClass(_ctx.classes),
110
- style: normalizeStyle(_ctx.getStyle),
111
- onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))
112
- }, [
113
- createElementVNode("view", _hoisted_1, [
114
- _ctx.loading ? (openBlock(), createBlock(_component_nut_icon, {
115
- key: 0,
116
- class: "nut-icon-loading"
117
- })) : createCommentVNode("", true),
118
- _ctx.icon && !_ctx.loading ? (openBlock(), createBlock(_component_nut_icon, {
119
- key: 1,
120
- name: _ctx.icon,
121
- "class-prefix": _ctx.iconClassPrefix,
122
- "font-class-name": _ctx.iconFontClassName
123
- }, null, 8, ["name", "class-prefix", "font-class-name"])) : createCommentVNode("", true),
124
- _ctx.$slots.default ? (openBlock(), createElementBlock("view", {
125
- key: 2,
126
- class: normalizeClass({ text: _ctx.icon || _ctx.loading })
127
- }, [
128
- renderSlot(_ctx.$slots, "default")
129
- ], 2)) : createCommentVNode("", true)
130
- ])
131
- ], 6);
132
- }
133
- var Button = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
134
- export { Button as default };
12
+ const { componentName: m, create: v } = d("button"), g = v({ components: { [p.name]: p }, props: { color: String, shape: { type: String, default: "round" }, plain: { type: Boolean, default: false }, loading: { type: Boolean, default: false }, disabled: { type: Boolean, default: false }, type: { type: String, default: "default" }, size: { type: String, default: "normal" }, block: { type: Boolean, default: false }, icon: { type: String, default: "" }, iconClassPrefix: { type: String, default: "nut-icon" }, iconFontClassName: { type: String, default: "nutui-iconfont" } }, emits: ["click"], setup(a2, { emit: o2, slots: t2 }) {
13
+ const { type: n2, size: s2, shape: i2, disabled: c2, loading: u2, color: r2, plain: d2, block: p2 } = e(a2);
14
+ return { handleClick: (e2) => {
15
+ u2.value || c2.value || o2("click", e2);
16
+ }, classes: l(() => {
17
+ const e2 = m;
18
+ return { [e2]: true, [`${e2}--${n2.value}`]: n2.value, [`${e2}--${s2.value}`]: s2.value, [`${e2}--${i2.value}`]: i2.value, [`${e2}--plain`]: d2.value, [`${e2}--block`]: p2.value, [`${e2}--disabled`]: c2.value, [`${e2}--loading`]: u2.value };
19
+ }), getStyle: l(() => {
20
+ var _a;
21
+ const e2 = {};
22
+ return (r2 == null ? void 0 : r2.value) && (d2.value ? (e2.color = r2.value, e2.background = "#fff", ((_a = r2.value) == null ? void 0 : _a.includes("gradient")) || (e2.borderColor = r2.value)) : (e2.color = "#fff", e2.background = r2.value)), e2;
23
+ }) };
24
+ } }), y = { class: "nut-button__warp" };
25
+ var k = f(g, [["render", function(e2, l2, d2, p2, f2, m2) {
26
+ const v2 = a("nut-icon");
27
+ return o(), t("view", { class: n(e2.classes), style: s(e2.getStyle), onClick: l2[0] || (l2[0] = (...l3) => e2.handleClick && e2.handleClick(...l3)) }, [i("view", y, [e2.loading ? (o(), c(v2, { key: 0, class: "nut-icon-loading" })) : u("", true), e2.icon && !e2.loading ? (o(), c(v2, { key: 1, name: e2.icon, "class-prefix": e2.iconClassPrefix, "font-class-name": e2.iconFontClassName }, null, 8, ["name", "class-prefix", "font-class-name"])) : u("", true), e2.$slots.default ? (o(), t("view", { key: 2, class: n({ text: e2.icon || e2.loading }) }, [r(e2.$slots, "default")], 2)) : u("", true)])], 6);
28
+ }]]);
29
+ export { k as default };
@@ -1,243 +1,36 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.21 Mon May 30 2022 20:20:01 GMT+0800 (中国标准时间)
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 { computed, ref, resolveComponent, openBlock, createBlock, withCtx, createSlots, renderSlot, createCommentVNode } from "vue";
7
- import { c as createComponent } from "./component.js";
8
- import { C as CalendarItem, U as Utils } from "./index5.js";
9
- import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
6
+ import { computed as t, ref as e, resolveComponent as o, openBlock as a, createBlock as l, withCtx as n, createSlots as s, renderSlot as d, createCommentVNode as i } from "vue";
7
+ import { c as p } from "./component.js";
8
+ import { C as f, U as r } from "./index5.js";
9
+ import { u } from "./index3.js";
10
+ import { _ as c } from "./plugin-vue_export-helper.js";
10
11
  import "../locale/lang";
11
12
  import "./raf.js";
12
- const { create } = createComponent("calendar");
13
- const _sfc_main = create({
14
- components: {
15
- [CalendarItem.name]: CalendarItem
16
- },
17
- props: {
18
- type: {
19
- type: String,
20
- default: "one"
21
- },
22
- isAutoBackFill: {
23
- type: Boolean,
24
- default: false
25
- },
26
- poppable: {
27
- type: Boolean,
28
- default: true
29
- },
30
- showTitle: {
31
- type: Boolean,
32
- default: true
33
- },
34
- showSubTitle: {
35
- type: Boolean,
36
- default: true
37
- },
38
- visible: {
39
- type: Boolean,
40
- default: false
41
- },
42
- showToday: {
43
- type: Boolean,
44
- default: true
45
- },
46
- title: {
47
- type: String,
48
- default: ""
49
- },
50
- confirmText: {
51
- type: String,
52
- default: ""
53
- },
54
- startText: {
55
- type: String,
56
- default: ""
57
- },
58
- endText: {
59
- type: String,
60
- default: ""
61
- },
62
- defaultValue: {
63
- type: [String, Array]
64
- },
65
- startDate: {
66
- type: String,
67
- default: Utils.getDay(0)
68
- },
69
- endDate: {
70
- type: String,
71
- default: Utils.getDay(365)
72
- }
73
- },
74
- emits: ["choose", "close", "update:visible", "select"],
75
- setup(props, { emit, slots }) {
76
- const showTopBtn = computed(() => {
77
- return slots.btn;
78
- });
79
- const topInfo = computed(() => {
80
- return slots.topInfo;
81
- });
82
- const dayInfo = computed(() => {
83
- return slots.day;
84
- });
85
- const bottomInfo = computed(() => {
86
- return slots.bottomInfo;
87
- });
88
- const calendarRef = ref(null);
89
- const update = () => {
90
- emit("update:visible", false);
91
- };
92
- const close = () => {
93
- emit("close");
94
- emit("update:visible", false);
95
- };
96
- const choose = (param) => {
97
- close();
98
- emit("choose", param);
99
- };
100
- const select = (param) => {
101
- emit("select", param);
102
- };
103
- const closePopup = () => {
104
- close();
105
- };
106
- return {
107
- closePopup,
108
- update,
109
- close,
110
- choose,
111
- select,
112
- calendarRef,
113
- showTopBtn,
114
- topInfo,
115
- dayInfo,
116
- bottomInfo
117
- };
118
- }
119
- });
120
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
121
- const _component_nut_calendar_item = resolveComponent("nut-calendar-item");
122
- const _component_nut_popup = resolveComponent("nut-popup");
123
- return _ctx.poppable ? (openBlock(), createBlock(_component_nut_popup, {
124
- key: 0,
125
- visible: _ctx.visible,
126
- position: "bottom",
127
- round: "",
128
- closeable: true,
129
- onClickOverlay: _ctx.closePopup,
130
- onClickCloseIcon: _ctx.closePopup,
131
- "destroy-on-close": true,
132
- style: { height: "85vh" }
133
- }, {
134
- default: withCtx(() => [
135
- _ctx.visible ? (openBlock(), createBlock(_component_nut_calendar_item, {
136
- key: 0,
137
- props: "",
138
- ref: "calendarRef",
139
- type: _ctx.type,
140
- "is-auto-back-fill": _ctx.isAutoBackFill,
141
- poppable: _ctx.poppable,
142
- title: _ctx.title,
143
- "confirm-text": _ctx.confirmText,
144
- "start-text": _ctx.startText,
145
- "end-text": _ctx.endText,
146
- "default-value": _ctx.defaultValue,
147
- "start-date": _ctx.startDate,
148
- "end-date": _ctx.endDate,
149
- onUpdate: _ctx.update,
150
- onClose: _ctx.close,
151
- onChoose: _ctx.choose,
152
- onSelect: _ctx.select,
153
- "show-today": _ctx.showToday,
154
- "show-title": _ctx.showTitle,
155
- "show-sub-title": _ctx.showSubTitle
156
- }, createSlots({ _: 2 }, [
157
- _ctx.showTopBtn ? {
158
- name: "btn",
159
- fn: withCtx(() => [
160
- renderSlot(_ctx.$slots, "btn")
161
- ])
162
- } : void 0,
163
- _ctx.dayInfo ? {
164
- name: "day",
165
- fn: withCtx((date) => [
166
- renderSlot(_ctx.$slots, "day", {
167
- date: date.date
168
- })
169
- ])
170
- } : void 0,
171
- _ctx.topInfo ? {
172
- name: "topInfo",
173
- fn: withCtx((date) => [
174
- renderSlot(_ctx.$slots, "topInfo", {
175
- date: date.date
176
- })
177
- ])
178
- } : void 0,
179
- _ctx.bottomInfo ? {
180
- name: "bottomInfo",
181
- fn: withCtx((date) => [
182
- renderSlot(_ctx.$slots, "bottomInfo", {
183
- date: date.date
184
- })
185
- ])
186
- } : void 0
187
- ]), 1032, ["type", "is-auto-back-fill", "poppable", "title", "confirm-text", "start-text", "end-text", "default-value", "start-date", "end-date", "onUpdate", "onClose", "onChoose", "onSelect", "show-today", "show-title", "show-sub-title"])) : createCommentVNode("", true)
188
- ]),
189
- _: 3
190
- }, 8, ["visible", "onClickOverlay", "onClickCloseIcon"])) : (openBlock(), createBlock(_component_nut_calendar_item, {
191
- key: 1,
192
- type: _ctx.type,
193
- "is-auto-back-fill": _ctx.isAutoBackFill,
194
- poppable: _ctx.poppable,
195
- title: _ctx.title,
196
- "confirm-text": _ctx.confirmText,
197
- "start-text": _ctx.startText,
198
- "end-text": _ctx.endText,
199
- "default-value": _ctx.defaultValue,
200
- "start-date": _ctx.startDate,
201
- "end-date": _ctx.endDate,
202
- onUpdate: _ctx.update,
203
- onClose: _ctx.close,
204
- onChoose: _ctx.choose,
205
- onSelect: _ctx.select,
206
- "show-today": _ctx.showToday,
207
- "show-title": _ctx.showTitle,
208
- "show-sub-title": _ctx.showSubTitle
209
- }, createSlots({ _: 2 }, [
210
- _ctx.showTopBtn ? {
211
- name: "btn",
212
- fn: withCtx(() => [
213
- renderSlot(_ctx.$slots, "btn")
214
- ])
215
- } : void 0,
216
- _ctx.dayInfo ? {
217
- name: "day",
218
- fn: withCtx((date) => [
219
- renderSlot(_ctx.$slots, "day", {
220
- date: date.date
221
- })
222
- ])
223
- } : void 0,
224
- _ctx.topInfo ? {
225
- name: "topInfo",
226
- fn: withCtx((date) => [
227
- renderSlot(_ctx.$slots, "topInfo", {
228
- date: date.date
229
- })
230
- ])
231
- } : void 0,
232
- _ctx.bottomInfo ? {
233
- name: "bottomInfo",
234
- fn: withCtx((date) => [
235
- renderSlot(_ctx.$slots, "bottomInfo", {
236
- date: date.date
237
- })
238
- ])
239
- } : void 0
240
- ]), 1032, ["type", "is-auto-back-fill", "poppable", "title", "confirm-text", "start-text", "end-text", "default-value", "start-date", "end-date", "onUpdate", "onClose", "onChoose", "onSelect", "show-today", "show-title", "show-sub-title"]));
241
- }
242
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
243
- export { index as default };
13
+ const { create: y } = p("calendar");
14
+ var b = c(y({ components: { [f.name]: f }, props: { type: { type: String, default: "one" }, isAutoBackFill: { type: Boolean, default: false }, poppable: { type: Boolean, default: true }, showTitle: { type: Boolean, default: true }, showSubTitle: { type: Boolean, default: true }, visible: { type: Boolean, default: false }, showToday: { type: Boolean, default: true }, title: { type: String, default: "" }, confirmText: { type: String, default: "" }, startText: { type: String, default: "" }, endText: { type: String, default: "" }, defaultValue: { type: [String, Array] }, startDate: { type: String, default: r.getDay(0) }, endDate: { type: String, default: r.getDay(365) } }, emits: ["choose", "close", "update:visible", "select"], setup(o2, { emit: a2, slots: l2 }) {
15
+ const n2 = t(() => l2.btn), s2 = t(() => l2.topInfo), d2 = t(() => l2.day), i2 = t(() => l2.bottomInfo), p2 = e(null);
16
+ u({ scrollToDate: (t2) => {
17
+ var _a;
18
+ (_a = p2.value) == null ? void 0 : _a.scrollToDate(t2);
19
+ } });
20
+ const f2 = () => {
21
+ a2("close"), a2("update:visible", false);
22
+ };
23
+ return { closePopup: () => {
24
+ f2();
25
+ }, update: () => {
26
+ a2("update:visible", false);
27
+ }, close: f2, choose: (t2) => {
28
+ f2(), a2("choose", t2);
29
+ }, select: (t2) => {
30
+ a2("select", t2);
31
+ }, calendarRef: p2, showTopBtn: n2, topInfo: s2, dayInfo: d2, bottomInfo: i2 };
32
+ } }), [["render", function(t2, e2, p2, f2, r2, u2) {
33
+ const c2 = o("nut-calendar-item"), y2 = o("nut-popup");
34
+ return t2.poppable ? (a(), l(y2, { key: 0, visible: t2.visible, position: "bottom", round: "", closeable: true, onClickOverlay: t2.closePopup, onClickCloseIcon: t2.closePopup, "destroy-on-close": true, style: { height: "85vh" } }, { default: n(() => [t2.visible ? (a(), l(c2, { key: 0, props: "", ref: "calendarRef", type: t2.type, "is-auto-back-fill": t2.isAutoBackFill, poppable: t2.poppable, title: t2.title, "confirm-text": t2.confirmText, "start-text": t2.startText, "end-text": t2.endText, "default-value": t2.defaultValue, "start-date": t2.startDate, "end-date": t2.endDate, onUpdate: t2.update, onClose: t2.close, onChoose: t2.choose, onSelect: t2.select, "show-today": t2.showToday, "show-title": t2.showTitle, "show-sub-title": t2.showSubTitle }, s({ _: 2 }, [t2.showTopBtn ? { name: "btn", fn: n(() => [d(t2.$slots, "btn")]) } : void 0, t2.dayInfo ? { name: "day", fn: n((e3) => [d(t2.$slots, "day", { date: e3.date })]) } : void 0, t2.topInfo ? { name: "topInfo", fn: n((e3) => [d(t2.$slots, "topInfo", { date: e3.date })]) } : void 0, t2.bottomInfo ? { name: "bottomInfo", fn: n((e3) => [d(t2.$slots, "bottomInfo", { date: e3.date })]) } : void 0]), 1032, ["type", "is-auto-back-fill", "poppable", "title", "confirm-text", "start-text", "end-text", "default-value", "start-date", "end-date", "onUpdate", "onClose", "onChoose", "onSelect", "show-today", "show-title", "show-sub-title"])) : i("", true)]), _: 3 }, 8, ["visible", "onClickOverlay", "onClickCloseIcon"])) : (a(), l(c2, { key: 1, type: t2.type, "is-auto-back-fill": t2.isAutoBackFill, poppable: t2.poppable, title: t2.title, "confirm-text": t2.confirmText, "start-text": t2.startText, "end-text": t2.endText, "default-value": t2.defaultValue, "start-date": t2.startDate, "end-date": t2.endDate, onUpdate: t2.update, onClose: t2.close, onChoose: t2.choose, onSelect: t2.select, "show-today": t2.showToday, "show-title": t2.showTitle, "show-sub-title": t2.showSubTitle, ref: "calendarRef" }, s({ _: 2 }, [t2.showTopBtn ? { name: "btn", fn: n(() => [d(t2.$slots, "btn")]) } : void 0, t2.dayInfo ? { name: "day", fn: n((e3) => [d(t2.$slots, "day", { date: e3.date })]) } : void 0, t2.topInfo ? { name: "topInfo", fn: n((e3) => [d(t2.$slots, "topInfo", { date: e3.date })]) } : void 0, t2.bottomInfo ? { name: "bottomInfo", fn: n((e3) => [d(t2.$slots, "bottomInfo", { date: e3.date })]) } : void 0]), 1032, ["type", "is-auto-back-fill", "poppable", "title", "confirm-text", "start-text", "end-text", "default-value", "start-date", "end-date", "onUpdate", "onClose", "onChoose", "onSelect", "show-today", "show-title", "show-sub-title"]));
35
+ }]]);
36
+ export { b as default };
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.21 Mon May 30 2022 20:20:01 GMT+0800 (中国标准时间)
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
  */
@@ -7,5 +7,6 @@ import "vue";
7
7
  import "./component.js";
8
8
  export { C as default } from "./index5.js";
9
9
  import "./raf.js";
10
+ import "./index3.js";
10
11
  import "./plugin-vue_export-helper.js";
11
12
  import "../locale/lang";