@nutui/nutui 3.1.22-beta.3 → 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 (204) hide show
  1. package/dist/nutui.es.js +2074 -1902
  2. package/dist/nutui.umd.js +1024 -852
  3. package/dist/packages/_es/ActionSheet.js +2 -21
  4. package/dist/packages/_es/Address.js +5 -24
  5. package/dist/packages/_es/AddressList.js +1 -1
  6. package/dist/packages/_es/Animate.js +22 -0
  7. package/dist/packages/_es/Audio.js +3 -22
  8. package/dist/packages/_es/AudioOperate.js +2 -21
  9. package/dist/packages/_es/Avatar.js +3 -19
  10. package/dist/packages/_es/AvatarGroup.js +1 -1
  11. package/dist/packages/_es/BackTop.js +1 -1
  12. package/dist/packages/_es/Badge.js +1 -1
  13. package/dist/packages/_es/Barrage.js +1 -1
  14. package/dist/packages/_es/Button.js +1 -1
  15. package/dist/packages/_es/Calendar.js +13 -7
  16. package/dist/packages/_es/CalendarItem.js +2 -1
  17. package/dist/packages/_es/Card.js +1 -1
  18. package/dist/packages/_es/Cascader.js +7 -39
  19. package/dist/packages/_es/Category.js +1 -1
  20. package/dist/packages/_es/CategoryPane.js +1 -1
  21. package/dist/packages/_es/Cell.js +1 -1
  22. package/dist/packages/_es/CellGroup.js +1 -1
  23. package/dist/packages/_es/Checkbox.js +1 -1
  24. package/dist/packages/_es/CheckboxGroup.js +1 -1
  25. package/dist/packages/_es/CircleProgress.js +1 -1
  26. package/dist/packages/_es/Col.js +1 -1
  27. package/dist/packages/_es/Collapse.js +31 -22
  28. package/dist/packages/_es/CollapseItem.js +40 -62
  29. package/dist/packages/_es/Comment.js +1 -1
  30. package/dist/packages/_es/ConfigProvider.js +13 -0
  31. package/dist/packages/_es/CountDown.js +4 -23
  32. package/dist/packages/_es/CountUp.js +3 -22
  33. package/dist/packages/_es/DatePicker.js +5 -24
  34. package/dist/packages/_es/Dialog.js +2 -21
  35. package/dist/packages/_es/Divider.js +2 -21
  36. package/dist/packages/_es/Drag.js +1 -1
  37. package/dist/packages/_es/Ecard.js +1 -1
  38. package/dist/packages/_es/Elevator.js +16 -35
  39. package/dist/packages/_es/Ellipsis.js +64 -0
  40. package/dist/packages/_es/Empty.js +1 -1
  41. package/dist/packages/_es/FixedNav.js +1 -1
  42. package/dist/packages/_es/Form.js +2 -2
  43. package/dist/packages/_es/FormItem.js +1 -1
  44. package/dist/packages/_es/Grid.js +1 -1
  45. package/dist/packages/_es/GridItem.js +1 -1
  46. package/dist/packages/_es/Icon.js +1 -1
  47. package/dist/packages/_es/Image.js +31 -0
  48. package/dist/packages/_es/ImagePreview.js +66 -74
  49. package/dist/packages/_es/Indicator.js +1 -1
  50. package/dist/packages/_es/InfiniteLoading.js +3 -22
  51. package/dist/packages/_es/Input.js +2 -2
  52. package/dist/packages/_es/InputNumber.js +1 -1
  53. package/dist/packages/_es/Layout.js +1 -1
  54. package/dist/packages/_es/List.js +3 -22
  55. package/dist/packages/_es/Menu.js +37 -22
  56. package/dist/packages/_es/MenuItem.js +27 -24
  57. package/dist/packages/_es/Navbar.js +1 -1
  58. package/dist/packages/_es/NoticeBar.js +3 -22
  59. package/dist/packages/_es/Notify.js +4 -23
  60. package/dist/packages/_es/NumberKeyboard.js +1 -1
  61. package/dist/packages/_es/OldPicker.js +6 -25
  62. package/dist/packages/_es/OverLay.js +3 -19
  63. package/dist/packages/_es/Pagination.js +1 -1
  64. package/dist/packages/_es/Picker.js +6 -25
  65. package/dist/packages/_es/Popover.js +2 -21
  66. package/dist/packages/_es/Popup.js +5 -24
  67. package/dist/packages/_es/Price.js +1 -1
  68. package/dist/packages/_es/Progress.js +1 -1
  69. package/dist/packages/_es/PullRefresh.js +3 -19
  70. package/dist/packages/_es/Radio.js +1 -1
  71. package/dist/packages/_es/RadioGroup.js +1 -1
  72. package/dist/packages/_es/Range.js +4 -23
  73. package/dist/packages/_es/Rate.js +35 -14
  74. package/dist/packages/_es/Row.js +1 -1
  75. package/dist/packages/_es/SearchBar.js +3 -22
  76. package/dist/packages/_es/ShortPassword.js +1 -1
  77. package/dist/packages/_es/SideNavBar.js +2 -21
  78. package/dist/packages/_es/SideNavBarItem.js +1 -1
  79. package/dist/packages/_es/Signature.js +3 -22
  80. package/dist/packages/_es/Skeleton.js +1 -1
  81. package/dist/packages/_es/Sku.js +2 -21
  82. package/dist/packages/_es/Step.js +3 -22
  83. package/dist/packages/_es/Steps.js +1 -1
  84. package/dist/packages/_es/Sticky.js +1 -1
  85. package/dist/packages/_es/SubSideNavBar.js +3 -22
  86. package/dist/packages/_es/Swipe.js +3 -22
  87. package/dist/packages/_es/Swiper.js +1 -1
  88. package/dist/packages/_es/SwiperItem.js +1 -1
  89. package/dist/packages/_es/Switch.js +1 -1
  90. package/dist/packages/_es/TabPane.js +1 -1
  91. package/dist/packages/_es/Tabbar.js +2 -2
  92. package/dist/packages/_es/TabbarItem.js +1 -1
  93. package/dist/packages/_es/Table.js +3 -22
  94. package/dist/packages/_es/Tabs.js +2 -18
  95. package/dist/packages/_es/Tag.js +1 -1
  96. package/dist/packages/_es/TextArea.js +1 -1
  97. package/dist/packages/_es/TimeDetail.js +3 -22
  98. package/dist/packages/_es/TimePannel.js +3 -22
  99. package/dist/packages/_es/TimeSelect.js +12 -12
  100. package/dist/packages/_es/Toast.js +4 -23
  101. package/dist/packages/_es/Uploader.js +5 -21
  102. package/dist/packages/_es/Video.js +3 -22
  103. package/dist/packages/_es/common.js +1 -1
  104. package/dist/packages/_es/component.js +1 -1
  105. package/dist/packages/_es/index.js +1 -1
  106. package/dist/packages/_es/index2.js +1 -1
  107. package/dist/packages/_es/index3.js +1 -1
  108. package/dist/packages/_es/index4.js +8 -8
  109. package/dist/packages/_es/index5.js +123 -86
  110. package/dist/packages/_es/plugin-vue_export-helper.js +1 -1
  111. package/dist/packages/_es/pxCheck.js +1 -1
  112. package/dist/packages/_es/raf.js +1 -1
  113. package/dist/packages/animate/index.scss +299 -0
  114. package/dist/packages/cell/index.scss +7 -1
  115. package/dist/packages/checkbox/index.scss +10 -0
  116. package/dist/packages/configprovider/index.scss +2 -0
  117. package/dist/packages/ellipsis/index.scss +12 -0
  118. package/dist/packages/formitem/index.scss +12 -0
  119. package/dist/packages/griditem/index.scss +11 -0
  120. package/dist/packages/image/index.scss +39 -0
  121. package/dist/packages/imagepreview/index.scss +21 -2
  122. package/dist/packages/input/index.scss +13 -0
  123. package/dist/packages/inputnumber/index.scss +21 -0
  124. package/dist/packages/locale/lang/baseLang.js +1 -1
  125. package/dist/packages/locale/lang/en-US.js +1 -1
  126. package/dist/packages/locale/lang/id-ID.js +1 -1
  127. package/dist/packages/locale/lang/index.js +1 -1
  128. package/dist/packages/locale/lang/zh-CN.js +1 -1
  129. package/dist/packages/locale/lang/zh-TW.js +1 -1
  130. package/dist/packages/menu/index.scss +45 -36
  131. package/dist/packages/menuitem/index.scss +4 -0
  132. package/dist/packages/navbar/index.scss +9 -0
  133. package/dist/packages/pagination/index.scss +19 -0
  134. package/dist/packages/radio/index.scss +18 -0
  135. package/dist/packages/range/index.scss +19 -0
  136. package/dist/packages/rate/index.scss +1 -1
  137. package/dist/packages/searchbar/index.scss +21 -0
  138. package/dist/packages/switch/index.scss +1 -0
  139. package/dist/packages/tabbar/index.scss +5 -0
  140. package/dist/packages/tabbaritem/index.scss +7 -0
  141. package/dist/packages/tabpane/index.scss +5 -0
  142. package/dist/packages/tabs/index.scss +22 -0
  143. package/dist/packages/textarea/index.scss +8 -0
  144. package/dist/smartips/attributes.json +132 -4
  145. package/dist/smartips/tags.json +53 -6
  146. package/dist/smartips/web-types.json +6945 -0
  147. package/dist/style.css +1 -1
  148. package/dist/style.es.js +1 -1
  149. package/dist/styles/font/config.json +3 -1
  150. package/dist/styles/font/demo_index.html +49 -3
  151. package/dist/styles/font/iconfont.css +11 -3
  152. package/dist/styles/font/iconfont.js +15 -15
  153. package/dist/styles/font/iconfont.json +14 -0
  154. package/dist/styles/font/iconfont.ttf +0 -0
  155. package/dist/styles/font/iconfont.woff +0 -0
  156. package/dist/styles/font/iconfont.woff2 +0 -0
  157. package/dist/styles/themes/default.scss +53 -49
  158. package/dist/styles/themes/jdb.scss +53 -49
  159. package/dist/styles/themes/jdt.scss +53 -49
  160. package/dist/styles/variables-jdb.scss +9 -0
  161. package/dist/styles/variables-jdt.scss +9 -0
  162. package/dist/styles/variables.scss +12 -0
  163. package/dist/types/__VUE/address/index.vue.d.ts +4 -4
  164. package/dist/types/__VUE/animate/index.vue.d.ts +48 -0
  165. package/dist/types/__VUE/animate/type.d.ts +6 -0
  166. package/dist/types/__VUE/avatar/index.vue.d.ts +3 -3
  167. package/dist/types/__VUE/calendaritem/index.vue.d.ts +10 -2
  168. package/dist/types/__VUE/cascader/index.vue.d.ts +1 -1
  169. package/dist/types/__VUE/cell/index.vue.d.ts +2 -2
  170. package/dist/types/__VUE/checkbox/index.vue.d.ts +2 -2
  171. package/dist/types/__VUE/circleprogress/index.vue.d.ts +2 -2
  172. package/dist/types/__VUE/collapse/index.vue.d.ts +5 -3
  173. package/dist/types/__VUE/configprovider/common.d.ts +20 -0
  174. package/dist/types/__VUE/configprovider/index.vue.d.ts +33 -0
  175. package/dist/types/__VUE/divider/index.vue.d.ts +2 -2
  176. package/dist/types/__VUE/ecard/index.vue.d.ts +2 -2
  177. package/dist/types/__VUE/ellipsis/index.vue.d.ts +72 -0
  178. package/dist/types/__VUE/grid/index.vue.d.ts +4 -4
  179. package/dist/types/__VUE/image/index.vue.d.ts +105 -0
  180. package/dist/types/__VUE/image/type.d.ts +6 -0
  181. package/dist/types/__VUE/imagepreview/index.vue.d.ts +36 -2
  182. package/dist/types/__VUE/infiniteloading/index.vue.d.ts +6 -6
  183. package/dist/types/__VUE/input/index.vue.d.ts +2 -2
  184. package/dist/types/__VUE/menu/index.vue.d.ts +29 -2
  185. package/dist/types/__VUE/menuitem/index.vue.d.ts +12 -3
  186. package/dist/types/__VUE/noticebar/index.vue.d.ts +1 -1
  187. package/dist/types/__VUE/oldpicker/index.vue.d.ts +2 -2
  188. package/dist/types/__VUE/picker/index.vue.d.ts +2 -2
  189. package/dist/types/__VUE/popover/index.vue.d.ts +4 -4
  190. package/dist/types/__VUE/range/index.vue.d.ts +1 -1
  191. package/dist/types/__VUE/rate/common.d.ts +149 -0
  192. package/dist/types/__VUE/rate/index.vue.d.ts +19 -9
  193. package/dist/types/__VUE/row/index.vue.d.ts +2 -2
  194. package/dist/types/__VUE/searchbar/index.vue.d.ts +2 -2
  195. package/dist/types/__VUE/shortpassword/index.vue.d.ts +2 -2
  196. package/dist/types/__VUE/swiper/index.vue.d.ts +2 -2
  197. package/dist/types/__VUE/switch/index.vue.d.ts +2 -2
  198. package/dist/types/__VUE/textarea/index.vue.d.ts +2 -2
  199. package/dist/types/__VUE/timeselect/index.vue.d.ts +3 -2
  200. package/dist/types/__VUE/toast/index.vue.d.ts +1 -1
  201. package/dist/types/__VUE/uploader/uploader.d.ts +1 -0
  202. package/dist/types/index.d.ts +1 -1
  203. package/dist/types/nutui.d.ts +5 -1
  204. package/package.json +5 -3
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.22-beta.3 Wed Jun 15 2022 20:12:30 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
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.22-beta.3 Wed Jun 15 2022 20:12:30 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
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.22-beta.3 Wed Jun 15 2022 20:12:30 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
  */
