view-ui-plus-derive 0.1.1 → 0.2.0

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.
package/dist/index.d.ts CHANGED
@@ -7,6 +7,8 @@ import { ComponentOptionsBase } from 'vue';
7
7
  import { ComponentOptionsMixin } from 'vue';
8
8
  import { ComponentProvideOptions } from 'vue';
9
9
  import { ComponentPublicInstance } from 'vue';
10
+ import { ComputedOptions } from 'vue';
11
+ import { CreateComponentPublicInstanceWithMixins } from 'vue';
10
12
  import { DebuggerEvent } from 'vue';
11
13
  import { DefineComponent } from 'vue';
12
14
  import { Directive } from 'vue';
@@ -14,11 +16,13 @@ import { ExtractPropTypes } from 'vue';
14
16
  import { GlobalComponents } from 'vue';
15
17
  import { GlobalDirectives } from 'vue';
16
18
  import { JSX } from 'vue/jsx-runtime';
19
+ import { MethodOptions } from 'vue';
17
20
  import { nextTick } from 'vue';
18
21
  import { OnCleanup } from '@vue/reactivity';
19
22
  import { PropType } from 'vue';
20
23
  import { PublicProps } from 'vue';
21
24
  import { Ref } from 'vue';
25
+ import { ShallowReactive } from 'vue';
22
26
  import { ShallowUnwrapRef } from 'vue';
23
27
  import { Slot } from 'vue';
24
28
  import { VNodeProps } from 'vue';
@@ -285,6 +289,10 @@ falseValue: string | number | boolean;
285
289
  close(): any;
286
290
  }>;
287
291
 
