vant 3.5.0-beta.0 → 3.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (255) hide show
  1. package/es/action-bar/ActionBar.mjs +1 -1
  2. package/es/action-bar/index.mjs +2 -2
  3. package/es/action-bar-button/ActionBarButton.mjs +5 -5
  4. package/es/action-bar-button/index.mjs +2 -2
  5. package/es/action-bar-icon/ActionBarIcon.mjs +5 -5
  6. package/es/action-bar-icon/index.mjs +2 -2
  7. package/es/action-sheet/ActionSheet.mjs +5 -5
  8. package/es/action-sheet/index.mjs +2 -2
  9. package/es/address-edit/AddressEdit.mjs +11 -11
  10. package/es/address-edit/AddressEditDetail.mjs +3 -3
  11. package/es/address-edit/index.mjs +2 -2
  12. package/es/address-list/AddressList.mjs +4 -4
  13. package/es/address-list/AddressListItem.mjs +5 -5
  14. package/es/address-list/index.mjs +2 -2
  15. package/es/area/Area.mjs +5 -5
  16. package/es/area/index.mjs +2 -2
  17. package/es/badge/Badge.mjs +1 -1
  18. package/es/badge/index.mjs +2 -2
  19. package/es/button/Button.mjs +4 -4
  20. package/es/button/index.mjs +2 -2
  21. package/es/calendar/Calendar.mjs +12 -9
  22. package/es/calendar/CalendarDay.mjs +2 -2
  23. package/es/calendar/CalendarHeader.mjs +2 -2
  24. package/es/calendar/CalendarMonth.mjs +6 -6
  25. package/es/calendar/index.mjs +2 -2
  26. package/es/calendar/utils.mjs +1 -1
  27. package/es/card/Card.mjs +3 -3
  28. package/es/card/index.mjs +2 -2
  29. package/es/cascader/Cascader.mjs +4 -4
  30. package/es/cascader/index.mjs +2 -2
  31. package/es/cell/Cell.mjs +3 -3
  32. package/es/cell/index.mjs +2 -2
  33. package/es/cell-group/CellGroup.mjs +1 -1
  34. package/es/cell-group/index.mjs +2 -2
  35. package/es/checkbox/Checkbox.mjs +4 -4
  36. package/es/checkbox/Checker.mjs +2 -2
  37. package/es/checkbox/index.mjs +2 -2
  38. package/es/checkbox-group/CheckboxGroup.mjs +2 -2
  39. package/es/checkbox-group/index.mjs +2 -2
  40. package/es/circle/Circle.mjs +1 -1
  41. package/es/circle/index.mjs +2 -2
  42. package/es/col/Col.mjs +2 -2
  43. package/es/col/index.mjs +2 -2
  44. package/es/collapse/Collapse.mjs +1 -1
  45. package/es/collapse/index.mjs +2 -2
  46. package/es/collapse-item/CollapseItem.mjs +6 -6
  47. package/es/collapse-item/index.mjs +2 -2
  48. package/es/composables/use-expose.mjs +1 -1
  49. package/es/composables/use-lock-scroll.mjs +2 -2
  50. package/es/composables/use-placeholder.mjs +1 -1
  51. package/es/composables/use-visibility-change.mjs +1 -1
  52. package/es/config-provider/ConfigProvider.mjs +1 -1
  53. package/es/config-provider/index.mjs +2 -2
  54. package/es/contact-card/ContactCard.mjs +2 -2
  55. package/es/contact-card/index.mjs +2 -2
  56. package/es/contact-edit/ContactEdit.mjs +6 -6
  57. package/es/contact-edit/index.mjs +2 -2
  58. package/es/contact-list/ContactList.mjs +7 -7
  59. package/es/contact-list/index.mjs +2 -2
  60. package/es/count-down/CountDown.mjs +3 -3
  61. package/es/count-down/index.mjs +2 -2
  62. package/es/count-down/utils.mjs +1 -1
  63. package/es/coupon/Coupon.mjs +3 -3
  64. package/es/coupon/index.mjs +2 -2
  65. package/es/coupon/utils.mjs +1 -1
  66. package/es/coupon-cell/CouponCell.mjs +2 -2
  67. package/es/coupon-cell/index.mjs +2 -2
  68. package/es/coupon-list/CouponList.mjs +8 -8
  69. package/es/coupon-list/index.mjs +2 -2
  70. package/es/datetime-picker/DatePicker.mjs +4 -4
  71. package/es/datetime-picker/DatetimePicker.mjs +4 -4
  72. package/es/datetime-picker/TimePicker.mjs +4 -4
  73. package/es/datetime-picker/index.mjs +2 -2
  74. package/es/datetime-picker/utils.mjs +2 -2
  75. package/es/dialog/Dialog.d.ts +8 -0
  76. package/es/dialog/Dialog.mjs +12 -6
  77. package/es/dialog/function-call.d.ts +10 -0
  78. package/es/dialog/function-call.mjs +5 -3
  79. package/es/dialog/index.mjs +1 -1
  80. package/es/dialog/types.d.ts +3 -1
  81. package/es/divider/Divider.mjs +1 -1
  82. package/es/divider/index.mjs +2 -2
  83. package/es/dropdown-item/DropdownItem.mjs +6 -6
  84. package/es/dropdown-item/index.mjs +2 -2
  85. package/es/dropdown-menu/DropdownMenu.mjs +2 -2
  86. package/es/dropdown-menu/index.mjs +2 -2
  87. package/es/empty/Empty.mjs +2 -2
  88. package/es/empty/index.mjs +2 -2
  89. package/es/field/Field.mjs +7 -7
  90. package/es/field/index.mjs +2 -2
  91. package/es/field/utils.mjs +1 -1
  92. package/es/form/Form.mjs +2 -2
  93. package/es/form/index.mjs +2 -2
  94. package/es/grid/Grid.mjs +2 -2
  95. package/es/grid/index.mjs +2 -2
  96. package/es/grid-item/GridItem.mjs +5 -5
  97. package/es/grid-item/index.mjs +2 -2
  98. package/es/icon/Icon.mjs +3 -3
  99. package/es/icon/index.mjs +2 -2
  100. package/es/image/Image.mjs +2 -2
  101. package/es/image/index.mjs +2 -2
  102. package/es/image-preview/ImagePreview.mjs +6 -6
  103. package/es/image-preview/ImagePreviewItem.mjs +5 -5
  104. package/es/image-preview/function-call.mjs +3 -3
  105. package/es/image-preview/index.mjs +1 -1
  106. package/es/index-anchor/IndexAnchor.mjs +4 -4
  107. package/es/index-anchor/index.mjs +2 -2
  108. package/es/index-bar/IndexBar.mjs +3 -3
  109. package/es/index-bar/index.mjs +2 -2
  110. package/es/index.d.ts +1 -1
  111. package/es/index.mjs +172 -172
  112. package/es/lazyload/index.mjs +1 -1
  113. package/es/lazyload/vue-lazyload/index.mjs +4 -4
  114. package/es/lazyload/vue-lazyload/lazy-container.mjs +1 -1
  115. package/es/lazyload/vue-lazyload/lazy-image.mjs +2 -2
  116. package/es/lazyload/vue-lazyload/lazy.mjs +3 -3
  117. package/es/lazyload/vue-lazyload/listener.mjs +2 -2
  118. package/es/list/List.mjs +4 -4
  119. package/es/list/index.mjs +2 -2
  120. package/es/loading/Loading.mjs +1 -1
  121. package/es/loading/index.mjs +2 -2
  122. package/es/locale/index.mjs +2 -2
  123. package/es/nav-bar/NavBar.mjs +3 -3
  124. package/es/nav-bar/index.mjs +2 -2
  125. package/es/notice-bar/NoticeBar.mjs +4 -4
  126. package/es/notice-bar/index.mjs +2 -2
  127. package/es/notify/Notify.mjs +3 -3
  128. package/es/notify/function-call.mjs +3 -3
  129. package/es/notify/index.mjs +1 -1
  130. package/es/number-keyboard/NumberKeyboard.mjs +2 -2
  131. package/es/number-keyboard/NumberKeyboardKey.mjs +3 -3
  132. package/es/number-keyboard/index.mjs +2 -2
  133. package/es/overlay/Overlay.mjs +2 -2
  134. package/es/overlay/index.mjs +2 -2
  135. package/es/pagination/Pagination.mjs +1 -1
  136. package/es/pagination/index.mjs +2 -2
  137. package/es/password-input/PasswordInput.mjs +1 -1
  138. package/es/password-input/index.mjs +2 -2
  139. package/es/picker/Picker.mjs +5 -5
  140. package/es/picker/PickerColumn.mjs +6 -4
  141. package/es/picker/index.mjs +2 -2
  142. package/es/popover/Popover.mjs +3 -3
  143. package/es/popover/index.mjs +2 -2
  144. package/es/popup/Popup.mjs +9 -9
  145. package/es/popup/index.mjs +2 -2
  146. package/es/popup/shared.mjs +1 -1
  147. package/es/progress/Progress.mjs +1 -1
  148. package/es/progress/index.mjs +2 -2
  149. package/es/pull-refresh/PullRefresh.d.ts +2 -1
  150. package/es/pull-refresh/PullRefresh.mjs +8 -4
  151. package/es/pull-refresh/index.d.ts +2 -1
  152. package/es/pull-refresh/index.mjs +2 -2
  153. package/es/radio/Radio.mjs +3 -3
  154. package/es/radio/index.mjs +2 -2
  155. package/es/radio-group/RadioGroup.mjs +1 -1
  156. package/es/radio-group/index.mjs +2 -2
  157. package/es/rate/Rate.mjs +4 -4
  158. package/es/rate/index.mjs +2 -2
  159. package/es/row/Row.mjs +1 -1
  160. package/es/row/index.mjs +2 -2
  161. package/es/search/Search.mjs +5 -5
  162. package/es/search/index.mjs +2 -2
  163. package/es/share-sheet/ShareSheet.mjs +4 -4
  164. package/es/share-sheet/index.mjs +2 -2
  165. package/es/sidebar/Sidebar.mjs +1 -1
  166. package/es/sidebar/index.mjs +2 -2
  167. package/es/sidebar-item/SidebarItem.mjs +4 -4
  168. package/es/sidebar-item/index.mjs +2 -2
  169. package/es/skeleton/Skeleton.mjs +1 -1
  170. package/es/skeleton/index.mjs +2 -2
  171. package/es/slider/Slider.mjs +2 -2
  172. package/es/slider/index.mjs +2 -2
  173. package/es/step/Step.mjs +3 -3
  174. package/es/step/index.mjs +2 -2
  175. package/es/stepper/Stepper.mjs +1 -1
  176. package/es/stepper/index.mjs +2 -2
  177. package/es/steps/Steps.mjs +1 -1
  178. package/es/steps/index.mjs +2 -2
  179. package/es/sticky/Sticky.mjs +2 -2
  180. package/es/sticky/index.mjs +2 -2
  181. package/es/submit-bar/SubmitBar.mjs +3 -3
  182. package/es/submit-bar/index.mjs +2 -2
  183. package/es/swipe/Swipe.mjs +4 -4
  184. package/es/swipe/index.mjs +2 -2
  185. package/es/swipe-cell/SwipeCell.mjs +3 -3
  186. package/es/swipe-cell/index.mjs +2 -2
  187. package/es/swipe-item/SwipeItem.mjs +3 -3
  188. package/es/swipe-item/index.mjs +2 -2
  189. package/es/switch/Switch.mjs +4 -3
  190. package/es/switch/index.mjs +2 -2
  191. package/es/tab/Tab.mjs +7 -7
  192. package/es/tab/index.mjs +2 -2
  193. package/es/tabbar/Tabbar.mjs +2 -2
  194. package/es/tabbar/index.mjs +2 -2
  195. package/es/tabbar-item/TabbarItem.mjs +5 -5
  196. package/es/tabbar-item/index.mjs +2 -2
  197. package/es/tabs/Tabs.mjs +10 -10
  198. package/es/tabs/TabsContent.mjs +2 -2
  199. package/es/tabs/TabsTitle.mjs +2 -2
  200. package/es/tabs/index.mjs +2 -2
  201. package/es/tabs/utils.mjs +1 -1
  202. package/es/tag/Tag.mjs +2 -2
  203. package/es/tag/index.mjs +2 -2
  204. package/es/toast/Toast.mjs +5 -5
  205. package/es/toast/function-call.d.ts +5 -6
  206. package/es/toast/function-call.mjs +3 -3
  207. package/es/toast/index.mjs +1 -1
  208. package/es/toast/types.d.ts +10 -1
  209. package/es/tree-select/TreeSelect.mjs +4 -4
  210. package/es/tree-select/index.mjs +2 -2
  211. package/es/uploader/Uploader.d.ts +3 -3
  212. package/es/uploader/Uploader.mjs +6 -6
  213. package/es/uploader/UploaderPreviewItem.mjs +5 -5
  214. package/es/uploader/index.d.ts +2 -2
  215. package/es/uploader/index.mjs +2 -2
  216. package/es/uploader/utils.mjs +1 -1
  217. package/es/utils/create.mjs +4 -4
  218. package/es/utils/deep-assign.mjs +1 -1
  219. package/es/utils/deep-clone.mjs +1 -1
  220. package/es/utils/dom.mjs +1 -1
  221. package/es/utils/format.mjs +3 -3
  222. package/es/utils/index.mjs +9 -9
  223. package/es/utils/interceptor.mjs +2 -2
  224. package/es/utils/mount-component.mjs +2 -2
  225. package/es/utils/validate.mjs +1 -1
  226. package/es/utils/with-install.mjs +1 -1
  227. package/lib/calendar/Calendar.js +3 -0
  228. package/lib/dialog/Dialog.d.ts +8 -0
  229. package/lib/dialog/Dialog.js +6 -0
  230. package/lib/dialog/function-call.d.ts +10 -0
  231. package/lib/dialog/function-call.js +2 -0
  232. package/lib/dialog/types.d.ts +3 -1
  233. package/lib/index.d.ts +1 -1
  234. package/lib/index.js +1 -1
  235. package/lib/picker/Picker.js +1 -1
  236. package/lib/picker/PickerColumn.js +2 -0
  237. package/lib/popup/Popup.js +1 -1
  238. package/lib/pull-refresh/PullRefresh.d.ts +2 -1
  239. package/lib/pull-refresh/PullRefresh.js +5 -1
  240. package/lib/pull-refresh/index.d.ts +2 -1
  241. package/lib/switch/Switch.js +2 -1
  242. package/lib/toast/function-call.d.ts +5 -6
  243. package/lib/toast/types.d.ts +10 -1
  244. package/lib/uploader/Uploader.d.ts +3 -3
  245. package/lib/uploader/index.d.ts +2 -2
  246. package/lib/vant.cjs.js +23 -5
  247. package/lib/vant.cjs.min.js +1 -1
  248. package/lib/vant.es.js +23 -5
  249. package/lib/vant.es.min.js +23 -5
  250. package/lib/vant.js +23 -5
  251. package/lib/vant.min.js +1 -1
  252. package/package.json +3 -3
  253. package/vetur/attributes.json +398 -390
  254. package/vetur/tags.json +140 -138
  255. package/vetur/web-types.json +1526 -1493