@@ -0,0 +1,31 @@
1
+ /*!
2
+ * @nutui/nutui v3.1.22-beta.5 Fri Jun 24 2022 15:10:09 GMT+0800 (中国标准时间)
3
+ * (c) 2022 @jdf2e.
4
+ * Released under the MIT License.
5
+ */
6
+ import { reactive as r, useSlots as o, computed as e, watch as t, toRefs as i, resolveComponent as l, openBlock as s, createElementBlock as a, normalizeClass as n, normalizeStyle as d, createElementVNode as g, createBlock as c, createCommentVNode as u, renderSlot as m } from "vue";
7
+ import { c as p } from "./component.js";
8
+ import { p as f } from "./pxCheck.js";
9
+ import { _ as y } from "./plugin-vue_export-helper.js";
10
+ import "../locale/lang";
11
+ const { componentName: h, create: k } = p("image"), w = k({ props: { src: String, fit: { type: String, default: "fill" }, position: { type: String, default: "center" }, alt: { type: String, default: "" }, width: { type: String, default: "center" }, height: { type: String, default: "" }, round: { type: Boolean, default: false }, radius: [String, Number], showError: { type: Boolean, default: true }, showLoading: { type: Boolean, default: true } }, emits: ["click", "load", "error"], setup(l2, { emit: s2 }) {
12
+ const a2 = r({ loading: true, isError: false, slotLoding: o().loading, slotError: o().error }), n2 = e(() => ({ [h]: true, [`${h}-round`]: l2.round })), d2 = e(() => {
13
+ let r2 = {};
14
+ return l2.width && (r2.width = f(l2.width)), l2.height && (r2.height = f(l2.height)), l2.radius !== void 0 && l2.radius !== null && (r2.overflow = "hidden", r2.borderRadius = f(l2.radius)), r2;
15
+ }), g2 = e(() => ({ objectFit: l2.fit, objectPosition: l2.position }));
16
+ t(() => l2.src, (r2) => {
17
+ a2.isError = false, a2.loading = true;
18
+ });
19
+ return { ...i(a2), imageClick: (r2) => {
20
+ s2("click", r2);
21
+ }, classes: n2, styles: g2, stylebox: d2, error: () => {
22
+ a2.isError = true, a2.loading = false, s2("error");
23
+ }, load: () => {
24
+ a2.loading = false, s2("load");
25
+ } };
26
+ } }), v = ["src", "alt"], E = { key: 0, class: "nut-img-loading" }, S = { key: 1, class: "nut-img-error" };
27
+ var b = y(w, [["render", function(r2, o2, e2, t2, i2, p2) {
28
+ const f2 = l("nut-icon");
29
+ return s(), a("view", { class: n(r2.classes), style: d(r2.stylebox), onClick: o2[2] || (o2[2] = (...o3) => r2.imageClick && r2.imageClick(...o3)) }, [g("img", { class: "nut-img", src: r2.src, alt: r2.alt, onLoad: o2[0] || (o2[0] = (...o3) => r2.load && r2.load(...o3)), onError: o2[1] || (o2[1] = (...o3) => r2.error && r2.error(...o3)), style: d(r2.styles) }, null, 44, v), r2.loading ? (s(), a("view", E, [r2.slotLoding ? u("", true) : (s(), c(f2, { key: 0, name: "image" })), m(r2.$slots, "loading")])) : u("", true), r2.isError && !r2.loading ? (s(), a("view", S, [r2.slotError ? u("", true) : (s(), c(f2, { key: 0, name: "image-error" })), m(r2.$slots, "error")])) : u("", true)], 6);
30
+ }]]);
31
+ export { b as default };
@@ -1,102 +1,94 @@
1
- var __defProp = Object.defineProperty;
2
- var __defProps = Object.defineProperties;
3
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
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 = (a2, b2) => {
9
- for (var prop in b2 || (b2 = {}))
10
- if (__hasOwnProp.call(b2, prop))
11
- __defNormalProp(a2, prop, b2[prop]);
12
- if (__getOwnPropSymbols)
13
- for (var prop of __getOwnPropSymbols(b2)) {
14
- if (__propIsEnum.call(b2, prop))
15
- __defNormalProp(a2, prop, b2[prop]);
16
- }
17
- return a2;
18
- };
19
- var __spreadProps = (a2, b2) => __defProps(a2, __getOwnPropDescs(b2));
20
1
  /*!
21
- * @nutui/nutui v3.1.22-beta.3 Wed Jun 15 2022 20:12:30 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.22-beta.5 Fri Jun 24 2022 15:10:09 GMT+0800 (中国标准时间)
22
3
  * (c) 2022 @jdf2e.
23
4
  * Released under the MIT License.
24
5
  */
