@aplus-frontend/ui 6.21.0 → 6.21.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/es/src/ap-pro-card/components/card/index.vue2.mjs +37 -37
  2. package/es/src/ap-pro-card/components/divider/index.vue.d.ts +13 -0
  3. package/es/src/ap-pro-card/components/divider/index.vue.mjs +4 -0
  4. package/es/src/ap-pro-card/components/divider/index.vue2.mjs +29 -0
  5. package/es/src/ap-pro-card/components/title/index.vue.d.ts +23 -0
  6. package/es/src/ap-pro-card/components/title/index.vue.mjs +4 -0
  7. package/es/src/ap-pro-card/components/title/index.vue2.mjs +28 -0
  8. package/es/src/ap-pro-card/index.d.ts +9 -41
  9. package/es/src/ap-pro-card/index.mjs +10 -4
  10. package/es/src/ap-pro-card/interface.d.ts +2 -2
  11. package/es/src/version.d.ts +1 -1
  12. package/es/src/version.mjs +1 -1
  13. package/lib/src/ap-pro-card/components/card/index.vue2.js +1 -1
  14. package/lib/src/ap-pro-card/components/divider/index.vue.d.ts +13 -0
  15. package/lib/src/ap-pro-card/components/divider/index.vue.js +1 -0
  16. package/lib/src/ap-pro-card/components/divider/index.vue2.js +1 -0
  17. package/lib/src/ap-pro-card/components/title/index.vue.d.ts +23 -0
  18. package/lib/src/ap-pro-card/components/title/index.vue.js +1 -0
  19. package/lib/src/ap-pro-card/components/title/index.vue2.js +1 -0
  20. package/lib/src/ap-pro-card/index.d.ts +9 -41
  21. package/lib/src/ap-pro-card/index.js +1 -1
  22. package/lib/src/ap-pro-card/interface.d.ts +2 -2
  23. package/lib/src/version.d.ts +1 -1
  24. package/lib/src/version.js +1 -1
  25. package/package.json +1 -1
  26. package/theme/ag-grid/custom-header.css +82 -0
  27. package/theme/ag-grid/custom-header.less +39 -0
  28. package/theme/ag-grid/index.css +204 -0
  29. package/theme/ag-grid/index.less +118 -0
  30. package/theme/ap-pro-card/index.css +52 -0
  31. package/theme/ap-pro-card/index.less +56 -0
  32. package/theme/index.css +52 -0
@@ -1,5 +1,5 @@
1
- import { defineComponent as Y, useSlots as Z, computed as s, ref as ee, createVNode as u, Fragment as x, createElementBlock as b, openBlock as n, mergeProps as te, createCommentVNode as v, createElementVNode as re, normalizeStyle as w, normalizeClass as m, unref as g, renderSlot as G, createBlock as p, resolveDynamicComponent as h, withCtx as P } from "vue";
2
- import { Spin as oe, Tooltip as le } from "@aplus-frontend/antdv";
1
+ import { defineComponent as Y, useSlots as Z, computed as s, ref as ee, createVNode as u, Fragment as x, createElementBlock as b, openBlock as n, mergeProps as te, createCommentVNode as v, createElementVNode as oe, normalizeStyle as A, normalizeClass as m, unref as g, renderSlot as G, createBlock as p, resolveDynamicComponent as h, withCtx as P } from "vue";
2
+ import { Spin as re, Tooltip as le } from "@aplus-frontend/antdv";
3
3
  import { QuestionCircleOutlined as ne } from "@ant-design/icons-vue";
4
4
  import { getProCardCssVar as ae } from "../../utils/css-var.mjs";
5
5
  import "../../../config-provider/index.mjs";
@@ -64,10 +64,10 @@ const be = /* @__PURE__ */ Y({
64
64
  }
65
65
  },