292
+ declare type BtnSize = '' | 'default' | 'small' | 'large' | undefined;
293
+
294
+ declare type BtnType = '' | 'default' | 'primary' | 'dashed' | 'text' | 'info' | 'success' | 'warning' | 'error' | undefined;
295
+
288
296
  export declare const CacheSelect: __VLS_WithTemplateSlots_4<DefineComponent<ExtractPropTypes< {
289
297
  modelValue: PropType<SelectValue>;
290
298
  /**
@@ -913,10 +921,10 @@ beforeAdd: FunctionConstructor;
913
921
  */
914
922
  beforeRemove: FunctionConstructor;
915
923
  addBtnType: {
916
- type: StringConstructor;
924
+ type: PropType<BtnType>;
917
925
  default: string;
918
926
  };
919
- addBtnSize: StringConstructor;
927
+ addBtnSize: PropType<BtnSize>;
920
928
  addBtnGhost: {
921
929
  type: BooleanConstructor;
922
930
  default: boolean;
@@ -930,11 +938,11 @@ type: ObjectConstructor;
930
938
  default: () => {};
931
939
  };
932
940
  delBtnType: {
933
- type: StringConstructor;
941
+ type: PropType<BtnType>;
934
942
  default: string;
935
943
  };
936
944
  delBtnSize: {
937
- type: StringConstructor;
945
+ type: PropType<BtnSize>;
938
946
  default: string;
939
947
  };
940
948
  delBtnGhost: {
@@ -1037,10 +1045,10 @@ beforeAdd: FunctionConstructor;
1037
1045
  */
1038
1046
  beforeRemove: FunctionConstructor;
1039
1047
  addBtnType: {
1040
- type: StringConstructor;
1048
+ type: PropType<BtnType>;
1041
1049
  default: string;
1042
1050
  };
1043
- addBtnSize: StringConstructor;
1051
+ addBtnSize: PropType<BtnSize>;
1044
1052
  addBtnGhost: {
1045
1053
  type: BooleanConstructor;
1046
1054
  default: boolean;
@@ -1054,11 +1062,11 @@ type: ObjectConstructor;
1054
1062
  default: () => {};
1055
1063
  };
1056
1064
  delBtnType: {
1057
- type: StringConstructor;
1065
+ type: PropType<BtnType>;
1058
1066
  default: string;
1059
1067
  };
1060
1068
  delBtnSize: {
1061
- type: StringConstructor;
1069
+ type: PropType<BtnSize>;
1062
1070
  default: string;
1063
1071
  };
1064
1072
  delBtnGhost: {
@@ -1096,12 +1104,12 @@ actionWidth: number;
1096
1104
  actionAlign: string;
1097
1105
  actionCol: Record<string, any>;
1098
1106
  addRow: Function;
1099
- addBtnType: string;
1107
+ addBtnType: BtnType;
1100
1108
  addBtnGhost: boolean;
1101
1109
  addBtnDisabled: boolean;
1102
1110
  addBtn: Record<string, any>;
1103
- delBtnType: string;
1104
- delBtnSize: string;
1111
+ delBtnType: BtnType;
1112
+ delBtnSize: BtnSize;
1105
1113
  delBtnGhost: boolean;
1106
1114
  delBtn: Record<string, any>;
1107
1115
  delBtnDisabled: Function;
@@ -1344,7 +1352,7 @@ disableToday: BooleanConstructor;
1344
1352
  transfer: BooleanConstructor;
1345
1353
  placeholder: StringConstructor;
1346
1354
  disabled: BooleanConstructor;
1347
- placement: StringConstructor;
1355
+ placement: PropType<"top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end" | undefined>;
1348
1356
  /**
1349
1357
  * 用于格式化绑定时间,默认 YYYY-MM-DD
1350
1358
  */
@@ -1399,7 +1407,7 @@ disableToday: BooleanConstructor;
1399
1407
  transfer: BooleanConstructor;
1400
1408
  placeholder: StringConstructor;
1401
1409
  disabled: BooleanConstructor;
1402
- placement: StringConstructor;
1410
+ placement: PropType<"top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end" | undefined>;
1403
1411
  /**
1404
1412
  * 用于格式化绑定时间,默认 YYYY-MM-DD
1405
1413
  */
@@ -1432,6 +1440,7 @@ declare const _default: {
1432
1440
  export default _default;
1433
1441
 
1434
1442
  export declare function install(app: App, opt?: {
1443
+ prefix?: string;
1435
1444
  i18n?: any;
1436
1445
  msg?: Obj;
1437
1446
  msgPrefix?: string;
@@ -1718,7 +1727,7 @@ cancelDisabled: BooleanConstructor;
1718
1727
  * 取消按钮type,默认 text
1719
1728
  */
1720
1729
  cancelType: {
1721
- type: StringConstructor;
1730
+ type: PropType<BtnType>;
1722
1731
  default: string;
1723
1732
  };
1724
1733
  /**
@@ -1774,7 +1783,7 @@ cancelDisabled: BooleanConstructor;
1774
1783
  * 取消按钮type,默认 text
1775
1784
  */
1776
1785
  cancelType: {
1777
- type: StringConstructor;
1786
+ type: PropType<BtnType>;
1778
1787
  default: string;
1779
1788
  };
1780
1789
  /**
@@ -1799,7 +1808,7 @@ okDisabled: boolean;
1799
1808
  cancelLoading: boolean;
1800
1809
  cancelDisabled: boolean;
1801
1810
  rightCancel: boolean;
1802
- cancelType: string;
1811
+ cancelType: BtnType;
1803
1812
  hasOk: boolean;
1804
1813
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>, {
1805
1814
  other?(_: {}): any;
@@ -1877,13 +1886,6 @@ border: BooleanConstructor;
1877
1886
  */
1878
1887
  process: FunctionConstructor;
1879
1888
  /**
1880
- * 自动设置Table的maxHeight
1881
- */
1882
- autoMaxHeight: {
1883
- type: BooleanConstructor;
1884
- default: boolean;
1885
- };
1886
- /**
1887
1889
  * 是否本地分页
1888
1890
  */
1889
1891
  isLocal: BooleanConstructor;
@@ -1900,17 +1902,13 @@ default: () => number[];
1900
1902
  autoRemain: BooleanConstructor;
1901
1903
  /**
1902
1904
  * 计算Table的maxHeight时,Table距离视口底部的距离
1903
- * @default 80
1905
+ * @default 45
1904
1906
  */
1905
1907
  bottomDis: {
1906
1908
  type: (NumberConstructor | StringConstructor)[];
1907
1909
  default: number;
1908
1910
  };
1909
1911
  /**
1910
- * Table的maxHeight
1911
- */
1912
- maxHeight: (NumberConstructor | StringConstructor)[];
1913
- /**
1914
1912
  * 勾选项
1915
1913
  */
1916
1914
  selection: ArrayConstructor;
@@ -1954,14 +1952,45 @@ fullscreen: BooleanConstructor;
1954
1952
  * 传至ToggleColumn组件的storeAt
1955
1953
  */
1956
1954
  storeAt: StringConstructor;
1955
+ /**
1956
+ * 隐藏分页
1957
+ */
1958
+ hidePage: BooleanConstructor;
1959
+ /**
1960
+ * 自动设置Table的maxHeight
1961
+ */
1962
+ autoMaxHeight: {
1963
+ type: BooleanConstructor;
1964
+ default: boolean;
1965
+ };
1966
+ /**
1967
+ * Table的maxHeight
1968
+ */
1969
+ maxHeight: (NumberConstructor | StringConstructor)[];
1970
+ /**
1971
+ * Table的height
1972
+ */
1973
+ height: (NumberConstructor | StringConstructor)[];
1974
+ /**
1975
+ * 自动设置Table的height
1976
+ */
1977
+ autoHeight: BooleanConstructor;
1978
+ /**
1979
+ * 最大化时自动计算哪种高度
1980
+ */
1981
+ maximizeHeightType: {
1982
+ type: PropType<"height" | "maxHeight">;
1983
+ default: string;
1984
+ };
1957
1985
  loading: {
1958
1986
  type: PropType<boolean>;
1959
1987
  };
1960
1988
  }>, {
1961
1989
  search: (stay?: boolean) => void;
1962
- setMaxHeight: () => void;
1990
+ setMaxHeight: (isHeight?: boolean) => void;
1963
1991
  table: {
1964
1992
  data: Obj[];
1993
+ height: string | number | undefined;
1965
1994
  maxHeight: string | number | undefined;
1966
1995
  selectType: {
1967
1996
  align: string;
@@ -1970,6 +1999,11 @@ renderHeader: (h: any) => false | JSX.Element;
1970
1999
  render: (h: any, { row, index }: Obj) => any;
1971
2000
  };
1972
2001
  };
2002
+ sizer: ShallowReactive< {
2003
+ curr: number;
2004
+ size: number;
2005
+ total: number;
2006
+ }>;
1973
2007
  getPage: () => {
1974
2008
  curr: number;
1975
2009
  total: number;
@@ -2052,13 +2086,6 @@ border: BooleanConstructor;
2052
2086
  */
2053
2087
  process: FunctionConstructor;
2054
2088
  /**
2055
- * 自动设置Table的maxHeight
2056
- */
2057
- autoMaxHeight: {
2058
- type: BooleanConstructor;
2059
- default: boolean;
2060
- };
2061
- /**
2062
2089
  * 是否本地分页
2063
2090
  */
2064
2091
  isLocal: BooleanConstructor;
@@ -2075,17 +2102,13 @@ default: () => number[];
2075
2102
  autoRemain: BooleanConstructor;
2076
2103
  /**
2077
2104
  * 计算Table的maxHeight时,Table距离视口底部的距离
2078
- * @default 80
2105
+ * @default 45
2079
2106
  */
2080
2107
  bottomDis: {
2081
2108
  type: (NumberConstructor | StringConstructor)[];
2082
2109
  default: number;
2083
2110
  };
2084
2111
  /**
2085
- * Table的maxHeight
2086
- */
2087
- maxHeight: (NumberConstructor | StringConstructor)[];
2088
- /**
2089
2112
  * 勾选项
2090
2113
  */
2091
2114
  selection: ArrayConstructor;
@@ -2129,6 +2152,36 @@ fullscreen: BooleanConstructor;
2129
2152
  * 传至ToggleColumn组件的storeAt
2130
2153
  */
2131
2154
  storeAt: StringConstructor;
2155
+ /**
2156
+ * 隐藏分页
2157
+ */
2158
+ hidePage: BooleanConstructor;
2159
+ /**
2160
+ * 自动设置Table的maxHeight
2161
+ */
2162
+ autoMaxHeight: {
2163
+ type: BooleanConstructor;
2164
+ default: boolean;
2165
+ };
2166
+ /**
2167
+ * Table的maxHeight
2168
+ */
2169
+ maxHeight: (NumberConstructor | StringConstructor)[];
2170
+ /**
2171
+ * Table的height
2172
+ */
2173
+ height: (NumberConstructor | StringConstructor)[];
2174
+ /**
2175
+ * 自动设置Table的height
2176
+ */
2177
+ autoHeight: BooleanConstructor;
2178
+ /**
2179
+ * 最大化时自动计算哪种高度
2180
+ */
2181
+ maximizeHeightType: {
2182
+ type: PropType<"height" | "maxHeight">;
2183
+ default: string;
2184
+ };
2132
2185
  loading: {
2133
2186
  type: PropType<boolean>;
2134
2187
  };
@@ -2155,13 +2208,187 @@ clickToCheck: boolean;
2155
2208
  pure: boolean;
2156
2209
  showHeader: boolean;
2157
2210
  fullscreen: boolean;
2211
+ hidePage: boolean;
2212
+ autoHeight: boolean;
2158
2213
  pageMap: Record<string, any>;
2159
- autoMaxHeight: boolean;
2160
2214
  pageSizeOpts: number[];
2161
2215
  bottomDis: string | number;
2216
+ autoMaxHeight: boolean;
2217
+ maximizeHeightType: "height" | "maxHeight";
2162
2218
  }, {}, {}, {}, string, ComponentProvideOptions, true, {
2163
2219
  elRef: HTMLDivElement;
2164
- tableRef: unknown;
2220
+ tableRef: CreateComponentPublicInstanceWithMixins<Readonly<{
2221
+ data?: any[];
2222
+ columns?: any[];
2223
+ stripe?: boolean;
2224
+ border?: boolean;
2225
+ 'show-header'?: boolean;
2226
+ width?: number | string;
2227
+ height?: number | string;
2228
+ 'max-height'?: number | string;
2229
+ loading?: boolean;
2230
+ 'disabled-hover'?: boolean;
2231
+ 'highlight-row'?: boolean;
2232
+ 'row-class-name'?: Function;
2233
+ size?: string;
2234
+ 'no-data-text'?: string;
2235
+ 'no-filtered-data-text'?: string;
2236
+ draggable?: boolean;
2237
+ 'tooltip-theme'?: string;
2238
+ 'tooltip-max-width'?: number;
2239
+ 'row-key'?: boolean | string;
2240
+ 'span-method'?: Function;
2241
+ 'show-summary'?: boolean;
2242
+ 'sum-text'?: string;
2243
+ 'summary-method'?: Function;
2244
+ 'indent-size'?: number;
2245
+ 'load-data'?: Function;
2246
+ 'update-show-children'?: boolean;
2247
+ 'context-menu'?: boolean;
2248
+ 'show-context-menu'?: boolean;
2249
+ 'fixed-shadow'?: string;
2250
+ 'auto-close-contextmenu'?: boolean;
2251
+ onOnCurrentChange?: (event?: any) => any;
2252
+ onOnSelect?: (event?: any) => any;
2253
+ onOnSelectCancel?: (event?: any) => any;
2254
+ onOnSelectAll?: (event?: any) => any;
2255
+ onOnSelectAllCancel?: (event?: any) => any;
2256
+ onOnSelectionChange?: (event?: any) => any;
2257
+ onOnSortChange?: (event?: any) => any;
2258
+ onOnFilterChange?: (event?: any) => any;
2259
+ onOnRowClick?: (event?: any) => any;
2260
+ onOnRowDblclick?: (event?: any) => any;
2261
+ onOnCellClick?: (event?: any) => any;
2262
+ onOnExpand?: (event?: any) => any;
2263
+ onOnDragDrop?: (event?: any) => any;
2264
+ onOnColumnWidthResize?: (event?: any) => any;
2265
+ onOnContextmenu?: (event?: any) => any;
2266
+ onOnExpandTree?: (event?: any) => any;
2267
+ 'v-slots'?: {
2268
+ header?: () => any;
2269
+ footer?: () => any;
2270
+ loading?: () => any;
2271
+ contextMenu?: () => any;
2272
+ };
2273
+ }>, {}, {}, ComputedOptions, MethodOptions, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {}, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
2274
+ P: {};
2275
+ B: {};
2276
+ D: {};
2277
+ C: {};
2278
+ M: {};
2279
+ Defaults: {};
2280
+ }, Readonly<{
2281
+ data?: any[];
2282
+ columns?: any[];
2283
+ stripe?: boolean;
2284
+ border?: boolean;
2285
+ 'show-header'?: boolean;
2286
+ width?: number | string;
2287
+ height?: number | string;
2288
+ 'max-height'?: number | string;
2289
+ loading?: boolean;
2290
+ 'disabled-hover'?: boolean;
2291
+ 'highlight-row'?: boolean;
2292
+ 'row-class-name'?: Function;
2293
+ size?: string;
2294
+ 'no-data-text'?: string;
2295
+ 'no-filtered-data-text'?: string;
2296
+ draggable?: boolean;
2297
+ 'tooltip-theme'?: string;
2298
+ 'tooltip-max-width'?: number;
2299
+ 'row-key'?: boolean | string;
2300
+ 'span-method'?: Function;
2301
+ 'show-summary'?: boolean;
2302
+ 'sum-text'?: string;
2303
+ 'summary-method'?: Function;
2304
+ 'indent-size'?: number;
2305
+ 'load-data'?: Function;
2306
+ 'update-show-children'?: boolean;
2307
+ 'context-menu'?: boolean;
2308
+ 'show-context-menu'?: boolean;
2309
+ 'fixed-shadow'?: string;
2310
+ 'auto-close-contextmenu'?: boolean;
2311
+ onOnCurrentChange?: (event?: any) => any;
2312
+ onOnSelect?: (event?: any) => any;
2313
+ onOnSelectCancel?: (event?: any) => any;
2314
+ onOnSelectAll?: (event?: any) => any;
2315
+ onOnSelectAllCancel?: (event?: any) => any;
2316
+ onOnSelectionChange?: (event?: any) => any;
2317
+ onOnSortChange?: (event?: any) => any;
2318
+ onOnFilterChange?: (event?: any) => any;
2319
+ onOnRowClick?: (event?: any) => any;
2320
+ onOnRowDblclick?: (event?: any) => any;
2321
+ onOnCellClick?: (event?: any) => any;
2322
+ onOnExpand?: (event?: any) => any;
2323
+ onOnDragDrop?: (event?: any) => any;
2324
+ onOnColumnWidthResize?: (event?: any) => any;
2325
+ onOnContextmenu?: (event?: any) => any;
2326
+ onOnExpandTree?: (event?: any) => any;
2327
+ 'v-slots'?: {
2328
+ header?: () => any;
2329
+ footer?: () => any;
2330
+ loading?: () => any;
2331
+ contextMenu?: () => any;
2332
+ };
2333
+ }>, {}, {}, ComputedOptions, MethodOptions, {}> | null;
2334
+ pageRef: CreateComponentPublicInstanceWithMixins<Readonly<{
2335
+ 'model-value'?: number;
2336
+ total?: number;
2337
+ 'page-size'?: number;
2338
+ 'page-size-opts'?: any[];
2339
+ placement?: string;
2340
+ size?: string;
2341
+ simple?: boolean;
2342
+ 'show-total'?: boolean;
2343
+ 'show-elevator'?: boolean;
2344
+ 'show-sizer'?: boolean;
2345
+ 'class-name'?: string;
2346
+ styles?: object;
2347
+ transfer?: boolean;
2348
+ 'prev-text'?: string;
2349
+ 'next-text'?: string;
2350
+ disabled?: boolean;
2351
+ 'events-enabled'?: boolean;
2352
+ onOnChange?: (event?: any) => any;
2353
+ onOnPageSizeChange?: (event?: any) => any;
2354
+ onOnPrev?: (event?: any) => any;
2355
+ onOnNext?: (event?: any) => any;
2356
+ 'v-slots'?: {
2357
+ default?: () => any;
2358
+ };
2359
+ }>, {}, {}, ComputedOptions, MethodOptions, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {}, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
2360
+ P: {};
2361
+ B: {};
2362
+ D: {};
2363
+ C: {};
2364
+ M: {};
2365
+ Defaults: {};
2366
+ }, Readonly<{
2367
+ 'model-value'?: number;
2368
+ total?: number;
2369
+ 'page-size'?: number;
2370
+ 'page-size-opts'?: any[];
2371
+ placement?: string;
2372
+ size?: string;
2373
+ simple?: boolean;
2374
+ 'show-total'?: boolean;
2375
+ 'show-elevator'?: boolean;
2376
+ 'show-sizer'?: boolean;
2377
+ 'class-name'?: string;
2378
+ styles?: object;
2379
+ transfer?: boolean;
2380
+ 'prev-text'?: string;
2381
+ 'next-text'?: string;
2382
+ disabled?: boolean;
2383
+ 'events-enabled'?: boolean;
2384
+ onOnChange?: (event?: any) => any;
2385
+ onOnPageSizeChange?: (event?: any) => any;
2386
+ onOnPrev?: (event?: any) => any;
2387
+ onOnNext?: (event?: any) => any;
2388
+ 'v-slots'?: {
2389
+ default?: () => any;
2390
+ };
2391
+ }>, {}, {}, ComputedOptions, MethodOptions, {}> | null;
2165
2392
  }, HTMLDivElement>, Partial<Record<any, (_: any) => any>> & {
2166
2393
  title?(_: {}): any;
2167
2394
  headerAction?(_: {}): any;