25
- import { toRefs as e, reactive as o, watch as t, onMounted as i, resolveComponent as s, openBlock as a, createBlock as n, withCtx as l, createElementVNode as r, withModifiers as p, createElementBlock as c, Fragment as u, renderList as m, createVNode as g, createCommentVNode as d, toDisplayString as h, render as v, h as y } from "vue";
26
- import { c as f } from "./component.js";
27
- import w from "./Popup.js";
28
- import b from "./Video.js";
29
- import T from "./Swiper.js";
30
- import C from "./SwiperItem.js";
31
- import { _ as x } from "./plugin-vue_export-helper.js";
6
+ import { toRefs as e, reactive as o, computed as t, watch as i, onMounted as n, resolveComponent as s, openBlock as a, createBlock as l, withCtx as c, createElementVNode as r, withModifiers as p, createElementBlock as u, Fragment as m, renderList as g, createVNode as d, createCommentVNode as h, toDisplayString as f, normalizeStyle as v, render as y, h as w } from "vue";
7
+ import { c as b, a as C } from "./component.js";
8
+ import x from "./Popup.js";
9
+ import T from "./Video.js";
10
+ import I from "./Swiper.js";
11
+ import S from "./SwiperItem.js";
12
+ import j from "./Icon.js";
13
+ import { _ as N } from "./plugin-vue_export-helper.js";
32
14
  import "../locale/lang";
33
15
  import "./OverLay.js";
34
- import "./Icon.js";
35
16
  import "./pxCheck.js";
36
17
  import "./index3.js";
