vue-devui 1.5.15-hotfix.2 → 1.5.15-hotfix.4

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.
@@ -3,6 +3,7 @@ export declare type IButtonVariant = 'solid' | 'outline' | 'text';
3
3
  export declare type IButtonColor = 'secondary' | 'primary' | 'danger';
4
4
  export declare type IButtonSize = 'lg' | 'md' | 'sm';
5
5
  export declare type IButtonShape = 'round' | 'circle';
6
+ export declare type IButtonType = 'button' | 'submit' | 'reset';
6
7
  export declare const buttonProps: {
7
8
  readonly variant: {
8
9
  readonly type: PropType<IButtonVariant>;
@@ -30,6 +31,10 @@ export declare const buttonProps: {
30
31
  readonly shape: {
31
32
  readonly type: PropType<IButtonShape>;
32
33
  };
34
+ readonly nativeType: {
35
+ readonly type: PropType<IButtonType>;
36
+ readonly default: "button";
37
+ };
33
38
  };
34
39
  export declare const buttonGroupProps: {
35
40
  readonly size: {
@@ -96,6 +96,10 @@ export declare const paginationProps: {
96
96
  readonly onPageSizeChange: {
97
97
  readonly type: PropType<(v: number) => void>;
98
98
  };
99
+ readonly maxPage: {
100
+ readonly type: NumberConstructor;
101
+ readonly default: 0;
102
+ };
99
103
  };
100
104
  export declare type PaginationProps = ExtractPropTypes<typeof paginationProps>;
101
105
  export interface IPagination {
@@ -94,6 +94,10 @@ declare const _default: import("vue").DefineComponent<{
94
94
  readonly onPageSizeChange: {
95
95
  readonly type: import("vue").PropType<(v: number) => void>;
96
96
  };
97
+ readonly maxPage: {
98
+ readonly type: NumberConstructor;
99
+ readonly default: 0;
100
+ };
97
101
  }, () => JSX.Element | null, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("pageIndexChange" | "pageSizeChange" | "update:pageSize" | "update:pageIndex")[], "pageSizeChange" | "pageIndexChange" | "update:pageSize" | "update:pageIndex", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
98
102
  readonly pageSize: {
99
103
  readonly type: NumberConstructor;
@@ -189,6 +193,10 @@ declare const _default: import("vue").DefineComponent<{
189
193
  readonly onPageSizeChange: {
190
194
  readonly type: import("vue").PropType<(v: number) => void>;
191
195
  };
196
+ readonly maxPage: {
197
+ readonly type: NumberConstructor;
198
+ readonly default: 0;
199
+ };
192
200
  }>> & {
193
201
  onPageSizeChange?: ((...args: any[]) => any) | undefined;
194
202
  "onUpdate:pageIndex"?: ((...args: any[]) => any) | undefined;
@@ -214,5 +222,6 @@ declare const _default: import("vue").DefineComponent<{
214
222
  readonly haveConfigMenu: boolean;
215
223
  readonly autoFixPageIndex: boolean;
216
224
  readonly autoHide: boolean;
225
+ readonly maxPage: number;
217
226
  }>;
218
227
  export default _default;
package/vue-devui.es.js CHANGED
@@ -11760,6 +11760,10 @@ const buttonProps = {
11760
11760
  },
11761
11761
  shape: {
11762
11762
  type: String
11763
+ },
11764
+ nativeType: {
11765
+ type: String,
11766
+ default: "button"
11763
11767
  }
11764
11768
  };
11765
11769
  const buttonGroupProps = {
@@ -11817,7 +11821,8 @@ var DButton = defineComponent({
11817
11821
  const {
11818
11822
  icon: icon2,
11819
11823
  disabled,
11820
- loading: loading2
11824
+ loading: loading2,
11825
+ nativeType
11821
11826
  } = toRefs(props);
11822
11827
  const {
11823
11828
  classes,
@@ -11834,7 +11839,8 @@ var DButton = defineComponent({
11834
11839
  return createVNode("button", {
11835
11840
  "class": classes.value,
11836
11841
  "disabled": disabled.value,
11837
- "onClick": onClick
11842
+ "onClick": onClick,
11843
+ "type": nativeType.value
11838
11844
  }, [icon2.value && createVNode(DIcon, {
11839
11845
  "name": icon2.value,
11840
11846
  "size": "var(--devui-font-size, 12px)",
@@ -26128,14 +26134,17 @@ var ToolbarItem = defineComponent({
26128
26134
  };
26129
26135
  return () => createVNode(Fragment, null, [config.type === "button" && createVNode(Tooltip, {
26130
26136
  "position": ["top", "bottom"],
26131
- "content": getTooltipContent(config.name, config.shortKey),
26132
26137
  "hide-after": 1e3
26133
26138
  }, {
26134
- default: () => [createVNode("span", {
26139
+ default: () => createVNode("span", {
26135
26140
  "class": "md-toolbar-item",
26136
26141
  "onClick": onToolbarItemClick,
26137
26142
  "innerHTML": config.id === "fullscreen" ? showFullscreen.value ? config.exitIcon : config.icon : config.icon
26138
- }, null)]
26143
+ }, null),
26144
+ content: () => createVNode("span", {
26145
+ "class": "md-toolbar-tip-content",
26146
+ "innerHTML": getTooltipContent(config.name, config.shortKey)
26147
+ }, null)
26139
26148
  }), config.type === "dropDown" && createVNode(Dropdown$1, {
26140
26149
  "position": ["bottom-start"],
26141
26150
  "align": "start"
@@ -26145,14 +26154,18 @@ var ToolbarItem = defineComponent({
26145
26154
  "content": getTooltipContent(config.name),
26146
26155
  "hide-after": 1e3
26147
26156
  }, {
26148
- default: () => [createVNode("span", {
26157
+ default: () => createVNode("span", {
26149
26158
  "class": "md-toolbar-item",
26150
26159
  "onClick": () => {
26151
26160
  var _a;
26152
26161
  return (_a = config.handler) == null ? void 0 : _a.call(config);
26153
26162
  },
26154
26163
  "innerHTML": config.icon
26155
- }, null)]
26164
+ }, null),
26165
+ content: () => createVNode("span", {
26166
+ "class": "md-toolbar-tip-content",
26167
+ "innerHTML": getTooltipContent(config.name)
26168
+ }, null)
26156
26169
  })]),
26157
26170
  menu: () => createVNode(Fragment, null, [config.component === "FontSize" && createVNode(FontSize, null, null), config.component === "FontColor" && createVNode(FontColor, null, null)])
26158
26171
  })]);
@@ -32879,6 +32892,10 @@ const paginationProps = {
32879
32892
  },
32880
32893
  onPageSizeChange: {
32881
32894
  type: Function
32895
+ },
32896
+ maxPage: {
32897
+ type: Number,
32898
+ default: 0
32882
32899
  }
32883
32900
  };
32884
32901
  const paginationInjectionKey = Symbol("d-pagination");
@@ -33328,10 +33345,16 @@ var Pagination = defineComponent({
33328
33345
  goToText,
33329
33346
  pageIndex,
33330
33347
  showJumpButton,
33331
- haveConfigMenu
33348
+ haveConfigMenu,
33349
+ maxPage
33332
33350
  } = toRefs(props);
33333
33351
  const ns2 = useNamespace("pagination");
33334
- const totalPages = computed(() => Math.ceil(props.total / props.pageSize));
33352
+ const totalPages = computed(() => {
33353
+ if (maxPage.value) {
33354
+ return Math.min(Math.ceil(props.total / props.pageSize), maxPage.value);
33355
+ }
33356
+ return Math.ceil(props.total / props.pageSize);
33357
+ });
33335
33358
  const litePageOptions = computed(() => liteSelectOptions(totalPages.value));
33336
33359
  const cursor = computed({
33337
33360
  get() {
@@ -44063,7 +44086,7 @@ const installs = [
44063
44086
  VirtualListInstall
44064
44087
  ];
44065
44088
  var vueDevui = {
44066
- version: "1.5.15-hotfix.2",
44089
+ version: "1.5.15-hotfix.4",
44067
44090
  install(app) {
44068
44091
  installs.forEach((p) => app.use(p));
44069
44092
  }