ll-plus 1.0.0 → 1.0.3

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/_virtual/_plugin-vue_export-helper.mjs +10 -0
  2. package/es/_virtual/_plugin-vue_export-helper.mjs.map +1 -0
  3. package/es/component.mjs +8 -0
  4. package/es/component.mjs.map +1 -0
  5. package/es/components/icon/index.d.ts +55 -10
  6. package/es/components/icon/index.mjs +10 -0
  7. package/es/components/icon/index.mjs.map +1 -0
  8. package/es/components/icon/src/icon.d.ts +27 -3
  9. package/es/components/icon/src/icon.mjs +34 -0
  10. package/es/components/icon/src/icon.mjs.map +1 -0
  11. package/es/components/icon/src/icon.vue.d.ts +56 -10
  12. package/es/components/icon/src/icon.vue.mjs +8 -0
  13. package/es/components/icon/src/icon.vue.mjs.map +1 -0
  14. package/es/components/icon/src/icon.vue2.mjs +59 -0
  15. package/es/components/icon/src/icon.vue2.mjs.map +1 -0
  16. package/es/components/index.d.ts +1 -0
  17. package/es/components/index.mjs +7 -0
  18. package/es/components/index.mjs.map +1 -0
  19. package/es/components/table/index.d.ts +592 -0
  20. package/es/components/table/index.mjs +10 -0
  21. package/es/components/table/index.mjs.map +1 -0
  22. package/es/components/table/src/components/header-search.vue.d.ts +110 -0
  23. package/es/components/table/src/components/header-search.vue.mjs +8 -0
  24. package/es/components/table/src/components/header-search.vue.mjs.map +1 -0
  25. package/es/components/table/src/components/header-search.vue2.mjs +125 -0
  26. package/es/components/table/src/components/header-search.vue2.mjs.map +1 -0
  27. package/es/components/table/src/components/main-table.vue.d.ts +254 -0
  28. package/es/components/table/src/components/main-table.vue.mjs +8 -0
  29. package/es/components/table/src/components/main-table.vue.mjs.map +1 -0
  30. package/es/components/table/src/components/main-table.vue2.mjs +549 -0
  31. package/es/components/table/src/components/main-table.vue2.mjs.map +1 -0
  32. package/es/components/table/src/components/pagination.vue.d.ts +65 -0
  33. package/es/components/table/src/components/pagination.vue.mjs +8 -0
  34. package/es/components/table/src/components/pagination.vue.mjs.map +1 -0
  35. package/es/components/table/src/components/pagination.vue2.mjs +37 -0
  36. package/es/components/table/src/components/pagination.vue2.mjs.map +1 -0
  37. package/es/components/table/src/table.d.ts +148 -0
  38. package/es/components/table/src/table.mjs +196 -0
  39. package/es/components/table/src/table.mjs.map +1 -0
  40. package/es/components/table/src/table.vue.d.ts +586 -0
  41. package/es/components/table/src/table.vue.mjs +8 -0
  42. package/es/components/table/src/table.vue.mjs.map +1 -0
  43. package/es/components/table/src/table.vue2.mjs +134 -0
  44. package/es/components/table/src/table.vue2.mjs.map +1 -0
  45. package/es/defaults.d.ts +4 -0
  46. package/es/defaults.mjs +8 -0
  47. package/es/defaults.mjs.map +1 -0
  48. package/es/index.d.ts +4 -6
  49. package/es/index.mjs +12 -0
  50. package/es/index.mjs.map +1 -0
  51. package/es/ll-plus/defaults.d.ts +4 -0
  52. package/es/ll-plus/index.d.ts +4 -0
  53. package/es/ll-plus/make-installer.d.ts +4 -0
  54. package/es/locale/index.d.ts +10 -0
  55. package/es/locale/index.mjs +6 -0
  56. package/es/locale/index.mjs.map +1 -0
  57. package/es/locale/lang/en_US.d.ts +144 -0
  58. package/es/locale/lang/en_US.mjs +147 -0
  59. package/es/locale/lang/en_US.mjs.map +1 -0
  60. package/es/locale/lang/zh_CN.d.ts +169 -0
  61. package/es/locale/lang/zh_CN.mjs +172 -0
  62. package/es/locale/lang/zh_CN.mjs.map +1 -0
  63. package/es/locale/lang/zh_TW.d.ts +125 -0
  64. package/es/locale/lang/zh_TW.mjs +128 -0
  65. package/es/locale/lang/zh_TW.mjs.map +1 -0
  66. package/es/make-installer.d.ts +4 -0
  67. package/es/make-installer.mjs +12 -0
  68. package/es/make-installer.mjs.map +1 -0
  69. package/es/utils/add-unit.mjs +7 -0
  70. package/es/utils/add-unit.mjs.map +1 -0
  71. package/es/utils/create-namespace.mjs +40 -0
  72. package/es/utils/create-namespace.mjs.map +1 -0
  73. package/es/utils/index.d.ts +2 -1
  74. package/es/utils/index.mjs +8 -0
  75. package/es/utils/index.mjs.map +1 -0
  76. package/es/utils/props/index.d.ts +3 -0
  77. package/es/utils/props/index.mjs +6 -0
  78. package/es/utils/props/index.mjs.map +1 -0
  79. package/es/utils/props/runtime.d.ts +29 -0
  80. package/es/utils/props/runtime.mjs +53 -0
  81. package/es/utils/props/runtime.mjs.map +1 -0
  82. package/es/utils/props/types.d.ts +120 -0
  83. package/es/utils/props/types.mjs +2 -0
  84. package/es/utils/props/types.mjs.map +1 -0
  85. package/es/utils/props/util.d.ts +8 -0
  86. package/es/utils/props/util.mjs +2 -0
  87. package/es/utils/props/util.mjs.map +1 -0
  88. package/es/utils/types.d.ts +10 -0
  89. package/es/utils/types.mjs +30 -0
  90. package/es/utils/types.mjs.map +1 -0
  91. package/es/utils/with-install.mjs +10 -0
  92. package/es/utils/with-install.mjs.map +1 -0
  93. package/global.d.ts +11 -0
  94. package/index.full.js +8305 -0
  95. package/index.full.min.js +25 -0
  96. package/index.full.min.js.map +1 -0
  97. package/index.full.min.mjs +25 -0
  98. package/index.full.min.mjs.map +1 -0
  99. package/index.full.mjs +8288 -0
  100. package/lib/_virtual/_plugin-vue_export-helper.js +14 -0
  101. package/lib/_virtual/_plugin-vue_export-helper.js.map +1 -0
  102. package/lib/component.js +12 -0
  103. package/lib/component.js.map +1 -0
  104. package/lib/components/icon/index.d.ts +55 -10
  105. package/lib/components/icon/index.js +8 -31
  106. package/lib/components/icon/index.js.map +1 -0
  107. package/lib/components/icon/src/icon.d.ts +27 -3
  108. package/lib/components/icon/src/icon.js +36 -0
  109. package/lib/components/icon/src/icon.js.map +1 -0
  110. package/lib/components/icon/src/icon.vue.d.ts +56 -10
  111. package/lib/components/icon/src/icon.vue.js +12 -0
  112. package/lib/components/icon/src/icon.vue.js.map +1 -0
  113. package/lib/components/icon/src/icon.vue2.js +63 -0
  114. package/lib/components/icon/src/icon.vue2.js.map +1 -0
  115. package/lib/components/index.d.ts +1 -0
  116. package/lib/components/index.js +15 -8
  117. package/lib/components/index.js.map +1 -0
  118. package/lib/components/table/index.d.ts +592 -0
  119. package/lib/components/table/index.js +21 -0
  120. package/lib/components/table/index.js.map +1 -0
  121. package/lib/components/table/src/components/header-search.vue.d.ts +110 -0
  122. package/lib/components/table/src/components/header-search.vue.js +12 -0
  123. package/lib/components/table/src/components/header-search.vue.js.map +1 -0
  124. package/lib/components/table/src/components/header-search.vue2.js +129 -0
  125. package/lib/components/table/src/components/header-search.vue2.js.map +1 -0
  126. package/lib/components/table/src/components/main-table.vue.d.ts +254 -0
  127. package/lib/components/table/src/components/main-table.vue.js +12 -0
  128. package/lib/components/table/src/components/main-table.vue.js.map +1 -0
  129. package/lib/components/table/src/components/main-table.vue2.js +553 -0
  130. package/lib/components/table/src/components/main-table.vue2.js.map +1 -0
  131. package/lib/components/table/src/components/pagination.vue.d.ts +65 -0
  132. package/lib/components/table/src/components/pagination.vue.js +12 -0
  133. package/lib/components/table/src/components/pagination.vue.js.map +1 -0
  134. package/lib/components/table/src/components/pagination.vue2.js +41 -0
  135. package/lib/components/table/src/components/pagination.vue2.js.map +1 -0
  136. package/lib/components/table/src/table.d.ts +148 -0
  137. package/lib/components/table/src/table.js +203 -0
  138. package/lib/components/table/src/table.js.map +1 -0
  139. package/lib/components/table/src/table.vue.d.ts +586 -0
  140. package/lib/components/table/src/table.vue.js +12 -0
  141. package/lib/components/table/src/table.vue.js.map +1 -0
  142. package/lib/components/table/src/table.vue2.js +138 -0
  143. package/lib/components/table/src/table.vue2.js.map +1 -0
  144. package/lib/defaults.d.ts +4 -0
  145. package/lib/defaults.js +12 -0
  146. package/lib/defaults.js.map +1 -0
  147. package/lib/index.d.ts +4 -6
  148. package/lib/index.js +20 -15
  149. package/lib/index.js.map +1 -0
  150. package/lib/ll-plus/component.d.ts +3 -0
  151. package/lib/ll-plus/defaults.d.ts +4 -0
  152. package/lib/ll-plus/index.d.ts +4 -0
  153. package/lib/ll-plus/make-installer.d.ts +4 -0
  154. package/lib/locale/index.d.ts +10 -0
  155. package/lib/locale/index.js +12 -0
  156. package/lib/locale/index.js.map +1 -0
  157. package/lib/locale/lang/en_US.d.ts +144 -0
  158. package/lib/locale/lang/en_US.js +151 -0
  159. package/lib/locale/lang/en_US.js.map +1 -0
  160. package/lib/locale/lang/zh_CN.d.ts +169 -0
  161. package/lib/locale/lang/zh_CN.js +176 -0
  162. package/lib/locale/lang/zh_CN.js.map +1 -0
  163. package/lib/locale/lang/zh_TW.d.ts +125 -0
  164. package/lib/locale/lang/zh_TW.js +132 -0
  165. package/lib/locale/lang/zh_TW.js.map +1 -0
  166. package/lib/make-installer.d.ts +4 -0
  167. package/lib/make-installer.js +14 -0
  168. package/lib/make-installer.js.map +1 -0
  169. package/lib/utils/add-unit.js +9 -0
  170. package/lib/utils/add-unit.js.map +1 -0
  171. package/lib/utils/create-namespace.js +34 -34
  172. package/lib/utils/create-namespace.js.map +1 -0
  173. package/lib/utils/index.d.ts +2 -1
  174. package/lib/utils/index.js +18 -18
  175. package/lib/utils/index.js.map +1 -0
  176. package/lib/utils/props/index.d.ts +3 -0
  177. package/lib/utils/props/index.js +14 -0
  178. package/lib/utils/props/index.js.map +1 -0
  179. package/lib/utils/props/runtime.d.ts +29 -0
  180. package/lib/utils/props/runtime.js +59 -0
  181. package/lib/utils/props/runtime.js.map +1 -0
  182. package/lib/utils/props/types.d.ts +120 -0
  183. package/lib/utils/props/types.js +4 -0
  184. package/lib/utils/props/types.js.map +1 -0
  185. package/lib/utils/props/util.d.ts +8 -0
  186. package/lib/utils/props/util.js +4 -0
  187. package/lib/utils/props/util.js.map +1 -0
  188. package/lib/utils/types.d.ts +10 -0
  189. package/lib/utils/types.js +70 -0
  190. package/lib/utils/types.js.map +1 -0
  191. package/lib/utils/with-install.js +8 -6
  192. package/lib/utils/with-install.js.map +1 -0
  193. package/package.json +37 -3
  194. package/theme-chalk/css/icon.css +1 -1
  195. package/theme-chalk/css/index.css +5 -1
  196. package/theme-chalk/css/table.css +5 -0
  197. package/theme-chalk/fonts/iconfont.js +1 -0
  198. package/theme-chalk/fonts/iconfont.json +1262 -0
  199. package/types/packages/component.d.ts +3 -0
  200. package/types/packages/components/icon/index.d.ts +79 -0
  201. package/types/packages/components/icon/src/icon.d.ts +30 -0
  202. package/types/packages/components/icon/src/icon.vue.d.ts +73 -0
  203. package/types/packages/components/index.d.ts +2 -0
  204. package/types/packages/components/table/index.d.ts +592 -0
  205. package/types/packages/components/table/src/components/header-search.vue.d.ts +110 -0
  206. package/types/packages/components/table/src/components/main-table.vue.d.ts +254 -0
  207. package/types/packages/components/table/src/components/pagination.vue.d.ts +65 -0
  208. package/types/packages/components/table/src/table.d.ts +148 -0
  209. package/types/packages/components/table/src/table.vue.d.ts +586 -0
  210. package/types/packages/defaults.d.ts +4 -0
  211. package/types/packages/index.d.ts +4 -0
  212. package/types/packages/ll-plus/component.d.ts +3 -0
  213. package/types/packages/ll-plus/defaults.d.ts +4 -0
  214. package/types/packages/ll-plus/index.d.ts +4 -0
  215. package/types/packages/ll-plus/make-installer.d.ts +4 -0
  216. package/types/packages/locale/index.d.ts +10 -0
  217. package/types/packages/locale/lang/en_US.d.ts +144 -0
  218. package/types/packages/locale/lang/zh_CN.d.ts +169 -0
  219. package/types/packages/locale/lang/zh_TW.d.ts +125 -0
  220. package/types/packages/make-installer.d.ts +4 -0
  221. package/types/{utils → packages/utils}/index.d.ts +2 -1
  222. package/types/packages/utils/props/index.d.ts +3 -0
  223. package/types/packages/utils/props/runtime.d.ts +29 -0
  224. package/types/packages/utils/props/types.d.ts +120 -0
  225. package/types/packages/utils/props/util.d.ts +8 -0
  226. package/types/packages/utils/types.d.ts +10 -0
  227. package/types/tsconfig.web.tsbuildinfo +1 -0
  228. package/entry/types/index.d.ts +0 -6
  229. package/es/components/icon/index.js +0 -33
  230. package/es/components/index.js +0 -1
  231. package/es/components.js +0 -5
  232. package/es/index.js +0 -11
  233. package/es/utils/add-util.js +0 -3
  234. package/es/utils/create-namespace.js +0 -38
  235. package/es/utils/index.js +0 -3
  236. package/es/utils/with-install.js +0 -6
  237. package/index.esm.js +0 -91
  238. package/index.js +0 -101
  239. package/lib/components.js +0 -9
  240. package/lib/utils/add-util.js +0 -7
  241. package/theme-chalk/fonts/iconfont.ttf +0 -0
  242. package/theme-chalk/fonts/iconfont.woff +0 -0
  243. package/theme-chalk/fonts/iconfont.woff2 +0 -0
  244. package/types/components/icon/index.d.ts +0 -34
  245. package/types/components/icon/src/icon.d.ts +0 -6
  246. package/types/components/icon/src/icon.vue.d.ts +0 -27
  247. package/types/components/index.d.ts +0 -1
  248. /package/{entry/types/components.d.ts → es/component.d.ts} +0 -0
  249. /package/es/{components.d.ts → ll-plus/component.d.ts} +0 -0
  250. /package/es/utils/{add-util.d.ts → add-unit.d.ts} +0 -0
  251. /package/lib/{components.d.ts → component.d.ts} +0 -0
  252. /package/lib/utils/{add-util.d.ts → add-unit.d.ts} +0 -0
  253. /package/types/{utils/add-util.d.ts → packages/utils/add-unit.d.ts} +0 -0
  254. /package/types/{utils → packages/utils}/create-namespace.d.ts +0 -0
  255. /package/types/{utils → packages/utils}/with-install.d.ts +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pagination.vue.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -0,0 +1,37 @@
