@keyblade/pro-components 1.13.8-alpha.3 → 1.13.8-alpha.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.
@@ -1,7 +1,9 @@
1
1
  import { ProFooterBarProps } from './pro-footer-bar/inerface';
2
+ import { ProTableProps } from './pro-table/interface';
2
3
  import { ProTextareaProps } from './pro-textarea';
3
4
  export interface GlobalProps {
4
5
  footerBar?: ProFooterBarProps;
5
6
  textarea?: ProTextareaProps;
7
+ table?: ProTableProps;
6
8
  }
7
9
  export declare const globalProps: GlobalProps;
@@ -1,7 +1,7 @@
1
1
  import o from "./pro-date-range-picker.vue2.js";
2
2
  /* empty css */
3
- import e from "../_virtual/_plugin-vue_export-helper.js";
4
- const _ = /* @__PURE__ */ e(o, [["__scopeId", "data-v-960e2e33"]]);
3
+ import r from "../_virtual/_plugin-vue_export-helper.js";
4
+ const _ = /* @__PURE__ */ r(o, [["__scopeId", "data-v-26a58e45"]]);
5
5
  export {
6
6
  _ as default
7
7
  };
@@ -1,7 +1,7 @@
1
- import { defineComponent as R, ref as m, computed as h, resolveComponent as y, createElementBlock as w, openBlock as N, normalizeClass as q, createVNode as n, mergeProps as c, withCtx as f, createTextVNode as A, toDisplayString as H, nextTick as D } from "vue";
1
+ import { defineComponent as R, ref as p, computed as y, resolveComponent as b, createElementBlock as w, openBlock as I, normalizeClass as N, createVNode as i, mergeProps as s, withCtx as c, createTextVNode as q, toDisplayString as A, nextTick as D } from "vue";
2
2
  import o from "dayjs";
