@funcho/ui 1.1.4 → 1.1.6

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.
@@ -82,6 +82,7 @@ require('../../components/RichEditor/index.js');
82
82
  const ProForm_vue_vue_type_script_setup_true_lang = require('../ProForm/ProForm.vue.js');
83
83
  ;/* empty css */
84
84
  const core = require('@vueuse/core');
85
+ const index_vue_vue_type_script_lang = require('../../components/VNodeRenderer/index.vue.js');
85
86
 
86
87
  const _sfc_main = /* @__PURE__ */ vue.defineComponent({
87
88
  ...{
@@ -97,6 +98,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
97
98
  fields: { default: () => [] },
98
99
  request: { type: Function, default: () => Promise.resolve({ data: { list: [], total: 0 } }) },
99
100
  actions: { default: () => [] },
101
+ actionsWidth: { default: 0 },
100
102
  tools: { default: () => [] }
101
103
  },
102
104
  setup(__props, { expose: __expose }) {
@@ -108,6 +110,57 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
108
110
  });
109
111
  const isExpanded = vue.ref(false);
110
112
  const props = __props;
113
+ const renderActions = (actions, row, index$1) => {
114
+ return vue.h(
115
+ "div",
116
+ {
117
+ class: ns.e("actions")
118
+ },
119
+ [
120
+ actions.filter((action) => {
121
+ return typeof action.hidden === "function" ? !action.hidden(row) : !action.hidden;
122
+ }).map((action) => {
123
+ const vnode = vue.h(
124
+ action.label.includes("删除") ? index.FcDangerButton : index.FcLinkButton,
125
+ {
126
+ type: action.type || "primary",
127
+ disabled: typeof action.disabled === "function" ? action.disabled(row) : action.disabled,
128
+ onClick: action.label.includes("删除") ? void 0 : () => action.onClick(row, index$1),
129
+ onConfirm: action.label.includes("删除") ? () => action.onClick(row, index$1) : void 0
130
+ },
131
+ { default: () => action.label }
132
+ );
133
+ const dirs = (action.directives || []).map((dir) => {
134
+ const directiveInstance = vue.resolveDirective(dir.name);
135
+ if (!directiveInstance) return null;
136
+ return [directiveInstance, dir.value, dir.arg, dir.modifiers];
137
+ }).filter(Boolean);
138
+ return dirs.length > 0 ? vue.withDirectives(vnode, dirs) : vnode;
139
+ })
140
+ ]
141
+ );
142
+ };
143
+ const renderTools = (tools) => {
144
+ return tools.filter((tool) => {
145
+ return typeof tool.hidden === "function" ? !tool.hidden() : !tool.hidden;
146
+ }).map((tool) => {
147
+ const vnode = vue.h(
148
+ index.FcButton,
149
+ {
150
+ type: tool.type || "primary",
151
+ disabled: typeof tool.disabled === "function" ? tool.disabled() : tool.disabled,
152
+ onClick: () => tool.onClick(null, 0)
153
+ },
154
+ { default: () => tool.label }
155
+ );
156
+ const dirs = (tool.directives || []).map((dir) => {
157
+ const directiveInstance = vue.resolveDirective(dir.name);
158
+ if (!directiveInstance) return null;
159
+ return [directiveInstance, dir.value, dir.arg, dir.modifiers];
160
+ }).filter(Boolean);
161
+ return dirs.length > 0 ? vue.withDirectives(vnode, dirs) : vnode;
162
+ });
163
+ };
111
164
  const queryBoxRef = vue.ref(null);
112
165
  const { height: queryBoxHeight } = core.useElementSize(queryBoxRef, void 0, {
113
166
  box: "border-box"
@@ -252,21 +305,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
252
305
  ])]),
253
306
  _: 1
254
307
  }, 8, ["disabled"]),
255
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(props.tools, (tool, i) => {
256
- return vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: i }, [
257
- (typeof tool.hidden === "function" ? !tool.hidden() : !tool.hidden) ? (vue.openBlock(), vue.createBlock(vue.unref(index.FcButton), {
258
- key: 0,
259
- type: tool.type || "primary",
260
- disabled: typeof tool.disabled === "function" ? tool.disabled() : tool.disabled,
261
- onClick: tool.onClick
262
- }, {
263
- default: vue.withCtx(() => [
264
- vue.createTextVNode(vue.toDisplayString(tool.label), 1)
265
- ]),
266
- _: 2
267
- }, 1032, ["type", "disabled", "onClick"])) : vue.createCommentVNode("", true)
268
- ], 64);
269
- }), 128))
308
+ vue.createVNode(index_vue_vue_type_script_lang.default, {
309
+ content: () => renderTools(__props.tools)
310
+ }, null, 8, ["content"])
270
311
  ], 2)