@@ -1,12 +1,12 @@
1
1
  import { createVNode as _createVNode, mergeProps as _mergeProps } from "vue";
2
2
  import { ref, reactive, defineComponent, onBeforeUnmount } from "vue";
3
- import { pick, extend, toArray, isPromise, truthProp, getSizeStyle, makeArrayProp, makeStringProp, makeNumericProp } from "../utils";
4
- import { bem, name, isOversize, filterFiles, isImageFile, readFileContent } from "./utils";
3
+ import { pick, extend, toArray, isPromise, truthProp, getSizeStyle, makeArrayProp, makeStringProp, makeNumericProp } from "../utils/index.mjs";
4
+ import { bem, name, isOversize, filterFiles, isImageFile, readFileContent } from "./utils.mjs";
5
5
  import { useCustomFieldValue } from "@vant/use";
6
- import { useExpose } from "../composables/use-expose";
7
- import { Icon } from "../icon";
8
- import { ImagePreview } from "../image-preview";
9
- import UploaderPreviewItem from "./UploaderPreviewItem";
6
+ import { useExpose } from "../composables/use-expose.mjs";
7
+ import { Icon } from "../icon/index.mjs";
8
+ import { ImagePreview } from "../image-preview/index.mjs";
9
+ import UploaderPreviewItem from "./UploaderPreviewItem.mjs";
10
10
  const uploaderProps = {
11
11
  name: makeNumericProp(""),
12
12
  accept: makeStringProp("image/*"),
@@ -1,10 +1,10 @@
1
1
  import { createVNode as _createVNode } from "vue";
2
2
  import { defineComponent } from "vue";
3
- import { t, bem, isImageFile } from "./utils";
4
- import { isDef, extend, numericProp, getSizeStyle, callInterceptor, makeRequiredProp } from "../utils";
5
- import { Icon } from "../icon";
6
- import { Image } from "../image";
7
- import { Loading } from "../loading";
3
+ import { t, bem, isImageFile } from "./utils.mjs";
4
+ import { isDef, extend, numericProp, getSizeStyle, callInterceptor, makeRequiredProp } from "../utils/index.mjs";
5
+ import { Icon } from "../icon/index.mjs";
6
+ import { Image } from "../image/index.mjs";
7
+ import { Loading } from "../loading/index.mjs";
8
8
  var stdin_default = defineComponent({
9
9
  props: {
10
10
  name: numericProp,
@@ -50,7 +50,7 @@ export declare const Uploader: import("../utils").WithInstall<import("vue").Defi
50
50
  type: BooleanConstructor;
51
51
  default: true;
52
52
  };
53
- previewOptions: import("vue").PropType<import("..").ImagePreviewOptions>;
53
+ previewOptions: import("vue").PropType<Partial<import("..").ImagePreviewOptions>>;
54
54
  previewFullImage: {
55
55
  type: BooleanConstructor;
56
56
  default: true;
@@ -110,7 +110,7 @@ export declare const Uploader: import("../utils").WithInstall<import("vue").Defi
110
110
  type: BooleanConstructor;
111
111
  default: true;
112
112
  };
113
- previewOptions: import("vue").PropType<import("..").ImagePreviewOptions>;
113
+ previewOptions: import("vue").PropType<Partial<import("..").ImagePreviewOptions>>;
114
114
  previewFullImage: {
115
115
  type: BooleanConstructor;
116
116
  default: true;
@@ -1,5 +1,5 @@
1
- import { withInstall } from "../utils";
2
- import _Uploader from "./Uploader";
1
+ import { withInstall } from "../utils/index.mjs";
2
+ import _Uploader from "./Uploader.mjs";
3
3
  const Uploader = withInstall(_Uploader);
4
4
  var stdin_default = Uploader;
5
5
  export {
@@ -1,4 +1,4 @@
1
- import { toArray, createNamespace, isFunction } from "../utils";
1
+ import { toArray, createNamespace, isFunction } from "../utils/index.mjs";
2
2
  const [name, bem, t] = createNamespace("uploader");
3
3
  function readFileContent(file, resultType) {
4
4
  return new Promise((resolve) => {
@@ -1,7 +1,7 @@
1
- import { get } from "./basic";
2
- import { camelize } from "./format";
3
- import { isFunction } from "./validate";
4
- import locale from "../locale";
1
+ import { get } from "./basic.mjs";
2
+ import { camelize } from "./format.mjs";
3
+ import { isFunction } from "./validate.mjs";
4
+ import locale from "../locale/index.mjs";
5
5
  function createTranslate(name) {
6
6
  const prefix = camelize(name) + ".";
7
7
  return (path, ...args) => {
@@ -1,4 +1,4 @@
1
- import { isDef, isObject } from "./validate";
1
+ import { isDef, isObject } from "./validate.mjs";
2
2
  const { hasOwnProperty } = Object.prototype;
3
3
  function assignKey(to, from, key) {
4
4
  const val = from[key];
@@ -1,4 +1,4 @@
1
- import { isDef, isObject } from "./validate";
1
+ import { isDef, isObject } from "./validate.mjs";
2
2
  function deepClone(obj) {
3
3
  if (!isDef(obj)) {
4
4
  return obj;
package/es/utils/dom.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { useRect, useWindowSize } from "@vant/use";
2
2
  import { unref } from "vue";
3
- import { isIOS as checkIsIOS } from "./validate";
3
+ import { isIOS as checkIsIOS } from "./validate.mjs";
4
4
  function getScrollTop(el) {
5
5
  const top = "scrollTop" in el ? el.scrollTop : el.pageYOffset;
6
6
  return Math.max(top, 0);
@@ -1,6 +1,6 @@
1
- import { inBrowser } from "./basic";
2
- import { windowWidth, windowHeight } from "./dom";
3
- import { isDef, isNumeric } from "./validate";
1
+ import { inBrowser } from "./basic.mjs";
2
+ import { windowWidth, windowHeight } from "./dom.mjs";
3
+ import { isDef, isNumeric } from "./validate.mjs";
4
4
  function addUnit(value) {
5
5
  if (isDef(value)) {
6
6
  return isNumeric(value) ? `${value}px` : String(value);
@@ -1,9 +1,9 @@
1
- export * from "./basic";
2
- export * from "./props";
3
- export * from "./dom";
4
- export * from "./create";
5
- export * from "./format";
6
- export * from "./constant";
7
- export * from "./validate";
8
- export * from "./interceptor";
9
- export * from "./with-install";
1
+ export * from "./basic.mjs";
2
+ export * from "./props.mjs";
3
+ export * from "./dom.mjs";
4
+ export * from "./create.mjs";
5
+ export * from "./format.mjs";
6
+ export * from "./constant.mjs";
7
+ export * from "./validate.mjs";
8
+ export * from "./interceptor.mjs";
9
+ export * from "./with-install.mjs";
@@ -1,5 +1,5 @@
1
- import { noop } from "./basic";
2
- import { isPromise } from "./validate";
1
+ import { noop } from "./basic.mjs";
2
+ import { isPromise } from "./validate.mjs";
3
3
  function callInterceptor(interceptor, {
4
4
  args = [],
5
5
  done,
@@ -1,6 +1,6 @@
1
1
  import { createApp, reactive } from "vue";
2
- import { extend } from "../utils";
3
- import { useExpose } from "../composables/use-expose";
2
+ import { extend } from "../utils/index.mjs";
3
+ import { useExpose } from "../composables/use-expose.mjs";
4
4
  function usePopupState() {
5
5
  const state = reactive({
6
6
  show: false
@@ -1,4 +1,4 @@
1
- import { inBrowser } from "./basic";
1
+ import { inBrowser } from "./basic.mjs";
2
2
  const isDef = (val) => val !== void 0 && val !== null;
3
3
  const isFunction = (val) => typeof val === "function";
4
4
  const isObject = (val) => val !== null && typeof val === "object";
@@ -1,4 +1,4 @@
1
- import { camelize } from "./format";
1
+ import { camelize } from "./format.mjs";
2
2
  function withInstall(options) {
3
3
  options.install = (app) => {
4
4
  const { name } = options;
@@ -137,6 +137,9 @@ var stdin_default = (0, import_vue2.defineComponent)({
137
137
  const months = (0, import_vue2.computed)(() => {
138
138
  const months2 = [];
139
139
  const cursor = new Date(props.minDate);
140
+ if (props.lazyRender && !props.show && props.poppable) {
141
+ return months2;
142
+ }
140
143
  cursor.setDate(1);
141
144
  do {
142
145
  months2.push(new Date(cursor));
@@ -45,8 +45,10 @@ declare const dialogProps: {
45
45
  showCancelButton: BooleanConstructor;
46
46
  cancelButtonText: StringConstructor;
47
47
  cancelButtonColor: StringConstructor;
48
+ cancelButtonDisabled: BooleanConstructor;
48
49
  confirmButtonText: StringConstructor;
49
50
  confirmButtonColor: StringConstructor;
51
+ confirmButtonDisabled: BooleanConstructor;
50
52
  showConfirmButton: {
51
53
  type: BooleanConstructor;
52
54
  default: true;
@@ -99,8 +101,10 @@ declare const _default: import("vue").DefineComponent<{
99
101
  showCancelButton: BooleanConstructor;
100
102
  cancelButtonText: StringConstructor;
101
103
  cancelButtonColor: StringConstructor;
104
+ cancelButtonDisabled: BooleanConstructor;
102
105
  confirmButtonText: StringConstructor;
103
106
  confirmButtonColor: StringConstructor;
107
+ confirmButtonDisabled: BooleanConstructor;
104
108
  showConfirmButton: {
105
109
  type: BooleanConstructor;
106
110
  default: true;
@@ -151,8 +155,10 @@ declare const _default: import("vue").DefineComponent<{
151
155
  showCancelButton: BooleanConstructor;
152
156
  cancelButtonText: StringConstructor;
153
157
  cancelButtonColor: StringConstructor;
158
+ cancelButtonDisabled: BooleanConstructor;
154
159
  confirmButtonText: StringConstructor;
155
160
  confirmButtonColor: StringConstructor;
161
+ confirmButtonDisabled: BooleanConstructor;
156
162
  showConfirmButton: {
157
163
  type: BooleanConstructor;
158
164
  default: true;
@@ -174,6 +180,8 @@ declare const _default: import("vue").DefineComponent<{
174
180
  closeOnPopstate: boolean;
175
181
  allowHtml: boolean;
176
182
  showCancelButton: boolean;
183
+ cancelButtonDisabled: boolean;
184
+ confirmButtonDisabled: boolean;
177
185
  showConfirmButton: boolean;
178
186
  }>;
179
187
  export default _default;
@@ -43,8 +43,10 @@ const dialogProps = (0, import_utils.extend)({}, import_shared.popupSharedProps,
43
43
  showCancelButton: Boolean,
44
44
  cancelButtonText: String,
45
45
  cancelButtonColor: String,
46
+ cancelButtonDisabled: Boolean,
46
47
  confirmButtonText: String,
47
48
  confirmButtonColor: String,
49
+ confirmButtonDisabled: Boolean,
48
50
  showConfirmButton: import_utils.truthProp,
49
51
  closeOnClickOverlay: Boolean
50
52
  });
@@ -165,6 +167,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
165
167
  color: props.cancelButtonColor
166
168
  },
167
169
  "loading": loading.cancel,
170
+ "disabled": props.cancelButtonDisabled,
168
171
  "onClick": onCancel
169
172
  }, null), props.showConfirmButton && (0, import_vue.createVNode)(import_button.Button, {
170
173
  "size": "large",
@@ -176,6 +179,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
176
179
  color: props.confirmButtonColor
177
180
  },
178
181
  "loading": loading.confirm,
182
+ "disabled": props.confirmButtonDisabled,
179
183
  "onClick": onConfirm
180
184
  }, null)]);
181
185
  const renderRoundButtons = () => (0, import_vue.createVNode)(import_action_bar.ActionBar, {
@@ -187,6 +191,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
187
191
  "class": bem("cancel"),
188
192
  "color": props.cancelButtonColor,
189
193
  "loading": loading.cancel,
194
+ "disabled": props.cancelButtonDisabled,
190
195
  "onClick": onCancel
191
196
  }, null), props.showConfirmButton && (0, import_vue.createVNode)(import_action_bar_button.ActionBarButton, {
192
197
  "type": "danger",
@@ -194,6 +199,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
194
199
  "class": bem("confirm"),
195
200
  "color": props.confirmButtonColor,
196
201
  "loading": loading.confirm,
202
+ "disabled": props.confirmButtonDisabled,
197
203
  "onClick": onConfirm
198
204
  }, null)]
199
205
  });
@@ -20,8 +20,10 @@ declare namespace Dialog {
20
20
  messageAlign: string;
21
21
  cancelButtonText: string;
22
22
  cancelButtonColor: null;
23
+ cancelButtonDisabled: boolean;
23
24
  confirmButtonText: string;
24
25
  confirmButtonColor: null;
26
+ confirmButtonDisabled: boolean;
25
27
  showConfirmButton: boolean;
26
28
  showCancelButton: boolean;
27
29
  closeOnPopstate: boolean;
@@ -45,8 +47,10 @@ declare namespace Dialog {
45
47
  messageAlign: string;
46
48
  cancelButtonText: string;
47
49
  cancelButtonColor: null;
50
+ cancelButtonDisabled: boolean;
48
51
  confirmButtonText: string;
49
52
  confirmButtonColor: null;
53
+ confirmButtonDisabled: boolean;
50
54
  showConfirmButton: boolean;
51
55
  showCancelButton: boolean;
52
56
  closeOnPopstate: boolean;
@@ -102,8 +106,10 @@ declare namespace Dialog {
102
106
  showCancelButton: BooleanConstructor;
103
107
  cancelButtonText: StringConstructor;
104
108
  cancelButtonColor: StringConstructor;
109
+ cancelButtonDisabled: BooleanConstructor;
105
110
  confirmButtonText: StringConstructor;
106
111
  confirmButtonColor: StringConstructor;
112
+ confirmButtonDisabled: BooleanConstructor;
107
113
  showConfirmButton: {
108
114
  type: BooleanConstructor;
109
115
  default: true;
@@ -154,8 +160,10 @@ declare namespace Dialog {
154
160
  showCancelButton: BooleanConstructor;
155
161
  cancelButtonText: StringConstructor;
156
162
  cancelButtonColor: StringConstructor;
163
+ cancelButtonDisabled: BooleanConstructor;
157
164
  confirmButtonText: StringConstructor;
158
165
  confirmButtonColor: StringConstructor;
166
+ confirmButtonDisabled: BooleanConstructor;
159
167
  showConfirmButton: {
160
168
  type: BooleanConstructor;
161
169
  default: true;
@@ -177,6 +185,8 @@ declare namespace Dialog {
177
185
  closeOnPopstate: boolean;
178
186
  allowHtml: boolean;
179
187
  showCancelButton: boolean;
188
+ cancelButtonDisabled: boolean;
189
+ confirmButtonDisabled: boolean;
180
190
  showConfirmButton: boolean;
181
191
  }>>;
182
192
  var install: (app: App<any>) => void;
@@ -77,8 +77,10 @@ Dialog.defaultOptions = {
77
77
  messageAlign: "",
78
78
  cancelButtonText: "",
79
79
  cancelButtonColor: null,
80
+ cancelButtonDisabled: false,
80
81
  confirmButtonText: "",
81
82
  confirmButtonColor: null,
83
+ confirmButtonDisabled: false,
82
84
  showConfirmButton: true,
83
85
  showCancelButton: false,
84
86
  closeOnPopstate: true,
@@ -21,12 +21,14 @@ export declare type DialogOptions = {
21
21
  overlayClass?: string;
22
22
  overlayStyle?: CSSProperties;
23
23
  closeOnPopstate?: boolean;
24
- cancelButtonText?: string;
25
24
  showCancelButton?: boolean;
26
25
  showConfirmButton?: boolean;
26
+ cancelButtonText?: string;
27
27
  cancelButtonColor?: string;
28
+ cancelButtonDisabled?: boolean;
28
29
  confirmButtonText?: string;
29
30
  confirmButtonColor?: string;
31
+ confirmButtonDisabled?: boolean;
30
32
  closeOnClickOverlay?: boolean;
31
33
  };
32
34
  declare module '@vue/runtime-core' {
package/lib/index.d.ts CHANGED
@@ -90,4 +90,4 @@ declare namespace _default {
90
90
  }
91
91
  export default _default;
92
92
  export function install(app: any): void;
93
- export const version: "3.5.0-beta.0";
93
+ export const version: "3.5.1";
package/lib/index.js CHANGED
@@ -194,7 +194,7 @@ __reExport(stdin_exports, require("./tag"), module.exports);
194
194
  __reExport(stdin_exports, require("./toast"), module.exports);
195
195
  __reExport(stdin_exports, require("./tree-select"), module.exports);
196
196
  __reExport(stdin_exports, require("./uploader"), module.exports);
197
- const version = "3.5.0-beta.0";
197
+ const version = "3.5.1";
198
198
  function install(app) {
199
199
  const components = [
200
200
  import_action_bar.ActionBar,
@@ -136,7 +136,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
136
136
  } else {
137
137
  formattedColumns.value = columns;
138
138
  }
139
- hasOptions.value = formattedColumns.value.some((item) => item[columnsFieldNames.value.values] && item[columnsFieldNames.value.values].length !== 0);
139
+ hasOptions.value = formattedColumns.value.some((item) => item[columnsFieldNames.value.values] && item[columnsFieldNames.value.values].length !== 0) || children.some((item) => item.hasOptions);
140
140
  };
141
141
  const getIndexes = () => children.map((child) => child.state.index);
142
142
  const setColumnValues = (index, options) => {
@@ -225,6 +225,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
225
225
  }
226
226
  };
227
227
  const getValue = () => state.options[state.index];
228
+ const hasOptions = () => state.options.length;
228
229
  setIndex(state.index);
229
230
  (0, import_use.useParent)(PICKER_KEY);
230
231
  (0, import_use_expose.useExpose)({
@@ -233,6 +234,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
233
234
  getValue,
234
235
  setValue,
235
236
  setOptions,
237
+ hasOptions,
236
238
  stopMomentum
237
239
  });
238
240
  (0, import_vue2.watch)(() => props.initialOptions, setOptions);
@@ -204,7 +204,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
204
204
  }
205
205
  });
206
206
  (0, import_vue2.onDeactivated)(() => {
207
- if (props.show) {
207
+ if (props.show && props.teleport) {
208
208
  close();
209
209
  shouldReopen = true;
210
210
  }
@@ -41,7 +41,7 @@ declare const _default: import("vue").DefineComponent<{
41
41
  type: (NumberConstructor | StringConstructor)[];
42
42
  default: number;
43
43
  };
44
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "refresh")[], "update:modelValue" | "refresh", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
44
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change" | "refresh")[], "update:modelValue" | "change" | "refresh", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
45
45
  disabled: BooleanConstructor;
46
46
  modelValue: BooleanConstructor;
47
47
  headHeight: {
@@ -62,6 +62,7 @@ declare const _default: import("vue").DefineComponent<{
62
62
  default: number;
63
63
  };
64
64
  }>> & {
65
+ onChange?: ((...args: any[]) => any) | undefined;
65
66
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
66
67
  onRefresh?: ((...args: any[]) => any) | undefined;
67
68
  }, {
@@ -44,7 +44,7 @@ const pullRefreshProps = {
44
44
  var stdin_default = (0, import_vue2.defineComponent)({
45
45
  name,
46
46
  props: pullRefreshProps,
47
- emits: ["refresh", "update:modelValue"],
47
+ emits: ["change", "refresh", "update:modelValue"],
48
48
  setup(props, {
49
49
  emit,
50
50
  slots
@@ -89,6 +89,10 @@ var stdin_default = (0, import_vue2.defineComponent)({
89
89
  } else {
90
90
  state.status = "loosing";
91
91
  }
92
+ emit("change", {
93
+ status: state.status,
94
+ distance
95
+ });
92
96
  };
93
97
  const getStatusText = () => {
94
98
  const {
@@ -18,7 +18,7 @@ export declare const PullRefresh: import("../utils").WithInstall<import("vue").D
18
18
  type: (NumberConstructor | StringConstructor)[];
19
19
  default: number;
20
20
  };
21
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "refresh")[], "update:modelValue" | "refresh", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
21
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change" | "refresh")[], "update:modelValue" | "change" | "refresh", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
22
22
  disabled: BooleanConstructor;
23
23
  modelValue: BooleanConstructor;
24
24
  headHeight: {
@@ -39,6 +39,7 @@ export declare const PullRefresh: import("../utils").WithInstall<import("vue").D
39
39
  default: number;
40
40
  };
41
41
  }>> & {
42
+ onChange?: ((...args: any[]) => any) | undefined;
42
43
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
43
44
  onRefresh?: ((...args: any[]) => any) | undefined;
44
45
  }, {
@@ -72,6 +72,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
72
72
  };
73
73
  (0, import_use.useCustomFieldValue)(() => props.modelValue);
74
74
  return () => {
75
+ var _a;
75
76
  const {
76
77
  size,
77
78
  loading,
@@ -97,7 +98,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
97
98
  "onClick": onClick
98
99
  }, [(0, import_vue.createVNode)("div", {
99
100
  "class": bem("node")
100
- }, [renderLoading()])]);
101
+ }, [renderLoading()]), (_a = slots.background) == null ? void 0 : _a.call(slots)]);
101
102
  };
102
103
  }
103
104
  });
@@ -1,11 +1,10 @@
1
1
  import { type App } from 'vue';
2
- import { type ComponentInstance } from '../utils';
3
- import type { ToastType, ToastOptions } from './types';
4
- declare function Toast(options?: string | ToastOptions): ComponentInstance;
2
+ import type { ToastType, ToastOptions, ToastWrapperInstance } from './types';
3
+ declare function Toast(options?: string | ToastOptions): ToastWrapperInstance;
5
4
  declare namespace Toast {
6
- var loading: (options: string | ToastOptions) => ComponentInstance;
7
- var success: (options: string | ToastOptions) => ComponentInstance;
8
- var fail: (options: string | ToastOptions) => ComponentInstance;
5
+ var loading: (options: string | ToastOptions) => ToastWrapperInstance;
6
+ var success: (options: string | ToastOptions) => ToastWrapperInstance;
7
+ var fail: (options: string | ToastOptions) => ToastWrapperInstance;
9
8
  var clear: (all?: boolean | undefined) => void;
10
9
  var setDefaultOptions: {
11
10
  (options: ToastOptions): void;
@@ -1,5 +1,5 @@
1
1
  import { Toast } from './function-call';
2
- import type { TeleportProps } from 'vue';
2
+ import type { ComponentPublicInstance, TeleportProps } from 'vue';
3
3
  import type { LoadingType } from '../loading';
4
4
  import type { Numeric } from '../utils';
5
5
  export declare type ToastType = 'text' | 'loading' | 'success' | 'fail' | 'html';
@@ -31,3 +31,12 @@ declare module '@vue/runtime-core' {
31
31
  $toast: typeof Toast;
32
32
  }
33
33
  }
34
+ export declare type ToastWrapperInstance = ComponentPublicInstance<{
35
+ message: Numeric;
36
+ }, {
37
+ clear: () => void;
38
+ /**
39
+ * @private
40
+ */
41
+ open: (props: Record<string, any>) => void;
42
+ }>;
@@ -54,7 +54,7 @@ declare const uploaderProps: {
54
54
  type: BooleanConstructor;
55
55
  default: true;
56
56
  };
57
- previewOptions: PropType<ImagePreviewOptions>;
57
+ previewOptions: PropType<Partial<ImagePreviewOptions>>;
58
58
  previewFullImage: {
59
59
  type: BooleanConstructor;
60
60
  default: true;
@@ -116,7 +116,7 @@ declare const _default: import("vue").DefineComponent<{
116
116
  type: BooleanConstructor;
117
117
  default: true;
118
118
  };
119
- previewOptions: PropType<ImagePreviewOptions>;
119
+ previewOptions: PropType<Partial<ImagePreviewOptions>>;
120
120
  previewFullImage: {
121
121
  type: BooleanConstructor;
122
122
  default: true;
@@ -176,7 +176,7 @@ declare const _default: import("vue").DefineComponent<{
176
176
  type: BooleanConstructor;
177
177
  default: true;
178
178
  };
179
- previewOptions: PropType<ImagePreviewOptions>;
179
+ previewOptions: PropType<Partial<ImagePreviewOptions>>;
180
180
  previewFullImage: {
181
181
  type: BooleanConstructor;
182
182
  default: true;
@@ -50,7 +50,7 @@ export declare const Uploader: import("../utils").WithInstall<import("vue").Defi
50
50
  type: BooleanConstructor;
51
51
  default: true;
52
52
  };
53
- previewOptions: import("vue").PropType<import("..").ImagePreviewOptions>;
53
+ previewOptions: import("vue").PropType<Partial<import("..").ImagePreviewOptions>>;
54
54
  previewFullImage: {
55
55
  type: BooleanConstructor;
56
56
  default: true;
@@ -110,7 +110,7 @@ export declare const Uploader: import("../utils").WithInstall<import("vue").Defi
110
110
  type: BooleanConstructor;
111
111
  default: true;
112
112
  };
113
- previewOptions: import("vue").PropType<import("..").ImagePreviewOptions>;
113
+ previewOptions: import("vue").PropType<Partial<import("..").ImagePreviewOptions>>;
114
114
  previewFullImage: {
115
115
  type: BooleanConstructor;
116
116
  default: true;