37
- const { componentName: j, create: N } = f("imagepreview"), S = N({ props: { show: { type: Boolean, default: false }, images: { type: Array, default: () => [] }, videos: { type: Array, default: () => [] }, contentClose: { type: Boolean, default: false }, initNo: { type: Number, default: 1 }, paginationVisible: { type: Boolean, default: false }, paginationColor: { type: String, default: "#fff" }, autoplay: { type: [Number, String], default: 3e3 }, isWrapTeleport: { type: Boolean, default: false } }, emits: ["close"], components: { [w.name]: w, [b.name]: b, [T.name]: T, [C.name]: C }, setup(s2, { emit: a2 }) {
18
+ const { componentName: k, create: E } = b("imagepreview"), P = E({ props: { show: { type: Boolean, default: false }, images: { type: Array, default: () => [] }, videos: { type: Array, default: () => [] }, contentClose: { type: Boolean, default: true }, initNo: { type: Number, default: 1 }, paginationVisible: { type: Boolean, default: false }, paginationColor: { type: String, default: "#fff" }, autoplay: { type: [Number, String], default: 3e3 }, isWrapTeleport: { type: Boolean, default: false }, showIndex: { type: Boolean, default: true }, closeable: { type: Boolean, default: false }, closeIcon: { type: String, default: "circle-close" }, closeIconPosition: { type: String, default: "top-right" }, beforeClose: Function }, emits: ["close", "change"], components: { [x.name]: x, [T.name]: T, [I.name]: I, [S.name]: S, [j.name]: j }, setup(s2, { emit: a2 }) {
38
19
  e(s2);
39
- const n2 = o({ showPop: false, active: 1, maxNo: 1, source: { src: "https://storage.jd.com/about/big-final.mp4?Expires=3730193075&AccessKey=3LoYX1dQWa6ZXzQl&Signature=ViMFjz%2BOkBxS%2FY1rjtUVqbopbJI%3D", type: "video/mp4" }, options: { muted: true, controls: true }, eleImg: null, store: { scale: 1, moveable: false }, lastTouchEndTime: 0 }), l2 = () => {
40
- n2.showPop = false, n2.store.scale = 1, p2(), n2.active = 1, a2("close");
41
- }, r2 = (e2, o2) => Math.hypot(Math.abs(o2.x - e2.x), Math.abs(o2.y - e2.y)), p2 = () => {
42
- n2.eleImg.style.transform = "scale(" + n2.store.scale + ")";
43
- }, c2 = (e2) => {
44
- if (!n2.store.moveable)
20
+ const l2 = o({ showPop: false, active: 1, maxNo: 1, source: { src: "https://storage.jd.com/about/big-final.mp4?Expires=3730193075&AccessKey=3LoYX1dQWa6ZXzQl&Signature=ViMFjz%2BOkBxS%2FY1rjtUVqbopbJI%3D", type: "video/mp4" }, options: { muted: true, controls: true }, eleImg: null, store: { scale: 1, moveable: false }, lastTouchEndTime: 0 }), c2 = t(() => {
21
+ let e2 = {};
22
+ return s2.closeIconPosition == "top-right" ? e2.right = "10px" : e2.left = "10px", e2;
23
+ }), r2 = () => {
24
+ if (s2.beforeClose) {
25
+ const e2 = s2.beforeClose.apply(null, l2.active);
26
+ C(e2) ? e2.then((e3) => {
27
+ e3 && p2();
28
+ }) : e2 && p2();
29
+ } else
30
+ p2();
31
+ }, p2 = () => {
32
+ l2.showPop = false, l2.store.scale = 1, m2(), l2.active = 1, a2("close");
33
+ }, u2 = (e2, o2) => Math.hypot(Math.abs(o2.x - e2.x), Math.abs(o2.y - e2.y)), m2 = () => {
34
+ l2.eleImg.style.transform = "scale(" + l2.store.scale + ")";
35
+ }, g2 = (e2) => {
36
+ if (!l2.store.moveable)
45
37
  return;
46
- const o2 = n2.store;
47
- var t2 = e2.touches, i2 = t2[0], s3 = t2[1];
48
- if (s3) {
49
- const e3 = r2({ x: i2.pageX, y: i2.pageY }, { x: s3.pageX, y: s3.pageY }) / o2.oriDistance;
50
- o2.scale = o2.originScale * e3, o2.scale > 3 && (o2.scale = 3), p2();
38
+ const o2 = l2.store;
39
+ var t2 = e2.touches, i2 = t2[0], n2 = t2[1];
40
+ if (n2) {
41
+ const e3 = u2({ x: i2.pageX, y: i2.pageY }, { x: n2.pageX, y: n2.pageY }) / o2.oriDistance;
42
+ o2.scale = o2.originScale * e3, o2.scale > 3 && (o2.scale = 3), m2();
51
43
  }
52
- }, u2 = () => {
53
- n2.lastTouchEndTime = new Date().getTime();
54
- const e2 = n2.store;
55
- e2.moveable = false, (e2.scale < 1.1 && e2.scale > 1 || e2.scale < 1) && (e2.scale = 1, p2());
44
+ }, d2 = () => {
45
+ l2.lastTouchEndTime = new Date().getTime();
46
+ const e2 = l2.store;
47
+ e2.moveable = false, (e2.scale < 1.1 && e2.scale > 1 || e2.scale < 1) && (e2.scale = 1, m2());
56
48
  };
57
- return t(() => s2.show, (e2) => {
58
- n2.showPop = e2, n2.eleImg = document.querySelector(".nut-imagepreview"), document.addEventListener("touchmove", c2), document.addEventListener("touchend", u2), document.addEventListener("touchcancel", u2);
59
- }), i(() => {
60
- n2.active = s2.initNo, n2.showPop = s2.show, n2.maxNo = s2.images.length + s2.videos.length;
61
- }), __spreadProps(__spreadValues({}, e(n2)), { slideChangeEnd: function(e2) {
62
- n2.active = e2 + 1;
63
- }, onClose: l2, closeOnImg: () => {
64
- s2.contentClose && l2();
49
+ return i(() => s2.show, (e2) => {
50
+ l2.showPop = e2, l2.eleImg = document.querySelector(".nut-imagepreview"), document.addEventListener("touchmove", g2), document.addEventListener("touchend", d2), document.addEventListener("touchcancel", d2);
51
+ }), n(() => {
52
+ l2.active = s2.initNo, l2.showPop = s2.show, l2.maxNo = s2.images.length + s2.videos.length;
53
+ }), { ...e(l2), slideChangeEnd: function(e2) {
54
+ l2.active = e2 + 1, a2("change", l2.active);
55
+ }, onClose: r2, closeOnImg: () => {
56
+ s2.contentClose && r2();
65
57
  }, onTouchStart: (e2) => {
66
- if (new Date().getTime() - n2.lastTouchEndTime < 300) {
67
- const e3 = n2.store;
68
- e3.scale > 1 ? e3.scale = 1 : e3.scale == 1 && (e3.scale = 2), p2();
58
+ if (new Date().getTime() - l2.lastTouchEndTime < 300) {
59
+ const e3 = l2.store;
60
+ e3.scale > 1 ? e3.scale = 1 : e3.scale == 1 && (e3.scale = 2), m2();
69
61
  }
70
62
  var o2 = e2.touches, t2 = o2[0], i2 = o2[1];
71
- const s3 = n2.store;
72
- s3.moveable = true, i2 && (s3.oriDistance = r2({ x: t2.pageX, y: t2.pageY }, { x: i2.pageX, y: i2.pageY })), s3.originScale = s3.scale || 1;
73
- }, onTouchMove: c2, onTouchEnd: u2, getDistance: r2, scaleNow: p2 });
74
- } }), E = ["src"], I = { class: "nut-imagepreview-index" };
75
- var P = x(S, [["render", function(e2, o2, t2, i2, v2, y2) {
76
- const f2 = s("nut-video"), w2 = s("nut-swiper-item"), b2 = s("nut-swiper"), T2 = s("nut-popup");
77
- return a(), n(T2, { "pop-class": "custom-pop", visible: e2.showPop, "onUpdate:visible": o2[2] || (o2[2] = (o3) => e2.showPop = o3), isWrapTeleport: e2.isWrapTeleport, onClick: e2.onClose, style: { width: "100%" } }, { default: l(() => [r("view", { class: "nut-imagepreview", onClick: o2[0] || (o2[0] = p((...o3) => e2.closeOnImg && e2.closeOnImg(...o3), ["stop"])), onTouchstartCapture: o2[1] || (o2[1] = (...o3) => e2.onTouchStart && e2.onTouchStart(...o3)) }, [e2.showPop ? (a(), n(b2, { key: 0, "auto-play": e2.autoplay, class: "nut-imagepreview-swiper", loop: true, "is-preventDefault": false, direction: "horizontal", onChange: e2.slideChangeEnd, "init-page": e2.initNo > e2.maxNo ? e2.maxNo - 1 : e2.initNo - 1, "pagination-visible": e2.paginationVisible, "pagination-color": e2.paginationColor }, { default: l(() => [(a(true), c(u, null, m(e2.videos, (e3, o3) => (a(), n(w2, { key: o3 }, { default: l(() => [g(f2, { source: e3.source, options: e3.options }, null, 8, ["source", "options"])]), _: 2 }, 1024))), 128)), (a(true), c(u, null, m(e2.images, (e3, o3) => (a(), n(w2, { key: o3 }, { default: l(() => [r("img", { src: e3.src, class: "nut-imagepreview-img" }, null, 8, E)]), _: 2 }, 1024))), 128))]), _: 1 }, 8, ["auto-play", "onChange", "init-page", "pagination-visible", "pagination-color"])) : d("", true)], 32), r("view", I, h(e2.active) + " / " + h(e2.images.length + e2.videos.length), 1)]), _: 1 }, 8, ["visible", "isWrapTeleport", "onClick"]);
63
+ const n2 = l2.store;
64
+ n2.moveable = true, i2 && (n2.oriDistance = u2({ x: t2.pageX, y: t2.pageY }, { x: i2.pageX, y: i2.pageY })), n2.originScale = n2.scale || 1;
65
+ }, onTouchMove: g2, onTouchEnd: d2, getDistance: u2, scaleNow: m2, styles: c2 };
66
+ } }), B = ["src"], D = { key: 0, class: "nut-imagepreview-index" };
67
+ var O = N(P, [["render", function(e2, o2, t2, i2, n2, y2) {
68
+ const w2 = s("nut-video"), b2 = s("nut-swiper-item"), C2 = s("nut-swiper"), x2 = s("nut-icon"), T2 = s("nut-popup");
69
+ return a(), l(T2, { "pop-class": "custom-pop", visible: e2.showPop, "onUpdate:visible": o2[3] || (o2[3] = (o3) => e2.showPop = o3), isWrapTeleport: e2.isWrapTeleport, onClick: e2.onClose, style: { width: "100%" } }, { default: c(() => [r("view", { class: "nut-imagepreview", onClick: o2[0] || (o2[0] = p((...o3) => e2.closeOnImg && e2.closeOnImg(...o3), ["stop"])), onTouchstartCapture: o2[1] || (o2[1] = (...o3) => e2.onTouchStart && e2.onTouchStart(...o3)) }, [e2.showPop ? (a(), l(C2, { key: 0, "auto-play": e2.autoplay, class: "nut-imagepreview-swiper", loop: true, "is-preventDefault": false, direction: "horizontal", onChange: e2.slideChangeEnd, "init-page": e2.initNo > e2.maxNo ? e2.maxNo - 1 : e2.initNo - 1, "pagination-visible": e2.paginationVisible, "pagination-color": e2.paginationColor }, { default: c(() => [(a(true), u(m, null, g(e2.videos, (e3, o3) => (a(), l(b2, { key: o3 }, { default: c(() => [d(w2, { source: e3.source, options: e3.options }, null, 8, ["source", "options"])]), _: 2 }, 1024))), 128)), (a(true), u(m, null, g(e2.images, (e3, o3) => (a(), l(b2, { key: o3 }, { default: c(() => [r("img", { src: e3.src, class: "nut-imagepreview-img" }, null, 8, B)]), _: 2 }, 1024))), 128))]), _: 1 }, 8, ["auto-play", "onChange", "init-page", "pagination-visible", "pagination-color"])) : h("", true)], 32), e2.showIndex ? (a(), u("view", D, f(e2.active) + " / " + f(e2.images.length + e2.videos.length), 1)) : h("", true), e2.closeable ? (a(), u("view", { key: 1, class: "nut-imagepreview-close-icon", onClick: o2[2] || (o2[2] = (...o3) => e2.handleCloseIcon && e2.handleCloseIcon(...o3)), style: v(e2.styles) }, [d(x2, { name: e2.closeIcon, color: "#ffffff" }, null, 8, ["name"])], 4)) : h("", true)]), _: 1 }, 8, ["visible", "isWrapTeleport", "onClick"]);
78
70
  }]]);
79
- class k {
71
+ class V {
80
72
  constructor() {
81
73
  this.show = false, this.images = [], this.initNo = 1, this.paginationVisible = false, this.paginationColor = "", this.teleport = "body", this.onClose = () => {
82
74
  };
83
75
  }
84
76
  }
85
- class D {
77
+ class X {
86
78
  constructor(e2) {
87
- this.options = new k();
79
+ this.options = new V();
88
80
  let o2 = Object.assign(this.options, e2), t2 = document.body, i2 = o2.teleport;
89
81
  i2 != "body" && (t2 = typeof i2 == "string" ? document.querySelector(i2) : o2.teleport);
90
- const s2 = document.createElement("view");
91
- s2.id = "imagepreview-" + new Date().getTime();
92
- const a2 = g({ setup: () => (o2.teleport = `#${s2.id}`, () => y(P, o2)) });
93
- t2.appendChild(s2), v(a2, s2);
82
+ const n2 = document.createElement("view");
83
+ n2.id = "imagepreview-" + new Date().getTime();
84
+ const s2 = d({ setup: () => (o2.teleport = `#${n2.id}`, () => w(O, o2)) });
85
+ t2.appendChild(n2), y(s2, n2);
94
86
  }
95
87
  }
96
- const B = function(e2) {
97
- return new D(e2);
88
+ const Y = function(e2) {
89
+ return new X(e2);
98
90
  };
99
- B.install = (e2) => {
100
- e2.use(P), e2.config.globalProperties.$imagepreview = B;
91
+ Y.install = (e2) => {
92
+ e2.use(O), e2.config.globalProperties.$imagepreview = Y;
101
93
  };
102
- export { P as ImagePreview, k as ImagePreviewOptions, B as default };
94
+ export { O as ImagePreview, V as ImagePreviewOptions, Y as default };
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.22-beta.3 Wed Jun 15 2022 20:12:30 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
  */
@@ -1,24 +1,5 @@
1
- var __defProp = Object.defineProperty;
2
- var __defProps = Object.defineProperties;
3
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
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 = (a2, b2) => {
9
- for (var prop in b2 || (b2 = {}))
10
- if (__hasOwnProp.call(b2, prop))
11
- __defNormalProp(a2, prop, b2[prop]);
12
- if (__getOwnPropSymbols)
13
- for (var prop of __getOwnPropSymbols(b2)) {
14
- if (__propIsEnum.call(b2, prop))
15
- __defNormalProp(a2, prop, b2[prop]);
16
- }
17
- return a2;
18
- };
19
- var __spreadProps = (a2, b2) => __defProps(a2, __getOwnPropDescs(b2));
20
1
  /*!
21
- * @nutui/nutui v3.1.22-beta.3 Wed Jun 15 2022 20:12:30 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.22-beta.5 Fri Jun 24 2022 15:10:09 GMT+0800 (中国标准时间)
22
3
  * (c) 2022 @jdf2e.
23
4
  * Released under the MIT License.
24
5
  */
@@ -64,7 +45,7 @@ const { componentName: b, create: x, translate: E } = y("infiniteloading"), S =
64
45
  v2.value && (v2.value = false, T2());
65
46
  }), i(() => {
66
47
  v2.value = true, d2.scrollEl.removeEventListener("scroll", w2, a2.useCapture);
67
- }), __spreadProps(__spreadValues({ classes: f2 }, r(d2)), { touchStart: (e2) => {
48
+ }), { classes: f2, ...r(d2), touchStart: (e2) => {
68
49
  if (d2.beforeScrollTop == 0 && !d2.isTouching && a2.isOpenRefresh) {
69
50
  d2.y = e2.touches[0].pageY, d2.isTouching = true;
70
51
  const t2 = d2.refreshTop.firstElementChild.offsetHeight;
@@ -74,7 +55,7 @@ const { componentName: b, create: x, translate: E } = y("infiniteloading"), S =
74
55
  d2.distance = e2.touches[0].pageY - d2.y, d2.distance > 0 && d2.isTouching ? (e2.preventDefault(), d2.distance >= d2.refreshMaxH && (d2.distance = d2.refreshMaxH)) : (d2.distance = 0, d2.isTouching = false);
75
56
  }, touchEnd: () => {
76
57
  d2.distance && (d2.distance < d2.refreshMaxH ? d2.distance = 0 : c2("refresh", y2));
77
- }, getStyle: p2, translate: E, slots: u2 });
58
+ }, getStyle: p2, translate: E, slots: u2 };
78
59
  } }), M = { class: "top-box" }, I = { class: "top-text" }, H = { class: "nut-infinite-container" }, k = { class: "nut-infinite-bottom" }, C = { key: 0, class: "bottom-box" }, $ = { class: "bottom-text" }, j = { key: 0, class: "tips" };
79
60
  var B = v(S, [["render", function(e2, t2, o2, n2, s2, l2) {
80
61
  const i2 = a("nut-icon");
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.22-beta.3 Wed Jun 15 2022 20:12:30 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
  */
@@ -11,7 +11,7 @@ function k(e2, t2, l2) {
11
11
  const n2 = e2.indexOf(t2);
12
12
  return n2 === -1 ? e2 : t2 === "-" && n2 !== 0 ? e2.slice(0, n2) : e2.slice(0, n2 + 1) + e2.slice(n2).replace(l2, "");
13
13
  }
14
- function I(e2, t2, l2) {
14
+ function I(e2, t2 = true, l2 = true) {
15
15
  e2 = t2 ? k(e2, ".", /\./g) : e2.split(".")[0];
16
16
  const n2 = t2 ? /[^-0-9.]/g : /[^-0-9]/g;
17
17
  return (e2 = l2 ? k(e2, "-", /-/g) : e2.replace(/-/, "")).replace(n2, "");
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.22-beta.3 Wed Jun 15 2022 20:12:30 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
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.22-beta.3 Wed Jun 15 2022 20:12:30 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
  */
@@ -1,24 +1,5 @@
1
- var __defProp = Object.defineProperty;
2
- var __defProps = Object.defineProperties;
3
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
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 = (a2, b) => {
9
- for (var prop in b || (b = {}))
10
- if (__hasOwnProp.call(b, prop))
11
- __defNormalProp(a2, prop, b[prop]);
12
- if (__getOwnPropSymbols)
13
- for (var prop of __getOwnPropSymbols(b)) {
14
- if (__propIsEnum.call(b, prop))
15
- __defNormalProp(a2, prop, b[prop]);
16
- }
17
- return a2;
18
- };
19
- var __spreadProps = (a2, b) => __defProps(a2, __getOwnPropDescs(b));
20
1
  /*!
21
- * @nutui/nutui v3.1.22-beta.3 Wed Jun 15 2022 20:12:30 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.22-beta.5 Fri Jun 24 2022 15:10:09 GMT+0800 (中国标准时间)
22
3
  * (c) 2022 @jdf2e.
23
4
  * Released under the MIT License.
24
5
  */
@@ -31,11 +12,11 @@ var v = p(d({ props: { height: { type: [Number], default: 50 }, listData: { type
31
12
  const n2 = t(null), o2 = e({ startOffset: 0, start: 0, list: a2.listData.slice() }), c2 = l(() => Math.ceil(a2.containerHeight / a2.height)), h2 = l(() => o2.start + c2.value), m2 = l(() => `translate3d(0, ${o2.startOffset}px, 0)`), u2 = l(() => ({ [f]: true })), g2 = l(() => o2.list.length * a2.height), p2 = l(() => o2.list.slice(o2.start, Math.min(h2.value, o2.list.length)));
32
13
  return s(() => a2.listData, () => {
33
14
  o2.list = a2.listData.slice();
34
- }), __spreadProps(__spreadValues({}, i(o2)), { list: n2, getTransform: m2, listHeight: g2, visibleData: p2, classes: u2, handleScrollEvent: () => {
15
+ }), { ...i(o2), list: n2, getTransform: m2, listHeight: g2, visibleData: p2, classes: u2, handleScrollEvent: () => {
35
16
  var _a;
36
17
  const t2 = (_a = n2.value) == null ? void 0 : _a.scrollTop;
37
18
  o2.start = Math.floor(t2 / a2.height), h2.value > o2.list.length && (r2("scroll"), r2("scroll-bottom")), o2.startOffset = t2 - t2 % a2.height;
38
- } });
19
+ } };
39
20
  } }), [["render", function(t2, e2, l2, s2, i2, g2) {
40
21
  return a(), r("view", { class: n(t2.classes), onScrollPassive: e2[0] || (e2[0] = (...e3) => t2.handleScrollEvent && t2.handleScrollEvent(...e3)), ref: "list" }, [o("div", { class: "nut-list-phantom", style: c({ height: t2.listHeight + "px" }) }, null, 4), o("div", { class: "nut-list-container", style: c({ transform: t2.getTransform }) }, [(a(true), r(h, null, m(t2.visibleData, (e3, l3) => (a(), r("div", { class: "nut-list-item", style: c({ height: t2.height + "px" }), key: e3 }, [u(t2.$slots, "default", { item: e3, index: l3 })], 4))), 128))], 4)], 34);
41
22
  }]]);
@@ -1,36 +1,51 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.22-beta.3 Wed Jun 15 2022 20:12:30 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 { ref as e, computed as t, reactive as o, provide as n, resolveComponent as l, openBlock as s, createElementBlock as r, normalizeClass as a, createElementVNode as i, Fragment as u, renderList as c, normalizeStyle as p, toDisplayString as m, createVNode as d, renderSlot as f } from "vue";
7
- import { c as h } from "./component.js";
8
- import { u as v } from "./index2.js";
9
- import { _ as g } from "./plugin-vue_export-helper.js";
6
+ import { ref as e, computed as t, onMounted as o, onUnmounted as l, reactive as n, provide as s, resolveComponent as r, openBlock as i, createElementBlock as a, normalizeClass as c, createElementVNode as u, Fragment as d, renderList as p, normalizeStyle as m, toDisplayString as f, createVNode as v, renderSlot as w } from "vue";
7
+ import { c as g } from "./component.js";
8
+ import { u as h } from "./index2.js";
9
+ import { _ as y } from "./plugin-vue_export-helper.js";
10
10
  import "../locale/lang";
11
- const { componentName: _, create: w } = h("menu"), y = w({ props: { activeColor: { type: String, default: "" }, overlay: { type: Boolean, default: true }, duration: { type: [Number, String], default: 0 }, closeOnClickOverlay: { type: Boolean, default: true } }, setup(l2, { emit: s2, slots: r2 }) {
12
- const a2 = e(), i2 = e(0), { children: u2, linkChildren: c2 } = (() => {
13
- const e2 = o([]), t2 = o([]);
11
+ const { componentName: b, create: x } = g("menu"), C = x({ props: { activeColor: { type: String, default: "" }, overlay: { type: Boolean, default: true }, lockScroll: { type: Boolean, default: true }, duration: { type: [Number, String], default: 0 }, closeOnClickOverlay: { type: Boolean, default: true }, direction: { type: String, default: "down" }, scrollFixed: { type: [Boolean, String, Number], default: false }, titleClass: [String] }, setup(r2, { emit: i2, slots: a2 }) {
12
+ const c2 = e(), u2 = e(0), d2 = e(false), { children: p2, linkChildren: m2 } = (() => {
13
+ const e2 = n([]), t2 = n([]);
14
14
  return { children: e2, linkChildren: (o2) => {
15
- n("menuParent", Object.assign({ link: (o3) => {
15
+ s("menuParent", Object.assign({ link: (o3) => {
16
16
  o3.proxy && (t2.push(o3), e2.push(o3.proxy));
17
17
  }, children: e2, internalChildren: t2 }, o2));
18
18
  } };
19
- })(), p2 = t(() => u2.some((e2) => e2.state.showWrapper)), m2 = t(() => ({ [_]: true }));
20
- c2({ props: l2, offset: i2 });
21
- return { toggleItem: (e2) => {
22
- u2.forEach((t2, o2) => {
19
+ })(), f2 = t(() => p2.some((e2) => e2.state.showWrapper)), v2 = t(() => ({ [b]: true, "scroll-fixed": d2.value }));
20
+ m2({ props: r2, offset: u2 });
21
+ const w2 = () => {
22
+ const { scrollFixed: e2 } = r2, t2 = (o2 = window, Math.max(0, "scrollTop" in o2 ? o2.scrollTop : o2.pageYOffset));
23
+ var o2;
24
+ d2.value = t2 > (typeof e2 == "boolean" ? 30 : Number(e2));
25
+ };
26
+ return o(() => {
27
+ const { scrollFixed: e2 } = r2;
28
+ e2 && window.addEventListener("scroll", w2);
29
+ }), l(() => {
30
+ const { scrollFixed: e2 } = r2;
31
+ e2 && window.removeEventListener("scroll", w2);
32
+ }), { toggleItem: (e2) => {
33
+ p2.forEach((t2, o2) => {
23
34
  o2 === e2 ? ((() => {
24
- if (a2.value) {
25
- const e3 = v(a2);
26
- i2.value = e3.bottom;
35
+ if (c2.value) {
36
+ const e3 = h(c2);
37
+ r2.direction === "down" ? u2.value = e3.bottom : u2.value = window.innerHeight - e3.top;
27
38
  }
28
39
  })(), t2.toggle()) : t2.state.showPopup && t2.toggle(false, { immediate: true });
29
40
  });
30
- }, children: u2, opened: p2, classes: m2, barRef: a2 };
31
- } }), b = ["onClick"], C = { class: "nut-menu__title-text" };
32
- var k = g(y, [["render", function(e2, t2, o2, n2, h2, v2) {
33
- const g2 = l("nut-icon");
34
- return s(), r("view", { class: a(e2.classes) }, [i("view", { class: a(["nut-menu__bar", { opened: e2.opened }]), ref: "barRef" }, [(s(true), r(u, null, c(e2.children, (t3, o3) => (s(), r("view", { key: o3, class: a(["nut-menu__item", { disabled: t3.disabled, active: t3.state.showPopup }]), onClick: (n3) => !t3.disabled && e2.toggleItem(o3), style: p({ color: t3.state.showPopup ? e2.activeColor : "" }) }, [i("view", { class: a(["nut-menu__title", { active: t3.state.showPopup }]) }, [i("view", C, m(t3.renderTitle()), 1), d(g2, { name: t3.titleIcon, size: "10", class: "nut-menu__title-icon" }, null, 8, ["name"])], 2)], 14, b))), 128))], 2), f(e2.$slots, "default")], 2);
41
+ }, children: p2, opened: f2, classes: v2, barRef: c2, getClasses: (e2) => {
42
+ let t2 = "";
43
+ const { titleClass: o2 } = r2;
44
+ return e2 && (t2 += "active"), o2 && (t2 += ` ${o2}`), t2;
45
+ } };
46
+ } }), _ = ["onClick"], k = { class: "nut-menu__title-text" };
47
+ var S = y(C, [["render", function(e2, t2, o2, l2, n2, s2) {
48
+ const g2 = r("nut-icon");
49
+ return i(), a("view", { class: c(e2.classes) }, [u("view", { class: c(["nut-menu__bar", { opened: e2.opened }]), ref: "barRef" }, [(i(true), a(d, null, p(e2.children, (t3, o3) => (i(), a("view", { key: o3, class: c(["nut-menu__item", { disabled: t3.disabled, active: t3.state.showPopup }]), onClick: (l3) => !t3.disabled && e2.toggleItem(o3), style: m({ color: t3.state.showPopup ? e2.activeColor : "" }) }, [u("view", { class: c(["nut-menu__title", e2.getClasses(t3.state.showPopup)]) }, [u("view", k, f(t3.renderTitle()), 1), v(g2, { name: t3.titleIcon || (e2.direction === "up" ? "arrow-up" : "down-arrow"), size: "10", class: "nut-menu__title-icon" }, null, 8, ["name"])], 2)], 14, _))), 128))], 2), w(e2.$slots, "default")], 2);
35
50
  }]]);
36
- export { k as default };
51
+ export { S as default };
@@ -1,42 +1,45 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.22-beta.3 Wed Jun 15 2022 20:12:30 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 { reactive as e, computed as o, inject as l, getCurrentInstance as t, resolveComponent as a, withDirectives as s, openBlock as n, createElementBlock as p, normalizeClass as r, createElementVNode as i, normalizeStyle as u, vShow as c, createVNode as m, mergeProps as d, withCtx as h, Fragment as v, renderList as y, createBlock as f, createCommentVNode as w, toDisplayString as C, renderSlot as k } from "vue";
6
+ import { reactive as e, computed as o, inject as t, getCurrentInstance as l, resolveComponent as n, withDirectives as p, openBlock as a, createElementBlock as r, normalizeClass as s, createElementVNode as i, normalizeStyle as u, vShow as c, createVNode as d, mergeProps as m, withCtx as h, Fragment as v, renderList as f, createBlock as y, createCommentVNode as w, toDisplayString as k, renderSlot as C } from "vue";
7
7
  import { c as P } from "./component.js";
8
- import _ from "./Icon.js";
9
- import g from "./Popup.js";
10
- import { _ as x } from "./plugin-vue_export-helper.js";
8
+ import S from "./Icon.js";
9
+ import x from "./Popup.js";
10
+ import { _ } from "./plugin-vue_export-helper.js";
11
11
  import "../locale/lang";
12
12
  import "./pxCheck.js";
13
13
  import "./OverLay.js";
14
- const { componentName: S, create: V } = P("menu-item"), b = V({ props: { title: String, options: { type: Array, default: [] }, disabled: { type: Boolean, default: false }, modelValue: null, cols: { type: Number, default: 1 }, titleIcon: { type: String, default: "down-arrow" } }, components: { [_.name]: _, [g.name]: g }, emits: ["update:modelValue", "change"], setup(a2, { emit: s2, slots: n2 }) {
15
- const p2 = e({ showPopup: false, transition: true, showWrapper: false, isShowPlaceholderElement: false }), { parent: r2 } = (() => {
16
- const e2 = l("menuParent", null);
14
+ const { componentName: g, create: b } = P("menu-item"), V = b({ props: { title: String, options: { type: Array, default: [] }, disabled: { type: Boolean, default: false }, modelValue: null, cols: { type: Number, default: 1 }, titleIcon: String, optionIcon: { type: String, default: "Check" } }, components: { [S.name]: S, [x.name]: x }, emits: ["update:modelValue", "change"], setup(n2, { emit: p2, slots: a2 }) {
15
+ const r2 = e({ showPopup: false, transition: true, showWrapper: false, isShowPlaceholderElement: false }), { parent: s2 } = (() => {
16
+ const e2 = t("menuParent", null);
17
17
  if (e2) {
18
- const o2 = t(), { link: l2 } = e2;
19
- return l2(o2), { parent: e2 };
18
+ const o2 = l(), { link: t2 } = e2;
19
+ return t2(o2), { parent: e2 };
20
20
  }
21
21
  })();
22
- return { classes: o(() => ({ [S]: true })), renderTitle: () => {
22
+ return { classes: o(() => ({ [g]: true })), placeholderElementStyle: o(() => {
23
+ const e2 = { height: s2.offset.value + "px" };
24
+ return s2.props.direction === "down" ? e2 : { ...e2, top: "auto" };
25
+ }), renderTitle: () => {
23
26
  var _a;
24
- if (a2.title)
25
- return a2.title;
26
- const e2 = (_a = a2.options) == null ? void 0 : _a.find((e3) => e3.value === a2.modelValue);
27
+ if (n2.title)
28
+ return n2.title;
29
+ const e2 = (_a = n2.options) == null ? void 0 : _a.find((e3) => e3.value === n2.modelValue);
27
30
  return e2 ? e2.text : "";
28
- }, state: p2, parent: r2, toggle: (e2 = !p2.showPopup, o2 = {}) => {
29
- e2 !== p2.showPopup && (p2.showPopup = e2, p2.isShowPlaceholderElement = e2, e2 && (p2.showWrapper = true));
31
+ }, state: r2, parent: s2, toggle: (e2 = !r2.showPopup, o2 = {}) => {
32
+ e2 !== r2.showPopup && (r2.showPopup = e2, r2.isShowPlaceholderElement = e2, e2 && (r2.showWrapper = true));
30
33
  }, onClick: (e2) => {
31
- p2.showPopup = false, p2.isShowPlaceholderElement = false, e2.value !== a2.modelValue && (s2("update:modelValue", e2.value), s2("change", e2.value));
34
+ r2.showPopup = false, r2.isShowPlaceholderElement = false, e2.value !== n2.modelValue && (p2("update:modelValue", e2.value), p2("change", e2.value));
32
35
  }, handleClose: () => {
33
- p2.showWrapper = false, p2.isShowPlaceholderElement = false;
36
+ r2.showWrapper = false, r2.isShowPlaceholderElement = false;
34
37
  }, handleClickOutside: () => {
35
- p2.showPopup = false;
38
+ r2.showPopup = false;
36
39
  } };
37
- } }), j = { class: "nut-menu-item__content" }, O = ["onClick"];
38
- var E = x(b, [["render", function(e2, o2, l2, t2, P2, _2) {
39
- const g2 = a("nut-icon"), x2 = a("nut-popup");
40
- return s((n(), p("view", { class: r(e2.classes) }, [s(i("div", { onClick: o2[0] || (o2[0] = (...o3) => e2.handleClickOutside && e2.handleClickOutside(...o3)), class: "placeholder-element", style: u({ height: e2.parent.offset.value + "px" }) }, null, 4), [[c, e2.state.isShowPlaceholderElement]]), m(x2, d({ style: { top: e2.parent.offset.value + "px" }, overlayStyle: { top: e2.parent.offset.value + "px" } }, e2.$attrs, { visible: e2.state.showPopup, "onUpdate:visible": o2[1] || (o2[1] = (o3) => e2.state.showPopup = o3), position: "top", duration: e2.parent.props.duration, "pop-class": "nut-menu__pop", overlayClass: "nut-menu__overlay", overlay: e2.parent.props.overlay, onClosed: e2.handleClose, isWrapTeleport: false, "close-on-click-overlay": e2.parent.props.closeOnClickOverlay }), { default: h(() => [i("view", j, [(n(true), p(v, null, y(e2.options, (o3, l3) => (n(), p("view", { key: l3, class: r(["nut-menu-item__option", { active: o3.value === e2.modelValue }]), style: u({ "flex-basis": 100 / e2.cols + "%" }), onClick: (l4) => e2.onClick(o3) }, [o3.value === e2.modelValue ? (n(), f(g2, { key: 0, name: "Check", color: e2.parent.props.activeColor }, null, 8, ["color"])) : w("", true), i("view", { style: u({ color: o3.value === e2.modelValue ? e2.parent.props.activeColor : "" }) }, C(o3.text), 5)], 14, O))), 128)), k(e2.$slots, "default")])]), _: 3 }, 16, ["style", "overlayStyle", "visible", "duration", "overlay", "onClosed", "close-on-click-overlay"])], 2)), [[c, e2.state.showWrapper]]);
40
+ } }), E = { class: "nut-menu-item__content" }, j = ["onClick"];
41
+ var O = _(V, [["render", function(e2, o2, t2, l2, P2, S2) {
42
+ const x2 = n("nut-icon"), _2 = n("nut-popup");
43
+ return p((a(), r("view", { class: s(e2.classes) }, [p(i("div", { onClick: o2[0] || (o2[0] = (...o3) => e2.handleClickOutside && e2.handleClickOutside(...o3)), class: s(["placeholder-element", { up: e2.parent.props.direction === "up" }]), style: u(e2.placeholderElementStyle) }, null, 6), [[c, e2.state.isShowPlaceholderElement]]), d(_2, m({ style: e2.parent.props.direction === "down" ? { top: e2.parent.offset.value + "px" } : { bottom: e2.parent.offset.value + "px" }, overlayStyle: e2.parent.props.direction === "down" ? { top: e2.parent.offset.value + "px" } : { bottom: e2.parent.offset.value + "px" } }, e2.$attrs, { visible: e2.state.showPopup, "onUpdate:visible": o2[1] || (o2[1] = (o3) => e2.state.showPopup = o3), position: e2.parent.props.direction === "down" ? "top" : "bottom", duration: e2.parent.props.duration, "pop-class": "nut-menu__pop", overlayClass: "nut-menu__overlay", overlay: e2.parent.props.overlay, onClosed: e2.handleClose, lockScroll: e2.parent.props.lockScroll, isWrapTeleport: false, "close-on-click-overlay": e2.parent.props.closeOnClickOverlay }), { default: h(() => [i("view", E, [(a(true), r(v, null, f(e2.options, (o3, t3) => (a(), r("view", { key: t3, class: s(["nut-menu-item__option", { active: o3.value === e2.modelValue }]), style: u({ "flex-basis": 100 / e2.cols + "%" }), onClick: (t4) => e2.onClick(o3) }, [o3.value === e2.modelValue ? (a(), y(x2, { key: 0, name: e2.optionIcon, color: e2.parent.props.activeColor }, null, 8, ["name", "color"])) : w("", true), i("view", { style: u({ color: o3.value === e2.modelValue ? e2.parent.props.activeColor : "" }) }, k(o3.text), 5)], 14, j))), 128)), C(e2.$slots, "default")])]), _: 3 }, 16, ["style", "overlayStyle", "visible", "position", "duration", "overlay", "onClosed", "lockScroll", "close-on-click-overlay"])], 2)), [[c, e2.state.showWrapper]]);
41
44
  }]]);
42
- export { E as default };
45
+ export { O as default };
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.22-beta.3 Wed Jun 15 2022 20:12:30 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
  */
@@ -1,24 +1,5 @@
1
- var __defProp = Object.defineProperty;
2
- var __defProps = Object.defineProperties;
3
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
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 = (a2, b2) => {
9
- for (var prop in b2 || (b2 = {}))
10
- if (__hasOwnProp.call(b2, prop))
11
- __defNormalProp(a2, prop, b2[prop]);
12
- if (__getOwnPropSymbols)
13
- for (var prop of __getOwnPropSymbols(b2)) {
14
- if (__propIsEnum.call(b2, prop))
15
- __defNormalProp(a2, prop, b2[prop]);
16
- }
17
- return a2;
18
- };
19
- var __spreadProps = (a2, b2) => __defProps(a2, __getOwnPropDescs(b2));
20
1
  /*!
21
- * @nutui/nutui v3.1.22-beta.3 Wed Jun 15 2022 20:12:30 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.22-beta.5 Fri Jun 24 2022 15:10:09 GMT+0800 (中国标准时间)
22
3
  * (c) 2022 @jdf2e.
23
4
  * Released under the MIT License.
24
5
  */
@@ -79,7 +60,7 @@ const { componentName: $, create: N } = A("noticebar"), T = N({ props: { directi
79
60
  h2.keepAlive = true, clearInterval(h2.timer);
80
61
  }), c(() => {
81
62
  clearInterval(h2.timer);
82
- }), __spreadProps(__spreadValues(__spreadValues({}, r(e2)), r(h2)), { isEllipsis: f2, classes: y2, iconShow: g2, barStyle: k2, contentStyle: w2, iconBg: v2, horseLampStyle: C2, wrap: u2, content: m2, handleClick: (e3) => {
63
+ }), { ...r(e2), ...r(h2), isEllipsis: f2, classes: y2, iconShow: g2, barStyle: k2, contentStyle: w2, iconBg: v2, horseLampStyle: C2, wrap: u2, content: m2, handleClick: (e3) => {
83
64
  d2("click", e3);
84
65
  }, onClickIcon: (t2) => {
85
66
  e2.closeMode && (h2.showNoticeBar = !e2.closeMode), d2("close", t2);
@@ -91,7 +72,7 @@ const { componentName: $, create: N } = A("noticebar"), T = N({ props: { directi
91
72
  d2("click", e3);
92
73
  }, handleClickIcon: () => {
93
74
  d2("close", h2.scrollList[0]);
94
- }, slots: p2 });
75
+ }, slots: p2 };
95
76
  } }), E = { ref: "wrap", class: "wrap" }, W = ["onClick"];
96
77
  var M = B(T, [["render", function(e2, t2, l2, o2, i2, n2) {
97
78
  const s2 = d("nut-icon"), a2 = d("ScrollItem");