271
312
  ], 6)) : vue.createCommentVNode("", true),
272
313
  vue.withDirectives((vue.openBlock(), vue.createBlock(vue.unref(index$2.FcTable), vue.mergeProps(_ctx.$attrs, {
@@ -304,32 +345,16 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
304
345
  key: "actions",
305
346
  label: "操作",
306
347
  align: "right",
307
- fixed: "right"
348
+ fixed: "right",
349
+ width: __props.actionsWidth || void 0
308
350
  }, {
309
351
  default: vue.withCtx(({ row, $index }) => [
310
- vue.createElementVNode("div", {
311
- class: vue.normalizeClass(vue.unref(ns).e("actions"))
312
- }, [
313
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(props.actions, (action, i) => {
314
- return vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: i }, [
315
- (typeof action.hidden === "function" ? !action.hidden(row) : !action.hidden) ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(action.label.includes("删除") ? vue.unref(index.FcDangerButton) : vue.unref(index.FcLinkButton)), {
316
- key: 0,
317
- type: action.type || "primary",
318
- disabled: typeof action.disabled === "function" ? action.disabled(row) : action.disabled,
319
- onClick: ($event) => action.label.includes("删除") ? void 0 : action.onClick(row, $index),
320
- onConfirm: ($event) => action.label.includes("删除") ? action.onClick(row, $index) : void 0
321
- }, {
322
- default: vue.withCtx(() => [
323
- vue.createTextVNode(vue.toDisplayString(action.label), 1)
324
- ]),
325
- _: 2
326
- }, 1064, ["type", "disabled", "onClick", "onConfirm"])) : vue.createCommentVNode("", true)
327
- ], 64);
328
- }), 128))
329
- ], 2)
352
+ vue.createVNode(index_vue_vue_type_script_lang.default, {
353
+ content: () => renderActions(props.actions, row, $index)
354
+ }, null, 8, ["content"])
330
355
  ]),
331
356
  _: 1
332
- })) : vue.createCommentVNode("", true)
357
+ }, 8, ["width"])) : vue.createCommentVNode("", true)
333
358
  ]),
334
359
  _: 1