66
66
  setup(E) {
67
- const t = E, r = Z(), {
67
+ const t = E, o = Z(), {
68
68
  b: c
69
- } = se("pro-card"), V = de("uiMode"), M = s(() => ae(V.value)), $ = ["xxxl", "xxl", "xl", "lg", "md", "sm", "xs"], f = ie(), k = (e, o) => e ? o : {}, _ = (e) => {
70
- const o = [0, 0];
69
+ } = se("pro-card"), V = de("uiMode"), M = s(() => ae(V.value)), $ = ["xxxl", "xxl", "xl", "lg", "md", "sm", "xs"], f = ie(), k = (e, r) => e ? r : {}, _ = (e) => {
70
+ const r = [0, 0];
71
71
  return (Array.isArray(e) ? e : [e, 0]).forEach((a, d) => {
72
72
  if (typeof a == "object")
73
73
  for (let i = 0; i < $.length; i += 1) {
@@ -82,15 +82,15 @@ const be = /* @__PURE__ */ Y({
82
82
  xxxl: !1,
83
83
  ...f == null ? void 0 : f.value
84
84
  }[y] && a[y] !== void 0) {
85
- o[d] = a[y];
85
+ r[d] = a[y];
86
86
  break;
87
87
  }
88
88
  }
89
89
  else
90
- o[d] = a || 0;
91
- }), o;
90
+ r[d] = a || 0;
91
+ }), r;
92
92
  }, I = (e) => {
93
- let o = e;
93
+ let r = e;
94
94
  if (typeof e == "object")
95
95
  for (let a = 0; a < $.length; a += 1) {
96
96
  const d = $[a], i = {
@@ -104,30 +104,30 @@ const be = /* @__PURE__ */ Y({
104
104
  ...f == null ? void 0 : f.value
105
105
  };
106
106
  if (i != null && i[d] && (e == null ? void 0 : e[d]) !== void 0) {
107
- o = e[d];
107
+ r = e[d];
108
108
  break;
109
109
  }
110
110
  }
111
- const l = k(typeof o == "string" && /\d%|\dpx/i.test(o), {
112
- width: o,
111
+ const l = k(typeof r == "string" && /\d%|\dpx/i.test(r), {
112
+ width: r,
113
113
  flexShrink: 0
114
114
  });
115
115
  return {
116
- span: o,
116
+ span: r,
117
117
  colSpanStyle: l
118
118
  };
119
119
  }, D = s(() => _(t.gutter)), N = ee(!1), O = (e) => {
120
120
  N.value = e;
121
121
  }, F = s(() => {
122
122
  var e;
123
- return u(x, null, [t.title || ((e = r.title) == null ? void 0 : e.call(r))]);
123
+ return u(x, null, [t.title || ((e = o.title) == null ? void 0 : e.call(o))]);
124
124
  }), H = s(() => u(x, null, [t.tooltip])), Q = s(() => {
125
125
  var e;
126
- return u(x, null, [t.extra || ((e = r.extra) == null ? void 0 : e.call(r))]);
126
+ return u(x, null, [t.extra || ((e = o.extra) == null ? void 0 : e.call(o))]);
127
127
  }), T = s(() => {
128
128
  var e;
129
- return u(x, null, [t.actions || ((e = r.actions) == null ? void 0 : e.call(r))]);
130
- }), q = s(() => t.loading === !0 ? u(oe, {
129
+ return u(x, null, [t.actions || ((e = o.actions) == null ? void 0 : e.call(o))]);
130
+ }), q = s(() => t.loading === !0 ? u(re, {
131
131
  style: {
132
132
  width: "100%",
133
133
  height: "100%",
@@ -137,34 +137,34 @@ const be = /* @__PURE__ */ Y({
137
137
  }
138
138
  }, null) : u(x, null, [t.loading]));
139
139
  function J() {
140
- var o;
141
- const e = (o = r.default) == null ? void 0 : o.call(r);
142
- return O(!1), u(x, null, [Array.isArray(e) ? e == null ? void 0 : e.map((l, a, d) => {
140
+ var r;
141
+ const e = (r = o.default) == null ? void 0 : r.call(o);
142
+ return O(!1), u(x, null, [e == null ? void 0 : e.map((l, a, d) => {
143
143
  var i, y, z;
144
144
  if (l && typeof l == "object" && "type" in l && ((i = l.type) == null ? void 0 : i.isProCard) === !0) {
145
145
  O(!0);
146
146
  const U = ((y = l == null ? void 0 : l.props) == null ? void 0 : y.colSpan) || ((z = l == null ? void 0 : l.props) == null ? void 0 : z["col-span"]) || {}, {
147
147
  span: C,
148
148
  colSpanStyle: W
149
- } = I(U), B = c("col"), X = S(`${B}`, [typeof C == "number" && C >= 0 && C <= 24 ? `${B}-span-${C}` : void 0, t.split === "horizontal" && a !== d.length - 1 ? `${B}-split-horizontal` : void 0, t.split === "vertical" && a !== d.length - 1 ? `${B}-split-vertical` : void 0].filter(Boolean)), [A, j] = D.value;
149
+ } = I(U), B = c("col"), X = S(`${B}`, [typeof C == "number" && C >= 0 && C <= 24 ? `${B}-span-${C}` : void 0, t.split === "horizontal" && a !== d.length - 1 ? `${B}-split-horizontal` : void 0, t.split === "vertical" && a !== d.length - 1 ? `${B}-split-vertical` : void 0].filter(Boolean)), [j, w] = D.value;
150
150
  return u("div", {
151
151
  class: X,
152
152
  style: {
153
153
  ...W,
154
- ...k(A > 0, {
155
- paddingInlineStart: `${A / 2}px`,
156
- paddingInlineEnd: `${A / 2}px`
157
- }),
158
154
  ...k(j > 0, {
159
- paddingBlockStart: `${j / 2}px`,
160
- paddingBlockEnd: `${j / 2}px`
155
+ paddingInlineStart: `${j / 2}px`,
156
+ paddingInlineEnd: `${j / 2}px`
157
+ }),
158
+ ...k(w > 0, {
159
+ paddingBlockStart: `${w / 2}px`,
160
+ paddingBlockEnd: `${w / 2}px`
161
161
  }),
162
162
  ...t.colStyle
163
163
  }
164
164
  }, [l]);
165
165
  }
166
166
  return l;
167
- }) : e]);
167
+ })]);
168
168
  }
169
169
  const K = s(() => {
170
170
  const e = c();
@@ -176,20 +176,20 @@ const be = /* @__PURE__ */ Y({
176
176
  const e = c("body");
177
177
  return S(`${e}`, [t.layout === "center" ? `${e}-center` : void 0, t.split === "horizontal" || t.direction === "column" ? `${e}-direction-column` : void 0, t.wrap && N.value ? `${e}-wrap` : void 0].filter(Boolean));
178
178
  });
179
- return (e, o) => (n(), b("div", te({
179
+ return (e, r) => (n(), b("div", te({
180
180
  class: K.value,
181
181
  style: {
182
182
  ...M.value
183
183
  }
184
184
  }, {
185
185
  ...e.$attrs
186
- }), [t.title || r.title || t.extra || r.extra ? (n(), b("div", {
186
+ }), [t.title || o.title || t.extra || o.extra ? (n(), b("div", {
187
187
  key: 0,
188
188
  class: m(L.value),
189
- style: w({
189
+ style: A({
190
190
  ...t.headStyle
191
191
  })
192
- }, [t.title || r.title ? (n(), b("div", {
192
+ }, [t.title || o.title ? (n(), b("div", {
193
193
  key: 0,
194
194
  class: m(g(c)("header-title"))
195
195
  }, [G(e.$slots, "title", {}, () => [(n(), p(h(F.value)))]), t.tooltip ? (n(), p(g(le), {
@@ -200,22 +200,22 @@ const be = /* @__PURE__ */ Y({
200
200
  class: m(g(c)("header-title-tooltip"))
201
201
  }, null, 8, ["class"])]),
202
202
  _: 1
203
- })) : v("", !0)], 2)) : v("", !0), t.extra || r.extra ? (n(), b("div", {
203
+ })) : v("", !0)], 2)) : v("", !0), t.extra || o.extra ? (n(), b("div", {
204
204
  key: 1,
205
205
  class: m(g(c)("header-extra"))
206
- }, [G(e.$slots, "extra", {}, () => [(n(), p(h(Q.value)))])], 2)) : v("", !0)], 6)) : v("", !0), re("div", {
206
+ }, [G(e.$slots, "extra", {}, () => [(n(), p(h(Q.value)))])], 2)) : v("", !0)], 6)) : v("", !0), oe("div", {
207
207
  class: m(R.value),
208
- style: w({
208
+ style: A({
209
209
  ...t.bodyStyle
210
210
  })
211
211
  }, [t.loading ? (n(), p(h(q.value), {
212
212
  key: 0
213
213
  })) : (n(), p(h(J()), {
214
214
  key: 1
215
- }))], 6), t.actions || r.actions ? (n(), b("div", {
215
+ }))], 6), t.actions || o.actions ? (n(), b("div", {
216
216
  key: 1,
217
217
  class: m(g(c)("actions")),
218
- style: w({
218
+ style: A({
219
219
  ...t.actionsStyle
220
220
  })
221
221
  }, [(n(), p(h(T.value)))], 6)) : v("", !0)], 16));
@@ -0,0 +1,13 @@
1
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ type __VLS_Props = {
3
+ /**
4
+ * 布局类型
5
+ *
6
+ * @default vertical
7
+ */
8
+ type?: 'horizontal' | 'vertical';
9
+ };
10
+ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
11
+ type: "horizontal" | "vertical";
12
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
13
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import f from "./index.vue2.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,29 @@
1
+ import { defineComponent as p, computed as s, createElementBlock as a, openBlock as i, mergeProps as c } from "vue";
2
+ import "../../../config-provider/index.mjs";
3
+ import { mergeClass as m } from "../../../editable-table/utils.mjs";
4
+ import { useNamespace as d } from "../../../config-provider/hooks/use-namespace.mjs";
5
+ const _ = /* @__PURE__ */ p({
6
+ name: "ApProCardDivider",
7
+ __name: "index",
8
+ props: {
9
+ type: {
10
+ default: "vertical"
11
+ }
12
+ },
13
+ setup(t) {
14
+ const {
15
+ b: o
16
+ } = d("pro-card-divider"), r = t, n = s(() => {
17
+ const e = o();
18
+ return m(`${e}`, [r.type ? `${e}-${r.type}` : void 0].filter(Boolean));
19
+ });
20
+ return (e, l) => (i(), a("div", c({
21
+ ...e.$attrs
22
+ }, {
23
+ class: n.value
24
+ }), null, 16));
25
+ }
26
+ });
27
+ export {
28
+ _ as default
29
+ };
@@ -0,0 +1,23 @@
1
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ type __VLS_Props = {
3
+ type?: 'default';
4
+ };
5
+ declare function __VLS_template(): {
6
+ attrs: Partial<{}>;
7
+ slots: {
8
+ default?(_: {}): any;
9
+ };
10
+ refs: {};
11
+ rootEl: HTMLDivElement;
12
+ };
13
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
14
+ declare const __VLS_component: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
15
+ type: "default";
16
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
17
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
18
+ export default _default;
19
+ type __VLS_WithTemplateSlots<T, S> = T & {
20
+ new (): {
21
+ $slots: S;
22
+ };
23
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./index.vue2.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,28 @@
1
+ import { defineComponent as a, computed as s, createElementBlock as p, openBlock as i, normalizeClass as u, renderSlot as d } from "vue";
2
+ import "../../../config-provider/index.mjs";
3
+ import { mergeClass as m } from "../../../editable-table/utils.mjs";
4
+ import { useNamespace as c } from "../../../config-provider/hooks/use-namespace.mjs";
5
+ import { useGlobalConfig as f } from "../../../config-provider/hooks/use-global-config.mjs";
6
+ const B = /* @__PURE__ */ a({
7
+ name: "ApProCardTitle",
8
+ __name: "index",
9
+ props: {
10
+ type: {
11
+ default: "default"
12
+ }
13
+ },
14
+ setup(r) {
15
+ const {
16
+ b: l
17
+ } = c("pro-card-title"), o = f("uiMode"), t = r, n = s(() => {
18
+ const e = l();
19
+ return m(`${e}`, [t.type ? `${e}-${t.type}` : void 0, o.value ? `${e}-${t.type ?? "default"}-${o.value}` : void 0].filter(Boolean));
20
+ });
21
+ return (e, C) => (i(), p("div", {
22
+ class: u(n.value)
23
+ }, [d(e.$slots, "default")], 2));
24
+ }
25
+ });
26
+ export {
27
+ B as default
28
+ };
@@ -1,42 +1,10 @@
1
- import { CreateComponentPublicInstanceWithMixins, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, ComponentOptionsBase, VNodeProps, AllowedComponentProps, ComponentCustomProps } from 'vue';
2
- import { ApProCardProps, ApProCardGutter, ApProCardSolts } from './interface';
3
- declare const ApProCard: {
4
- new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< ApProCardProps> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
5
- wrap: boolean;
6
- boxShadow: boolean;
7
- gutter: ApProCardGutter | ApProCardGutter[];
8
- ghost: boolean;
9
- bordered: boolean;
10
- headerBordered: boolean;
11
- hoverable: boolean;
12
- }, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, HTMLDivElement, ComponentProvideOptions, {
13
- P: {};
14
- B: {};
15
- D: {};
16
- C: {};
17
- M: {};
18
- Defaults: {};
19
- }, Readonly< ApProCardProps> & Readonly<{}>, {}, {}, {}, {}, {
20
- wrap: boolean;
21
- boxShadow: boolean;
22
- gutter: ApProCardGutter | ApProCardGutter[];
23
- ghost: boolean;
24
- bordered: boolean;
25
- headerBordered: boolean;
26
- hoverable: boolean;
27
- }>;
28
- __isFragment?: never;
29
- __isTeleport?: never;
30
- __isSuspense?: never;
31
- } & ComponentOptionsBase<Readonly< ApProCardProps> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
32
- wrap: boolean;
33
- boxShadow: boolean;
34
- gutter: ApProCardGutter | ApProCardGutter[];
35
- ghost: boolean;
36
- bordered: boolean;
37
- headerBordered: boolean;
38
- hoverable: boolean;
39
- }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
40
- $slots: Readonly< ApProCardSolts> & ApProCardSolts;
41
- });
1
+ import { default as Card } from './components/card/index.vue';
2
+ import { default as Divider } from './components/divider/index.vue';
3
+ import { default as Title } from './components/title/index.vue';
4
+ export type ProCardType = typeof Card & {
5
+ isProCard: boolean;
6
+ Divider: typeof Divider;
7
+ Title: typeof Title;
8
+ };
9
+ declare const ApProCard: ProCardType;
42
10
  export { ApProCard };
@@ -1,7 +1,13 @@
1
1
  import "./components/card/index.vue.mjs";
2
- import r from "./components/card/index.vue2.mjs";
3
- const o = r;
4
- o.isProCard = !0;
2
+ import "./components/divider/index.vue.mjs";
3
+ import "./components/title/index.vue.mjs";
4
+ import i from "./components/card/index.vue2.mjs";
5
+ import o from "./components/divider/index.vue2.mjs";
6
+ import m from "./components/title/index.vue2.mjs";
7
+ const r = i;
8
+ r.isProCard = !0;
9
+ r.Divider = o;
10
+ r.Title = m;
5
11
  export {
6
- o as ApProCard
12
+ r as ApProCard
7
13
  };
@@ -1,4 +1,4 @@
1
- import { CSSProperties, VNodeChild } from 'vue';
1
+ import { CSSProperties, VNode, VNodeChild } from 'vue';
2
2
  export type ApProCardBreakpoint = 'xxxl' | 'xxl' | 'xl' | 'lg' | 'md' | 'sm' | 'xs';
3
3
  export type ApProCardGutter = number | Partial<Record<ApProCardBreakpoint, number>>;
4
4
  export type ApProCardColSpanType = number | string;
@@ -51,7 +51,7 @@ export interface ApProCardProps {
51
51
  }
52
52
  export type ApProCardSolts = {
53
53
  /** 内容区 */
54
- default?: () => VNodeChild;
54
+ default?: () => VNode[];
55
55
  /** 标题 */
56
56
  title?: () => VNodeChild;
57
57
  /** 右上角自定义区域 */
@@ -1,2 +1,2 @@
1
- declare const _default: "6.21.0";
1
+ declare const _default: "6.21.1";
2
2
  export default _default;
@@ -1,4 +1,4 @@
1
- const e = "6.21.0";
1
+ const e = "6.21.1";
2
2
  export {
3
3
  e as default
4
4
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),b=require("@aplus-frontend/antdv"),I=require("@ant-design/icons-vue"),T=require("../../utils/css-var.js");require("../../../config-provider/index.js");const m=require("../../../editable-table/utils.js"),H=require("@aplus-frontend/antdv/es/_util/hooks/useBreakpoint"),Q=require("../../../config-provider/hooks/use-namespace.js"),J=require("../../../config-provider/hooks/use-global-config.js"),K=e.defineComponent({name:"ApProCard",__name:"index",props:{headStyle:{},bodyStyle:{},actionsStyle:{},headerBordered:{type:Boolean,default:!1},title:{type:[Object,String,Number,Boolean,null,Array]},tooltip:{type:[Object,String,Number,Boolean,null,Array]},extra:{type:[Object,String,Number,Boolean,null,Array]},layout:{},type:{},direction:{},wrap:{type:Boolean,default:!1},loading:{type:[Boolean,Object,String,Number,null,Array]},colSpan:{},colStyle:{},gutter:{default:0},actions:{type:[Object,String,Number,Boolean,null,Array]},split:{},bordered:{type:Boolean,default:!1},hoverable:{type:Boolean,default:!1},ghost:{type:Boolean,default:!1},boxShadow:{type:Boolean,default:!1}},setup(h){const o=h,r=e.useSlots(),{b:c}=Q.useNamespace("pro-card"),S=J.useGlobalConfig("uiMode"),$=e.computed(()=>T.getProCardCssVar(S.value)),p=["xxxl","xxl","xl","lg","md","sm","xs"],d=H(),g=(t,n)=>t?n:{},N=t=>{const n=[0,0];return(Array.isArray(t)?t:[t,0]).forEach((a,i)=>{if(typeof a=="object")for(let s=0;s<p.length;s+=1){const u=p[s];if({lg:!0,md:!0,sm:!0,xl:!1,xs:!1,xxl:!1,xxxl:!1,...d==null?void 0:d.value}[u]&&a[u]!==void 0){n[i]=a[u];break}}else n[i]=a||0}),n},V=t=>{let n=t;if(typeof t=="object")for(let a=0;a<p.length;a+=1){const i=p[a],s={lg:!0,md:!0,sm:!0,xl:!1,xs:!1,xxl:!1,xxxl:!1,...d==null?void 0:d.value};if(s!=null&&s[i]&&(t==null?void 0:t[i])!==void 0){n=t[i];break}}const l=g(typeof n=="string"&&/\d%|\dpx/i.test(n),{width:n,flexShrink:0});return{span:n,colSpanStyle:l}},z=e.computed(()=>N(o.gutter)),C=e.ref(!1),k=t=>{C.value=t},j=e.computed(()=>{var t;return e.createVNode(e.Fragment,null,[o.title||((t=r.title)==null?void 0:t.call(r))])}),w=e.computed(()=>e.createVNode(e.Fragment,null,[o.tooltip])),A=e.computed(()=>{var t;return e.createVNode(e.Fragment,null,[o.extra||((t=r.extra)==null?void 0:t.call(r))])}),q=e.computed(()=>{var t;return e.createVNode(e.Fragment,null,[o.actions||((t=r.actions)==null?void 0:t.call(r))])}),E=e.computed(()=>o.loading===!0?e.createVNode(b.Spin,{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center"}},null):e.createVNode(e.Fragment,null,[o.loading]));function O(){var n;const t=(n=r.default)==null?void 0:n.call(r);return k(!1),e.createVNode(e.Fragment,null,[Array.isArray(t)?t==null?void 0:t.map((l,a,i)=>{var s,u,B;if(l&&typeof l=="object"&&"type"in l&&((s=l.type)==null?void 0:s.isProCard)===!0){k(!0);const F=((u=l==null?void 0:l.props)==null?void 0:u.colSpan)||((B=l==null?void 0:l.props)==null?void 0:B["col-span"])||{},{span:f,colSpanStyle:M}=V(F),y=c("col"),_=m.mergeClass(`${y}`,[typeof f=="number"&&f>=0&&f<=24?`${y}-span-${f}`:void 0,o.split==="horizontal"&&a!==i.length-1?`${y}-split-horizontal`:void 0,o.split==="vertical"&&a!==i.length-1?`${y}-split-vertical`:void 0].filter(Boolean)),[x,v]=z.value;return e.createVNode("div",{class:_,style:{...M,...g(x>0,{paddingInlineStart:`${x/2}px`,paddingInlineEnd:`${x/2}px`}),...g(v>0,{paddingBlockStart:`${v/2}px`,paddingBlockEnd:`${v/2}px`}),...o.colStyle}},[l])}return l}):t])}const D=e.computed(()=>{const t=c();return m.mergeClass(`${t}`,[o.bordered?`${t}-border`:void 0,o.boxShadow?`${t}-box-shadow`:void 0,C.value?`${t}-contain-card`:void 0,o.loading?`${t}-loading`:void 0,o.split==="vertical"||o.split==="horizontal"?`${t}-split`:void 0,o.ghost?`${t}-ghost`:void 0,o.hoverable?`${t}-hoverable`:void 0,o.type?`${t}-type-${o.type}`:void 0].filter(Boolean))}),G=e.computed(()=>{const t=c("header");return m.mergeClass(`${t}`,[o.headerBordered||o.type==="inner"?`${t}-border`:void 0].filter(Boolean))}),P=e.computed(()=>{const t=c("body");return m.mergeClass(`${t}`,[o.layout==="center"?`${t}-center`:void 0,o.split==="horizontal"||o.direction==="column"?`${t}-direction-column`:void 0,o.wrap&&C.value?`${t}-wrap`:void 0].filter(Boolean))});return(t,n)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps({class:D.value,style:{...$.value}},{...t.$attrs}),[o.title||r.title||o.extra||r.extra?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(G.value),style:e.normalizeStyle({...o.headStyle})},[o.title||r.title?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(c)("header-title"))},[e.renderSlot(t.$slots,"title",{},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(j.value)))]),o.tooltip?(e.openBlock(),e.createBlock(e.unref(b.Tooltip),{key:0},{title:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w.value)))]),default:e.withCtx(()=>[e.createVNode(e.unref(I.QuestionCircleOutlined),{class:e.normalizeClass(e.unref(c)("header-title-tooltip"))},null,8,["class"])]),_:1})):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0),o.extra||r.extra?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(c)("header-extra"))},[e.renderSlot(t.$slots,"extra",{},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(A.value)))])],2)):e.createCommentVNode("",!0)],6)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(P.value),style:e.normalizeStyle({...o.bodyStyle})},[o.loading?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(E.value),{key:0})):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(O()),{key:1}))],6),o.actions||r.actions?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(c)("actions")),style:e.normalizeStyle({...o.actionsStyle})},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(q.value)))],6)):e.createCommentVNode("",!0)],16))}});exports.default=K;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),b=require("@aplus-frontend/antdv"),I=require("@ant-design/icons-vue"),T=require("../../utils/css-var.js");require("../../../config-provider/index.js");const m=require("../../../editable-table/utils.js"),H=require("@aplus-frontend/antdv/es/_util/hooks/useBreakpoint"),Q=require("../../../config-provider/hooks/use-namespace.js"),J=require("../../../config-provider/hooks/use-global-config.js"),K=e.defineComponent({name:"ApProCard",__name:"index",props:{headStyle:{},bodyStyle:{},actionsStyle:{},headerBordered:{type:Boolean,default:!1},title:{type:[Object,String,Number,Boolean,null,Array]},tooltip:{type:[Object,String,Number,Boolean,null,Array]},extra:{type:[Object,String,Number,Boolean,null,Array]},layout:{},type:{},direction:{},wrap:{type:Boolean,default:!1},loading:{type:[Boolean,Object,String,Number,null,Array]},colSpan:{},colStyle:{},gutter:{default:0},actions:{type:[Object,String,Number,Boolean,null,Array]},split:{},bordered:{type:Boolean,default:!1},hoverable:{type:Boolean,default:!1},ghost:{type:Boolean,default:!1},boxShadow:{type:Boolean,default:!1}},setup(h){const o=h,r=e.useSlots(),{b:c}=Q.useNamespace("pro-card"),S=J.useGlobalConfig("uiMode"),$=e.computed(()=>T.getProCardCssVar(S.value)),p=["xxxl","xxl","xl","lg","md","sm","xs"],d=H(),g=(t,n)=>t?n:{},N=t=>{const n=[0,0];return(Array.isArray(t)?t:[t,0]).forEach((a,i)=>{if(typeof a=="object")for(let s=0;s<p.length;s+=1){const u=p[s];if({lg:!0,md:!0,sm:!0,xl:!1,xs:!1,xxl:!1,xxxl:!1,...d==null?void 0:d.value}[u]&&a[u]!==void 0){n[i]=a[u];break}}else n[i]=a||0}),n},V=t=>{let n=t;if(typeof t=="object")for(let a=0;a<p.length;a+=1){const i=p[a],s={lg:!0,md:!0,sm:!0,xl:!1,xs:!1,xxl:!1,xxxl:!1,...d==null?void 0:d.value};if(s!=null&&s[i]&&(t==null?void 0:t[i])!==void 0){n=t[i];break}}const l=g(typeof n=="string"&&/\d%|\dpx/i.test(n),{width:n,flexShrink:0});return{span:n,colSpanStyle:l}},z=e.computed(()=>N(o.gutter)),C=e.ref(!1),k=t=>{C.value=t},j=e.computed(()=>{var t;return e.createVNode(e.Fragment,null,[o.title||((t=r.title)==null?void 0:t.call(r))])}),w=e.computed(()=>e.createVNode(e.Fragment,null,[o.tooltip])),q=e.computed(()=>{var t;return e.createVNode(e.Fragment,null,[o.extra||((t=r.extra)==null?void 0:t.call(r))])}),E=e.computed(()=>{var t;return e.createVNode(e.Fragment,null,[o.actions||((t=r.actions)==null?void 0:t.call(r))])}),A=e.computed(()=>o.loading===!0?e.createVNode(b.Spin,{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center"}},null):e.createVNode(e.Fragment,null,[o.loading]));function O(){var n;const t=(n=r.default)==null?void 0:n.call(r);return k(!1),e.createVNode(e.Fragment,null,[t==null?void 0:t.map((l,a,i)=>{var s,u,B;if(l&&typeof l=="object"&&"type"in l&&((s=l.type)==null?void 0:s.isProCard)===!0){k(!0);const F=((u=l==null?void 0:l.props)==null?void 0:u.colSpan)||((B=l==null?void 0:l.props)==null?void 0:B["col-span"])||{},{span:f,colSpanStyle:M}=V(F),y=c("col"),_=m.mergeClass(`${y}`,[typeof f=="number"&&f>=0&&f<=24?`${y}-span-${f}`:void 0,o.split==="horizontal"&&a!==i.length-1?`${y}-split-horizontal`:void 0,o.split==="vertical"&&a!==i.length-1?`${y}-split-vertical`:void 0].filter(Boolean)),[x,v]=z.value;return e.createVNode("div",{class:_,style:{...M,...g(x>0,{paddingInlineStart:`${x/2}px`,paddingInlineEnd:`${x/2}px`}),...g(v>0,{paddingBlockStart:`${v/2}px`,paddingBlockEnd:`${v/2}px`}),...o.colStyle}},[l])}return l})])}const D=e.computed(()=>{const t=c();return m.mergeClass(`${t}`,[o.bordered?`${t}-border`:void 0,o.boxShadow?`${t}-box-shadow`:void 0,C.value?`${t}-contain-card`:void 0,o.loading?`${t}-loading`:void 0,o.split==="vertical"||o.split==="horizontal"?`${t}-split`:void 0,o.ghost?`${t}-ghost`:void 0,o.hoverable?`${t}-hoverable`:void 0,o.type?`${t}-type-${o.type}`:void 0].filter(Boolean))}),G=e.computed(()=>{const t=c("header");return m.mergeClass(`${t}`,[o.headerBordered||o.type==="inner"?`${t}-border`:void 0].filter(Boolean))}),P=e.computed(()=>{const t=c("body");return m.mergeClass(`${t}`,[o.layout==="center"?`${t}-center`:void 0,o.split==="horizontal"||o.direction==="column"?`${t}-direction-column`:void 0,o.wrap&&C.value?`${t}-wrap`:void 0].filter(Boolean))});return(t,n)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps({class:D.value,style:{...$.value}},{...t.$attrs}),[o.title||r.title||o.extra||r.extra?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(G.value),style:e.normalizeStyle({...o.headStyle})},[o.title||r.title?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(c)("header-title"))},[e.renderSlot(t.$slots,"title",{},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(j.value)))]),o.tooltip?(e.openBlock(),e.createBlock(e.unref(b.Tooltip),{key:0},{title:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w.value)))]),default:e.withCtx(()=>[e.createVNode(e.unref(I.QuestionCircleOutlined),{class:e.normalizeClass(e.unref(c)("header-title-tooltip"))},null,8,["class"])]),_:1})):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0),o.extra||r.extra?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(c)("header-extra"))},[e.renderSlot(t.$slots,"extra",{},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(q.value)))])],2)):e.createCommentVNode("",!0)],6)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(P.value),style:e.normalizeStyle({...o.bodyStyle})},[o.loading?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(A.value),{key:0})):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(O()),{key:1}))],6),o.actions||r.actions?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(c)("actions")),style:e.normalizeStyle({...o.actionsStyle})},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(E.value)))],6)):e.createCommentVNode("",!0)],16))}});exports.default=K;
@@ -0,0 +1,13 @@
1
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ type __VLS_Props = {
3
+ /**
4
+ * 布局类型
5
+ *
6
+ * @default vertical
7
+ */
8
+ type?: 'horizontal' | 'vertical';
9
+ };
10
+ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
11
+ type: "horizontal" | "vertical";
12
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
13
+ export default _default;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./index.vue2.js");exports.default=e.default;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../config-provider/index.js");const u=require("../../../editable-table/utils.js"),i=require("../../../config-provider/hooks/use-namespace.js"),a=e.defineComponent({name:"ApProCardDivider",__name:"index",props:{type:{default:"vertical"}},setup(s){const{b:n}=i.useNamespace("pro-card-divider"),t=s,o=e.computed(()=>{const r=n();return u.mergeClass(`${r}`,[t.type?`${r}-${t.type}`:void 0].filter(Boolean))});return(r,c)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps({...r.$attrs},{class:o.value}),null,16))}});exports.default=a;
@@ -0,0 +1,23 @@
1
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ type __VLS_Props = {
3
+ type?: 'default';
4
+ };
5
+ declare function __VLS_template(): {
6
+ attrs: Partial<{}>;
7
+ slots: {
8
+ default?(_: {}): any;
9
+ };
10
+ refs: {};
11
+ rootEl: HTMLDivElement;
12
+ };
13
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
14
+ declare const __VLS_component: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
15
+ type: "default";
16
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
17
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
18
+ export default _default;
19
+ type __VLS_WithTemplateSlots<T, S> = T & {
20
+ new (): {
21
+ $slots: S;
22
+ };
23
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./index.vue2.js");exports.default=e.default;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../config-provider/index.js");const n=require("../../../editable-table/utils.js"),a=require("../../../config-provider/hooks/use-namespace.js"),i=require("../../../config-provider/hooks/use-global-config.js"),c=e.defineComponent({name:"ApProCardTitle",__name:"index",props:{type:{default:"default"}},setup(l){const{b:r}=a.useNamespace("pro-card-title"),s=i.useGlobalConfig("uiMode"),o=l,u=e.computed(()=>{const t=r();return n.mergeClass(`${t}`,[o.type?`${t}-${o.type}`:void 0,s.value?`${t}-${o.type??"default"}-${s.value}`:void 0].filter(Boolean))});return(t,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(u.value)},[e.renderSlot(t.$slots,"default")],2))}});exports.default=c;
@@ -1,42 +1,10 @@
1
- import { CreateComponentPublicInstanceWithMixins, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, ComponentOptionsBase, VNodeProps, AllowedComponentProps, ComponentCustomProps } from 'vue';
2
- import { ApProCardProps, ApProCardGutter, ApProCardSolts } from './interface';
3
- declare const ApProCard: {
4
- new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< ApProCardProps> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
5
- wrap: boolean;
6
- boxShadow: boolean;
7
- gutter: ApProCardGutter | ApProCardGutter[];
8
- ghost: boolean;
9
- bordered: boolean;
10
- headerBordered: boolean;
11
- hoverable: boolean;
12
- }, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, HTMLDivElement, ComponentProvideOptions, {
13
- P: {};
14
- B: {};
15
- D: {};
16
- C: {};
17
- M: {};
18
- Defaults: {};
19
- }, Readonly< ApProCardProps> & Readonly<{}>, {}, {}, {}, {}, {
20
- wrap: boolean;
21
- boxShadow: boolean;
22
- gutter: ApProCardGutter | ApProCardGutter[];
23
- ghost: boolean;
24
- bordered: boolean;
25
- headerBordered: boolean;
26
- hoverable: boolean;
27
- }>;
28
- __isFragment?: never;
29
- __isTeleport?: never;
30
- __isSuspense?: never;
31
- } & ComponentOptionsBase<Readonly< ApProCardProps> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
32
- wrap: boolean;
33
- boxShadow: boolean;
34
- gutter: ApProCardGutter | ApProCardGutter[];
35
- ghost: boolean;
36
- bordered: boolean;
37
- headerBordered: boolean;
38
- hoverable: boolean;
39
- }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
40
- $slots: Readonly< ApProCardSolts> & ApProCardSolts;
41
- });
1
+ import { default as Card } from './components/card/index.vue';
2
+ import { default as Divider } from './components/divider/index.vue';
3
+ import { default as Title } from './components/title/index.vue';
4
+ export type ProCardType = typeof Card & {
5
+ isProCard: boolean;
6
+ Divider: typeof Divider;
7
+ Title: typeof Title;
8
+ };
9
+ declare const ApProCard: ProCardType;
42
10
  export { ApProCard };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./components/card/index.vue.js");const r=require("./components/card/index.vue2.js"),e=r.default;e.isProCard=!0;exports.ApProCard=e;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./components/card/index.vue.js");require("./components/divider/index.vue.js");require("./components/title/index.vue.js");const r=require("./components/card/index.vue2.js"),t=require("./components/divider/index.vue2.js"),u=require("./components/title/index.vue2.js"),e=r.default;e.isProCard=!0;e.Divider=t.default;e.Title=u.default;exports.ApProCard=e;
