@aplus-frontend/ui 0.4.29 → 0.4.31

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,5 +1,5 @@
1
- import { defineComponent as D, computed as n, openBlock as v, createBlock as y, unref as a, mergeProps as d, withCtx as r, createVNode as c, createElementVNode as N, normalizeStyle as R, toDisplayString as h, normalizeClass as x, normalizeProps as S, guardReactiveProps as V, createTextVNode as $, createCommentVNode as z } from "vue";
2
- import { DropdownButton as G, Dropdown as M } from "@aplus-frontend/antdv";
1
+ import { defineComponent as T, computed as n, openBlock as c, createBlock as m, unref as a, mergeProps as p, withCtx as r, createVNode as d, createElementVNode as N, normalizeStyle as $, resolveDynamicComponent as h, h as w, normalizeClass as x, normalizeProps as z, guardReactiveProps as G, createCommentVNode as M } from "vue";
2
+ import { DropdownButton as S, Dropdown as V } from "@aplus-frontend/antdv";
3
3
  import "../../ap-button/index.mjs";
4
4
  import "./MenuItemGroup.vue.mjs";
5
5
  import "../../config-provider/index.mjs";
@@ -9,17 +9,17 @@ import { useInjectApTable as j } from "../../ap-table/context.mjs";
9
9
  import { useNamespace as E } from "../../config-provider/hooks/use-namespace.mjs";
10
10
  import { useLocale as I } from "../../config-provider/hooks/use-locale.mjs";
11
11
  import { useGlobalConfig as q } from "../../config-provider/hooks/use-global-config.mjs";
12
- import w from "./MenuItemGroup.vue2.mjs";
12
+ import P from "./MenuItemGroup.vue2.mjs";
13
13
  import H from "../../ap-button/ap-button.vue.mjs";