335
360
  }, 16, ["data", "max-height"])), [
@@ -0,0 +1,29 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
4
+
5
+ const vue = require('vue');
6
+
7
+ const _sfc_main = vue.defineComponent({
8
+ name: "VNodeRenderer",
9
+ props: {
10
+ content: {
11
+ type: [Object, Array, Function, String, Number],
12
+ required: true
13
+ }
14
+ },
15
+ setup(props) {
16
+ return () => {
17
+ const { content } = props;
18
+ if (typeof content === "function") {
19
+ return content();
20
+ }
21
+ if (content === null || content === void 0) {
22
+ return null;
23
+ }
24
+ return content;
25
+ };
26
+ }
27
+ });
28
+
29
+ exports.default = _sfc_main;
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
4
+
5
+ const index_vue_vue_type_script_lang = require('./index.vue.js');
6
+
7
+
8
+
9
+ exports.default = index_vue_vue_type_script_lang.default;
@@ -2,6 +2,6 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
 
5
- const version = "1.1.4";
5
+ const version = "1.1.6";
6
6
 
7
7
  exports.version = version;
@@ -1,4 +1,4 @@
1
- import { defineComponent, ref, computed, onMounted, resolveDirective, createElementBlock, openBlock, normalizeClass, unref, createCommentVNode, withDirectives, normalizeStyle, createVNode, createElementVNode, createBlock, withCtx, createTextVNode, toDisplayString, Fragment, renderList, mergeProps, createSlots, resolveDynamicComponent } from 'vue';
1
+ import { defineComponent, ref, computed, onMounted, resolveDirective, createElementBlock, openBlock, normalizeClass, unref, createCommentVNode, withDirectives, normalizeStyle, createVNode, createElementVNode, createBlock, withCtx, createTextVNode, toDisplayString, mergeProps, Fragment, renderList, createSlots, resolveDynamicComponent, h } from 'vue';
2
2
  import { useNamespace } from '../../hooks/use-namespace.mjs';
3
3
  import { FcButton, FcDangerButton, FcLinkButton } from '../../components/Button/index.mjs';
4
4
  import '../../components/Dialog/index.mjs';
@@ -78,6 +78,7 @@ import '../../components/RichEditor/index.mjs';
78
78
  import _sfc_main$1 from '../ProForm/ProForm.vue.mjs';
79
79
  /* empty css */
80
80
  import { useElementSize } from '@vueuse/core';
81
+ import _sfc_main$2 from '../../components/VNodeRenderer/index.vue.mjs';
81
82
 
82
83
  const _sfc_main = /* @__PURE__ */ defineComponent({
83
84
  ...{
@@ -93,6 +94,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
93
94
  fields: { default: () => [] },
94
95
  request: { type: Function, default: () => Promise.resolve({ data: { list: [], total: 0 } }) },
95
96
  actions: { default: () => [] },
97
+ actionsWidth: { default: 0 },
96
98
  tools: { default: () => [] }
97
99
  },
98
100
  setup(__props, { expose: __expose }) {
@@ -104,6 +106,57 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
104
106
  });
105
107
  const isExpanded = ref(false);
106
108
  const props = __props;
109
+ const renderActions = (actions, row, index) => {
110
+ return h(
111
+ "div",
112
+ {
113
+ class: ns.e("actions")
114
+ },
115
+ [
116
+ actions.filter((action) => {
117
+ return typeof action.hidden === "function" ? !action.hidden(row) : !action.hidden;
118
+ }).map((action) => {
119
+ const vnode = h(
120
+ action.label.includes("删除") ? FcDangerButton : FcLinkButton,
121
+ {
122
+ type: action.type || "primary",
123
+ disabled: typeof action.disabled === "function" ? action.disabled(row) : action.disabled,
124
+ onClick: action.label.includes("删除") ? void 0 : () => action.onClick(row, index),
125
+ onConfirm: action.label.includes("删除") ? () => action.onClick(row, index) : void 0
126
+ },
127
+ { default: () => action.label }
128
+ );
129
+ const dirs = (action.directives || []).map((dir) => {
130
+ const directiveInstance = resolveDirective(dir.name);
131
+ if (!directiveInstance) return null;
132
+ return [directiveInstance, dir.value, dir.arg, dir.modifiers];
133
+ }).filter(Boolean);
134
+ return dirs.length > 0 ? withDirectives(vnode, dirs) : vnode;
135
+ })
136
+ ]
137
+ );
138
+ };
139
+ const renderTools = (tools) => {
140
+ return tools.filter((tool) => {
141
+ return typeof tool.hidden === "function" ? !tool.hidden() : !tool.hidden;
142
+ }).map((tool) => {
143
+ const vnode = h(
144
+ FcButton,
145
+ {
146
+ type: tool.type || "primary",
147
+ disabled: typeof tool.disabled === "function" ? tool.disabled() : tool.disabled,
148
+ onClick: () => tool.onClick(null, 0)
149
+ },
150
+ { default: () => tool.label }
151
+ );
152
+ const dirs = (tool.directives || []).map((dir) => {
153
+ const directiveInstance = resolveDirective(dir.name);
154
+ if (!directiveInstance) return null;
155
+ return [directiveInstance, dir.value, dir.arg, dir.modifiers];
156
+ }).filter(Boolean);
157
+ return dirs.length > 0 ? withDirectives(vnode, dirs) : vnode;
158
+ });
159
+ };
107
160
  const queryBoxRef = ref(null);
108
161
  const { height: queryBoxHeight } = useElementSize(queryBoxRef, void 0, {
109
162
  box: "border-box"
@@ -248,21 +301,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
248
301
  ])]),
249
302
  _: 1
250
303
  }, 8, ["disabled"]),
251
- (openBlock(true), createElementBlock(Fragment, null, renderList(props.tools, (tool, i) => {
252
- return openBlock(), createElementBlock(Fragment, { key: i }, [
253
- (typeof tool.hidden === "function" ? !tool.hidden() : !tool.hidden) ? (openBlock(), createBlock(unref(FcButton), {
254
- key: 0,
255
- type: tool.type || "primary",
256
- disabled: typeof tool.disabled === "function" ? tool.disabled() : tool.disabled,
257
- onClick: tool.onClick
258
- }, {
259
- default: withCtx(() => [
260
- createTextVNode(toDisplayString(tool.label), 1)
261
- ]),
262
- _: 2
263
- }, 1032, ["type", "disabled", "onClick"])) : createCommentVNode("", true)
264
- ], 64);
265
- }), 128))
304
+ createVNode(_sfc_main$2, {
305
+ content: () => renderTools(__props.tools)
306
+ }, null, 8, ["content"])
266
307
  ], 2)
