@funcho/ui 1.1.4 → 1.1.5

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.
@@ -97,6 +97,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
97
97
  fields: { default: () => [] },
98
98
  request: { type: Function, default: () => Promise.resolve({ data: { list: [], total: 0 } }) },
99
99
  actions: { default: () => [] },
100
+ actionsWidth: { default: 0 },
100
101
  tools: { default: () => [] }
101
102
  },
102
103
  setup(__props, { expose: __expose }) {
@@ -254,17 +255,18 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
254
255
  }, 8, ["disabled"]),
255
256
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(props.tools, (tool, i) => {
256
257
  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
+ (typeof tool.hidden === "function" ? !tool.hidden() : !tool.hidden) ? (vue.openBlock(), vue.createBlock(vue.unref(index.FcButton), vue.mergeProps({
258
259
  key: 0,
259
- type: tool.type || "primary",
260
+ type: tool.type || "primary"
261
+ }, { ref_for: true }, tool, {
260
262
  disabled: typeof tool.disabled === "function" ? tool.disabled() : tool.disabled,
261
263
  onClick: tool.onClick
262
- }, {
264
+ }), {
263
265
  default: vue.withCtx(() => [
264
266
  vue.createTextVNode(vue.toDisplayString(tool.label), 1)
265
267
  ]),
266
268
  _: 2
267
- }, 1032, ["type", "disabled", "onClick"])) : vue.createCommentVNode("", true)
269
+ }, 1040, ["type", "disabled", "onClick"])) : vue.createCommentVNode("", true)
268
270
  ], 64);
269
271
  }), 128))
270
272
  ], 2)
@@ -304,7 +306,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
304
306
  key: "actions",
305
307
  label: "操作",
306
308
  align: "right",
307
- fixed: "right"
309
+ fixed: "right",
310
+ width: __props.actionsWidth || void 0
308
311
  }, {
309
312
  default: vue.withCtx(({ row, $index }) => [
310
313
  vue.createElementVNode("div", {
@@ -312,24 +315,25 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
312
315
  }, [
313
316
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(props.actions, (action, i) => {
314
317
  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)), {
318
+ (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)), vue.mergeProps({
316
319
  key: 0,
317
320
  type: action.type || "primary",
318
- disabled: typeof action.disabled === "function" ? action.disabled(row) : action.disabled,
321
+ disabled: typeof action.disabled === "function" ? action.disabled(row) : action.disabled
322
+ }, { ref_for: true }, action, {
319
323
  onClick: ($event) => action.label.includes("删除") ? void 0 : action.onClick(row, $index),
320
324
  onConfirm: ($event) => action.label.includes("删除") ? action.onClick(row, $index) : void 0
321
- }, {
325
+ }), {
322
326
  default: vue.withCtx(() => [
323
327
  vue.createTextVNode(vue.toDisplayString(action.label), 1)
324
328
  ]),
325
329
  _: 2
326
- }, 1064, ["type", "disabled", "onClick", "onConfirm"])) : vue.createCommentVNode("", true)
330
+ }, 1040, ["type", "disabled", "onClick", "onConfirm"])) : vue.createCommentVNode("", true)
327
331
  ], 64);
328
332
  }), 128))
329
333
  ], 2)
330
334
  ]),
331
335
  _: 1
332
- })) : vue.createCommentVNode("", true)
336
+ }, 8, ["width"])) : vue.createCommentVNode("", true)
333
337
  ]),
334
338
  _: 1
335
339
  }, 16, ["data", "max-height"])), [
@@ -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.5";
6
6
 
7
7
  exports.version = version;
@@ -93,6 +93,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
93
93
  fields: { default: () => [] },
94
94
  request: { type: Function, default: () => Promise.resolve({ data: { list: [], total: 0 } }) },
95
95
  actions: { default: () => [] },
96
+ actionsWidth: { default: 0 },
96
97
  tools: { default: () => [] }
97
98
  },
98
99
  setup(__props, { expose: __expose }) {
@@ -250,17 +251,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
250
251
  }, 8, ["disabled"]),
251
252
  (openBlock(true), createElementBlock(Fragment, null, renderList(props.tools, (tool, i) => {
252
253
  return openBlock(), createElementBlock(Fragment, { key: i }, [
253
- (typeof tool.hidden === "function" ? !tool.hidden() : !tool.hidden) ? (openBlock(), createBlock(unref(FcButton), {
254
+ (typeof tool.hidden === "function" ? !tool.hidden() : !tool.hidden) ? (openBlock(), createBlock(unref(FcButton), mergeProps({
254
255
  key: 0,
255
- type: tool.type || "primary",
256
+ type: tool.type || "primary"
257
+ }, { ref_for: true }, tool, {
256
258
  disabled: typeof tool.disabled === "function" ? tool.disabled() : tool.disabled,
257
259
  onClick: tool.onClick
258
- }, {
260
+ }), {
259
261
  default: withCtx(() => [
260
262
  createTextVNode(toDisplayString(tool.label), 1)
261
263
  ]),
262
264
  _: 2
263
- }, 1032, ["type", "disabled", "onClick"])) : createCommentVNode("", true)
265
+ }, 1040, ["type", "disabled", "onClick"])) : createCommentVNode("", true)
264
266
  ], 64);
265
267
  }), 128))
266
268
  ], 2)
@@ -300,7 +302,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
300
302
  key: "actions",
301
303
  label: "操作",
302
304
  align: "right",
