@qy_better_lib/pc 0.2.7 → 0.2.9

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.
@@ -1,8 +1,33 @@
1
+ import { TableColumn, TableAttr } from './../type';
1
2
  import { DefineComponent, ExtractPropTypes, PropType, Ref, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
- import { TableAttr, TableColumn } from './../type';
3
3
  declare function clearSelection(): void;
4
4
  declare function toggleRowSelection(row: any): void;
5
- declare const _default: __VLS_WithTemplateSlots< DefineComponent<ExtractPropTypes<{
5
+ declare function __VLS_template(): {
6
+ attrs: Partial<{}>;
7
+ slots: Partial<Record<`col_${string}`, (_: {
8
+ index: any;
9
+ data: any;
10
+ }) => any>> & Partial<Record<`header_${string}`, (_: {
11
+ data: TableColumn;
12
+ }) => any>> & {
13
+ 'tool-left'?(_: {}): any;
14
+ 'tool-right'?(_: {}): any;
15
+ expand?(_: {
16
+ index: any;
17
+ data: any;
18
+ }): any;
19
+ operatColumn?(_: {}): any;
20
+ empty?(_: {}): any;
21
+ 'bottom-left'?(_: {}): any;
22
+ };
23
+ refs: {
24
+ tableExtendRef: HTMLDivElement;
25
+ tableRef: unknown;
26
+ };
27
+ rootEl: HTMLDivElement;
28
+ };
29
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
30
+ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
6
31
  options: {
7
32
  type: PropType<TableAttr>;
8
33
  default: () => {};
@@ -12,10 +37,14 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<ExtractPropType
12
37
  default: never[];
13
38
  };
14
39
  tableColums: {
15
- type: PropType< TableColumn[]>;
40
+ type: PropType<Array< TableColumn>>;
16
41
  default: () => never[];
17
42
  };
18
43
  tableLoading: BooleanConstructor;
44
+ expand: {
45
+ type: BooleanConstructor;
46
+ default: () => boolean;
47
+ };
19
48
  selectionCol: {
20
49
  type: BooleanConstructor;
21
50
  default: () => boolean;
@@ -36,7 +65,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<ExtractPropType
36
65
  };
37
66
  total: NumberConstructor;
38
67
  sizeList: {
39
- type: PropType<number[]>;
68
+ type: PropType<Array<number>>;
40
69
  default: () => number[];
41
70
  };
42
71
  autoHeight: {
@@ -68,10 +97,14 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<ExtractPropType
68
97
  default: never[];
69
98
  };
70
99
  tableColums: {
71
- type: PropType< TableColumn[]>;
100
+ type: PropType<Array< TableColumn>>;
72
101
  default: () => never[];
73
102
  };
74
103
  tableLoading: BooleanConstructor;
104
+ expand: {
105
+ type: BooleanConstructor;
106
+ default: () => boolean;
107
+ };
75
108
  selectionCol: {
76
109
  type: BooleanConstructor;
77
110
  default: () => boolean;
@@ -92,7 +125,7 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<ExtractPropType
92
125
  };
93
126
  total: NumberConstructor;
94
127
  sizeList: {
95
- type: PropType<number[]>;
128
+ type: PropType<Array<number>>;
96
129
  default: () => number[];
97
130
  };
98
131
  autoHeight: {
@@ -115,24 +148,18 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<ExtractPropType
115
148
  options: TableAttr;
116
149
  tableData: unknown[];
117
150
  tableLoading: boolean;
151
+ expand: boolean;
118
152
  selectionCol: boolean;
119
153
  indexCol: boolean;
120
154
  isSetColumn: boolean;
121
155
  sizeList: number[];
122
156
  autoHeight: boolean;
123
157
  autoPagination: boolean;
124
- }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>, Partial<Record<`col_${string}`, (_: {
125
- index: any;
126
- data: any;
127
- }) => any>> & Partial<Record<`header_${string}`, (_: {
128
- data: TableColumn;
129
- }) => any>> & {
130
- "tool-left"?(_: {}): any;
131
- "tool-right"?(_: {}): any;
132
- operatColumn?(_: {}): any;
133
- empty?(_: {}): any;
134
- "bottom-left"?(_: {}): any;
135
- }>;
158
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {
159
+ tableExtendRef: HTMLDivElement;
160
+ tableRef: unknown;
161
+ }, HTMLDivElement>;
162
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
136
163
  export default _default;
137
164
  type __VLS_WithTemplateSlots<T, S> = T & {
138
165
  new (): {
@@ -1,4 +1,4 @@
1
- import { defineComponent as G, provide as J, toRef as K, ref as S, watch as v, onMounted as Q, nextTick as W, resolveComponent as C, resolveDirective as X, openBlock as o, createElementBlock as u, unref as l, createElementVNode as g, renderSlot as s, createBlock as i, createCommentVNode as c, withDirectives as Y, mergeProps as h, withCtx as m, createVNode as z, Fragment as $, renderList as Z, createTextVNode as ee, toDisplayString as te } from "vue";
1
+ import { defineComponent as G, provide as J, toRef as K, ref as S, watch as y, onMounted as Q, nextTick as W, resolveComponent as C, resolveDirective as X, createElementBlock as u, openBlock as o, createCommentVNode as n, withDirectives as Y, unref as l, createElementVNode as m, renderSlot as a, createBlock as r, mergeProps as h, withCtx as f, Fragment as $, renderList as Z, createTextVNode as ee, toDisplayString as te, createVNode as z } from "vue";
2
2
  import { useI18n as oe } from "vue-i18n";
3
3
  import le from "../useTable.js";
4
4
  import ne from "../props.js";
@@ -7,13 +7,13 @@ import re from "./colVisible.vue.js";
7
7
  const se = {
8
8
  key: 0,
9
9
  class: "tool-panel"
10
- }, ie = { class: "left-panel" }, ce = { class: "right-panel" }, pe = { class: "default-tool" }, de = ["innerHTML"], ue = {
10
+ }, ie = { class: "left-panel" }, de = { class: "right-panel" }, pe = { class: "default-tool" }, ce = ["innerHTML"], ue = {
11
11
  key: 0,
12
12
  class: "required-ident"
13
13
  }, fe = {
14
14
  key: 1,
15
15
  class: "table-bottom"
16
- }, ge = { class: "left" }, ve = /* @__PURE__ */ G({
16
+ }, ge = { class: "left" }, Se = /* @__PURE__ */ G({
17
17
  __name: "index",
18
18
  props: { ...ne() },
19
19
  emits: [
@@ -24,54 +24,53 @@ const se = {
24
24
  "rowClick",
25
25
  "rowDblClick"
26
26
  ],
27
- setup(R, { expose: T, emit: D }) {
28
- const n = R, p = D, { t: P } = oe(), {
29
- selectionOptions: w,
30
- tableAttribute: x,
31
- pagination: a,
32
- hasPagination: y,
27
+ setup(R, { expose: T, emit: x }) {
28
+ const s = R, p = x, { t: D } = oe(), {
29
+ selectionOptions: v,
30
+ tableAttribute: P,
31
+ pagination: i,
32
+ hasPagination: w,
33
33
  columnConfig: _,
34
34
  colSettingList: I,
35
35
  showToolPanel: L,
36
- showBottomPanel: N,
37
- auto_size: me
38
- } = le(P);
36
+ showBottomPanel: N
37
+ } = le(D);
39
38
  J("table-extend", {
40
- tableProps: n,
41
- tableColums: K(n, "tableColums"),
39
+ tableProps: s,
40
+ tableColums: K(s, "tableColums"),
42
41
  columnConfig: _
43
42
  });
44
- const B = S(), d = S(null), k = S(!1);
45
- v(
46
- () => n.tableColums,
43
+ const B = S(), c = S(null), k = S(!1);
44
+ y(
45
+ () => s.tableColums,
47
46
  () => {
48
- _.showColumn = n.tableColums;
47
+ _.showColumn = s.tableColums;
49
48
  }
50
- ), v(
51
- () => a.pageIndex,
49
+ ), y(
50
+ () => i.pageIndex,
52
51
  (e) => {
53
52
  if (e && e > 0) {
54
53
  if (k.value) {
55
54
  k.value = !1;
56
55
  return;
57
56
  }
58
- p("currentChange", e), d.value.setScrollTop(0);
57
+ p("currentChange", e), c.value.setScrollTop(0);
59
58
  }
60
59
  }
61
- ), v(
62
- () => a.pageSize,
60
+ ), y(
61
+ () => i.pageSize,
63
62
  (e) => {
64
- e && e > 0 && (k.value = !0, a.pageIndex = 1, p("pageSizeChange", e), d.value.setScrollTop(0));
63
+ e && e > 0 && (k.value = !0, i.pageIndex = 1, p("pageSizeChange", e), c.value.setScrollTop(0));
65
64
  }
66
65
  ), Q(() => {
67
66
  W(() => {
68
- n.tableColums && n.tableColums.length > 0 && (_.showColumn = n.tableColums);
67
+ s.tableColums && s.tableColums.length > 0 && (_.showColumn = s.tableColums);
69
68
  }).then(() => {
70
69
  });
71
70
  }), T({
72
71
  clearSelection: q,
73
72
  toggleRowSelection: U,
74
- table: d
73
+ table: c
75
74
  });
76
75
  function E(e) {
77
76
  p("tableSort", {
@@ -80,7 +79,7 @@ const se = {
80
79
  });
81
80
  }
82
81
  function V(e) {
83
- w.rows = e, w.count = e && e.length, p("handleSelectionChange", e);
82
+ v.rows = e, v.count = e && e.length, p("handleSelectionChange", e);
84
83
  }
85
84
  function H(e) {
86
85
  p("rowClick", e);
@@ -89,120 +88,130 @@ const se = {
89
88
  p("rowDblClick", e);
90
89
  }
91
90
  function q() {
92
- var e;
93
- (e = d.value) == null || e.clearSelection();
91
+ c.value?.clearSelection();
94
92
  }
95
93
  function U(e) {
96
- var r;
97
- (r = d.value) == null || r.toggleRowSelection(e);
94
+ c.value?.toggleRowSelection(e);
98
95
  }
99
- return (e, r) => {
100
- const b = C("el-table-column"), j = C("el-empty"), A = C("el-table"), F = C("el-pagination"), O = X("loading");
96
+ return (e, b) => {
97
+ const g = C("el-table-column"), j = C("el-empty"), A = C("el-table"), F = C("el-pagination"), O = X("loading");
101
98
  return o(), u("div", {
102
99
  class: "table-extend",
103
100
  ref_key: "tableExtendRef",
104
101
  ref: B
105
102
  }, [
106
103
  l(L) ? (o(), u("div", se, [
107
- g("div", ie, [
108
- s(e.$slots, "tool-left")
104
+ m("div", ie, [
105
+ a(e.$slots, "tool-left")
109
106
  ]),
110
- g("div", ce, [
111
- s(e.$slots, "tool-right"),
112
- g("div", pe, [
113
- e.isSetColumn ? (o(), i(re, { key: 0 })) : c("", !0)
107
+ m("div", de, [
108
+ a(e.$slots, "tool-right"),
109
+ m("div", pe, [
110
+ e.isSetColumn ? (o(), r(re, { key: 0 })) : n("", !0)
114
111
  ])
115
112
  ])
116
- ])) : c("", !0),
117
- Y((o(), i(A, h({
113
+ ])) : n("", !0),
114
+ Y((o(), r(A, h({
118
115
  ref_key: "tableRef",
119
- ref: d
120
- }, l(x), {
116
+ ref: c
117
+ }, l(P), {
121
118
  data: e.tableData,
122
119
  onSortChange: E,
123
120
  onSelectionChange: V,
124
121
  onRowClick: H,
125
122
  onRowDblclick: M
126
123
  }), {
127
- empty: m(() => [
128
- s(e.$slots, "empty", {}, () => [
124
+ empty: f(() => [
125
+ a(e.$slots, "empty", {}, () => [
129
126
  z(j, { "image-size": 60 })
130
127
  ])
131
128
  ]),
132
- default: m(() => [
133
- e.selectionCol ? (o(), i(b, {
129
+ default: f(() => [
130
+ e.selectionCol ? (o(), r(g, {
134
131
  key: 0,
135
132
  type: "selection",
136
133
  width: 48,
137
134
  fixed: "left"
138
- })) : c("", !0),
139
- e.indexCol ? (o(), i(b, {
135
+ })) : n("", !0),
136
+ e.indexCol ? (o(), r(g, {
140
137
  key: 1,
141
138
  type: "index",
142
139
  label: "序号",
143
140
  width: 58,
144
141
  fixed: "left"
145
- })) : c("", !0),
142
+ })) : n("", !0),
143
+ e.expand ? (o(), r(g, {
144
+ key: 2,
145
+ type: "expand"
146
+ }, {
147
+ default: f(({ row: t, $index: d }) => [
148
+ a(e.$slots, "expand", {
149
+ index: d,
150
+ data: t
151
+ })
152
+ ]),
153
+ _: 3
154
+ })) : n("", !0),
146
155
  (o(!0), u($, null, Z(l(I), (t) => (o(), u($, {
147
156
  key: t.prop
148
157
  }, [
149
- t.isHtml ? (o(), i(b, h({
158
+ t.isHtml ? (o(), r(g, h({
150
159
  key: 0,
151
160
  ref_for: !0
152
161
  }, t), {
153
- default: m((f) => [
154
- g("div", {
155
- innerHTML: t.prop && f.row[t.prop]
156
- }, null, 8, de)
162
+ default: f((d) => [
163
+ m("div", {
164
+ innerHTML: t.prop && d.row[t.prop]
165
+ }, null, 8, ce)
157
166
  ]),
158
167
  _: 2
159
- }, 1040)) : (o(), i(b, h({
168
+ }, 1040)) : (o(), r(g, h({
160
169
  key: 1,
161
170
  ref_for: !0
162
171
  }, t), {
163
- default: m((f) => [
164
- s(e.$slots, `col_${t.prop}`, {
165
- index: f.$index,
166
- data: f.row
172
+ default: f((d) => [
173
+ a(e.$slots, `col_${t.prop}`, {
174
+ index: d.$index,
175
+ data: d.row
167
176
  }, () => [
168
- z(ae, h({ ref_for: !0 }, { row: f.row, colCfg: t }), null, 16)
177
+ z(ae, h({ ref_for: !0 }, { row: d.row, colCfg: t }), null, 16)
169
178
  ])
170
179
  ]),
171
- header: m(() => [
172
- s(e.$slots, `header_${t.prop}`, { data: t }, () => [
173
- t.required ? (o(), u("span", ue, "*")) : c("", !0),
180
+ header: f(() => [
181
+ a(e.$slots, `header_${t.prop}`, { data: t }, () => [
182
+ t.required ? (o(), u("span", ue, "*")) : n("", !0),
174
183
  ee(" " + te(t.label), 1)
175
184
  ])
176
185
  ]),
177
186
  _: 2
178
187
  }, 1040))
179
188
  ], 64))), 128)),
180
- s(e.$slots, "operatColumn")
189
+ a(e.$slots, "operatColumn")
181
190
  ]),
182
191
  _: 3
183
192
  }, 16, ["data"])), [
184
193
  [O, e.tableLoading]
185
194
  ]),
186
- l(N) || l(y) ? (o(), u("div", fe, [
187
- g("div", ge, [
188
- s(e.$slots, "bottom-left")
195
+ l(N) || l(w) ? (o(), u("div", fe, [
196
+ m("div", ge, [
197
+ a(e.$slots, "bottom-left")
189
198
  ]),
190
- l(y) ? (o(), i(F, {
199
+ l(w) ? (o(), r(F, {
191
200
  key: 0,
192
- "current-page": l(a).pageIndex,
193
- "onUpdate:currentPage": r[0] || (r[0] = (t) => l(a).pageIndex = t),
194
- "page-size": l(a).pageSize,
195
- "onUpdate:pageSize": r[1] || (r[1] = (t) => l(a).pageSize = t),
201
+ "current-page": l(i).pageIndex,
202
+ "onUpdate:currentPage": b[0] || (b[0] = (t) => l(i).pageIndex = t),
203
+ "page-size": l(i).pageSize,
204
+ "onUpdate:pageSize": b[1] || (b[1] = (t) => l(i).pageSize = t),
196
205
  "page-sizes": e.sizeList,
197
206
  layout: "total,prev,pager,next,sizes,jumper",
198
207
  total: e.total,
199
208
  background: ""
200
- }, null, 8, ["current-page", "page-size", "page-sizes", "total"])) : c("", !0)
201
- ])) : c("", !0)
209
+ }, null, 8, ["current-page", "page-size", "page-sizes", "total"])) : n("", !0)
210
+ ])) : n("", !0)
202
211
  ], 512);
203
212
  };
204
213
  }
205
214
  });
206
215
  export {
207
- ve as default
216
+ Se as default
208
217
  };
@@ -20,5 +20,5 @@ declare const _default: DefineComponent<ExtractPropTypes<{
20
20
  }>> & Readonly<{}>, {
21
21
  row: Record<string, any>;
22
22
  colCfg: Record<string, any>;
23
- }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
23
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLSpanElement>;
24
24
  export default _default;
@@ -1,4 +1,4 @@
1
- import { defineComponent as l, computed as p, openBlock as r, createElementBlock as u, toDisplayString as a } from "vue";
1
+ import { defineComponent as l, computed as p, createElementBlock as r, openBlock as a, toDisplayString as u } from "vue";
2
2
  const f = /* @__PURE__ */ l({
3
3
  __name: "valueCol",
4
4
  props: {
@@ -15,10 +15,10 @@ const f = /* @__PURE__ */ l({
15
15
  },
16
16
  setup(n) {
17
17
  const c = n, e = p(() => {
18
- const { row: t, colCfg: o } = c;
19
- return t[o.prop];
18
+ const { row: o, colCfg: t } = c;
19
+ return o[t.prop];
20
20
  });
21
- return (t, o) => (r(), u("span", null, a(e.value != null ? e.value : "--"), 1));
21
+ return (o, t) => (a(), r("span", null, u(e.value != null ? e.value : "--"), 1));
22
22
  }
23
23
  });
24
24
  export {
@@ -1,6 +1,5 @@
1
1
  import { TableProps } from 'element-plus';
2
2
  import { Ref } from 'vue';
3
-
4
3
  export type TableAttr = {
5
4
  /**rowKey */
6
5
  rowKey?: string;
@@ -1,6 +1,5 @@
1
1
  import { TableColumn, FileType } from './type';
2
2
  import { ComputedRef } from 'vue';
3
-
4
3
  /**
5
4
  * useTable
6
5
  */
@@ -28,7 +27,7 @@ export default function useTable(i18nInstance?: (key: string) => string): {
28
27
  init?: boolean | undefined;
29
28
  width?: number | undefined;
30
29
  minWidth?: number | undefined;
31
- showOverflowTooltip?: boolean | Record<string, any> | undefined;
30
+ showOverflowTooltip?: (boolean | Record<string, any>) | undefined;
32
31
  sortable?: boolean | undefined;
33
32
  fixed?: "left" | "right" | undefined;
34
33
  fileType?: FileType | undefined;
@@ -44,7 +43,7 @@ export default function useTable(i18nInstance?: (key: string) => string): {
44
43
  init?: boolean | undefined;
45
44
  width?: number | undefined;
46
45
  minWidth?: number | undefined;
47
- showOverflowTooltip?: boolean | Record<string, any> | undefined;
46
+ showOverflowTooltip?: (boolean | Record<string, any>) | undefined;
48
47
  sortable?: boolean | undefined;
49
48
  fixed?: "left" | "right" | undefined;
50
49
  fileType?: FileType | undefined;
@@ -1,15 +1,14 @@
1
- import { getCurrentInstance as L, computed as a, reactive as g, toRef as m } from "vue";
2
- import { FileType as v } from "./type.js";
3
- function R(u) {
4
- var c, p;
5
- const i = L(), t = i == null ? void 0 : i.props, C = {
1
+ import { getCurrentInstance as T, computed as n, reactive as r, toRef as p } from "vue";
2
+ import { FileType as I } from "./type.js";
3
+ function P(g) {
4
+ const l = T(), e = l?.props, h = {
6
5
  rowKey: "id",
7
6
  "element-loading-text": "加载中…",
8
7
  "element-loading-background": "rgba(0, 0, 0, 0.2)",
9
8
  highlightCurrentRow: !0,
10
9
  stripe: !0,
11
10
  border: !1
12
- }, h = {
11
+ }, u = {
13
12
  headerAlign: void 0,
14
13
  align: void 0,
15
14
  prop: void 0,
@@ -19,74 +18,67 @@ function R(u) {
19
18
  showOverflowTooltip: !1,
20
19
  sortable: void 0,
21
20
  fixed: void 0
22
- }, x = a(() => ({
23
- ...C,
24
- ...Object.keys(t.options).length > 0 ? t.options : {}
25
- })), W = g({
21
+ }, f = n(() => ({
22
+ ...h,
23
+ ...Object.keys(e.options).length > 0 ? e.options : {}
24
+ })), w = r({
26
25
  count: 0,
27
26
  rows: []
28
- }), r = g({
29
- pageIndex: (c = t == null ? void 0 : t.paging) != null && c.pageIndex ? m(t.paging, "pageIndex") : 1,
30
- pageSize: (p = t == null ? void 0 : t.paging) != null && p.pageSize ? m(t.paging, "pageSize") : 10
31
- }), T = a(() => {
32
- var o, l;
33
- const n = ((o = t == null ? void 0 : t.paging) == null ? void 0 : o.pageIndex) > 0 && ((l = t == null ? void 0 : t.paging) == null ? void 0 : l.pageSize) > 0;
34
- if (!t.autoPagination)
35
- return n;
36
- const e = t.tableData.length > (t.total || 0) ? t.tableData.length : t.total || 0;
37
- return n && e > r.pageSize;
38
- }), S = g({
27
+ }), d = r({
28
+ pageIndex: e?.paging?.pageIndex ? p(e.paging, "pageIndex") : 1,
29
+ pageSize: e?.paging?.pageSize ? p(e.paging, "pageSize") : 10
30
+ }), b = n(() => {
31
+ const o = e?.paging?.pageIndex > 0 && e?.paging?.pageSize > 0;
32
+ if (!e.autoPagination)
33
+ return o;
34
+ const t = e.tableData.length > (e.total || 0) ? e.tableData.length : e.total || 0;
35
+ return o && t > d.pageSize;
36
+ }), m = r({
39
37
  /**是否显示 */
40
38
  show: !1,
41
39
  /**图片路径 */
42
40
  filePathList: [],
43
41
  /**显示图片的索引 */
44
42
  index: 0
45
- }), d = g({
43
+ }), a = r({
46
44
  showColumn: [],
47
45
  hiddenColumn: []
48
- }), f = a(() => !d.showColumn || d.showColumn.length === 0 ? [
46
+ }), c = n(() => !a.showColumn || a.showColumn.length === 0 ? [
49
47
  {
50
48
  prop: "default-prop",
51
49
  init: !0,
52
50
  label: ""
53
51
  }
54
- ] : d.showColumn.map((e) => {
55
- if (u && e.langue && (e.label = u(e.langue)), e.autoW) {
56
- const { baseW: o = 1920 } = e;
57
- e.width ? e.width = s(e.width || 0, o) : e.minWidth && (e.minWidth = s(e.minWidth || 0, o));
52
+ ] : a.showColumn.map((t) => {
53
+ if (g && t.langue && (t.label = g(t.langue)), t.autoW) {
54
+ const { baseW: i = 1920 } = t;
55
+ t.width ? t.width = s(t.width || 0, i) : t.minWidth && (t.minWidth = s(t.minWidth || 0, i));
58
56
  }
59
- return { ...h, ...e };
60
- })), y = a(() => {
61
- var n, e, o, l, w, b;
62
- return (((o = (e = i == null ? void 0 : (n = i.slots)["tool-left"]) == null ? void 0 : e.call(n)) == null ? void 0 : o.length) || 0) > 0 || (((b = (w = i == null ? void 0 : (l = i.slots)["tool-right"]) == null ? void 0 : w.call(l)) == null ? void 0 : b.length) || 0) > 0;
63
- }), P = a(() => {
64
- var n, e, o;
65
- return (((o = (e = i == null ? void 0 : (n = i.slots)["tool-left"]) == null ? void 0 : e.call(n)) == null ? void 0 : o.length) || 0) > 0;
66
- }), z = a(() => f.value.some(
67
- (n) => n.fileType && n.fileType == v.PICTURE
57
+ return { ...u, ...t };
58
+ })), v = n(() => (l?.slots["tool-left"]?.()?.length || 0) > 0 || (l?.slots["tool-right"]?.()?.length || 0) > 0), C = n(() => (l?.slots["tool-left"]?.()?.length || 0) > 0), x = n(() => c.value.some(
59
+ (o) => o.fileType && o.fileType == I.PICTURE
68
60
  ));
69
- function s(n, e = 1920) {
70
- let o = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
71
- if (!o) return n;
72
- let l = o / e;
73
- return Number((n * l).toFixed(3));
61
+ function s(o, t = 1920) {
62
+ let i = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
63
+ if (!i) return o;
64
+ let W = i / t;
65
+ return Number((o * W).toFixed(3));
74
66
  }
75
67
  return {
76
- defColSetting: h,
77
- selectionOptions: W,
78
- tableAttribute: x,
79
- pagination: r,
80
- hasPagination: T,
81
- imageViewer: S,
82
- columnConfig: d,
83
- colSettingList: f,
84
- showToolPanel: y,
85
- showBottomPanel: P,
86
- hasImageViewer: z,
68
+ defColSetting: u,
69
+ selectionOptions: w,
70
+ tableAttribute: f,
71
+ pagination: d,
72
+ hasPagination: b,
73
+ imageViewer: m,
74
+ columnConfig: a,
75
+ colSettingList: c,
76
+ showToolPanel: v,
77
+ showBottomPanel: C,
78
+ hasImageViewer: x,
87
79
  auto_size: s
88
80
  };
89
81
  }
90
82
  export {
91
- R as default
83
+ P as default
92
84
  };
@@ -1,3 +1,2 @@
1
1
  import { default as textButton } from './src/index.vue';
2
-
3
2
  export default textButton;
@@ -1,5 +1,14 @@
1
1
  import { DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
- declare const _default: __VLS_WithTemplateSlots< DefineComponent<ExtractPropTypes<{
2
+ declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
4
+ slots: {
5
+ default?(_: {}): any;
6
+ };
7
+ refs: {};
8
+ rootEl: HTMLDivElement;
9
+ };
10
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
11
+ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
3
12
  type: {
4
13
  type: StringConstructor;
5
14
  default: string;
@@ -22,9 +31,8 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<ExtractPropType
22
31
  }>, {
23
32
  type: string;
24
33
  disabled: boolean;
25
- }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>, {
26
- default?(_: {}): any;
27
- }>;
34
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
35
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
28
36
  export default _default;
29
37
  type __VLS_WithTemplateSlots<T, S> = T & {
30
38
  new (): {
@@ -1,4 +1,4 @@
1
- import { defineComponent as s, resolveComponent as d, openBlock as o, createElementBlock as m, normalizeClass as u, createBlock as i, withCtx as p, resolveDynamicComponent as f, createCommentVNode as b, createElementVNode as k, withModifiers as x, renderSlot as C } from "vue";
1
+ import { defineComponent as s, resolveComponent as d, createElementBlock as m, openBlock as o, normalizeClass as u, createBlock as i, createCommentVNode as p, createElementVNode as f, withCtx as b, resolveDynamicComponent as k, withModifiers as x, renderSlot as C } from "vue";
2
2
  const B = /* @__PURE__ */ s({
3
3
  name: "TextButton",
4
4
  __name: "index",
@@ -36,12 +36,12 @@ const B = /* @__PURE__ */ s({
36
36
  key: 0,
37
37
  class: "text-button-icon"
38
38
  }, {
39
- default: p(() => [
40
- (o(), i(f(t.icon)))
39
+ default: b(() => [
40
+ (o(), i(k(t.icon)))
41
41
  ]),
42
42
  _: 1
43
- })) : b("", !0),
44
- k("div", {
43
+ })) : p("", !0),
44
+ f("div", {
45
45
  class: "text-button-inner",
46
46
  onClick: x(l, ["prevent"])
47
47
  }, [