267
308
  ], 6)) : createCommentVNode("", true),
268
309
  withDirectives((openBlock(), createBlock(unref(FcTable), mergeProps(_ctx.$attrs, {
@@ -300,32 +341,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
300
341
  key: "actions",
301
342
  label: "操作",
302
343
  align: "right",
303
- fixed: "right"
344
+ fixed: "right",
345
+ width: __props.actionsWidth || void 0
304
346
  }, {
305
347
  default: withCtx(({ row, $index }) => [
306
- createElementVNode("div", {
307
- class: normalizeClass(unref(ns).e("actions"))
308
- }, [
309
- (openBlock(true), createElementBlock(Fragment, null, renderList(props.actions, (action, i) => {
310
- return openBlock(), createElementBlock(Fragment, { key: i }, [
311
- (typeof action.hidden === "function" ? !action.hidden(row) : !action.hidden) ? (openBlock(), createBlock(resolveDynamicComponent(action.label.includes("删除") ? unref(FcDangerButton) : unref(FcLinkButton)), {
312
- key: 0,
313
- type: action.type || "primary",
314
- disabled: typeof action.disabled === "function" ? action.disabled(row) : action.disabled,
315
- onClick: ($event) => action.label.includes("删除") ? void 0 : action.onClick(row, $index),
316
- onConfirm: ($event) => action.label.includes("删除") ? action.onClick(row, $index) : void 0
317
- }, {
318
- default: withCtx(() => [
319
- createTextVNode(toDisplayString(action.label), 1)
320
- ]),
321
- _: 2
322
- }, 1064, ["type", "disabled", "onClick", "onConfirm"])) : createCommentVNode("", true)
323
- ], 64);
324
- }), 128))
325
- ], 2)
348
+ createVNode(_sfc_main$2, {
349
+ content: () => renderActions(props.actions, row, $index)
350
+ }, null, 8, ["content"])
326
351
  ]),
327
352
  _: 1
328
- })) : createCommentVNode("", true)
353
+ }, 8, ["width"])) : createCommentVNode("", true)
329
354
  ]),
330
355
  _: 1