3
- import { range as p } from "./pro-date-range-picker.js";
4
- const I = "keyblade-pro-date-range-picker", $ = /* @__PURE__ */ R({
3
+ import { range as f } from "./pro-date-range-picker.js";
4
+ const H = "keyblade-pro-date-range-picker", $ = /* @__PURE__ */ R({
5
5
  __name: "pro-date-range-picker",
6
6
  props: {
7
7
  modelValue: {},
@@ -17,7 +17,7 @@ const I = "keyblade-pro-date-range-picker", $ = /* @__PURE__ */ R({
17
17
  },
18
18
  emits: ["update:modelValue"],
19
19
  setup(F, { emit: g }) {
20
- const e = F, V = g, k = m(), P = m(), i = m(), s = h({
20
+ const e = F, V = g, h = p(), P = p(), n = p(), u = y({
21
21
  get: () => e.modelValue[e.startField],
22
22
  set: (t) => {
23
23
  V("update:modelValue", {
@@ -25,7 +25,7 @@ const I = "keyblade-pro-date-range-picker", $ = /* @__PURE__ */ R({
25
25
  [e.startField]: t
26
26
  });
27
27
  }
28
- }), b = h({
28
+ }), k = y({
29
29
  get: () => e.modelValue[e.endField],
30
30
  set: (t) => {
31
31
  V("update:modelValue", {
@@ -43,24 +43,24 @@ const I = "keyblade-pro-date-range-picker", $ = /* @__PURE__ */ R({
43
43
  return e.modelValue[e.startField] ? (e.intraday && ((d = e.datePickerProps) != null && d.showTime) && t.setDate(t.getDate() + 1), o(t).isBefore(o(e.modelValue[e.startField]))) : !1;
44
44
  }, C = (t) => {
45
45
  if (!e.modelValue[e.startField] || !t || !e.intraday) {
46
- i.value = {};
46
+ n.value = {};
47
47
  return;
48
48
  }
49
49
  const a = o(e.modelValue[e.startField]), d = o(t);
50
50
  if (!a.isSame(d, "day")) {
51
- i.value = {};
51
+ n.value = {};
52
52
  return;
53
53
  }
54
- const l = a.hour(), r = a.minute(), _ = a.second();
55
- i.value = {
56
- disabledHours: () => p(0, l),
57
- disabledMinutes: (u) => u === l ? p(0, r) : [],
58
- disabledSeconds: (u, B) => u === l && B === r ? p(0, _) : []
54
+ const l = a.hour(), r = a.minute(), B = a.second();
55
+ n.value = {
56
+ disabledHours: () => f(0, l),
57
+ disabledMinutes: (m) => m === l ? f(0, r) : [],
58
+ disabledSeconds: (m, _) => m === l && _ === r ? f(0, B) : []
59
59
  };
60
60
  }, T = () => {
61
61
  setTimeout(() => {
62
62
  const t = e.modelValue[e.endField], a = e.modelValue[e.startField];
63
- o(a).isAfter(o(t)) && (s.value = t), t && !a && D(() => {
63
+ o(a).isAfter(o(t)) && (u.value = t), t && !a && D(() => {
64
64
  var l;
65
65
  const d = (l = P.value) == null ? void 0 : l.$el.parentElement.querySelector("input");
66
66
  d && d.click();
@@ -70,26 +70,26 @@ const I = "keyblade-pro-date-range-picker", $ = /* @__PURE__ */ R({
70
70
  setTimeout(() => {
71
71
  e.modelValue[e.endField] && !e.modelValue[e.startField] && D(() => {
72
72
  var a;
73
- const t = (a = k.value) == null ? void 0 : a.$el.parentElement.querySelector("input");
73
+ const t = (a = h.value) == null ? void 0 : a.$el.parentElement.querySelector("input");
74
74
  t && t.click();
75
75
  });
76
76
  });
77
77
  };
78
78
  return (t, a) => {
79
- const d = y("a-date-picker"), l = y("a-form-item");
80
- return N(), w("div", {
81
- class: q(I)
79
+ const d = b("a-date-picker"), l = b("a-form-item");
80
+ return I(), w("div", {
81
+ class: N(H)
82
82
  }, [
83
- n(l, c(t.formItemProps, {
83
+ i(l, s(t.formItemProps, {
84
84
  field: t.startField,
85
85
  "hide-label": t.hideLabel
86
86
  }), {
87
- default: f(() => [
88
- n(d, c({
87
+ default: c(() => [
88
+ i(d, s({
89
89
  ref_key: "startDatePickerRef",
90
- ref: k,
91
- modelValue: s.value,
92
- "onUpdate:modelValue": a[0] || (a[0] = (r) => s.value = r)
90
+ ref: h,
91
+ modelValue: u.value,
92
+ "onUpdate:modelValue": a[0] || (a[0] = (r) => u.value = r)
93
93
  }, t.datePickerProps, {
94
94
  placeholder: t.startPlaceholder,
95
95
  "disabled-date": (r) => v(r),
@@ -98,33 +98,36 @@ const I = "keyblade-pro-date-range-picker", $ = /* @__PURE__ */ R({
98
98
  ]),
99
99
  _: 1
100
100
  }, 16, ["field", "hide-label"]),
101
- n(l, { "hide-label": "" }, {
102
- default: f(() => [
103
- A(H(t.separator), 1)
101
+ i(l, {
102
+ "hide-label": "",
103
+ style: { "max-height": "32px", top: "0px" }
104
+ }, {
105
+ default: c(() => [
106
+ q(A(t.separator), 1)
104
107
  ]),
105
108
  _: 1
106
109
  }),
107
- n(l, {
110
+ i(l, s(t.formItemProps, {
108
111
  field: t.endField,
109
112
  "hide-label": "",
110
113
  style: { "margin-right": "0px" }
111
- }, {
112
- default: f(() => [
113
- n(d, c({
114
+ }), {
115
+ default: c(() => [
116
+ i(d, s({
114
117
  ref_key: "endDatePickerRef",
115
118
  ref: P,
116
- modelValue: b.value,
117
- "onUpdate:modelValue": a[1] || (a[1] = (r) => b.value = r)
119
+ modelValue: k.value,
120
+ "onUpdate:modelValue": a[1] || (a[1] = (r) => k.value = r)
118
121
  }, t.datePickerProps, {
119
122
  placeholder: t.endPlaceholder,
120
123
  "disabled-date": (r) => S(r),
121
- "disabled-time": () => i.value,
124
+ "disabled-time": () => n.value,
122
125
  onSelect: C,
123
126
  onChange: E
124
127
  }), null, 16, ["modelValue", "placeholder", "disabled-date", "disabled-time"])
125
128
  ]),
126
129
  _: 1
127
- }, 8, ["field"])
130
+ }, 16, ["field"])
128
131
  ]);
129
132
  };
130
133
  }
@@ -1,131 +1,131 @@
1
- import { ref as r, computed as L, watch as g } from "vue";
1
+ import { ref as h, computed as L, watch as g } from "vue";
2
2
  import { useRoute as R, useRouter as W } from "vue-router";
3
3
  import { ProLayoutMode as P, ProLayoutMenuType as B } from "./enum.js";
4
- function z(u) {
5
- const o = R(), h = W(), y = r([]), T = r([]), i = r(), v = r([]), M = r({}), k = r([]), s = r([]), p = r([]), b = r([]), f = r([]), d = L(() => {
6
- const a = [...u.menuItems], e = (n) => {
7
- n.forEach((l) => {
4
+ function z(o) {
5
+ const u = R(), r = W(), y = h([]), T = h([]), i = h(), v = h([]), M = h({}), k = h([]), s = h([]), p = h([]), b = h([]), f = h([]), d = L(() => {
6
+ const e = [...o.menuItems], a = (t) => {
7
+ t.forEach((l) => {
8
8
  if (l != null && l.children && l.children.length > 0) {
9
9
  if ((l == null ? void 0 : l.topChildrenMenu) !== void 0)
10
- l.children = l.children.map((t) => ({ ...t, topMenu: l == null ? void 0 : l.topChildrenMenu }));
10
+ l.children = l.children.map((n) => ({ ...n, topMenu: l == null ? void 0 : l.topChildrenMenu }));
11
11
  else {
12
- const t = l.children.find((c) => c.topMenu !== void 0);
13
- t && (l.topChildrenMenu = t.topMenu, l.children = l.children.map((c) => ({ ...c, topMenu: t.topMenu })));
12
+ const n = l.children.find((c) => c.topMenu !== void 0);
13
+ n && (l.topChildrenMenu = n.topMenu, l.children = l.children.map((c) => ({ ...c, topMenu: n.topMenu })));
14
14
  }
15
- e(l.children);
15
+ a(l.children);
16
16
  }
17
17
  });
18
18
  };
19
- return u.layout === P.mix && e(a), a;
20
- }), C = (a) => {
21
- var e;
22
- y.value = [a.name], !(a != null && a.children) || ((e = a == null ? void 0 : a.children) == null ? void 0 : e.length) === 0 ? (f.value = [], h == null || h.push({ path: a.path })) : f.value = a.children;
23
- }, E = (a) => {
24
- h == null || h.push({ path: a.path }), T.value = [a.name];
25
- }, N = async (a, e) => {
26
- if (e != null && e.path && !(u != null && u.onMenuItemClick && !await u.onMenuItemClick(e))) {
27
- if (e.path.startsWith("http") || e.path.startsWith("https")) {
28
- window.open(e.path);
19
+ return o.layout === P.mix && a(e), e;
20
+ }), C = (e) => {
21
+ var a;
22
+ y.value = [e.name], !(e != null && e.children) || ((a = e == null ? void 0 : e.children) == null ? void 0 : a.length) === 0 ? (f.value = [], r == null || r.push({ path: e.path })) : f.value = e.children;
23
+ }, E = (e) => {
24
+ e != null && e.name ? r == null || r.push({ name: e.name }) : r == null || r.push({ path: e.path, params: {} }), T.value = [e.name];
25
+ }, N = async (e, a) => {
26
+ if (a != null && a.path && !(o != null && o.onMenuItemClick && !await o.onMenuItemClick(a))) {
27
+ if (a.path.startsWith("http") || a.path.startsWith("https")) {
28
+ window.open(a.path);
29
29
  return;
30
30
  }
31
- a === B.top ? C(e) : E(e);
31
+ e === B.top ? C(a) : E(a);
32
32
  }
33
33
  }, S = () => {
34
- const a = [], e = (n) => {
34
+ const e = [], a = (t) => {
35
35
  var l;
36
- for (const t in n) {
37
- const c = n[t];
38
- if (c.name === ((l = i == null ? void 0 : i.value) == null ? void 0 : l.name) || c.children && c.children.length > 0 && e(c.children))
39
- return a.unshift(c), !0;
36
+ for (const n in t) {
37
+ const c = t[n];
38
+ if (c.name === ((l = i == null ? void 0 : i.value) == null ? void 0 : l.name) || c.children && c.children.length > 0 && a(c.children))
39
+ return e.unshift(c), !0;
40
40
  }
41
41
  return !1;
42
42
  };
43
- e(JSON.parse(JSON.stringify(d.value))), v.value = a;
43
+ a(JSON.parse(JSON.stringify(d.value))), v.value = e;
44
44
  }, x = () => {
45
- var e, n, l;
46
- const a = (e = v.value) == null ? void 0 : e.map((t) => ({ path: t == null ? void 0 : t.path, label: t == null ? void 0 : t.title }));
47
- k.value = (n = i.value) != null && n.breadcrumbs ? (l = i.value) == null ? void 0 : l.breadcrumbs : a.length !== 0 ? a : [];
45
+ var a, t, l;
46
+ const e = (a = v.value) == null ? void 0 : a.map((n) => ({ path: n == null ? void 0 : n.path, label: n == null ? void 0 : n.title }));
47
+ k.value = (t = i.value) != null && t.breadcrumbs ? (l = i.value) == null ? void 0 : l.breadcrumbs : e.length !== 0 ? e : [];
48
48
  };
49
49
  function A() {
50
50
  if (!i.value || i.value.noAffix) {
51
- s.value.forEach((t) => {
52
- t.active = !1;
51
+ s.value.forEach((n) => {
52
+ n.active = !1;
53
53
  });
54
54
  return;
55
55
  }
56
- const { name: a, title: e } = i.value;
57
- let n = -1;
58
- s.value.forEach((t, c) => {
59
- t.active = !1, t.name === a && (n = c);
56
+ const { name: e, title: a } = i.value;
57
+ let t = -1;
58
+ s.value.forEach((n, c) => {
59
+ n.active = !1, n.name === e && (t = c);
60
60
  });
61
61
  const l = {
62
- name: a,
63
- parentNames: v.value.map((t) => t.name),
64
- title: e ?? a,
65
- fullPath: o.fullPath,
62
+ name: e,
63
+ parentNames: v.value.map((n) => n.name),
64
+ title: a ?? e,
65
+ fullPath: u.fullPath,
66
66
  active: !0
67
67
  };
68
- if (~n) {
69
- const t = s.value[n];
70
- t.fullPath === o.fullPath ? (t.active = !0, t.fullPath = o.fullPath) : (s.value.splice(n, 1), setTimeout(() => {
68
+ if (~t) {
69
+ const n = s.value[t];
70
+ n.fullPath === u.fullPath ? (n.active = !0, n.fullPath = u.fullPath) : (s.value.splice(t, 1), setTimeout(() => {
71
71
  s.value.push(l);
72
72
  }));
73
73
  } else
74
74
  s.value.push(l);
75
75
  }
76
- const w = (a) => {
77
- const e = s.value.findIndex((l) => l.name === a), n = s.value[e];
78
- h.push(n.fullPath);
79
- }, K = (a) => {
80
- let e = -1, n = -1;
81
- if (s.value.forEach((t, c) => {
82
- t.name === a && (n = c), t.active && (e = c);
83
- }), e === n) {
84
- let t;
85
- n === 0 ? t = s.value[n + 1] : t = s.value[n - 1], t.active = !0, h.push(t.fullPath);
76
+ const w = (e) => {
77
+ const a = s.value.findIndex((l) => l.name === e), t = s.value[a];
78
+ r.push(t.fullPath);
79
+ }, K = (e) => {
80
+ let a = -1, t = -1;
81
+ if (s.value.forEach((n, c) => {
82
+ n.name === e && (t = c), n.active && (a = c);
83
+ }), a === t) {
84
+ let n;
85
+ t === 0 ? n = s.value[t + 1] : n = s.value[t - 1], n.active = !0, r.push(n.fullPath);
86
86
  }
87
- const l = s.value.splice(n, 1);
87
+ const l = s.value.splice(t, 1);
88
88
  O(l[0]);
89
89
  }, J = () => {
90
- var e;
91
- if (u != null && u.disableKeepAlive || (e = o == null ? void 0 : o.meta) != null && e.ignoreCache)
90
+ var a;
91
+ if (o != null && o.disableKeepAlive || (a = u == null ? void 0 : u.meta) != null && a.ignoreCache)
92
92
  return;
93
- const a = new Set(p.value);
94
- v.value.forEach((n) => {
95
- n.name && a.add(n.name);
96
- }), p.value = Array.from(a.values());
97
- }, O = (a) => {
98
93
  const e = new Set(p.value);
99
- a.parentNames.forEach((n) => {
100
- e.delete(n);
101
- }), s.value.forEach((n) => {
102
- n.parentNames.forEach((l) => {
103
- const t = M.value[l];
104
- t != null && t.ignoreCache || e.add(t.name);
105
- });
94
+ v.value.forEach((t) => {
95
+ t.name && e.add(t.name);
106
96
  }), p.value = Array.from(e.values());
97
+ }, O = (e) => {
98
+ const a = new Set(p.value);
99
+ e.parentNames.forEach((t) => {
100
+ a.delete(t);
101
+ }), s.value.forEach((t) => {
102
+ t.parentNames.forEach((l) => {
103
+ const n = M.value[l];
104
+ n != null && n.ignoreCache || a.add(n.name);
105
+ });
106
+ }), p.value = Array.from(a.values());
107
107
  };
108
108
  return g(() => d.value, () => {
109
- const a = {}, e = (n) => {
110
- n.forEach((l) => {
111
- l.children && l.children.length > 0 && e(l.children), delete l.children, a[l.name] = l;
109
+ const e = {}, a = (t) => {
110
+ t.forEach((l) => {
111
+ l.children && l.children.length > 0 && a(l.children), delete l.children, e[l.name] = l;
112
112
  });
113
113
  };
114
- e(JSON.parse(JSON.stringify(d.value))), M.value = a;
115
- }, { immediate: !0 }), g(() => [u.layout, d.value], () => {
116
- var a;
117
- if (b.value = [], f.value = [], u.layout === P.side)
114
+ a(JSON.parse(JSON.stringify(d.value))), M.value = e;
115
+ }, { immediate: !0 }), g(() => [o.layout, d.value], () => {
116
+ var e;
117
+ if (b.value = [], f.value = [], o.layout === P.side)
118
118
  f.value = d.value;
119
- else if (u.layout === P.mix) {
120
- const e = (a = d.value) == null ? void 0 : a.filter((n) => n.topMenu);
121
- (e == null ? void 0 : e.length) === 0 ? f.value = d.value : b.value = e;
119
+ else if (o.layout === P.mix) {
120
+ const a = (e = d.value) == null ? void 0 : e.filter((t) => t.topMenu);
121
+ (a == null ? void 0 : a.length) === 0 ? f.value = d.value : b.value = a;
122
122
  }
123
- }, { immediate: !0 }), g(() => o == null ? void 0 : o.name, () => {
124
- var n, l, t;
125
- const a = o == null ? void 0 : o.name;
126
- i.value = M.value[a], S();
127
- const e = v.value.filter((c) => c.topMenu);
128
- e.length > 0 && b.value.length > 0 && (f.value = ((n = e[e.length - 1]) == null ? void 0 : n.children) || []), y.value = i != null && i.value ? [...e.map((c) => c.name), ...((l = i.value) == null ? void 0 : l.activatedKeys) || []] : [], T.value = i != null && i.value ? [i.value.name, ...((t = i.value) == null ? void 0 : t.activatedKeys) || []] : [], x(), u.hideTabs || A(), J();
123
+ }, { immediate: !0 }), g(() => u == null ? void 0 : u.name, () => {
124
+ var t, l, n;
125
+ const e = u == null ? void 0 : u.name;
126
+ i.value = M.value[e], S();
127
+ const a = v.value.filter((c) => c.topMenu);
128
+ a.length > 0 && b.value.length > 0 && (f.value = ((t = a[a.length - 1]) == null ? void 0 : t.children) || []), y.value = i != null && i.value ? [...a.map((c) => c.name), ...((l = i.value) == null ? void 0 : l.activatedKeys) || []] : [], T.value = i != null && i.value ? [i.value.name, ...((n = i.value) == null ? void 0 : n.activatedKeys) || []] : [], x(), o.hideTabs || A(), J();
129
129
  }, { immediate: !0 }), {
130
130
  topMenuItems: b,
131
131
  siderMenuItems: f,
@@ -23,7 +23,7 @@ declare const ProTable: {
23
23
  defaultExpandAllRows: boolean;
24
24
  stickyHeader: number | boolean;
25
25
  showEmptyTree: boolean;
26
- }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
26
+ }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
27
27
  P: {};
28
28
  B: {};
29
29
  D: {};
@@ -81,7 +81,9 @@ declare const ProTable: {
81
81
  stickyHeader: number | boolean;
82
82
  showEmptyTree: boolean;
83
83
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
84
- $slots: any;
84
+ $slots: Partial<Record<NonNullable<string | number>, (_: any) => any>> & {
85
+ 'pagination-left'?(_: {}): any;
86
+ };
85
87
  }) & {
86
88
  install: (app: App) => void;
87
89
  };
@@ -1,8 +1,9 @@
1
- import e from "./index.vue.js";
2
- import { Table as t } from "@arco-design/web-vue";
3
- const s = Object.assign(e, {
1
+ import t from "./index.vue.js";
2
+ /* empty css */
3
+ import { Table as e } from "@arco-design/web-vue";
4
+ const s = Object.assign(t, {
4
5
  install: (o) => {
5
- o.use(t), o.component("KbProTable", e);
6
+ o.use(e), o.component("KbProTable", t);
6
7
  }
7
8
  });
8
9
  export {
@@ -1,5 +1,12 @@
1
1
  import { IProTable } from './interface';
2
- declare function __VLS_template(): any;
2
+ declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
4
+ slots: Partial<Record<NonNullable<string | number>, (_: any) => any>> & {
5
+ 'pagination-left'?(_: {}): any;
6
+ };
7
+ refs: {};
8
+ rootEl: HTMLDivElement;
9
+ };
3
10
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
4
11
  declare const __VLS_component: import('vue').DefineComponent<IProTable, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<IProTable> & Readonly<{}>, {
5
12
  data: any[];
@@ -24,7 +31,7 @@ declare const __VLS_component: import('vue').DefineComponent<IProTable, {}, {},
24
31
  defaultExpandAllRows: boolean;
25
32
  stickyHeader: number | boolean;
26
33
  showEmptyTree: boolean;
27
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
34
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
28
35
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
29
36
  export default _default;
30
37
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -1,5 +1,7 @@
1
- import { defineComponent as p, useSlots as f, useAttrs as c, computed as i, resolveComponent as y, createBlock as m, openBlock as C, mergeProps as B, toHandlers as g, createSlots as b, renderList as h, unref as x, withCtx as S, renderSlot as w, normalizeProps as k, guardReactiveProps as _ } from "vue";
2
- const K = /* @__PURE__ */ p({
1
+ import { defineComponent as B, useSlots as h, useAttrs as x, computed as s, resolveComponent as S, createElementBlock as r, openBlock as d, normalizeClass as u, createCommentVNode as k, createVNode as v, renderSlot as p, mergeProps as w, toHandlers as E, createSlots as P, renderList as z, unref as K, withCtx as R, normalizeProps as _, guardReactiveProps as L } from "vue";
2
+ import { conclude as A } from "vue-global-config";
3
+ import { globalProps as M } from "../global-props.js";
4
+ const i = "keyblade-pro-table", F = /* @__PURE__ */ B({
3
5
  __name: "index",
4
6
  props: {
5
7
  size: { default: "large" },
@@ -12,7 +14,7 @@ const K = /* @__PURE__ */ p({
12
14
  pagination: { type: Boolean, default: !0 },
13
15
  stripe: { type: Boolean, default: !1 },
14
16
  tableLayoutFixed: { type: Boolean, default: !1 },
15
- pagePosition: { default: "br" },
17
+ pagePosition: { default: "tr" },
16
18
  indentSize: { default: 16 },
17
19
  rowKey: { default: "key" },
18
20
  showHeader: { type: Boolean, default: !0 },
@@ -63,26 +65,37 @@ const K = /* @__PURE__ */ p({
63
65
  onRowContextmenu: {},
64
66
  onCellContextmenu: {}
65
67
  },
66
- setup(a) {
67
- const n = a, s = f(), r = c(), d = i(() => {
68
+ setup(f) {
69
+ const c = f, y = h(), m = x(), C = s(() => {
68
70
  const e = {};
69
- for (const [o, t] of Object.entries(r))
71
+ for (const [o, t] of Object.entries(m))
70
72
  o.startsWith("on") && typeof t == "function" && (e[o] = t);
71
73
  return e;
72
- });
74
+ }), g = s(() => A([c, M.textarea]) || {});
73
75
  return (e, o) => {
74
- const t = y("a-table");
75
- return C(), m(t, B(n, g(d.value)), b({ _: 2 }, [
76
- h(x(s), (v, l) => ({
77
- name: l,
78
- fn: S((u) => [
79
- w(e.$slots, l, k(_(u)))
80
- ])
81
- }))
82
- ]), 1040);
76
+ var a, l;
77
+ const t = S("a-table");
78
+ return d(), r("div", {
79
+ class: u(i)
80
+ }, [
81
+ !((a = e.pagination) != null && a.total) && !((l = e.data) != null && l.length) ? (d(), r("div", {
82
+ key: 0,
83
+ class: u(`${i}-header`)
84
+ }, [
85
+ p(e.$slots, "pagination-left")
86
+ ], 2)) : k("", !0),
87
+ v(t, w(g.value, E(C.value)), P({ _: 2 }, [
88
+ z(K(y), (N, n) => ({
89
+ name: n,
90
+ fn: R((b) => [
91
+ p(e.$slots, n, _(L(b ?? {})))
92
+ ])
93
+ }))
94
+ ]), 1040)
95
+ ]);
83
96
  };
84
97
  }
85
98
  });
86
99
  export {
87
- K as default
100
+ F as default
88
101
  };
@@ -0,0 +1,5 @@
1
+ import o from "./index.vue.js";
2
+ /* empty css */
3
+ export {
4
+ o as default
5
+ };
@@ -147,3 +147,4 @@ export interface IProTable {
147
147
  /** 单元格右键菜单事件 */
148
148
  'onCellContextmenu'?: (record: any, column: any, ev: Event) => any;
149
149
  }
150
+ export type ProTableProps = Partial<IProTable>;
package/es/style.css CHANGED
@@ -1 +1 @@
1
- .keyblade-pro-page-header{background:var(--color-bg-2);padding:16px 32px}.keyblade-pro-page-header .keyblade-pro-page-header-section-breadcrumb .arco-breadcrumb-item:first-child{padding-left:0}.keyblade-pro-page-header .keyblade-pro-page-header-title.arco-typography{padding-top:4px;margin-top:0}.keyblade-pro-layout{width:100%;height:100%}.keyblade-pro-layout .keyblade-pro-layout-header{position:fixed;top:0;left:0;width:100%;height:var(--4a477a1a);z-index:100;display:flex;align-items:center;justify-content:space-between;padding:0 20px;background-color:var(--color-bg-2);border-bottom:1px solid var(--color-border);transition:all .2s cubic-bezier(.34,.69,.1,1)}.keyblade-pro-layout .keyblade-pro-layout-header-left{cursor:pointer;display:flex;align-items:center}.keyblade-pro-layout .keyblade-pro-layout-header-left-logo-img{width:28px;height:28px}.keyblade-pro-layout .keyblade-pro-layout-header-left-logo-title.arco-typography{margin:0;font-size:18px}.keyblade-pro-layout .keyblade-pro-layout-header-center{flex:1}.keyblade-pro-layout .keyblade-pro-layout-sider{padding-top:var(--4a477a1a);position:fixed;top:0;left:0;z-index:99;height:100%;transition:all .2s cubic-bezier(.34,.69,.1,1)}.keyblade-pro-layout .keyblade-pro-layout-sider-content{position:relative;height:100%;overflow:auto}.keyblade-pro-layout .keyblade-pro-layout-sider-collapse-btn.arco-btn{position:absolute;right:12px;bottom:12px}.keyblade-pro-layout .keyblade-pro-layout-body{padding-top:var(--4a477a1a);padding-left:var(--3599ef93);min-height:100vh;overflow-y:hidden;background-color:var(--color-fill-2);transition:padding .2s cubic-bezier(.34,.69,.1,1)}.keyblade-pro-layout .keyblade-pro-layout-body-hide-sider{padding-left:0}.keyblade-pro-layout .keyblade-pro-layout-body-affix .arco-affix{z-index:98}.keyblade-pro-layout .keyblade-pro-layout-body-footer{display:flex;align-items:center;justify-content:center;height:40px;color:var(--color-text-2);text-align:center}.keyblade-pro-layout .keyblade-pro-layout-body-collapsed{padding-left:var(--5b478c92)}.keyblade-pro-layout-side .keyblade-pro-layout-header{z-index:98;left:var(--3599ef93);width:calc(100% - var(--3599ef93))}.keyblade-pro-layout-side .keyblade-pro-layout-header-collapsed{left:var(--5b478c92);width:calc(100% - var(--5b478c92))}.keyblade-pro-layout-side .keyblade-pro-layout-sider{padding-top:0}.keyblade-pro-layout-side .keyblade-pro-layout-sider-content-logo{position:relative;display:flex;align-items:center;padding:16px;cursor:pointer;transition:padding .3s cubic-bezier(.645,.045,.355,1)}.keyblade-pro-layout-side .keyblade-pro-layout-sider-content-logo-img{width:28px;height:28px}.keyblade-pro-layout-side .keyblade-pro-layout-sider-content-logo-title.arco-typography{margin:0;font-size:18px}.keyblade-pro-layout-side .keyblade-pro-layout-sider-collapsed .keyblade-pro-layout-sider-content-logo{padding:16px 10px}.keyblade-pro-menu .keyblade-pro-menu-item-img{width:14px;height:auto}.keyblade-pro-reuse-tabs{position:relative;background-color:var(--color-bg-2);padding:4px 20px}.keyblade-pro-page-container .keyblade-pro-page-container-content{padding:20px}.keyblade-pro-page-container-with-footer-bar .keyblade-pro-page-container-content{padding-bottom:84px}.keyblade-pro-footer-bar[data-v-f9d45b25]{z-index:11;position:fixed;width:100%;bottom:0;right:0;padding:16px 20px;background-color:var(--color-bg-3);display:flex;justify-content:flex-end;box-shadow:0 -2px 5px #0000000d}[arco-theme=dark] .keyblade-pro-footer-bar[data-v-f9d45b25]{border-top:1px solid var(--color-neutral-3)}.keyblade-pro-image-upload-cropper-dialog-cropper-wrapper[data-v-1bddf267]{width:100%;height:400px}.keyblade-pro-image-upload-cropper-dialog-operate[data-v-1bddf267]{margin-top:24px;display:flex;align-items:center;justify-content:center}.keyblade-pro-image-upload-cropper-dialog-footer[data-v-1bddf267]{margin-top:24px;display:flex;align-items:center;justify-content:flex-end}.keyblade-pro-image-upload-cropper-dialog-footer-left[data-v-1bddf267]{display:flex;align-items:center;justify-content:flex-start;margin-right:12px}.keyblade-pro-image-upload-cropper-dialog-footer-right[data-v-1bddf267]{flex:1;display:flex;align-items:center;justify-content:flex-end}.keyblade-pro-date-range-picker[data-v-960e2e33]{display:flex;align-items:center}.keyblade-pro-date-range-picker[data-v-960e2e33] .arco-form-item{margin-right:8px;margin-bottom:0}.keyblade-pro-date-range-picker[data-v-960e2e33] .arco-picker{background-color:var(--color-bg-1);border-color:var(--color-border-1)}.keyblade-pro-textarea-word-limit[data-v-8721e63b]{overflow:inherit}.keyblade-pro-textarea-word-limit[data-v-8721e63b] .arco-textarea-word-limit{bottom:-20px}
1
+ .keyblade-pro-page-header{background:var(--color-bg-2);padding:16px 32px}.keyblade-pro-page-header .keyblade-pro-page-header-section-breadcrumb .arco-breadcrumb-item:first-child{padding-left:0}.keyblade-pro-page-header .keyblade-pro-page-header-title.arco-typography{padding-top:4px;margin-top:0}.keyblade-pro-layout{width:100%;height:100%}.keyblade-pro-layout .keyblade-pro-layout-header{position:fixed;top:0;left:0;width:100%;height:var(--4a477a1a);z-index:100;display:flex;align-items:center;justify-content:space-between;padding:0 20px;background-color:var(--color-bg-2);border-bottom:1px solid var(--color-border);transition:all .2s cubic-bezier(.34,.69,.1,1)}.keyblade-pro-layout .keyblade-pro-layout-header-left{cursor:pointer;display:flex;align-items:center}.keyblade-pro-layout .keyblade-pro-layout-header-left-logo-img{width:28px;height:28px}.keyblade-pro-layout .keyblade-pro-layout-header-left-logo-title.arco-typography{margin:0;font-size:18px}.keyblade-pro-layout .keyblade-pro-layout-header-center{flex:1}.keyblade-pro-layout .keyblade-pro-layout-sider{padding-top:var(--4a477a1a);position:fixed;top:0;left:0;z-index:99;height:100%;transition:all .2s cubic-bezier(.34,.69,.1,1)}.keyblade-pro-layout .keyblade-pro-layout-sider-content{position:relative;height:100%;overflow:auto}.keyblade-pro-layout .keyblade-pro-layout-sider-collapse-btn.arco-btn{position:absolute;right:12px;bottom:12px}.keyblade-pro-layout .keyblade-pro-layout-body{padding-top:var(--4a477a1a);padding-left:var(--3599ef93);min-height:100vh;overflow-y:hidden;background-color:var(--color-fill-2);transition:padding .2s cubic-bezier(.34,.69,.1,1)}.keyblade-pro-layout .keyblade-pro-layout-body-hide-sider{padding-left:0}.keyblade-pro-layout .keyblade-pro-layout-body-affix .arco-affix{z-index:98}.keyblade-pro-layout .keyblade-pro-layout-body-footer{display:flex;align-items:center;justify-content:center;height:40px;color:var(--color-text-2);text-align:center}.keyblade-pro-layout .keyblade-pro-layout-body-collapsed{padding-left:var(--5b478c92)}.keyblade-pro-layout-side .keyblade-pro-layout-header{z-index:98;left:var(--3599ef93);width:calc(100% - var(--3599ef93))}.keyblade-pro-layout-side .keyblade-pro-layout-header-collapsed{left:var(--5b478c92);width:calc(100% - var(--5b478c92))}.keyblade-pro-layout-side .keyblade-pro-layout-sider{padding-top:0}.keyblade-pro-layout-side .keyblade-pro-layout-sider-content-logo{position:relative;display:flex;align-items:center;padding:16px;cursor:pointer;transition:padding .3s cubic-bezier(.645,.045,.355,1)}.keyblade-pro-layout-side .keyblade-pro-layout-sider-content-logo-img{width:28px;height:28px}.keyblade-pro-layout-side .keyblade-pro-layout-sider-content-logo-title.arco-typography{margin:0;font-size:18px}.keyblade-pro-layout-side .keyblade-pro-layout-sider-collapsed .keyblade-pro-layout-sider-content-logo{padding:16px 10px}.keyblade-pro-menu .keyblade-pro-menu-item-img{width:14px;height:auto}.keyblade-pro-reuse-tabs{position:relative;background-color:var(--color-bg-2);padding:4px 20px}.keyblade-pro-page-container .keyblade-pro-page-container-content{padding:20px}.keyblade-pro-page-container-with-footer-bar .keyblade-pro-page-container-content{padding-bottom:84px}.keyblade-pro-footer-bar[data-v-f9d45b25]{z-index:11;position:fixed;width:100%;bottom:0;right:0;padding:16px 20px;background-color:var(--color-bg-3);display:flex;justify-content:flex-end;box-shadow:0 -2px 5px #0000000d}[arco-theme=dark] .keyblade-pro-footer-bar[data-v-f9d45b25]{border-top:1px solid var(--color-neutral-3)}.keyblade-pro-image-upload-cropper-dialog-cropper-wrapper[data-v-1bddf267]{width:100%;height:400px}.keyblade-pro-image-upload-cropper-dialog-operate[data-v-1bddf267]{margin-top:24px;display:flex;align-items:center;justify-content:center}.keyblade-pro-image-upload-cropper-dialog-footer[data-v-1bddf267]{margin-top:24px;display:flex;align-items:center;justify-content:flex-end}.keyblade-pro-image-upload-cropper-dialog-footer-left[data-v-1bddf267]{display:flex;align-items:center;justify-content:flex-start;margin-right:12px}.keyblade-pro-image-upload-cropper-dialog-footer-right[data-v-1bddf267]{flex:1;display:flex;align-items:center;justify-content:flex-end}.keyblade-pro-date-range-picker[data-v-26a58e45]{display:flex;align-items:flex-start}.keyblade-pro-date-range-picker[data-v-26a58e45] .arco-form-item{margin-right:8px;margin-bottom:0}.keyblade-pro-date-range-picker[data-v-26a58e45] .arco-form-item .arco-picker:not(.arco-picker-error){background-color:var(--color-bg-1);border-color:var(--color-border-1)}.keyblade-pro-date-range-picker[data-v-26a58e45] .arco-form-item .arco-picker:not(.arco-picker-error):hover{border-color:rgb(var(--primary-6))}.keyblade-pro-table .keyblade-pro-table-header{min-height:32px;margin-bottom:12px;display:flex;align-items:center}.keyblade-pro-table .arco-table .arco-table-pagination>:first-child:not(.arco-pagination){flex:1}.keyblade-pro-textarea-word-limit[data-v-8721e63b]{overflow:inherit}.keyblade-pro-textarea-word-limit[data-v-8721e63b] .arco-textarea-word-limit{bottom:-20px}.keyblade-pro-textarea[data-v-8721e63b]:not(.arco-textarea-error){background-color:var(--color-bg-1);border:1px solid var(--color-border-1);border-radius:4px}.keyblade-pro-textarea[data-v-8721e63b]:not(.arco-textarea-error):hover{border-color:rgb(var(--primary-6))}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@keyblade/pro-components",
3
3
  "description": "KeyBlade Pro Components",
4
4
  "author": "yangshuai <704807396@qq.com>",
5
- "version": "1.13.8-alpha.3",
5
+ "version": "1.13.8-alpha.5",
6
6
  "private": false,
7
7
  "type": "module",
8
8
  "main": "es/index.js",
@@ -1,4 +0,0 @@
1
- import f from "./index.vue.js";
2
- export {
3
- f as default
4
- };