1
+ import { defineComponent, useAttrs, resolveComponent, openBlock, createBlock, mergeProps, unref } from 'vue';
2
+ import '../../../../utils/index.mjs';
3
+ import { tablePaginationProps } from '../table.mjs';
4
+ import { createNamespace } from '../../../../utils/create-namespace.mjs';
5
+
6
+ "use strict";
7
+ var _sfc_main = /* @__PURE__ */ defineComponent({
8
+ ...{
9
+ name: "TableHeaderSearch"
10
+ },
11
+ __name: "pagination",
12
+ props: tablePaginationProps,
13
+ setup(__props) {
14
+ const props = __props;
15
+ const attrs = useAttrs();
16
+ console.log(props, "props");
17
+ console.log(attrs, "attrs");
18
+ const bem = createNamespace("table");
19
+ const handlePageChange = (page, pageSize) => props.onChange && props.onChange(page, pageSize);
20
+ return (_ctx, _cache) => {
21
+ const _component_a_pagination = resolveComponent("a-pagination");
22
+ return openBlock(), createBlock(_component_a_pagination, mergeProps(unref(attrs), {
23
+ class: `${unref(bem).e("pagination")}`,
24
+ current: props.current,
25
+ "page-size": props.pageSize,
26
+ total: props.total,
27
+ "show-size-changer": "",
28
+ "show-quick-jumper": "",
29
+ "show-total": (total) => `\u5171 ${total} \u6761`,
30
+ onChange: handlePageChange
31
+ }), null, 16, ["class", "current", "page-size", "total", "show-total"]);
32
+ };
33
+ }
34
+ });
35
+
36
+ export { _sfc_main as default };
37
+ //# sourceMappingURL=pagination.vue2.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pagination.vue2.mjs","sources":["../../../../../../packages/components/table/src/components/pagination.vue"],"sourcesContent":["<template>\n <a-pagination\n v-bind=\"attrs\"\n :class=\"`${bem.e('pagination')}`\"\n :current=\"props.current\"\n :page-size=\"props.pageSize\"\n :total=\"props.total\"\n show-size-changer\n show-quick-jumper\n :show-total=\"(total: number) => `共 ${total} 条`\"\n @change=\"handlePageChange\"\n />\n</template>\n\n<script lang=\"ts\" setup>\nimport { useAttrs } from 'vue'\nimport { createNamespace } from '@ll-plus/utils'\nimport { tablePaginationProps } from '../table'\n\n// 1.defineOptions\ndefineOptions({\n name: 'TableHeaderSearch'\n})\n\n// 2.props\nconst props = defineProps(tablePaginationProps)\n\n// 3.hooks\nconst attrs = useAttrs()\nconsole.log(props, 'props')\nconsole.log(attrs, 'attrs')\n// 4.const\nconst bem = createNamespace('table')\n\n// 5.methods\nconst handlePageChange = (page: number, pageSize: number) =>\n props.onChange && props.onChange(page, pageSize)\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;AAyBA,IAAA,MAAM,KAAQ,GAAA,OAAA,CAAA;AAGd,IAAA,MAAM,QAAQ,QAAS,EAAA,CAAA;AACvB,IAAQ,OAAA,CAAA,GAAA,CAAI,OAAO,OAAO,CAAA,CAAA;AAC1B,IAAQ,OAAA,CAAA,GAAA,CAAI,OAAO,OAAO,CAAA,CAAA;AAE1B,IAAM,MAAA,GAAA,GAAM,gBAAgB,OAAO,CAAA,CAAA;AAGnC,IAAM,MAAA,gBAAA,GAAmB,CAAC,IAAc,EAAA,QAAA,KACtC,MAAM,QAAY,IAAA,KAAA,CAAM,QAAS,CAAA,IAAA,EAAM,QAAQ,CAAA,CAAA;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,148 @@
1
+ import type { ExtractPropTypes } from 'vue';
2
+ import type { TableColumnProps } from 'ant-design-vue';
3
+ import type HeaderSearch from './components/header-search.vue';
4
+ import type MainTable from './components/main-table.vue';
5
+ import type Pagination from './components/pagination.vue';
6
+ import type Table from './table.vue';
7
+ export declare const enum ImenuSwitchType {
8
+ TABLE = "table",
9
+ CARD = "card"
10
+ }
11
+ export declare const menuSwitchRadioList: {
12
+ value: ImenuSwitchType;
13
+ icon: string;
14
+ }[];
15
+ export interface IMenuSwitchOptions {
16
+ show?: boolean;
17
+ onChange?: (value: ImenuSwitchType) => void;
18
+ }
19
+ export interface ITableScroll {
20
+ x: number | string | boolean;
21
+ y: number | string;
22
+ }
23
+ export declare const tableHeaderSearchProps: {
24
+ readonly menuSwitchOptions: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => IMenuSwitchOptions) | (() => IMenuSwitchOptions) | ((new (...args: any[]) => IMenuSwitchOptions) | (() => IMenuSwitchOptions))[], unknown, unknown, () => {
25
+ show: boolean;
26
+ onChange: () => void;
27
+ }, boolean>;
28
+ };
29
+ export declare const mainTableProps: {
30
+ readonly settingKey: {
31
+ readonly type: import("vue").PropType<string>;
32
+ readonly required: false;
33
+ readonly validator: ((val: unknown) => boolean) | undefined;
34
+ __epPropKey: true;
35
+ };
36
+ readonly columns: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => TableColumnProps[]) | (() => TableColumnProps[]) | ((new (...args: any[]) => TableColumnProps[]) | (() => TableColumnProps[]))[], unknown, unknown, () => never[], boolean>;
37
+ readonly dataSource: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => any[]) | (() => any[]) | ((new (...args: any[]) => any[]) | (() => any[]))[], unknown, unknown, () => never[], boolean>;
38
+ readonly showDrag: import("ll-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
39
+ readonly showIndexColumn: import("ll-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
40
+ readonly showOperate: import("ll-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
41
+ readonly showSetting: import("ll-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
42
+ readonly scroll: {
43
+ readonly type: import("vue").PropType<ITableScroll>;
44
+ readonly required: false;
45
+ readonly validator: ((val: unknown) => boolean) | undefined;
46
+ __epPropKey: true;
47
+ };
48
+ readonly expandedRowKeys: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => string[]) | (() => string[]) | ((new (...args: any[]) => string[]) | (() => string[]))[], unknown, unknown, () => never[], boolean>;
49
+ readonly hiddenPagination: {
50
+ readonly type: import("vue").PropType<import("ll-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>>;
51
+ readonly required: false;
52
+ readonly validator: ((val: unknown) => boolean) | undefined;
53
+ __epPropKey: true;
54
+ };
55
+ readonly customRowProps: import("ll-plus/es/utils").EpPropFinalized<FunctionConstructor, unknown, unknown, () => void, boolean>;
56
+ readonly expand: {
57
+ readonly type: import("vue").PropType<Function>;
58
+ readonly required: false;
59
+ readonly validator: ((val: unknown) => boolean) | undefined;
60
+ __epPropKey: true;
61
+ };
62
+ readonly change: {
63
+ readonly type: import("vue").PropType<Function>;
64
+ readonly required: false;
65
+ readonly validator: ((val: unknown) => boolean) | undefined;
66
+ __epPropKey: true;
67
+ };
68
+ readonly expandedRowsChange: {
69
+ readonly type: import("vue").PropType<Function>;
70
+ readonly required: false;
71
+ readonly validator: ((val: unknown) => boolean) | undefined;
72
+ __epPropKey: true;
73
+ };
74
+ readonly resizeColumn: {
75
+ readonly type: import("vue").PropType<Function>;
76
+ readonly required: false;
77
+ readonly validator: ((val: unknown) => boolean) | undefined;
78
+ __epPropKey: true;
79
+ };
80
+ readonly dragChange: {
81
+ readonly type: import("vue").PropType<Function>;
82
+ readonly required: false;
83
+ readonly validator: ((val: unknown) => boolean) | undefined;
84
+ __epPropKey: true;
85
+ };
86
+ };
87
+ export declare const tablePaginationProps: {
88
+ readonly current: {
89
+ readonly type: import("vue").PropType<number>;
90
+ readonly required: true;
91
+ readonly validator: ((val: unknown) => boolean) | undefined;
92
+ __epPropKey: true;
93
+ };
94
+ readonly pageSize: {
95
+ readonly type: import("vue").PropType<number>;
96
+ readonly required: true;
97
+ readonly validator: ((val: unknown) => boolean) | undefined;
98
+ __epPropKey: true;
99
+ };
100
+ readonly total: {
101
+ readonly type: import("vue").PropType<number>;
102
+ readonly required: true;
103
+ readonly validator: ((val: unknown) => boolean) | undefined;
104
+ __epPropKey: true;
105
+ };
106
+ readonly onChange: import("ll-plus/es/utils").EpPropFinalized<FunctionConstructor, unknown, unknown, () => void, boolean>;
107
+ };
108
+ export declare const tableProps: {
109
+ readonly loading: {
110
+ readonly type: import("vue").PropType<import("ll-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>>;
111
+ readonly required: false;
112
+ readonly validator: ((val: unknown) => boolean) | undefined;
113
+ __epPropKey: true;
114
+ };
115
+ readonly headerSearchProps: {
116
+ readonly type: import("vue").PropType<{
117
+ readonly menuSwitchOptions: IMenuSwitchOptions;
118
+ }>;
119
+ readonly required: true;
120
+ readonly validator: ((val: unknown) => boolean) | undefined;
121
+ __epPropKey: true;
122
+ };
123
+ readonly tableProps: {
124
+ readonly type: import("vue").PropType<MainTable>;
125
+ readonly required: true;
126
+ readonly validator: ((val: unknown) => boolean) | undefined;
127
+ __epPropKey: true;
128
+ };
129
+ readonly paginationProps: {
130
+ readonly type: import("vue").PropType<{
131
+ readonly onChange: Function;
132
+ readonly total: number;
133
+ readonly current: number;
134
+ readonly pageSize: number;
135
+ }>;
136
+ readonly required: true;
137
+ readonly validator: ((val: unknown) => boolean) | undefined;
138
+ __epPropKey: true;
139
+ };
140
+ };
141
+ export type TableHeaderSearchProps = ExtractPropTypes<typeof tableHeaderSearchProps>;
142
+ export type MainTable = ExtractPropTypes<typeof mainTableProps>;
143
+ export type TablePaginationProps = ExtractPropTypes<typeof tablePaginationProps>;
144
+ export type TableProps = ExtractPropTypes<typeof tableProps>;
145
+ export type TableHeaderSearchInstance = InstanceType<typeof HeaderSearch>;
146
+ export type MainTableInstance = InstanceType<typeof MainTable>;
147
+ export type TablePaginationInstance = InstanceType<typeof Pagination>;
148
+ export type TableInstance = InstanceType<typeof Table>;
@@ -0,0 +1,196 @@
1
+ import '../../../utils/index.mjs';
2
+ import { buildProps, definePropType } from '../../../utils/props/runtime.mjs';
3
+
4
+ "use strict";
5
+ var ImenuSwitchType = /* @__PURE__ */ ((ImenuSwitchType2) => {
6
+ ImenuSwitchType2["TABLE"] = "table";
7
+ ImenuSwitchType2["CARD"] = "card";
8
+ return ImenuSwitchType2;
9
+ })(ImenuSwitchType || {});
10
+ const menuSwitchRadioList = [
11
+ {
12
+ value: "table" /* TABLE */,
13
+ icon: "icon-list"
14
+ },
15
+ {
16
+ value: "card" /* CARD */,
17
+ icon: "icon-card"
18
+ }
19
+ ];
20
+ const tableHeaderSearchProps = buildProps({
21
+ menuSwitchOptions: {
22
+ type: definePropType(Object),
23
+ default: () => ({ show: true, onChange: () => {
24
+ } })
25
+ }
26
+ });
27
+ const mainTableProps = buildProps({
28
+ /**
29
+ * @description 当前页数
30
+ */
31
+ settingKey: {
32
+ type: String
33
+ },
34
+ /**
35
+ * @description 列设置
36
+ */
37
+ columns: {
38
+ type: definePropType(Array),
39
+ default: () => []
40
+ },
41
+ /**
42
+ * @description 数据源
43
+ */
44
+ dataSource: {
45
+ type: definePropType(Array),
46
+ default: () => []
47
+ },
48
+ /**
49
+ * @description 是否数据拖拽
50
+ */
51
+ showDrag: {
52
+ type: Boolean,
53
+ default: false
54
+ },
55
+ /**
56
+ * @description 是否显示#序列
57
+ */
58
+ showIndexColumn: {
59
+ type: Boolean,
60
+ default: true
61
+ },
62
+ /**
63
+ * @description 展示操作列的
64
+ */
65
+ showOperate: {
66
+ type: Boolean,
67
+ default: true
68
+ },
69
+ /**
70
+ * @description 是否显示操作栏上的设置
71
+ */
72
+ showSetting: {
73
+ type: Boolean,
74
+ default: false
75
+ },
76
+ /**
77
+ * @description table的scroll
78
+ */
79
+ scroll: {
80
+ type: definePropType(Object)
81
+ },
82
+ /**
83
+ * @description 展开的key
84
+ */
85
+ expandedRowKeys: {
86
+ type: definePropType(Array),
87
+ default: () => []
88
+ },
89
+ /**
90
+ * @description 是否隐藏分页
91
+ */
92
+ hiddenPagination: {
93
+ type: Boolean
94
+ },
95
+ /**
96
+ * @description 设置行属性同表格的customRow属性
97
+ */
98
+ customRowProps: {
99
+ type: Function,
100
+ default: () => {
101
+ }
102
+ },
103
+ /**
104
+ * @description 点击展开图标时触发
105
+ */
106
+ expand: {
107
+ type: Function
108
+ },
109
+ /**
110
+ * @description 分页、排序、筛选变化时触发
111
+ */
112
+ change: {
113
+ type: Function
114
+ },
115
+ /**
116
+ * @description 展开的行变化时触发
117
+ */
118
+ expandedRowsChange: {
119
+ type: Function
120
+ },
121
+ /**
122
+ * @description 拖动列改变列的宽度时触发
123
+ */
124
+ resizeColumn: {
125
+ type: Function
126
+ },
127
+ /**
128
+ * @description 拖拽后的change
129
+ */
130
+ dragChange: {
131
+ type: Function
132
+ }
133
+ });
134
+ const tablePaginationProps = buildProps({
135
+ /**
136
+ * @description 当前页数
137
+ */
138
+ current: {
139
+ type: Number,
140
+ required: true
141
+ },
142
+ /**
143
+ * @description 每页条数
144
+ */
145
+ pageSize: {
146
+ type: Number,
147
+ required: true
148
+ },
149
+ /**
150
+ * @description 数据总数
151
+ */
152
+ total: {
153
+ type: Number,
154
+ required: true
155
+ },
156
+ /**
157
+ * @description 页码或 pageSize 改变的回调,参数是改变后的页码及每页条数
158
+ */
159
+ onChange: {
160
+ type: Function,
161
+ default: () => {
162
+ }
163
+ }
164
+ });
165
+ const tableProps = buildProps({
166
+ /**
167
+ * @description table的loading
168
+ */
169
+ loading: {
170
+ type: Boolean
171
+ },
172
+ /**
173
+ * @description 头部props
174
+ */
175
+ headerSearchProps: {
176
+ type: definePropType(Object),
177
+ required: true
178
+ },
179
+ /**
180
+ * @description main-table的props
181
+ */
182
+ tableProps: {
183
+ type: definePropType(Object),
184
+ required: true
185
+ },
186
+ /**
187
+ * @description 分页的props
188
+ */
189
+ paginationProps: {
190
+ type: definePropType(Object),
191
+ required: true
192
+ }
193
+ });
194
+
195
+ export { ImenuSwitchType, mainTableProps, menuSwitchRadioList, tableHeaderSearchProps, tablePaginationProps, tableProps };
196
+ //# sourceMappingURL=table.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table.mjs","sources":["../../../../../packages/components/table/src/table.ts"],"sourcesContent":["import { buildProps, definePropType } from '@ll-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type { TableColumnProps } from 'ant-design-vue'\nimport type HeaderSearch from './components/header-search.vue'\nimport type MainTable from './components/main-table.vue'\nimport type Pagination from './components/pagination.vue'\nimport type Table from './table.vue'\n\n// 头部menu的enum\nexport const enum ImenuSwitchType {\n TABLE = 'table',\n CARD = 'card'\n}\n// menuList\nexport const menuSwitchRadioList = [\n {\n value: ImenuSwitchType.TABLE,\n icon: 'icon-list'\n },\n {\n value: ImenuSwitchType.CARD,\n icon: 'icon-card'\n }\n]\n\n// IMenuSwitchOptions\nexport interface IMenuSwitchOptions {\n show?: boolean // 是否显示切换菜单\n onChange?: (value: ImenuSwitchType) => void // 切换菜单的change\n}\n// ITableScroll\nexport interface ITableScroll {\n x: number | string | boolean\n y: number | string\n}\n\n// tableHeaderSearchProps\nexport const tableHeaderSearchProps = buildProps({\n menuSwitchOptions: {\n type: definePropType<IMenuSwitchOptions>(Object),\n default: () => ({ show: true, onChange: () => {} })\n }\n} as const)\n\n// mainTableProps\n// !列拖拽需在columns的指定项设置resizable: true\nexport const mainTableProps = buildProps({\n /**\n * @description 当前页数\n */\n settingKey: {\n type: String\n },\n /**\n * @description 列设置\n */\n columns: {\n type: definePropType<TableColumnProps[]>(Array),\n default: () => []\n },\n /**\n * @description 数据源\n */\n dataSource: {\n type: definePropType<any[]>(Array),\n default: () => []\n },\n /**\n * @description 是否数据拖拽\n */\n showDrag: {\n type: Boolean,\n default: false\n },\n /**\n * @description 是否显示#序列\n */\n showIndexColumn: {\n type: Boolean,\n default: true\n },\n /**\n * @description 展示操作列的\n */\n showOperate: {\n type: Boolean,\n default: true\n },\n /**\n * @description 是否显示操作栏上的设置\n */\n showSetting: {\n type: Boolean,\n default: false\n },\n /**\n * @description table的scroll\n */\n scroll: {\n type: definePropType<ITableScroll>(Object)\n },\n /**\n * @description 展开的key\n */\n expandedRowKeys: {\n type: definePropType<string[]>(Array),\n default: () => []\n },\n /**\n * @description 是否隐藏分页\n */\n hiddenPagination: {\n type: Boolean\n },\n /**\n * @description 设置行属性同表格的customRow属性\n */\n customRowProps: {\n type: Function,\n default: () => {}\n },\n /**\n * @description 点击展开图标时触发\n */\n expand: {\n type: Function\n },\n /**\n * @description 分页、排序、筛选变化时触发\n */\n change: {\n type: Function\n },\n /**\n * @description 展开的行变化时触发\n */\n expandedRowsChange: {\n type: Function\n },\n /**\n * @description 拖动列改变列的宽度时触发\n */\n resizeColumn: {\n type: Function\n },\n /**\n * @description 拖拽后的change\n */\n dragChange: {\n type: Function\n }\n} as const)\n\n// tablePaginationProps\nexport const tablePaginationProps = buildProps({\n /**\n * @description 当前页数\n */\n current: {\n type: Number,\n required: true\n },\n /**\n * @description 每页条数\n */\n pageSize: {\n type: Number,\n required: true\n },\n /**\n * @description 数据总数\n */\n total: {\n type: Number,\n required: true\n },\n /**\n * @description 页码或 pageSize 改变的回调,参数是改变后的页码及每页条数\n */\n onChange: {\n type: Function,\n default: () => {}\n }\n} as const)\n\n// tableProps\nexport const tableProps = buildProps({\n /**\n * @description table的loading\n */\n loading: {\n type: Boolean\n },\n /**\n * @description 头部props\n */\n headerSearchProps: {\n type: definePropType<TableHeaderSearchProps>(Object),\n required: true\n },\n /**\n * @description main-table的props\n */\n tableProps: {\n type: definePropType<MainTable>(Object),\n required: true\n },\n /**\n * @description 分页的props\n */\n paginationProps: {\n type: definePropType<TablePaginationProps>(Object),\n required: true\n }\n} as const)\n\n// props\nexport type TableHeaderSearchProps = ExtractPropTypes<\n typeof tableHeaderSearchProps\n>\nexport type MainTable = ExtractPropTypes<typeof mainTableProps>\n\nexport type TablePaginationProps = ExtractPropTypes<typeof tablePaginationProps>\nexport type TableProps = ExtractPropTypes<typeof tableProps>\n\n// instance\nexport type TableHeaderSearchInstance = InstanceType<typeof HeaderSearch>\nexport type MainTableInstance = InstanceType<typeof MainTable>\nexport type TablePaginationInstance = InstanceType<typeof Pagination>\nexport type TableInstance = InstanceType<typeof Table>\n"],"names":["ImenuSwitchType"],"mappings":";;;;AAUkB,IAAA,eAAA,qBAAAA,gBAAX,KAAA;AACL,EAAAA,iBAAA,OAAQ,CAAA,GAAA,OAAA,CAAA;AACR,EAAAA,iBAAA,MAAO,CAAA,GAAA,MAAA,CAAA;AAFS,EAAAA,OAAAA,gBAAAA,CAAAA;AAAA,CAAA,EAAA,eAAA,IAAA,EAAA,EAAA;AAKX,MAAM,mBAAsB,GAAA;AAAA,EACjC;AAAA,IACE,KAAO,EAAA,OAAA;AAAA,IACP,IAAM,EAAA,WAAA;AAAA,GACR;AAAA,EACA;AAAA,IACE,KAAO,EAAA,MAAA;AAAA,IACP,IAAM,EAAA,WAAA;AAAA,GACR;AACF,EAAA;AAcO,MAAM,yBAAyB,UAAW,CAAA;AAAA,EAC/C,iBAAmB,EAAA;AAAA,IACjB,IAAA,EAAM,eAAmC,MAAM,CAAA;AAAA,IAC/C,SAAS,OAAO,E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