331
356
  }, 16, ["data", "max-height"])), [
@@ -0,0 +1,25 @@
1
+ import { defineComponent } from 'vue';
2
+
3
+ const _sfc_main = defineComponent({
4
+ name: "VNodeRenderer",
5
+ props: {
6
+ content: {
7
+ type: [Object, Array, Function, String, Number],
8
+ required: true
9
+ }
10
+ },
11
+ setup(props) {
12
+ return () => {
13
+ const { content } = props;
14
+ if (typeof content === "function") {
15
+ return content();
16
+ }
17
+ if (content === null || content === void 0) {
18
+ return null;
19
+ }
20
+ return content;
21
+ };
22
+ }
23
+ });
24
+
25
+ export { _sfc_main as default };
@@ -0,0 +1,5 @@
1
+ import _sfc_main from './index.vue.mjs';
2
+
3
+
4
+
5
+ export { _sfc_main as default };
@@ -1,3 +1,3 @@
1
- const version = "1.1.4";
1
+ const version = "1.1.6";
2
2
 
3
3
  export { version };
@@ -2,6 +2,19 @@ import { VNode } from 'vue';
2
2
  import { RequestResult } from './DataTable.types';
3
3
  import { TProFormField } from '../ProForm/ProForm.types';
4
4
  type ButtonType = 'default' | 'primary' | 'success' | 'warning' | 'danger' | 'info' | '';
5
+ type ButtonProps = {
6
+ label: string;
7
+ type?: ButtonType;
8
+ disabled?: boolean | ((row?: any) => boolean);
9
+ hidden?: boolean | ((row?: any) => boolean);
10
+ onClick: (row: any, index: number) => void;
11
+ directives?: Array<{
12
+ name: string;
13
+ value?: any;
14
+ arg?: any;
15
+ modifiers?: any;
16
+ }>;
17
+ };
5
18
  type __VLS_Props = {
6
19
  hasIndex?: boolean;
7
20
  height?: number;
@@ -14,20 +27,9 @@ type __VLS_Props = {
14
27
  isPagination?: boolean;
15
28
  fields?: Array<TProFormField>;
16
29
  request?: (params: any) => Promise<RequestResult<any>>;
17
- actions?: Array<{
18
- label: string;
19
- type?: ButtonType;
20
- disabled?: boolean | ((row: any) => boolean);
21
- hidden?: boolean | ((row: any) => boolean);
22
- onClick: (row: any, index: number) => void;
23
- }>;
24
- tools?: Array<{
25
- label: string;
26
- type?: ButtonType;
27
- onClick: () => void;
28
- disabled?: boolean | (() => boolean);
29
- hidden?: boolean | (() => boolean);
30
- }>;
30
+ actions?: Array<ButtonProps>;
31
+ actionsWidth?: number;
32
+ tools?: Array<ButtonProps>;
31
33
  };
32
34
  declare const _default: import('vue').DefineComponent<__VLS_Props, {
33
35
  loadData: () => Promise<void>;
@@ -35,13 +37,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
35
37
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
36
38
  height: number;
37
39
  fields: Array<TProFormField>;
38
- tools: Array<{
39
- label: string;
40
- type?: ButtonType;
41
- onClick: () => void;
42
- disabled?: boolean | (() => boolean);
43
- hidden?: boolean | (() => boolean);
44
- }>;
40
+ tools: Array<ButtonProps>;
45
41
  columns: Array<{
46
42
  prop: string;
47
43
  label: string;
@@ -51,13 +47,8 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
51
47
  hasIndex: boolean;
52
48
  isPagination: boolean;
53
49
  request: (params: any) => Promise<RequestResult<any>>;
54
- actions: Array<{
55
- label: string;
56
- type?: ButtonType;
57
- disabled?: boolean | ((row: any) => boolean);
58
- hidden?: boolean | ((row: any) => boolean);
59
- onClick: (row: any, index: number) => void;
60
- }>;
50
+ actions: Array<ButtonProps>;
51
+ actionsWidth: number;
61
52
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
62
53
  containerRef: HTMLDivElement;
63
54
  queryBoxRef: HTMLDivElement;
@@ -14,16 +14,29 @@ export declare const FcProDataTable: {
14
14
  actions?: Array<{
15
15
  label: string;
16
16
  type?: "" | "default" | "primary" | "success" | "warning" | "info" | "danger";
17
- disabled?: boolean | ((row: any) => boolean);
18
- hidden?: boolean | ((row: any) => boolean);
17
+ disabled?: boolean | ((row?: any) => boolean);
18
+ hidden?: boolean | ((row?: any) => boolean);
19
19
  onClick: (row: any, index: number) => void;
20
+ directives?: Array<{
21
+ name: string;
22
+ value?: any;
23
+ arg?: any;
24
+ modifiers?: any;
25
+ }>;
20
26
  }>;
27
+ actionsWidth?: number;
21
28
  tools?: Array<{
22
29
  label: string;
23
30
  type?: "" | "default" | "primary" | "success" | "warning" | "info" | "danger";
24
- onClick: () => void;
25
- disabled?: boolean | (() => boolean);
26
- hidden?: boolean | (() => boolean);
31
+ disabled?: boolean | ((row?: any) => boolean);
32
+ hidden?: boolean | ((row?: any) => boolean);
33
+ onClick: (row: any, index: number) => void;
34
+ directives?: Array<{
35
+ name: string;
36
+ value?: any;
37
+ arg?: any;
38
+ modifiers?: any;
39
+ }>;
27
40
  }>;
28
41
  }> & Readonly<{}>, {
29
42
  loadData: () => Promise<void>;
@@ -34,9 +47,15 @@ export declare const FcProDataTable: {
34
47
  tools: Array<{
35
48
  label: string;
36
49
  type?: "" | "default" | "primary" | "success" | "warning" | "info" | "danger";
37
- onClick: () => void;
38
- disabled?: boolean | (() => boolean);
39
- hidden?: boolean | (() => boolean);
50
+ disabled?: boolean | ((row?: any) => boolean);
51
+ hidden?: boolean | ((row?: any) => boolean);
52
+ onClick: (row: any, index: number) => void;
53
+ directives?: Array<{
54
+ name: string;
55
+ value?: any;
56
+ arg?: any;
57
+ modifiers?: any;
58
+ }>;
40
59
  }>;
41
60
  columns: Array<{
42
61
  prop: string;
@@ -50,10 +69,17 @@ export declare const FcProDataTable: {
50
69
  actions: Array<{
51
70
  label: string;
52
71
  type?: "" | "default" | "primary" | "success" | "warning" | "info" | "danger";
53
- disabled?: boolean | ((row: any) => boolean);
54
- hidden?: boolean | ((row: any) => boolean);
72
+ disabled?: boolean | ((row?: any) => boolean);
73
+ hidden?: boolean | ((row?: any) => boolean);
55
74
  onClick: (row: any, index: number) => void;
75
+ directives?: Array<{
76
+ name: string;
77
+ value?: any;
78
+ arg?: any;
79
+ modifiers?: any;
80
+ }>;
56
81
  }>;
82
+ actionsWidth: number;
57
83
  }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
58
84
  containerRef: HTMLDivElement;
59
85
  queryBoxRef: HTMLDivElement;
@@ -1818,16 +1844,29 @@ export declare const FcProDataTable: {
1818
1844
  actions?: Array<{
1819
1845
  label: string;
1820
1846
  type?: "" | "default" | "primary" | "success" | "warning" | "info" | "danger";
1821
- disabled?: boolean | ((row: any) => boolean);
1822
- hidden?: boolean | ((row: any) => boolean);
1847
+ disabled?: boolean | ((row?: any) => boolean);
1848
+ hidden?: boolean | ((row?: any) => boolean);
1823
1849
  onClick: (row: any, index: number) => void;
1850
+ directives?: Array<{
1851
+ name: string;
1852
+ value?: any;
1853
+ arg?: any;
1854
+ modifiers?: any;
1855
+ }>;
1824
1856
  }>;
1857
+ actionsWidth?: number;
1825
1858
  tools?: Array<{
1826
1859
  label: string;
1827
1860
  type?: "" | "default" | "primary" | "success" | "warning" | "info" | "danger";
1828
- onClick: () => void;
1829
- disabled?: boolean | (() => boolean);
1830
- hidden?: boolean | (() => boolean);
1861
+ disabled?: boolean | ((row?: any) => boolean);
1862
+ hidden?: boolean | ((row?: any) => boolean);
1863
+ onClick: (row: any, index: number) => void;
1864
+ directives?: Array<{
1865
+ name: string;
1866
+ value?: any;
1867
+ arg?: any;
1868
+ modifiers?: any;
1869
+ }>;
1831
1870
  }>;
1832
1871
  }> & Readonly<{}>, {
1833
1872
  loadData: () => Promise<void>;
@@ -1838,9 +1877,15 @@ export declare const FcProDataTable: {
1838
1877
  tools: Array<{
1839
1878
  label: string;
1840
1879
  type?: "" | "default" | "primary" | "success" | "warning" | "info" | "danger";
1841
- onClick: () => void;
1842
- disabled?: boolean | (() => boolean);
1843
- hidden?: boolean | (() => boolean);
1880
+ disabled?: boolean | ((row?: any) => boolean);
1881
+ hidden?: boolean | ((row?: any) => boolean);
1882
+ onClick: (row: any, index: number) => void;
1883
+ directives?: Array<{
1884
+ name: string;
1885
+ value?: any;
1886
+ arg?: any;
1887
+ modifiers?: any;
1888
+ }>;
1844
1889
  }>;
1845
1890
  columns: Array<{
1846
1891
  prop: string;
@@ -1854,10 +1899,17 @@ export declare const FcProDataTable: {
1854
1899
  actions: Array<{
1855
1900
  label: string;
1856
1901
  type?: "" | "default" | "primary" | "success" | "warning" | "info" | "danger";
1857
- disabled?: boolean | ((row: any) => boolean);
1858
- hidden?: boolean | ((row: any) => boolean);
1902
+ disabled?: boolean | ((row?: any) => boolean);
1903
+ hidden?: boolean | ((row?: any) => boolean);
1859
1904
  onClick: (row: any, index: number) => void;
1905
+ directives?: Array<{
1906
+ name: string;
1907
+ value?: any;
1908
+ arg?: any;
1909
+ modifiers?: any;
1910
+ }>;
1860
1911
  }>;
1912
+ actionsWidth: number;
1861
1913
  }>;
1862
1914
  __isFragment?: never;
1863
1915
  __isTeleport?: never;
@@ -1877,16 +1929,29 @@ export declare const FcProDataTable: {
1877
1929
  actions?: Array<{
1878
1930
  label: string;
1879
1931
  type?: "" | "default" | "primary" | "success" | "warning" | "info" | "danger";
1880
- disabled?: boolean | ((row: any) => boolean);
1881
- hidden?: boolean | ((row: any) => boolean);
1932
+ disabled?: boolean | ((row?: any) => boolean);
1933
+ hidden?: boolean | ((row?: any) => boolean);
1882
1934
  onClick: (row: any, index: number) => void;
1935
+ directives?: Array<{
1936
+ name: string;
1937
+ value?: any;
1938
+ arg?: any;
1939
+ modifiers?: any;
1940
+ }>;
1883
1941
  }>;
1942
+ actionsWidth?: number;
1884
1943
  tools?: Array<{
1885
1944
  label: string;
1886
1945
  type?: "" | "default" | "primary" | "success" | "warning" | "info" | "danger";
1887
- onClick: () => void;
1888
- disabled?: boolean | (() => boolean);
1889
- hidden?: boolean | (() => boolean);
1946
+ disabled?: boolean | ((row?: any) => boolean);
1947
+ hidden?: boolean | ((row?: any) => boolean);
1948
+ onClick: (row: any, index: number) => void;
1949
+ directives?: Array<{
1950
+ name: string;
1951
+ value?: any;
1952
+ arg?: any;
1953
+ modifiers?: any;
1954
+ }>;
1890
1955
  }>;
1891
1956
  }> & Readonly<{}>, {
1892
1957
  loadData: () => Promise<void>;
@@ -1897,9 +1962,15 @@ export declare const FcProDataTable: {
1897
1962
  tools: Array<{
1898
1963
  label: string;
1899
1964
  type?: "" | "default" | "primary" | "success" | "warning" | "info" | "danger";
1900
- onClick: () => void;
1901
- disabled?: boolean | (() => boolean);
1902
- hidden?: boolean | (() => boolean);
1965
+ disabled?: boolean | ((row?: any) => boolean);
1966
+ hidden?: boolean | ((row?: any) => boolean);
1967
+ onClick: (row: any, index: number) => void;
1968
+ directives?: Array<{
1969
+ name: string;
1970
+ value?: any;
1971
+ arg?: any;
1972
+ modifiers?: any;
1973
+ }>;
1903
1974
  }>;
1904
1975
  columns: Array<{
1905
1976
  prop: string;
@@ -1913,10 +1984,17 @@ export declare const FcProDataTable: {
1913
1984
  actions: Array<{
1914
1985
  label: string;
1915
1986
  type?: "" | "default" | "primary" | "success" | "warning" | "info" | "danger";
1916
- disabled?: boolean | ((row: any) => boolean);
1917
- hidden?: boolean | ((row: any) => boolean);
1987
+ disabled?: boolean | ((row?: any) => boolean);
1988
+ hidden?: boolean | ((row?: any) => boolean);
1918
1989
  onClick: (row: any, index: number) => void;
1990
+ directives?: Array<{
1991
+ name: string;
1992
+ value?: any;
1993
+ arg?: any;
1994
+ modifiers?: any;
1995
+ }>;
1919
1996
  }>;
1997
+ actionsWidth: number;
1920
1998
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & import('vue').Plugin;
1921
1999
  export default FcProDataTable;
1922
2000
  export * from './DataTable.types';
@@ -0,0 +1,12 @@
1
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
+ content: {
3
+ type: (ObjectConstructor | StringConstructor | NumberConstructor | ArrayConstructor | FunctionConstructor)[];
4
+ required: true;
5
+ };
6
+ }>, () => any, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
7
+ content: {
8
+ type: (ObjectConstructor | StringConstructor | NumberConstructor | ArrayConstructor | FunctionConstructor)[];
9
+ required: true;
10
+ };
11
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
12
+ export default _default;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@funcho/ui",
3
3
  "description": "@funcho ui library",
4
- "version": "1.1.4",
4
+ "version": "1.1.6",
5
5
  "type": "module",
6
6
  "main": "dist/cjs/index.js",
7
7
  "module": "dist/esm/index.mjs",