@@ -1,4 +1,4 @@
1
- import { CSSProperties, VNodeChild } from 'vue';
1
+ import { CSSProperties, VNode, VNodeChild } from 'vue';
2
2
  export type ApProCardBreakpoint = 'xxxl' | 'xxl' | 'xl' | 'lg' | 'md' | 'sm' | 'xs';
3
3
  export type ApProCardGutter = number | Partial<Record<ApProCardBreakpoint, number>>;
4
4
  export type ApProCardColSpanType = number | string;
@@ -51,7 +51,7 @@ export interface ApProCardProps {
51
51
  }
52
52
  export type ApProCardSolts = {
53
53
  /** 内容区 */
54
- default?: () => VNodeChild;
54
+ default?: () => VNode[];
55
55
  /** 标题 */
56
56
  title?: () => VNodeChild;
57
57
  /** 右上角自定义区域 */
@@ -1,2 +1,2 @@
1
- declare const _default: "6.21.0";
1
+ declare const _default: "6.21.1";
2
2
  export default _default;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="6.21.0";exports.default=e;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="6.21.1";exports.default=e;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aplus-frontend/ui",
3
- "version": "6.21.0",
3
+ "version": "6.21.1",
4
4
  "main": "./lib/index.js",
5
5
  "type": "module",
6
6
  "files": [
@@ -0,0 +1,82 @@
1
+ .reset-component {
2
+ box-sizing: border-box;
3
+ margin: 0;
4
+ padding: 0;
5
+ color: #182948;
6
+ font-size: 12px;
7
+ font-family: inherit;
8
+ line-height: 18px;
9
+ list-style: none;
10
+ }
11
+ .reset-scrollbar ::-webkit-scrollbar {
12
+ width: 10px;
13
+ height: 10px;
14
+ }
15
+ .reset-scrollbar ::-webkit-scrollbar-thumb {
16
+ background-color: var(--ap-scrollbar-thumb-color-base);
17
+ background-clip: content-box;
18
+ border: 1px solid transparent;
19
+ border-radius: 4px;
20
+ }
21
+ .reset-scrollbar ::-webkit-scrollbar-track,
22
+ .reset-scrollbar ::-webkit-scrollbar-corner {
23
+ background-color: var(--ap-table-header-bg, #f2f6f9);
24
+ }
25
+ .reset-scrollbar ::-webkit-scrollbar-thumb:hover,
26
+ .reset-scrollbar ::-webkit-scrollbar-thumb:active {
27
+ background-color: var(--ap-scrollbar-thumb-color-hover);
28
+ }
29
+ .clear-fix::before {
30
+ display: table;
31
+ content: '';
32
+ }
33
+ .clear-fix::after {
34
+ display: table;
35
+ clear: both;
36
+ content: '';
37
+ }
38
+ .common-style {
39
+ box-sizing: border-box;
40
+ font-size: 12px;
41
+ font-family: inherit;
42
+ }
43
+ .common-style::before,
44
+ .common-style::after {
45
+ box-sizing: border-box;
46
+ }
47
+ .aplus-ag-custom-header {
48
+ display: flex;
49
+ flex-direction: row;
50
+ flex-wrap: nowrap;
51
+ align-items: center;
52
+ flex: 1;
53
+ }
54
+ .aplus-ag-custom-header.sortable:hover {
55
+ cursor: pointer;
56
+ }
57
+ .aplus-ag-custom-header.align-center {
58
+ justify-content: center;
59
+ }
60
+ .aplus-ag-custom-header.align-right {
61
+ justify-content: end;
62
+ }
63
+ .aplus-ag-custom-header__sort-wrapper {
64
+ display: inline-flex;
65
+ flex-direction: column;
66
+ align-items: center;
67
+ color: rgba(0, 0, 0, 0.29);
68
+ margin-left: 4px;
69
+ }
70
+ .aplus-ag-custom-header__sort-wrapper:hover {
71
+ color: rgba(0, 0, 0, 0.57);
72
+ cursor: pointer;
73
+ }
74
+ .aplus-ag-custom-header__sorter-up.active {
75
+ color: var(--ap-color-primary);
76
+ }
77
+ .aplus-ag-custom-header__sorter-down {
78
+ margin-top: -0.3em;
79
+ }
80
+ .aplus-ag-custom-header__sorter-down.active {
81
+ color: var(--ap-color-primary);
82
+ }
@@ -0,0 +1,39 @@
1
+ @import '../mixins/mixins.less';
2
+ @import '../mixins/config.less';
3
+
4
+ .b(ag-custom-header, {
5
+ display: flex;
6
+ flex-direction: row;
7
+ flex-wrap: nowrap;
8
+ align-items: center;
9
+ flex: 1;
10
+ &.sortable:hover {
11
+ cursor: pointer;
12
+ }
13
+ &.align-center {
14
+ justify-content: center;
15
+ }
16
+ &.align-right {
17
+ justify-content: end;
18
+ }
19
+ &__sort-wrapper {
20
+ display: inline-flex;
21
+ flex-direction: column;
22
+ align-items: center;
23
+ color: rgba(0,0,0,0.29);
24
+ &:hover {
25
+ color: rgba(0,0,0,0.57);
26
+ cursor: pointer;
27
+ }
28
+ margin-left: 4px;
29
+ }
30
+ &__sorter-up.active {
31
+ color: var(--ap-color-primary);
32
+ }
33
+ &__sorter-down {
34
+ margin-top: -0.3em;
35
+ &.active {
36
+ color: var(--ap-color-primary);
37
+ }
38
+ }
39
+ });
@@ -0,0 +1,204 @@
1
+ .reset-component {
2
+ box-sizing: border-box;
3
+ margin: 0;
4
+ padding: 0;
5
+ color: #182948;
6
+ font-size: 12px;
7
+ font-family: inherit;
8
+ line-height: 18px;
9
+ list-style: none;
10
+ }
11
+ .reset-scrollbar ::-webkit-scrollbar {
12
+ width: 10px;
13
+ height: 10px;
14
+ }
15
+ .reset-scrollbar ::-webkit-scrollbar-thumb {
16
+ background-color: var(--ap-scrollbar-thumb-color-base);
17
+ background-clip: content-box;
18
+ border: 1px solid transparent;
19
+ border-radius: 4px;
20
+ }
21
+ .reset-scrollbar ::-webkit-scrollbar-track,
22
+ .reset-scrollbar ::-webkit-scrollbar-corner {
23
+ background-color: var(--ap-table-header-bg, #f2f6f9);
24
+ }
25
+ .reset-scrollbar ::-webkit-scrollbar-thumb:hover,
26
+ .reset-scrollbar ::-webkit-scrollbar-thumb:active {
27
+ background-color: var(--ap-scrollbar-thumb-color-hover);
28
+ }
29
+ .clear-fix::before {
30
+ display: table;
31
+ content: '';
32
+ }
33
+ .clear-fix::after {
34
+ display: table;
35
+ clear: both;
36
+ content: '';
37
+ }
38
+ .common-style {
39
+ box-sizing: border-box;
40
+ font-size: 12px;
41
+ font-family: inherit;
42
+ }
43
+ .common-style::before,
44
+ .common-style::after {
45
+ box-sizing: border-box;
46
+ }
47
+ .aplus-ag-custom-header {
48
+ display: flex;
49
+ flex-direction: row;
50
+ flex-wrap: nowrap;
51
+ align-items: center;
52
+ flex: 1;
53
+ }
54
+ .aplus-ag-custom-header.sortable:hover {
55
+ cursor: pointer;
56
+ }
57
+ .aplus-ag-custom-header.align-center {
58
+ justify-content: center;
59
+ }
60
+ .aplus-ag-custom-header.align-right {
61
+ justify-content: end;
62
+ }
63
+ .aplus-ag-custom-header__sort-wrapper {
64
+ display: inline-flex;
65
+ flex-direction: column;
66
+ align-items: center;
67
+ color: rgba(0, 0, 0, 0.29);
68
+ margin-left: 4px;
69
+ }
70
+ .aplus-ag-custom-header__sort-wrapper:hover {
71
+ color: rgba(0, 0, 0, 0.57);
72
+ cursor: pointer;
73
+ }
74
+ .aplus-ag-custom-header__sorter-up.active {
75
+ color: var(--ap-color-primary);
76
+ }
77
+ .aplus-ag-custom-header__sorter-down {
78
+ margin-top: -0.3em;
79
+ }
80
+ .aplus-ag-custom-header__sorter-down.active {
81
+ color: var(--ap-color-primary);
82
+ }
83
+ .aplus-ag-grid ::-webkit-scrollbar {
84
+ width: 10px;
85
+ height: 10px;
86
+ }
87
+ .aplus-ag-grid ::-webkit-scrollbar-thumb {
88
+ background-color: var(--ap-scrollbar-thumb-color-base);
89
+ background-clip: content-box;
90
+ border: 1px solid transparent;
91
+ border-radius: 4px;
92
+ }
93
+ .aplus-ag-grid ::-webkit-scrollbar-track,
94
+ .aplus-ag-grid ::-webkit-scrollbar-corner {
95
+ background-color: var(--ap-table-header-bg, #f2f6f9);
96
+ }
97
+ .aplus-ag-grid ::-webkit-scrollbar-thumb:hover,
98
+ .aplus-ag-grid ::-webkit-scrollbar-thumb:active {
99
+ background-color: var(--ap-scrollbar-thumb-color-hover);
100
+ }
101
+ .aplus-ag-grid-adaptive {
102
+ height: 100%;
103
+ display: flex;
104
+ flex-direction: column;
105
+ }
106
+ .aplus-ag-grid-adaptive .aplus-ag-grid-grid-wrapper {
107
+ min-height: 0;
108
+ flex: 1;
109
+ position: relative;
110
+ }
111
+ .aplus-ag-grid-wrapper {
112
+ padding: 8px;
113
+ padding-bottom: 12px;
114
+ background-color: #fff;
115
+ }
116
+ .aplus-ag-grid-wrapper:has(ul.ant-pagination) {
117
+ padding-bottom: 0;
118
+ }
119
+ .aplus-ag-grid-sticky > .aplus-ag-grid__table-wrapper-card {
120
+ padding-bottom: 0;
121
+ }
122
+ .aplus-ag-grid__search-wrapper {
123
+ padding: 8px;
124
+ padding-bottom: 0;
125
+ background-color: #fff;
126
+ border-radius: 4px;
127
+ margin-bottom: 10px;
128
+ }
129
+ .aplus-ag-grid__table-wrapper {
130
+ flex: 1;
131
+ min-height: 0;
132
+ max-height: 100%;
133
+ width: 100%;
134
+ display: flex;
135
+ flex-direction: column;
136
+ }
137
+ .aplus-ag-grid__table-wrapper-card {
138
+ padding: 8px;
139
+ padding-bottom: 12px;
140
+ border-radius: 4px;
141
+ background-color: #fff;
142
+ }
143
+ .aplus-ag-grid__table-wrapper-card:has(ul.ant-pagination) {
144
+ padding-bottom: 0;
145
+ }
146
+ .aplus-ag-grid-pagination {
147
+ margin-block: 8px;
148
+ display: flex;
149
+ flex-wrap: wrap;
150
+ align-items: center;
151
+ row-gap: 8px;
152
+ }
153
+ .aplus-ag-grid-pagination .ant-pagination-total-text {
154
+ flex: 1;
155
+ height: unset;
156
+ line-height: 18px;
157
+ display: flex;
158
+ align-items: center;
159
+ }
160
+ .aplus-ag-grid__table-loading-wrapper {
161
+ position: absolute;
162
+ top: 0;
163
+ left: 0;
164
+ width: 100%;
165
+ height: 100%;
166
+ z-index: 1;
167
+ display: flex;
168
+ justify-content: center;
169
+ align-items: center;
170
+ background-color: var(--vxe-ui-loading-background-color);
171
+ }
172
+ .aplus-ag-grid-pagination-count-text {
173
+ color: var(--ap-text-color-2);
174
+ }
175
+ .aplus-ag-grid-pagination--total-right {
176
+ padding-left: 12px;
177
+ }
178
+ .aplus-ag-grid-pagination-total-wrapper {
179
+ color: var(--ap-text-color-1);
180
+ }
181
+ .aplus-ag-grid-table-header__title {
182
+ display: -webkit-inline-box;
183
+ -webkit-line-clamp: 2;
184
+ -webkit-box-orient: vertical;
185
+ overflow: hidden;
186
+ text-overflow: ellipsis;
187
+ white-space: normal;
188
+ max-width: 100%;
189
+ vertical-align: middle;
190
+ word-break: break-all;
191
+ flex: 1;
192
+ }
193
+ .aplus-ag-grid-table-header__title--single {
194
+ flex: unset;
195
+ }
196
+ .aplus-ag-grid__cell--left {
197
+ text-align: left;
198
+ }
199
+ .aplus-ag-grid__cell--center {
200
+ text-align: center;
201
+ }
202
+ .aplus-ag-grid__cell--right {
203
+ text-align: right;
204
+ }
@@ -0,0 +1,118 @@
1
+ @import '../mixins/mixins.less';
2
+ @import '../mixins/config.less';
3
+ @import './custom-header.less';
4
+
5
+ @aggrid: ~'@{ns}-ag-grid-grid-wrapper';
6
+ @pg: ~'@{ns}-ag-grid-pagination-wrapper';
7
+
8
+ .b(ag-grid, {
9
+ .reset-scrollbar();
10
+ &-adaptive {
11
+ height: 100%;
12
+ display: flex;
13
+ flex-direction: column;
14
+ .@{aggrid} {
15
+ min-height: 0;
16
+ flex: 1;
17
+ position: relative;
18
+ }
19
+ }
20
+ &-wrapper {
21
+ padding: @spacing;
22
+ padding-bottom: @spacing-lg;
23
+ // 如果渲染了分页器,则取消容器的底部边距,防止双重边距
24
+ &:has(ul.ant-pagination) {
25
+ padding-bottom: 0;
26
+ }
27
+ background-color: #fff;
28
+ }
29
+ &-sticky > &__table-wrapper-card {
30
+ padding-bottom: 0;
31
+ }
32
+ &__search-wrapper {
33
+ padding: @spacing;
34
+ padding-bottom: 0;
35
+ background-color: #fff;
36
+ border-radius: @border-radius;
37
+ margin-bottom: 10px;
38
+ }
39
+ &__table-wrapper {
40
+ flex: 1;
41
+ min-height: 0;
42
+ max-height: 100%;
43
+ width: 100%;
44
+ display: flex;
45
+ flex-direction: column;
46
+ }
47
+ &__table-wrapper-card {
48
+ padding: @spacing;
49
+ padding-bottom: @spacing-lg;
50
+ &:has(ul.ant-pagination) {
51
+ padding-bottom: 0;
52
+ }
53
+ border-radius: @border-radius;
54
+ background-color: #fff;
55
+ }
56
+ &-pagination {
57
+ margin-block: @spacing;
58
+ display: flex;
59
+ flex-wrap: wrap;
60
+ align-items: center;
61
+ row-gap: 8px;
62
+ .ant-pagination-total-text {
63
+ flex: 1;
64
+ height: unset;
65
+ line-height: @line-height-base;
66
+ display: flex;
67
+ align-items: center;
68
+ }
69
+ }
70
+ &__table-loading-wrapper {
71
+ position: absolute;
72
+ top: 0;
73
+ left: 0;
74
+ width: 100%;
75
+ height: 100%;
76
+ z-index: 1;
77
+ display: flex;
78
+ justify-content: center;
79
+ align-items: center;
80
+ background-color: var(--vxe-ui-loading-background-color);
81
+ }
82
+ &-pagination-count-text {
83
+ color: var(--ap-text-color-2);
84
+ }
85
+ &-pagination--total-right {
86
+ padding-left: 12px;
87
+ }
88
+ &-pagination-total-wrapper {
89
+ color: var(--ap-text-color-1);
90
+ }
91
+ // ApGrid中表格表头的样式
92
+ &-table-header {
93
+ &__title {
94
+ display: -webkit-inline-box;
95
+ -webkit-line-clamp: 2;
96
+ -webkit-box-orient: vertical;
97
+ overflow: hidden;
98
+ text-overflow: ellipsis;
99
+ white-space: normal;
100
+ max-width: 100%;
101
+ vertical-align: middle;
102
+ word-break: break-all;
103
+ flex: 1;
104
+ &--single {
105
+ flex: unset;
106
+ }
107
+ }
108
+ }
109
+ &__cell--left {
110
+ text-align: left;
111
+ }
112
+ &__cell--center {
113
+ text-align: center;
114
+ }
115
+ &__cell--right {
116
+ text-align: right;
117
+ }
118
+ });
@@ -257,3 +257,55 @@
257
257
  background: var(--ap-pro-card-colo-bg-container);
258
258
  padding: var(--ap-pro-card-actions-padding);
259
259
  }
260
+ .aplus-pro-card-title-default {
261
+ position: relative;
262
+ font-weight: bold;
263
+ font-size: 12px;
264
+ display: flex;
265
+ align-items: center;
266
+ }
267
+ .aplus-pro-card-title-default-aplus {
268
+ padding-left: 10px;
269
+ }
270
+ .aplus-pro-card-title-default-aplus::before {
271
+ position: absolute;
272
+ content: '';
273
+ left: 0;
274
+ top: 50%;
275
+ transform: translateY(-50%);
276
+ width: 3px;
277
+ height: 14px;
278
+ background: #0070ff;
279
+ border-radius: 0px 4px 4px 0px;
280
+ }
281
+ .aplus-pro-card-title-default-admin {
282
+ padding-left: 14px;
283
+ }
284
+ .aplus-pro-card-title-default-admin::before {
285
+ position: absolute;
286
+ content: '';
287
+ left: 0;
288
+ top: 50%;
289
+ transform: translateY(-50%);
290
+ width: 8px;
291
+ height: 8px;
292
+ border-radius: 50%;
293
+ border-width: 2px;
294
+ border-style: solid;
295
+ border-color: #34b77c;
296
+ background: #fff;
297
+ }
298
+ .aplus-pro-card-divider {
299
+ flex: none;
300
+ background: var(--ap-pro-card-border-color-split);
301
+ }
302
+ .aplus-pro-card-divider-vertical {
303
+ width: var(--ap-pro-card-border-line-width);
304
+ margin-inline: 8px;
305
+ margin-block: 24px;
306
+ }
307
+ .aplus-pro-card-divider-horizontal {
308
+ height: var(--ap-pro-card-border-line-width);
309
+ margin-inline: 24px;
310
+ margin-block: 8px;
311
+ }
@@ -127,3 +127,59 @@
127
127
  padding: var(--ap-pro-card-actions-padding);
128
128
  }
129
129
  });
130
+
131
+ .b(pro-card-title, {
132
+ &-default {
133
+ position: relative;
134
+ font-weight: bold;
135
+ font-size: 12px;
136
+ display: flex;
137
+ align-items: center;
138
+ &-aplus {
139
+ padding-left: 10px;
140
+ &::before {
141
+ position: absolute;
142
+ content: '';
143
+ left: 0;
144
+ top: 50%;
145
+ transform: translateY(-50%);
146
+ width: 3px;
147
+ height: 14px;
148
+ background: #0070ff;
149
+ border-radius: 0px 4px 4px 0px;
150
+ }
151
+ }
152
+ &-admin {
153
+ padding-left: 14px;
154
+ &::before {
155
+ position: absolute;
156
+ content: '';
157
+ left: 0;
158
+ top: 50%;
159
+ transform: translateY(-50%);
160
+ width: 8px;
161
+ height: 8px;
162
+ border-radius: 50%;
163
+ border-width: 2px;
164
+ border-style: solid;
165
+ border-color: #34b77c;
166
+ background: #fff;
167
+ }
168
+ }
169
+ }
170
+ });
171
+
172
+ .b(pro-card-divider, {
173
+ flex: none;
174
+ background: var(--ap-pro-card-border-color-split);
175
+ &-vertical {
176
+ width: var(--ap-pro-card-border-line-width);
177
+ margin-inline: 8px;
178
+ margin-block: 24px;
179
+ }
180
+ &-horizontal {
181
+ height: var(--ap-pro-card-border-line-width);
182
+ margin-inline: 24px;
183
+ margin-block: 8px;
184
+ }
185
+ });
package/theme/index.css CHANGED
@@ -4475,3 +4475,55 @@ div.aplus-ap-info-layout-admin__header-shadow.aplus-ap-info-layout-admin__sticky
4475
4475
  background: var(--ap-pro-card-colo-bg-container);
4476
4476
  padding: var(--ap-pro-card-actions-padding);
4477
4477
  }