303
- fixed: "right"
305
+ fixed: "right",
306
+ width: __props.actionsWidth || void 0
304
307
  }, {
305
308
  default: withCtx(({ row, $index }) => [
306
309
  createElementVNode("div", {
@@ -308,24 +311,25 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
308
311
  }, [
309
312
  (openBlock(true), createElementBlock(Fragment, null, renderList(props.actions, (action, i) => {
310
313
  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)), {
314
+ (typeof action.hidden === "function" ? !action.hidden(row) : !action.hidden) ? (openBlock(), createBlock(resolveDynamicComponent(action.label.includes("删除") ? unref(FcDangerButton) : unref(FcLinkButton)), mergeProps({
312
315
  key: 0,
313
316
  type: action.type || "primary",
314
- disabled: typeof action.disabled === "function" ? action.disabled(row) : action.disabled,
317
+ disabled: typeof action.disabled === "function" ? action.disabled(row) : action.disabled
318
+ }, { ref_for: true }, action, {
315
319
  onClick: ($event) => action.label.includes("删除") ? void 0 : action.onClick(row, $index),
316
320
  onConfirm: ($event) => action.label.includes("删除") ? action.onClick(row, $index) : void 0
317
- }, {
321
+ }), {
318
322
  default: withCtx(() => [
319
323
  createTextVNode(toDisplayString(action.label), 1)
320
324
  ]),
321
325
  _: 2
322
- }, 1064, ["type", "disabled", "onClick", "onConfirm"])) : createCommentVNode("", true)
326
+ }, 1040, ["type", "disabled", "onClick", "onConfirm"])) : createCommentVNode("", true)
323
327
  ], 64);
324
328
  }), 128))
325
329
  ], 2)
326
330
  ]),
327
331
  _: 1
328
- })) : createCommentVNode("", true)
332
+ }, 8, ["width"])) : createCommentVNode("", true)
329
333
  ]),
330
334
  _: 1
331
335
  }, 16, ["data", "max-height"])), [
@@ -1,3 +1,3 @@
1
- const version = "1.1.4";
1
+ const version = "1.1.5";
2
2
 
3
3
  export { version };
@@ -21,6 +21,7 @@ type __VLS_Props = {
21
21
  hidden?: boolean | ((row: any) => boolean);
22
22
  onClick: (row: any, index: number) => void;
23
23
  }>;
24
+ actionsWidth?: number;
24
25
  tools?: Array<{
25
26
  label: string;
26
27
  type?: ButtonType;
@@ -58,6 +59,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
58
59
  hidden?: boolean | ((row: any) => boolean);
59
60
  onClick: (row: any, index: number) => void;
60
61
  }>;
62
+ actionsWidth: number;
61
63
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
62
64
  containerRef: HTMLDivElement;
63
65
  queryBoxRef: HTMLDivElement;
@@ -18,6 +18,7 @@ export declare const FcProDataTable: {
18
18
  hidden?: boolean | ((row: any) => boolean);
19
19
  onClick: (row: any, index: number) => void;
20
20
  }>;
21
+ actionsWidth?: number;
21
22
  tools?: Array<{
22
23
  label: string;
23
24
  type?: "" | "default" | "primary" | "success" | "warning" | "info" | "danger";
@@ -54,6 +55,7 @@ export declare const FcProDataTable: {
54
55
  hidden?: boolean | ((row: any) => boolean);
55
56
  onClick: (row: any, index: number) => void;
56
57
  }>;
58
+ actionsWidth: number;
57
59
  }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
58
60
  containerRef: HTMLDivElement;
59
61
  queryBoxRef: HTMLDivElement;
@@ -1822,6 +1824,7 @@ export declare const FcProDataTable: {
1822
1824
  hidden?: boolean | ((row: any) => boolean);
1823
1825
  onClick: (row: any, index: number) => void;
1824
1826
  }>;
1827
+ actionsWidth?: number;
1825
1828
  tools?: Array<{
1826
1829
  label: string;
1827
1830
  type?: "" | "default" | "primary" | "success" | "warning" | "info" | "danger";
@@ -1858,6 +1861,7 @@ export declare const FcProDataTable: {
1858
1861
  hidden?: boolean | ((row: any) => boolean);
1859
1862
  onClick: (row: any, index: number) => void;
1860
1863
  }>;
1864
+ actionsWidth: number;
1861
1865
  }>;
1862
1866
  __isFragment?: never;
1863
1867
  __isTeleport?: never;
@@ -1881,6 +1885,7 @@ export declare const FcProDataTable: {
1881
1885
  hidden?: boolean | ((row: any) => boolean);
1882
1886
  onClick: (row: any, index: number) => void;
1883
1887
  }>;
1888
+ actionsWidth?: number;
1884
1889
  tools?: Array<{
1885
1890
  label: string;
1886
1891
  type?: "" | "default" | "primary" | "success" | "warning" | "info" | "danger";
@@ -1917,6 +1922,7 @@ export declare const FcProDataTable: {
1917
1922
  hidden?: boolean | ((row: any) => boolean);
1918
1923
  onClick: (row: any, index: number) => void;
1919
1924
  }>;
1925
+ actionsWidth: number;
1920
1926
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & import('vue').Plugin;
1921
1927
  export default FcProDataTable;
1922
1928
  export * from './DataTable.types';
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.5",
5
5
  "type": "module",
6
6
  "main": "dist/cjs/index.js",
7
7
  "module": "dist/esm/index.mjs",