14
- const re = /* @__PURE__ */ D({
14
+ const re = /* @__PURE__ */ T({
15
15
  __name: "ApBatchActionGroup",
16
16
  props: {
17
17
  selectedRows: {},
18
18
  buttonProps: {},
19
19
  menuList: {}
20
20
  },
21
- setup(P, { expose: _ }) {
22
- const { b: i } = E("ap-batch-action-group"), { t: g } = I(), { columns: k, dataSource: A } = j(), e = P, B = q("uiMode"), { hasPermission: L } = O(), p = n(
21
+ setup(_, { expose: g }) {
22
+ const { b: f } = E("ap-batch-action-group"), { t: k } = I(), { columns: A, dataSource: B } = j(), e = _, C = q("uiMode"), { hasPermission: L } = O(), b = n(
23
23
  () => {
24
24
  var t;
25
25
  return ((t = e == null ? void 0 : e.buttonProps) == null ? void 0 : t.dropdownType) || "default";
@@ -29,22 +29,22 @@ const re = /* @__PURE__ */ D({
29
29
  var t;
30
30
  return ((t = e == null ? void 0 : e.buttonProps) == null ? void 0 : t.type) || "borderLink";
31
31
  }
32
- ), f = n(
32
+ ), v = n(
33
33
  () => {
34
34
  var t;
35
- return ((t = e == null ? void 0 : e.buttonProps) == null ? void 0 : t.content) || g("ap.apApBatchActionGroup.batchOperation");
35
+ return ((t = e == null ? void 0 : e.buttonProps) == null ? void 0 : t.content) || k("ap.apApBatchActionGroup.batchOperation");
36
36
  }
37
- ), C = n(() => (e == null ? void 0 : e.selectedRows) || []), m = n(
37
+ ), D = n(() => (e == null ? void 0 : e.selectedRows) || []), i = n(
38
38
  () => {
39
39
  var t;
40
- return ((t = e == null ? void 0 : e.buttonProps) == null ? void 0 : t.disabled) ?? (Array.isArray(e.selectedRows) ? C.value.length === 0 : !1);
40
+ return ((t = e == null ? void 0 : e.buttonProps) == null ? void 0 : t.disabled) ?? (Array.isArray(e.selectedRows) ? D.value.length === 0 : !1);
41
41
  }
42
- ), T = n(() => {
42
+ ), R = n(() => {
43
43
  const t = {
44
44
  aplus: "#0070FF",
45
45
  admin: "#34b77c"
46
46
  };
47
- return u.value === "borderLink" ? m.value ? void 0 : t[B.value] || t.aplus : void 0;
47
+ return u.value === "borderLink" ? i.value ? void 0 : t[C.value] || t.aplus : void 0;
48
48
  }), l = n(() => {
49
49
  var t;
50
50
  return ((t = e == null ? void 0 : e.menuList) == null ? void 0 : t.filter((o) => {
@@ -52,61 +52,63 @@ const re = /* @__PURE__ */ D({
52
52
  return !(o != null && o.ifShow) && (o != null && o.auth) && (s = () => L(o.auth)), (s == null ? void 0 : s()) ?? !0;
53
53
  })) || [];
54
54
  });
55
- function b() {
55
+ function y() {
56
56
  return e != null && e.buttonProps ? {
57
57
  ...e.buttonProps,
58
58
  type: u.value === "borderLink" ? "default" : u.value
59
59
  } : {};
60
60
  }
61
- return _({
62
- columns: k,
63
- dataSource: A
64
- }), (t, o) => l.value.length && p.value === "dropdown" ? (v(), y(a(G), d({
61
+ return g({
62
+ columns: A,
63
+ dataSource: B
64
+ }), (t, o) => l.value.length && b.value === "dropdown" ? (c(), m(a(S), p({
65
65
  key: 0,
66
- class: [a(i)()]
66
+ class: [a(f)()]
67
67
  }, {
68
68
  ...t.$attrs,
69
- ...b(),
70
- disabled: m.value
69
+ ...y(),
70
+ disabled: i.value
71
71
  }), {
72
72
  overlay: r(() => [
73
- c(w, d({
73
+ d(P, p({
74
74
  ...e
75
75
  }, { "menu-list": l.value }), null, 16, ["menu-list"])
76
76
  ]),
77
77
  default: r(() => [
78
78
  N("span", {
79
- style: R({
80
- color: T.value
79
+ style: $({
80
+ color: R.value
81
81
  })
82
- }, h(f.value), 5)
82
+ }, [
83
+ (c(), m(h(w("span", [v.value]))))
84
+ ], 4)
83
85
  ]),
84
86
  _: 1
85
- }, 16, ["class"])) : l.value.length && p.value === "default" ? (v(), y(a(M), {
87
+ }, 16, ["class"])) : l.value.length && b.value === "default" ? (c(), m(a(V), {
86
88
  key: 1,
87
- class: x([a(i)()]),
88
- disabled: m.value
89
+ class: x([a(f)()]),
90
+ disabled: i.value
89
91
  }, {
90
92
  overlay: r(() => [
91
- c(w, d({
93
+ d(P, p({
92
94
  ...e
93
95
  }, { "menu-list": l.value }), null, 16, ["menu-list"])
94
96
  ]),
95
97
  default: r(() => [
96
- c(a(H), S(V({
98
+ d(a(H), z(G({
97
99
  ...t.$attrs,
98
- ...b(),
100
+ ...y(),
99
101
  type: u.value
100
102
  })), {
101
103
  default: r(() => [
102
- $(h(f.value) + " ", 1),
103
- c(a(F))
104
+ (c(), m(h(w("span", [v.value])))),
105
+ d(a(F))
104
106
  ]),
105
107
  _: 1
106
108
  }, 16)
107
109
  ]),
108
110
  _: 1
109
- }, 8, ["class", "disabled"])) : z("", !0);
111
+ }, 8, ["class", "disabled"])) : M("", !0);
110
112
  }
111
113
  });
112
114
  export {
@@ -1,4 +1,4 @@
1
- import { CreateComponentPublicInstanceWithMixins, ExtractPropTypes, PropType, CSSProperties, ComputedRef, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, ComponentOptionsBase, VNodeProps, AllowedComponentProps, ComponentCustomProps, Plugin } from 'vue';
1
+ import { CreateComponentPublicInstanceWithMixins, ExtractPropTypes, PropType, VNodeChild, CSSProperties, ComputedRef, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, ComponentOptionsBase, VNodeProps, AllowedComponentProps, ComponentCustomProps, Plugin } from 'vue';
2
2
  import { ButtonType, ButtonShape, ButtonSize } from '@aplus-frontend/antdv/es/button';
3
3
  import { ButtonHTMLType } from '@aplus-frontend/antdv/es/button/buttonTypes';
4
4
  import { VueTypeValidableDef } from '../../../node_modules/vue-types';
@@ -69,7 +69,7 @@ declare const ApBatchActionGroup: {
69
69
  lazy?: boolean | number;
70
70
  onClick?: () => any | Promise<any>;
71
71
  } & {
72
- content?: string;
72
+ content?: VNodeChild;
73
73
  }) | ({
74
74
  dropdownType?: "dropdown" | undefined;
75
75
  } & Omit<Partial< ExtractPropTypes<{
@@ -299,7 +299,7 @@ declare const ApBatchActionGroup: {
299
299
  };
300
300
  }>>, "type"> & {
301
301
  type?: ButtonType | "borderLink" | undefined;
302
- content?: string;
302
+ content?: VNodeChild;
303
303
  }) | undefined;
304
304
  menuList?: ApBatchActionGroupMenuProps<any>[] | undefined;
305
305
  }> & Readonly<{}>, {
@@ -370,7 +370,7 @@ declare const ApBatchActionGroup: {
370
370
  lazy?: boolean | number;
371
371
  onClick?: () => any | Promise<any>;
372
372
  } & {
373
- content?: string;
373
+ content?: VNodeChild;
374
374
  }) | ({
375
375
  dropdownType?: "dropdown" | undefined;
376
376
  } & Omit<Partial< ExtractPropTypes<{
@@ -600,7 +600,7 @@ declare const ApBatchActionGroup: {
600
600
  };
601
601
  }>>, "type"> & {
602
602
  type?: ButtonType | "borderLink" | undefined;
603
- content?: string;
603
+ content?: VNodeChild;
604
604
  }) | undefined;
605
605
  menuList?: ApBatchActionGroupMenuProps<any>[] | undefined;
606
606
  }> & Readonly<{}>, {
@@ -668,7 +668,7 @@ declare const ApBatchActionGroup: {
668
668
  lazy?: boolean | number;
669
669
  onClick?: () => any | Promise<any>;
670
670
  } & {
671
- content?: string;
671
+ content?: VNodeChild;
672
672
  }) | ({
673
673
  dropdownType?: "dropdown" | undefined;
674
674
  } & Omit<Partial< ExtractPropTypes<{
@@ -898,7 +898,7 @@ declare const ApBatchActionGroup: {
898
898
  };
899
899
  }>>, "type"> & {
900
900
  type?: ButtonType | "borderLink" | undefined;
901
- content?: string;
901
+ content?: VNodeChild;
902
902
  }) | undefined;
903
903
  menuList?: ApBatchActionGroupMenuProps<any>[] | undefined;
904
904
  }> & Readonly<{}>, {
@@ -6,11 +6,11 @@ import { ColumnType } from '@aplus-frontend/antdv/es/table';
6
6
  type ApBatchActionGroupButtonType = ButtonProps['type'] | 'borderLink';
7
7
  type MixinButton<T> = Omit<T, 'type'> & {
8
8
  type?: ApBatchActionGroupButtonType;
9
- content?: string;
9
+ content?: VNodeChild;
10
10
  };
11
11
  interface ApBatchActionGroupTypeProps {
12
12
  default: ApButtonProps & {
13
- content?: string;
13
+ content?: VNodeChild;
14
14
  };
15
15
  dropdown: MixinButton<DropdownButtonProps>;
16
16
  }
@@ -1,4 +1,4 @@
1
- import { defineComponent as O, ref as B, computed as r, unref as l, openBlock as g, createElementBlock as P, createVNode as p, withCtx as A, createBlock as T, normalizeStyle as z, createCommentVNode as K, mergeProps as M } from "vue";
1
+ import { defineComponent as O, ref as g, computed as r, unref as n, openBlock as B, createElementBlock as P, createVNode as d, withCtx as A, createBlock as T, normalizeStyle as z, createCommentVNode as K, mergeProps as M } from "vue";
2
2
  import "../../ap-field/index.mjs";
3
3
  import { Space as $ } from "@aplus-frontend/antdv";
4
4
  import "../../config-provider/index.mjs";
@@ -12,7 +12,7 @@ import { useLocale as H } from "../../config-provider/hooks/use-locale.mjs";
12
12
  import Y from "../../ap-field/select/index.vue.mjs";
13
13
  import { ApFieldText as J } from "../../ap-field/text/index.mjs";
14
14
  import Q from "./popover-input/index.vue2.mjs";
15
- const d = "GROUP_SEARCH_ALL", de = /* @__PURE__ */ O({
15
+ const c = "GROUP_SEARCH_ALL", de = /* @__PURE__ */ O({
16
16
  __name: "index",
17
17
  props: {
18
18
  style: { type: [Boolean, null, String, Object, Array] },
@@ -69,31 +69,31 @@ const d = "GROUP_SEARCH_ALL", de = /* @__PURE__ */ O({
69
69
  },
70
70
  emits: ["update:value"],
71
71
  setup(b, { emit: V }) {
72
- const n = b, C = N("Text", n), S = V, { value: a, updateValue: i } = q(
73
- n,
72
+ const l = b, C = N("Text", l), S = V, { value: a, updateValue: i } = q(
73
+ l,
74
74
  S
75
- ), f = B(), c = B(), { t: I } = H(), U = r(() => n.options ? n.options.length > 1 && n.hasAll ? [
76
- { value: d, label: I("ap.apGroupSearch.all") },
77
- ...n.options
78
- ] : n.options : []), w = r(() => n.options ? n.options.map((e) => e.value) : []), k = r(() => {
75
+ ), s = g(), f = g(), { t: I } = H(), U = r(() => l.options ? l.options.length > 1 && l.hasAll ? [
76
+ { value: c, label: I("ap.apGroupSearch.all") },
77
+ ...l.options
78
+ ] : l.options : []), w = r(() => l.options ? l.options.map((e) => e.value) : []), k = r(() => {
79
79
  var e, t;
80
- return (t = (e = l(a)) == null ? void 0 : e.value) != null && t.length ? l(a).value.join(",") : "";
80
+ return (t = (e = n(a)) == null ? void 0 : e.value) != null && t.length ? n(a).value.join(",") : "";
81
81
  }), x = r(() => {
82
82
  var e, t;
83
- return (t = (e = l(a)) == null ? void 0 : e.value) != null && t.length ? l(a).value.join(`
83
+ return (t = (e = n(a)) == null ? void 0 : e.value) != null && t.length ? n(a).value.join(`
84
84
  `) : "";
85
85
  }), R = r(() => {
86
86
  var t;
87
- const e = (t = l(a)) == null ? void 0 : t.key;
87
+ const e = (t = n(a)) == null ? void 0 : t.key;
88
88
  if (e != null && e.length)
89
- return e.length === 1 ? e[0] : d;
89
+ return e.length === 1 ? e[0] : c;
90
90
  }), _ = r(() => {
91
91
  var o;
92
- const e = (o = l(a)) == null ? void 0 : o.key;
93
- return !e || (e == null ? void 0 : e.length) <= 1 ? l(C) : (n.options || []).filter((u) => e.includes(u.value)).map((u) => u.label).join("/");
92
+ const e = (o = n(a)) == null ? void 0 : o.key;
93
+ return !e || (e == null ? void 0 : e.length) <= 1 ? n(C) : (l.options || []).filter((u) => e.includes(u.value)).map((u) => u.label).join("/");
94
94
  });
95
95
  function j(e) {
96
- const t = l(a) || {}, o = e === d ? l(w) : G(e) ? [e] : [];
96
+ const t = n(a) || {}, o = e === c ? n(w) : G(e) ? [e] : [];
97
97
  i({
98
98
  ...t,
99
99
  key: o
@@ -101,19 +101,19 @@ const d = "GROUP_SEARCH_ALL", de = /* @__PURE__ */ O({
101
101
  }
102
102
  function E(e) {
103
103
  var v, y;
104
- const t = l(a) || {}, o = e.target.value || "", u = o.replace(/[,]+/g, ",");
104
+ const t = n(a) || {}, o = e.target.value || "", u = o.replace(/[,]+/g, ",");
105
105
  if (o !== u) {
106
- const h = (y = (v = c.value) == null ? void 0 : v.$el) == null ? void 0 : y.querySelector("input");
106
+ const h = (y = (v = f.value) == null ? void 0 : v.$el) == null ? void 0 : y.querySelector("input");
107
107
  h && (h.value = u);
108
108
  }
109
- let s = u.split(",");
110
- s.length === 1 && s[0] === "" && (s = []), i({
109
+ let p = u.split(",");
110
+ p.length === 1 && p[0] === "" && (p = []), i({
111
111
  ...t,
112
- value: s
112
+ value: p
113
113
  });
114
114
  }
115
115
  function F(e) {
116
- const t = l(a) || {};
116
+ const t = n(a) || {};
117
117
  let o = e.split(/,|\n/);
118
118
  i({
119
119
  ...t,
@@ -122,7 +122,7 @@ const d = "GROUP_SEARCH_ALL", de = /* @__PURE__ */ O({
122
122
  }
123
123
  function m() {
124
124
  var o;
125
- const e = l(a) || {}, t = (o = e.value) == null ? void 0 : o.filter(Boolean);
125
+ const e = n(a) || {}, t = (o = e.value) == null ? void 0 : o.filter(Boolean);
126
126
  i({
127
127
  ...e,
128
128
  value: t
@@ -130,22 +130,22 @@ const d = "GROUP_SEARCH_ALL", de = /* @__PURE__ */ O({
130
130
  }
131
131
  function L(e) {
132
132
  var t;
133
- m(), (t = n.onBlur) == null || t.call(n, e);
133
+ m(), (t = l.onBlur) == null || t.call(l, e);
134
134
  }
135
- return (e, t) => (g(), P("div", {
135
+ return (e, t) => (B(), P("div", {
136
136
  ref_key: "containerRef",
137
- ref: f,
137
+ ref: s,
138
138
  style: { position: "relative" },
139
139
  onFocus: t[0] || (t[0] = //@ts-ignore
140
140
  (...o) => e.onFocus && e.onFocus(...o)),
141
141
  onBlur: t[1] || (t[1] = //@ts-ignore
142
142
  (...o) => e.onBlur && e.onBlur(...o))
143
143
  }, [
144
- p(l($).Compact, { block: "" }, {
144
+ d(n($).Compact, { block: "" }, {
145
145
  default: A(() => {
146
146
  var o;
147
147
  return [
148
- (o = e.options) != null && o.length ? (g(), T(l(Y), {
148
+ (o = e.options) != null && o.length ? (B(), T(n(Y), {
149
149
  key: 0,
150
150
  style: z(e.style),
151
151
  options: U.value,
@@ -153,10 +153,11 @@ const d = "GROUP_SEARCH_ALL", de = /* @__PURE__ */ O({
153
153
  "allow-clear": !1,
154
154
  "dropdown-match-select-width": !1,
155
155
  disabled: e.disabled,
156
+ "get-popup-container": () => s.value,
156
157
  "onUpdate:value": j
157
- }, null, 8, ["style", "options", "value", "disabled"])) : K("", !0),
158
- p(l(J), M(
159
- l(D)(n, [
158
+ }, null, 8, ["style", "options", "value", "disabled", "get-popup-container"])) : K("", !0),
159
+ d(n(J), M(
160
+ n(D)(l, [
160
161
  "style",
161
162
  "value",
162
163
  "onUpdate:value",
@@ -166,7 +167,7 @@ const d = "GROUP_SEARCH_ALL", de = /* @__PURE__ */ O({
166
167
  ]),
167
168
  {
168
169
  ref_key: "inputRef",
169
- ref: c,
170
+ ref: f,
170
171
  style: e.inputStyle,
171
172
  value: k.value,
172
173
  placeholder: _.value,
@@ -175,8 +176,8 @@ const d = "GROUP_SEARCH_ALL", de = /* @__PURE__ */ O({
175
176
  }
176
177
  ), {
177
178
  suffix: A(() => [
178
- p(Q, {
179
- _parent: f.value,
179
+ d(Q, {
180
+ _parent: s.value,
180
181
  value: x.value,
181
182
  disabled: e.disabled,
182
183
  "onUpdate:value": F,
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),p=require("@aplus-frontend/antdv");require("../../ap-button/index.js");require("./MenuItemGroup.vue.js");require("../../config-provider/index.js");const q=require("@ant-design/icons-vue"),C=require("@aplus-frontend/hooks"),k=require("../../ap-table/context.js"),B=require("../../config-provider/hooks/use-namespace.js"),N=require("../../config-provider/hooks/use-locale.js"),x=require("../../config-provider/hooks/use-global-config.js"),m=require("./MenuItemGroup.vue2.js"),L=require("../../ap-button/ap-button.vue.js"),A=e.defineComponent({__name:"ApBatchActionGroup",props:{selectedRows:{},buttonProps:{},menuList:{}},setup(v,{expose:b}){const{b:l}=B.useNamespace("ap-batch-action-group"),{t:f}=N.useLocale(),{columns:_,dataSource:y}=k.useInjectApTable(),t=v,h=x.useGlobalConfig("uiMode"),{hasPermission:w}=C.usePermission(),c=e.computed(()=>{var o;return((o=t==null?void 0:t.buttonProps)==null?void 0:o.dropdownType)||"default"}),n=e.computed(()=>{var o;return((o=t==null?void 0:t.buttonProps)==null?void 0:o.type)||"borderLink"}),d=e.computed(()=>{var o;return((o=t==null?void 0:t.buttonProps)==null?void 0:o.content)||f("ap.apApBatchActionGroup.batchOperation")}),g=e.computed(()=>(t==null?void 0:t.selectedRows)||[]),s=e.computed(()=>{var o;return((o=t==null?void 0:t.buttonProps)==null?void 0:o.disabled)??(Array.isArray(t.selectedRows)?g.value.length===0:!1)}),P=e.computed(()=>{const o={aplus:"#0070FF",admin:"#34b77c"};return n.value==="borderLink"?s.value?void 0:o[h.value]||o.aplus:void 0}),r=e.computed(()=>{var o;return((o=t==null?void 0:t.menuList)==null?void 0:o.filter(u=>{let a=u==null?void 0:u.ifShow;return!(u!=null&&u.ifShow)&&(u!=null&&u.auth)&&(a=()=>w(u.auth)),(a==null?void 0:a())??!0}))||[]});function i(){return t!=null&&t.buttonProps?{...t.buttonProps,type:n.value==="borderLink"?"default":n.value}:{}}return b({columns:_,dataSource:y}),(o,u)=>r.value.length&&c.value==="dropdown"?(e.openBlock(),e.createBlock(e.unref(p.DropdownButton),e.mergeProps({key:0,class:[e.unref(l)()]},{...o.$attrs,...i(),disabled:s.value}),{overlay:e.withCtx(()=>[e.createVNode(m.default,e.mergeProps({...t},{"menu-list":r.value}),null,16,["menu-list"])]),default:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle({color:P.value})},e.toDisplayString(d.value),5)]),_:1},16,["class"])):r.value.length&&c.value==="default"?(e.openBlock(),e.createBlock(e.unref(p.Dropdown),{key:1,class:e.normalizeClass([e.unref(l)()]),disabled:s.value},{overlay:e.withCtx(()=>[e.createVNode(m.default,e.mergeProps({...t},{"menu-list":r.value}),null,16,["menu-list"])]),default:e.withCtx(()=>[e.createVNode(e.unref(L.default),e.normalizeProps(e.guardReactiveProps({...o.$attrs,...i(),type:n.value})),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(d.value)+" ",1),e.createVNode(e.unref(q.DownOutlined))]),_:1},16)]),_:1},8,["class","disabled"])):e.createCommentVNode("",!0)}});exports.default=A;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),p=require("@aplus-frontend/antdv");require("../../ap-button/index.js");require("./MenuItemGroup.vue.js");require("../../config-provider/index.js");const k=require("@ant-design/icons-vue"),B=require("@aplus-frontend/hooks"),q=require("../../ap-table/context.js"),C=require("../../config-provider/hooks/use-namespace.js"),L=require("../../config-provider/hooks/use-locale.js"),N=require("../../config-provider/hooks/use-global-config.js"),m=require("./MenuItemGroup.vue2.js"),x=require("../../ap-button/ap-button.vue.js"),A=e.defineComponent({__name:"ApBatchActionGroup",props:{selectedRows:{},buttonProps:{},menuList:{}},setup(v,{expose:b}){const{b:l}=C.useNamespace("ap-batch-action-group"),{t:f}=L.useLocale(),{columns:_,dataSource:h}=q.useInjectApTable(),t=v,y=N.useGlobalConfig("uiMode"),{hasPermission:w}=B.usePermission(),c=e.computed(()=>{var o;return((o=t==null?void 0:t.buttonProps)==null?void 0:o.dropdownType)||"default"}),n=e.computed(()=>{var o;return((o=t==null?void 0:t.buttonProps)==null?void 0:o.type)||"borderLink"}),d=e.computed(()=>{var o;return((o=t==null?void 0:t.buttonProps)==null?void 0:o.content)||f("ap.apApBatchActionGroup.batchOperation")}),P=e.computed(()=>(t==null?void 0:t.selectedRows)||[]),s=e.computed(()=>{var o;return((o=t==null?void 0:t.buttonProps)==null?void 0:o.disabled)??(Array.isArray(t.selectedRows)?P.value.length===0:!1)}),g=e.computed(()=>{const o={aplus:"#0070FF",admin:"#34b77c"};return n.value==="borderLink"?s.value?void 0:o[y.value]||o.aplus:void 0}),r=e.computed(()=>{var o;return((o=t==null?void 0:t.menuList)==null?void 0:o.filter(u=>{let a=u==null?void 0:u.ifShow;return!(u!=null&&u.ifShow)&&(u!=null&&u.auth)&&(a=()=>w(u.auth)),(a==null?void 0:a())??!0}))||[]});function i(){return t!=null&&t.buttonProps?{...t.buttonProps,type:n.value==="borderLink"?"default":n.value}:{}}return b({columns:_,dataSource:h}),(o,u)=>r.value.length&&c.value==="dropdown"?(e.openBlock(),e.createBlock(e.unref(p.DropdownButton),e.mergeProps({key:0,class:[e.unref(l)()]},{...o.$attrs,...i(),disabled:s.value}),{overlay:e.withCtx(()=>[e.createVNode(m.default,e.mergeProps({...t},{"menu-list":r.value}),null,16,["menu-list"])]),default:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle({color:g.value})},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.h("span",[d.value]))))],4)]),_:1},16,["class"])):r.value.length&&c.value==="default"?(e.openBlock(),e.createBlock(e.unref(p.Dropdown),{key:1,class:e.normalizeClass([e.unref(l)()]),disabled:s.value},{overlay:e.withCtx(()=>[e.createVNode(m.default,e.mergeProps({...t},{"menu-list":r.value}),null,16,["menu-list"])]),default:e.withCtx(()=>[e.createVNode(e.unref(x.default),e.normalizeProps(e.guardReactiveProps({...o.$attrs,...i(),type:n.value})),{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.h("span",[d.value])))),e.createVNode(e.unref(k.DownOutlined))]),_:1},16)]),_:1},8,["class","disabled"])):e.createCommentVNode("",!0)}});exports.default=A;
@@ -1,4 +1,4 @@
1
- import { CreateComponentPublicInstanceWithMixins, ExtractPropTypes, PropType, CSSProperties, ComputedRef, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, ComponentOptionsBase, VNodeProps, AllowedComponentProps, ComponentCustomProps, Plugin } from 'vue';
1
+ import { CreateComponentPublicInstanceWithMixins, ExtractPropTypes, PropType, VNodeChild, CSSProperties, ComputedRef, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, ComponentOptionsBase, VNodeProps, AllowedComponentProps, ComponentCustomProps, Plugin } from 'vue';
2
2
  import { ButtonType, ButtonShape, ButtonSize } from '@aplus-frontend/antdv/es/button';
3
3
  import { ButtonHTMLType } from '@aplus-frontend/antdv/es/button/buttonTypes';
4
4
  import { VueTypeValidableDef } from '../../../node_modules/vue-types';
@@ -69,7 +69,7 @@ declare const ApBatchActionGroup: {
69
69
  lazy?: boolean | number;
70
70
  onClick?: () => any | Promise<any>;
71
71
  } & {
72
- content?: string;
72
+ content?: VNodeChild;
73
73
  }) | ({
74
74
  dropdownType?: "dropdown" | undefined;
75
75
  } & Omit<Partial< ExtractPropTypes<{
@@ -299,7 +299,7 @@ declare const ApBatchActionGroup: {
299
299
  };
300
300
  }>>, "type"> & {
301
301
  type?: ButtonType | "borderLink" | undefined;
302
- content?: string;
302
+ content?: VNodeChild;
303
303
  }) | undefined;
304
304
  menuList?: ApBatchActionGroupMenuProps<any>[] | undefined;
305
305
  }> & Readonly<{}>, {
@@ -370,7 +370,7 @@ declare const ApBatchActionGroup: {
370
370
  lazy?: boolean | number;
371
371
  onClick?: () => any | Promise<any>;
372
372
  } & {
373
- content?: string;
373
+ content?: VNodeChild;
374
374
  }) | ({
375
375
  dropdownType?: "dropdown" | undefined;
376
376
  } & Omit<Partial< ExtractPropTypes<{
@@ -600,7 +600,7 @@ declare const ApBatchActionGroup: {
600
600
  };
601
601
  }>>, "type"> & {
602
602
  type?: ButtonType | "borderLink" | undefined;
603
- content?: string;
603
+ content?: VNodeChild;
604
604
  }) | undefined;
605
605
  menuList?: ApBatchActionGroupMenuProps<any>[] | undefined;
606
606
  }> & Readonly<{}>, {
@@ -668,7 +668,7 @@ declare const ApBatchActionGroup: {
668
668
  lazy?: boolean | number;
669
669
  onClick?: () => any | Promise<any>;
670
670
  } & {
671
- content?: string;
671
+ content?: VNodeChild;
672
672
  }) | ({
673
673
  dropdownType?: "dropdown" | undefined;
674
674
  } & Omit<Partial< ExtractPropTypes<{
@@ -898,7 +898,7 @@ declare const ApBatchActionGroup: {
898
898
  };
899
899
  }>>, "type"> & {
900
900
  type?: ButtonType | "borderLink" | undefined;
901
- content?: string;
901
+ content?: VNodeChild;
902
902
  }) | undefined;
903
903
  menuList?: ApBatchActionGroupMenuProps<any>[] | undefined;
904
904
  }> & Readonly<{}>, {
@@ -6,11 +6,11 @@ import { ColumnType } from '@aplus-frontend/antdv/es/table';
6
6
  type ApBatchActionGroupButtonType = ButtonProps['type'] | 'borderLink';
7
7
  type MixinButton<T> = Omit<T, 'type'> & {
8
8
  type?: ApBatchActionGroupButtonType;
9
- content?: string;
9
+ content?: VNodeChild;
10
10
  };
11
11
  interface ApBatchActionGroupTypeProps {
12
12
  default: ApButtonProps & {
13
- content?: string;
13
+ content?: VNodeChild;
14
14
  };
15
15
  dropdown: MixinButton<DropdownButtonProps>;
16
16
  }
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue");require("../../ap-field/index.js");const k=require("@aplus-frontend/antdv");require("../../config-provider/index.js");const R=require("lodash-unified");require("./popover-input/index.vue.js");require("../../hooks/index.js");const j=require("../../utils/index.js"),L=require("../../ap-field/hooks/use-default-placeholder.js"),O=require("../../hooks/useControllableValue.js"),P=require("../../config-provider/hooks/use-locale.js"),E=require("../../ap-field/select/index.vue.js"),F=require("../../ap-field/text/index.js"),T=require("./popover-input/index.vue2.js"),i="GROUP_SEARCH_ALL",M=t.defineComponent({__name:"index",props:{style:{type:[Boolean,null,String,Object,Array]},inputStyle:{type:[Boolean,null,String,Object,Array]},options:{},hasAll:{type:Boolean,default:!0},value:{},"onUpdate:value":{},mode:{default:"edit"},class:{},id:{},placeholder:{},autocomplete:{},type:{default:"text"},name:{},size:{},autofocus:{type:Boolean},lazy:{type:Boolean,default:!0},maxlength:{},loading:{type:Boolean},bordered:{type:Boolean,default:!0},showCount:{type:[Boolean,Object]},htmlSize:{},onPressEnter:{},onKeydown:{},onKeyup:{},onMousedown:{},onMouseUp:{},onFocus:{},onBlur:{},onChange:{},onInput:{},onRawInput:{},onCompositionstart:{},onCompositionend:{},valueModifiers:{},hidden:{type:Boolean},status:{},defaultValue:{},inputElement:{},prefixCls:{},disabled:{type:Boolean},focused:{type:Boolean},triggerFocus:{},readonly:{type:Boolean},handleReset:{},addonBefore:{},addonAfter:{},prefix:{},suffix:{},clearIcon:{},allowClear:{type:Boolean,default:!0},emptyText:{default:"--"}},emits:["update:value"],setup(m,{emit:h}){const l=m,g=L.useDefaultPlaceholder("Text",l),B=h,{value:u,updateValue:r}=O.useControllableValue(l,B),p=t.ref(),d=t.ref(),{t:_}=P.useLocale(),b=t.computed(()=>l.options?l.options.length>1&&l.hasAll?[{value:i,label:_("ap.apGroupSearch.all")},...l.options]:l.options:[]),V=t.computed(()=>l.options?l.options.map(e=>e.value):[]),A=t.computed(()=>{var e,n;return(n=(e=t.unref(u))==null?void 0:e.value)!=null&&n.length?t.unref(u).value.join(","):""}),C=t.computed(()=>{var e,n;return(n=(e=t.unref(u))==null?void 0:e.value)!=null&&n.length?t.unref(u).value.join(`
2
- `):""}),q=t.computed(()=>{var n;const e=(n=t.unref(u))==null?void 0:n.key;if(e!=null&&e.length)return e.length===1?e[0]:i}),S=t.computed(()=>{var o;const e=(o=t.unref(u))==null?void 0:o.key;return!e||(e==null?void 0:e.length)<=1?t.unref(g):(l.options||[]).filter(a=>e.includes(a.value)).map(a=>a.label).join("/")});function x(e){const n=t.unref(u)||{},o=e===i?t.unref(V):j.isDef(e)?[e]:[];r({...n,key:o})}function U(e){var f,v;const n=t.unref(u)||{},o=e.target.value||"",a=o.replace(/[,]+/g,",");if(o!==a){const y=(v=(f=d.value)==null?void 0:f.$el)==null?void 0:v.querySelector("input");y&&(y.value=a)}let s=a.split(",");s.length===1&&s[0]===""&&(s=[]),r({...n,value:s})}function w(e){const n=t.unref(u)||{};let o=e.split(/,|\n/);r({...n,value:o})}function c(){var o;const e=t.unref(u)||{},n=(o=e.value)==null?void 0:o.filter(Boolean);r({...e,value:n})}function I(e){var n;c(),(n=l.onBlur)==null||n.call(l,e)}return(e,n)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"containerRef",ref:p,style:{position:"relative"},onFocus:n[0]||(n[0]=(...o)=>e.onFocus&&e.onFocus(...o)),onBlur:n[1]||(n[1]=(...o)=>e.onBlur&&e.onBlur(...o))},[t.createVNode(t.unref(k.Space).Compact,{block:""},{default:t.withCtx(()=>{var o;return[(o=e.options)!=null&&o.length?(t.openBlock(),t.createBlock(t.unref(E.default),{key:0,style:t.normalizeStyle(e.style),options:b.value,value:q.value,"allow-clear":!1,"dropdown-match-select-width":!1,disabled:e.disabled,"onUpdate:value":x},null,8,["style","options","value","disabled"])):t.createCommentVNode("",!0),t.createVNode(t.unref(F.ApFieldText),t.mergeProps(t.unref(R.omit)(l,["style","value","onUpdate:value","inputStyle","hasAll","options"]),{ref_key:"inputRef",ref:d,style:e.inputStyle,value:A.value,placeholder:S.value,onInput:U,onBlur:I}),{suffix:t.withCtx(()=>[t.createVNode(T.default,{_parent:p.value,value:C.value,disabled:e.disabled,"onUpdate:value":w,onClose:c},null,8,["_parent","value","disabled"])]),_:1},16,["style","value","placeholder"])]}),_:1})],544))}});exports.default=M;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue");require("../../ap-field/index.js");const k=require("@aplus-frontend/antdv");require("../../config-provider/index.js");const R=require("lodash-unified");require("./popover-input/index.vue.js");require("../../hooks/index.js");const j=require("../../utils/index.js"),L=require("../../ap-field/hooks/use-default-placeholder.js"),O=require("../../hooks/useControllableValue.js"),P=require("../../config-provider/hooks/use-locale.js"),E=require("../../ap-field/select/index.vue.js"),F=require("../../ap-field/text/index.js"),T=require("./popover-input/index.vue2.js"),p="GROUP_SEARCH_ALL",M=t.defineComponent({__name:"index",props:{style:{type:[Boolean,null,String,Object,Array]},inputStyle:{type:[Boolean,null,String,Object,Array]},options:{},hasAll:{type:Boolean,default:!0},value:{},"onUpdate:value":{},mode:{default:"edit"},class:{},id:{},placeholder:{},autocomplete:{},type:{default:"text"},name:{},size:{},autofocus:{type:Boolean},lazy:{type:Boolean,default:!0},maxlength:{},loading:{type:Boolean},bordered:{type:Boolean,default:!0},showCount:{type:[Boolean,Object]},htmlSize:{},onPressEnter:{},onKeydown:{},onKeyup:{},onMousedown:{},onMouseUp:{},onFocus:{},onBlur:{},onChange:{},onInput:{},onRawInput:{},onCompositionstart:{},onCompositionend:{},valueModifiers:{},hidden:{type:Boolean},status:{},defaultValue:{},inputElement:{},prefixCls:{},disabled:{type:Boolean},focused:{type:Boolean},triggerFocus:{},readonly:{type:Boolean},handleReset:{},addonBefore:{},addonAfter:{},prefix:{},suffix:{},clearIcon:{},allowClear:{type:Boolean,default:!0},emptyText:{default:"--"}},emits:["update:value"],setup(m,{emit:h}){const l=m,g=L.useDefaultPlaceholder("Text",l),B=h,{value:u,updateValue:r}=O.useControllableValue(l,B),i=t.ref(),d=t.ref(),{t:_}=P.useLocale(),b=t.computed(()=>l.options?l.options.length>1&&l.hasAll?[{value:p,label:_("ap.apGroupSearch.all")},...l.options]:l.options:[]),V=t.computed(()=>l.options?l.options.map(e=>e.value):[]),A=t.computed(()=>{var e,n;return(n=(e=t.unref(u))==null?void 0:e.value)!=null&&n.length?t.unref(u).value.join(","):""}),C=t.computed(()=>{var e,n;return(n=(e=t.unref(u))==null?void 0:e.value)!=null&&n.length?t.unref(u).value.join(`
2
+ `):""}),q=t.computed(()=>{var n;const e=(n=t.unref(u))==null?void 0:n.key;if(e!=null&&e.length)return e.length===1?e[0]:p}),S=t.computed(()=>{var o;const e=(o=t.unref(u))==null?void 0:o.key;return!e||(e==null?void 0:e.length)<=1?t.unref(g):(l.options||[]).filter(a=>e.includes(a.value)).map(a=>a.label).join("/")});function x(e){const n=t.unref(u)||{},o=e===p?t.unref(V):j.isDef(e)?[e]:[];r({...n,key:o})}function U(e){var f,v;const n=t.unref(u)||{},o=e.target.value||"",a=o.replace(/[,]+/g,",");if(o!==a){const y=(v=(f=d.value)==null?void 0:f.$el)==null?void 0:v.querySelector("input");y&&(y.value=a)}let s=a.split(",");s.length===1&&s[0]===""&&(s=[]),r({...n,value:s})}function w(e){const n=t.unref(u)||{};let o=e.split(/,|\n/);r({...n,value:o})}function c(){var o;const e=t.unref(u)||{},n=(o=e.value)==null?void 0:o.filter(Boolean);r({...e,value:n})}function I(e){var n;c(),(n=l.onBlur)==null||n.call(l,e)}return(e,n)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"containerRef",ref:i,style:{position:"relative"},onFocus:n[0]||(n[0]=(...o)=>e.onFocus&&e.onFocus(...o)),onBlur:n[1]||(n[1]=(...o)=>e.onBlur&&e.onBlur(...o))},[t.createVNode(t.unref(k.Space).Compact,{block:""},{default:t.withCtx(()=>{var o;return[(o=e.options)!=null&&o.length?(t.openBlock(),t.createBlock(t.unref(E.default),{key:0,style:t.normalizeStyle(e.style),options:b.value,value:q.value,"allow-clear":!1,"dropdown-match-select-width":!1,disabled:e.disabled,"get-popup-container":()=>i.value,"onUpdate:value":x},null,8,["style","options","value","disabled","get-popup-container"])):t.createCommentVNode("",!0),t.createVNode(t.unref(F.ApFieldText),t.mergeProps(t.unref(R.omit)(l,["style","value","onUpdate:value","inputStyle","hasAll","options"]),{ref_key:"inputRef",ref:d,style:e.inputStyle,value:A.value,placeholder:S.value,onInput:U,onBlur:I}),{suffix:t.withCtx(()=>[t.createVNode(T.default,{_parent:i.value,value:C.value,disabled:e.disabled,"onUpdate:value":w,onClose:c},null,8,["_parent","value","disabled"])]),_:1},16,["style","value","placeholder"])]}),_:1})],544))}});exports.default=M;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aplus-frontend/ui",
3
- "version": "0.4.29",
3
+ "version": "0.4.31",
4
4
  "main": "./lib/index.js",
5
5
  "type": "module",
6
6
  "files": [
@@ -450,11 +450,11 @@
450
450
  top: 0;
451
451
  inset-inline-start: 0;
452
452
  cursor: pointer;
453
- background-color: var(--aplus-scroll-bar-track-color, rgba(0, 0, 0, 0.05));
453
+ background-color: var(--aplus-scroll-bar-track-color, #F2F2F2);
454
454
  }
455
455
  .aplus-scroll-bar__track--disabled {
456
456
  pointer-events: none;
457
- background-color: rgba(0, 0, 0, 0.02);
457
+ background-color: #FAFAFA;
458
458
  }
459
459
  .aplus-scroll-bar__track--hidden {
460
460
  pointer-events: none;
@@ -450,11 +450,11 @@
450
450
  top: 0;
451
451
  inset-inline-start: 0;
452
452
  cursor: pointer;
453
- background-color: var(--aplus-scroll-bar-track-color, rgba(0, 0, 0, 0.05));
453
+ background-color: var(--aplus-scroll-bar-track-color, #F2F2F2);
454
454
  }
455
455
  .aplus-scroll-bar__track--disabled {
456
456
  pointer-events: none;
457
- background-color: rgba(0, 0, 0, 0.02);
457
+ background-color: #FAFAFA;
458
458
  }
459
459
  .aplus-scroll-bar__track--hidden {
460
460
  pointer-events: none;
package/theme/index.css CHANGED
@@ -1780,11 +1780,11 @@ div.aplus-ap-info-layout-admin__header-shadow.aplus-ap-info-layout-admin__sticky
1780
1780
  top: 0;
1781
1781
  inset-inline-start: 0;
1782
1782
  cursor: pointer;
1783
- background-color: var(--aplus-scroll-bar-track-color, rgba(0, 0, 0, 0.05));
1783
+ background-color: var(--aplus-scroll-bar-track-color, #F2F2F2);
1784
1784
  }
1785
1785
  .aplus-scroll-bar__track--disabled {
1786
1786
  pointer-events: none;
1787
- background-color: rgba(0, 0, 0, 0.02);
1787
+ background-color: #FAFAFA;
1788
1788
  }
1789
1789
  .aplus-scroll-bar__track--hidden {
1790
1790
  pointer-events: none;
@@ -16,11 +16,11 @@
16
16
  top: 0;
17
17
  inset-inline-start: 0;
18
18
  cursor: pointer;
19
- background-color: var(--aplus-scroll-bar-track-color, rgba(0, 0, 0, 0.05));
19
+ background-color: var(--aplus-scroll-bar-track-color, #F2F2F2);
20
20
  }
21
21
  .aplus-scroll-bar__track--disabled {
22
22
  pointer-events: none;
23
- background-color: rgba(0, 0, 0, 0.02);
23
+ background-color: #FAFAFA;
24
24
  }
25
25
  .aplus-scroll-bar__track--hidden {
26
26
  pointer-events: none;
@@ -27,10 +27,10 @@
27
27
  top: 0;
28
28
  inset-inline-start: 0;
29
29
  cursor: pointer;
30
- background-color: var(@tc, rgb(0 0 0 / 5%));
30
+ background-color: var(@tc, #F2F2F2);
31
31
  &--disabled {
32
32
  pointer-events: none;
33
- background-color: rgb(0 0 0 / 2%);
33
+ background-color: #FAFAFA;
34
34
  }
35
35
  &--hidden {
36
36
  pointer-events: none;