4478
+ .aplus-pro-card-title-default {
4479
+ position: relative;
4480
+ font-weight: bold;
4481
+ font-size: 12px;
4482
+ display: flex;
4483
+ align-items: center;
4484
+ }
4485
+ .aplus-pro-card-title-default-aplus {
4486
+ padding-left: 10px;
4487
+ }
4488
+ .aplus-pro-card-title-default-aplus::before {
4489
+ position: absolute;
4490
+ content: '';
4491
+ left: 0;
4492
+ top: 50%;
4493
+ transform: translateY(-50%);
4494
+ width: 3px;
4495
+ height: 14px;
4496
+ background: #0070ff;
4497
+ border-radius: 0px 4px 4px 0px;
4498
+ }
4499
+ .aplus-pro-card-title-default-admin {
4500
+ padding-left: 14px;
4501
+ }
4502
+ .aplus-pro-card-title-default-admin::before {
4503
+ position: absolute;
4504
+ content: '';
4505
+ left: 0;
4506
+ top: 50%;
4507
+ transform: translateY(-50%);
4508
+ width: 8px;
4509
+ height: 8px;
4510
+ border-radius: 50%;
4511
+ border-width: 2px;
4512
+ border-style: solid;
4513
+ border-color: #34b77c;
4514
+ background: #fff;
4515
+ }
4516
+ .aplus-pro-card-divider {
4517
+ flex: none;
4518
+ background: var(--ap-pro-card-border-color-split);
4519
+ }
4520
+ .aplus-pro-card-divider-vertical {
4521
+ width: var(--ap-pro-card-border-line-width);
4522
+ margin-inline: 8px;
4523
+ margin-block: 24px;
4524
+ }
4525
+ .aplus-pro-card-divider-horizontal {
4526
+ height: var(--ap-pro-card-border-line-width);
4527
+ margin-inline: 24px;
4528
+ margin-block: 8px;
4529
+ }