@aplus-frontend/ui 7.0.0 → 7.1.0

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 (156) hide show
  1. package/es/index.mjs +108 -106
  2. package/es/src/ag-grid/style/custom-header.mjs +1 -1
  3. package/es/src/ag-grid/style/index.mjs +0 -1
  4. package/es/src/ap-action/item-dropdown/index.vue.mjs +12 -12
  5. package/es/src/ap-descriptions/ap-descriptions.vue.mjs +39 -39
  6. package/es/src/ap-descriptions/style/index.mjs +16 -43
  7. package/es/src/ap-download/ap-download.vue.mjs +43 -43
  8. package/es/src/ap-download/hooks/useStyle.d.ts +1 -1
  9. package/es/src/ap-download/hooks/useStyle.mjs +17 -14
  10. package/es/src/ap-download/style/index.mjs +6 -13
  11. package/es/src/ap-form/modal-form/index.vue.mjs +59 -60
  12. package/es/src/ap-form/style/item.mjs +5 -4
  13. package/es/src/ap-form/style/modal-form.mjs +11 -12
  14. package/es/src/ap-form/style/search-form-sorter.mjs +31 -27
  15. package/es/src/ap-form/style/token.d.ts +8 -0
  16. package/es/src/ap-grid/style/index.mjs +3 -3
  17. package/es/src/ap-pro-card/style/statistic.mjs +3 -3
  18. package/es/src/ap-pro-card/style/token.mjs +1 -1
  19. package/es/src/ap-table/style/index.mjs +2 -2
  20. package/es/src/ap-table/style/setting.mjs +2 -2
  21. package/es/src/ap-tag/ap-tag-group.vue.mjs +61 -61
  22. package/es/src/ap-tag/ap-tag.vue.mjs +19 -20
  23. package/es/src/ap-tag/style/group.mjs +2 -8
  24. package/es/src/ap-tag/style/index.mjs +14 -23
  25. package/es/src/ap-upload/apUpload.vue.mjs +42 -41
  26. package/es/src/ap-upload/components/MultipleFile.vue2.mjs +60 -61
  27. package/es/src/ap-upload/components/Picture.vue2.mjs +90 -91
  28. package/es/src/ap-upload/components/SingleFile.vue2.mjs +72 -72
  29. package/es/src/ap-upload/style/multiple-file.mjs +13 -40
  30. package/es/src/ap-upload/style/picture.mjs +12 -30
  31. package/es/src/ap-upload/style/single-file.mjs +5 -16
  32. package/es/src/business/ag-grid-modal/interface.d.ts +1 -1
  33. package/es/src/business/ag-grid-modal/wrapper/index.vue.d.ts +6 -2
  34. package/es/src/business/ag-grid-modal/wrapper/index.vue2.mjs +29 -12
  35. package/es/src/business/ap-appendix/style/index.mjs +1 -1
  36. package/es/src/business/ap-attachment/ApAttachment.mjs +42 -39
  37. package/es/src/business/ap-copy/style/index.mjs +1 -1
  38. package/es/src/business/ap-expand-alert/ApExpandAlert.vue2.mjs +45 -46
  39. package/es/src/business/ap-ladder/ApLadder.mjs +20 -22
  40. package/es/src/business/ap-ladder/style/index.mjs +11 -39
  41. package/es/src/business/ap-product-info/ApProductInfo.mjs +21 -22
  42. package/es/src/business/ap-product-info/style/index.mjs +8 -24
  43. package/es/src/business/ap-radio-group/style/index.mjs +1 -1
  44. package/es/src/business/ap-size-input/ApSizeInput.d.ts +20 -4
  45. package/es/src/business/ap-size-input/ApSizeInput.mjs +37 -40
  46. package/es/src/business/ap-size-input/constans.d.ts +10 -2
  47. package/es/src/business/ap-size-input/constans.mjs +9 -1
  48. package/es/src/business/ap-size-input/form-item.vue.d.ts +13 -0
  49. package/es/src/business/ap-size-input/form-item.vue.mjs +65 -0
  50. package/es/src/business/ap-size-input/form-item.vue2.mjs +4 -0
  51. package/es/src/business/ap-size-input/index.d.ts +33 -8
  52. package/es/src/business/ap-size-input/index.mjs +3 -2
  53. package/es/src/business/ap-size-input/interface.d.ts +7 -0
  54. package/es/src/business/ap-size-input/style/index.mjs +2 -1
  55. package/es/src/business/ap-table-modal/hooks/use-table-modal.mjs +18 -19
  56. package/es/src/business/ap-table-modal/modal-title.vue2.mjs +13 -13
  57. package/es/src/business/ap-title/style/index.mjs +1 -1
  58. package/es/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.mjs +38 -37
  59. package/es/src/business/ap-value-select-card/index.vue2.mjs +36 -37
  60. package/es/src/business/ap-value-select-card/style/index.mjs +7 -29
  61. package/es/src/business/ap-view/components/menu-list-content.vue2.mjs +61 -64
  62. package/es/src/business/ap-view/style/index.mjs +1 -1
  63. package/es/src/business/batch-input-group/style/index.mjs +1 -1
  64. package/es/src/check-card/style/index.mjs +46 -51
  65. package/es/src/config-provider/hooks/use-token.d.ts +2 -2
  66. package/es/src/design-token/constants.mjs +4 -2
  67. package/es/src/design-token/interface.d.ts +39 -19
  68. package/es/src/index.mjs +95 -93
  69. package/es/src/scroll-bar/style/index.mjs +12 -12
  70. package/es/src/splitter/style/index.mjs +6 -6
  71. package/es/src/style/index.mjs +1 -1
  72. package/es/src/text/style/index.mjs +1 -1
  73. package/es/src/utils/cssinjs/TokenUtil.d.ts +11 -0
  74. package/es/src/utils/cssinjs/TokenUtil.mjs +26 -0
  75. package/es/src/utils/cssinjs/index.d.ts +1 -1
  76. package/es/src/utils/cssinjs/index.mjs +51 -50
  77. package/es/src/version.d.ts +1 -1
  78. package/es/src/version.mjs +1 -1
  79. package/lib/index.js +1 -1
  80. package/lib/src/ag-grid/style/custom-header.js +1 -1
  81. package/lib/src/ap-action/item-dropdown/index.vue.js +1 -1
  82. package/lib/src/ap-descriptions/ap-descriptions.vue.js +1 -1
  83. package/lib/src/ap-descriptions/style/index.js +1 -1
  84. package/lib/src/ap-download/ap-download.vue.js +1 -1
  85. package/lib/src/ap-download/hooks/useStyle.d.ts +1 -1
  86. package/lib/src/ap-download/hooks/useStyle.js +1 -1
  87. package/lib/src/ap-download/style/index.js +1 -1
  88. package/lib/src/ap-form/modal-form/index.vue.js +1 -1
  89. package/lib/src/ap-form/style/item.js +1 -1
  90. package/lib/src/ap-form/style/modal-form.js +1 -1
  91. package/lib/src/ap-form/style/search-form-sorter.js +1 -1
  92. package/lib/src/ap-form/style/token.d.ts +8 -0
  93. package/lib/src/ap-grid/style/index.js +1 -1
  94. package/lib/src/ap-pro-card/style/statistic.js +1 -1
  95. package/lib/src/ap-pro-card/style/token.js +1 -1
  96. package/lib/src/ap-table/style/index.js +1 -1
  97. package/lib/src/ap-table/style/setting.js +1 -1
  98. package/lib/src/ap-tag/ap-tag-group.vue.js +1 -1
  99. package/lib/src/ap-tag/ap-tag.vue.js +1 -1
  100. package/lib/src/ap-tag/style/group.js +1 -1
  101. package/lib/src/ap-tag/style/index.js +1 -1
  102. package/lib/src/ap-upload/apUpload.vue.js +1 -1
  103. package/lib/src/ap-upload/components/MultipleFile.vue2.js +1 -1
  104. package/lib/src/ap-upload/components/Picture.vue2.js +1 -1
  105. package/lib/src/ap-upload/components/SingleFile.vue2.js +1 -1
  106. package/lib/src/ap-upload/style/multiple-file.js +1 -1
  107. package/lib/src/ap-upload/style/picture.js +1 -1
  108. package/lib/src/ap-upload/style/single-file.js +1 -1
  109. package/lib/src/business/ag-grid-modal/interface.d.ts +1 -1
  110. package/lib/src/business/ag-grid-modal/wrapper/index.vue.d.ts +6 -2
  111. package/lib/src/business/ag-grid-modal/wrapper/index.vue2.js +1 -1
  112. package/lib/src/business/ap-appendix/style/index.js +1 -1
  113. package/lib/src/business/ap-attachment/ApAttachment.js +1 -1
  114. package/lib/src/business/ap-copy/style/index.js +1 -1
  115. package/lib/src/business/ap-expand-alert/ApExpandAlert.vue2.js +1 -1
  116. package/lib/src/business/ap-ladder/ApLadder.js +1 -1
  117. package/lib/src/business/ap-ladder/style/index.js +1 -1
  118. package/lib/src/business/ap-product-info/ApProductInfo.js +1 -1
  119. package/lib/src/business/ap-product-info/style/index.js +1 -1
  120. package/lib/src/business/ap-radio-group/style/index.js +1 -1
  121. package/lib/src/business/ap-size-input/ApSizeInput.d.ts +20 -4
  122. package/lib/src/business/ap-size-input/ApSizeInput.js +1 -1
  123. package/lib/src/business/ap-size-input/constans.d.ts +10 -2
  124. package/lib/src/business/ap-size-input/constans.js +1 -1
  125. package/lib/src/business/ap-size-input/form-item.vue.d.ts +13 -0
  126. package/lib/src/business/ap-size-input/form-item.vue.js +1 -0
  127. package/lib/src/business/ap-size-input/form-item.vue2.js +1 -0
  128. package/lib/src/business/ap-size-input/index.d.ts +33 -8
  129. package/lib/src/business/ap-size-input/index.js +1 -1
  130. package/lib/src/business/ap-size-input/interface.d.ts +7 -0
  131. package/lib/src/business/ap-size-input/style/index.js +1 -1
  132. package/lib/src/business/ap-table-modal/hooks/use-table-modal.js +1 -1
  133. package/lib/src/business/ap-table-modal/modal-title.vue2.js +1 -1
  134. package/lib/src/business/ap-title/style/index.js +1 -1
  135. package/lib/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.js +1 -1
  136. package/lib/src/business/ap-value-select-card/index.vue2.js +1 -1
  137. package/lib/src/business/ap-value-select-card/style/index.js +1 -1
  138. package/lib/src/business/ap-view/components/menu-list-content.vue2.js +1 -1
  139. package/lib/src/business/ap-view/style/index.js +1 -1
  140. package/lib/src/business/batch-input-group/style/index.js +1 -1
  141. package/lib/src/check-card/style/index.js +1 -1
  142. package/lib/src/config-provider/hooks/use-token.d.ts +2 -2
  143. package/lib/src/design-token/constants.js +1 -1
  144. package/lib/src/design-token/interface.d.ts +39 -19
  145. package/lib/src/index.js +1 -1
  146. package/lib/src/scroll-bar/style/index.js +1 -1
  147. package/lib/src/splitter/style/index.js +1 -1
  148. package/lib/src/style/index.js +1 -1
  149. package/lib/src/text/style/index.js +1 -1
  150. package/lib/src/utils/cssinjs/TokenUtil.d.ts +11 -0
  151. package/lib/src/utils/cssinjs/TokenUtil.js +1 -0
  152. package/lib/src/utils/cssinjs/index.d.ts +1 -1
  153. package/lib/src/utils/cssinjs/index.js +1 -1
  154. package/lib/src/version.d.ts +1 -1
  155. package/lib/src/version.js +1 -1
  156. package/package.json +1 -1
@@ -44,58 +44,31 @@ const e = (t) => {
44
44
  },
45
45
  ".ant-descriptions-row": {
46
46
  ".ant-descriptions-item-label": {
47
+ justifyContent: "flex-end",
48
+ width: "var(--ap-descriptions-item-label-width, auto)",
49
+ color: t.textColor3,
50
+ ".ap-descriptions-item-content__help": {
51
+ fontSize: t.fontSizeLG,
52
+ marginInlineStart: "4px",
53
+ color: t.textColor3
54
+ },
47
55
  ".ant-typography": {
48
56
  color: "inherit"
49
57
  }
50
- }
51
- },
52
- "&--admin": {
53
- ".ant-descriptions-row": {
54
- ".ant-descriptions-item-label": {
55
- justifyContent: "flex-end",
56
- width: "var(--ap-descriptions-item-label-width, auto)",
57
- color: "#999",
58
- ".ap-descriptions-item-content__help": {
59
- fontSize: t.fontSizeLG,
60
- marginInlineStart: "4px",
61
- color: "#999"
62
- }
63
- },
64
- ".ant-descriptions-item-content": {
65
- color: "#333",
66
- ".ap-descriptions-item-content__link": {
67
- color: "#1890ff",
68
- cursor: "pointer"
69
- }
70
- }
71
- }
72
- },
73
- "&--aplus": {
74
- ".ant-descriptions-row": {
75
- ".ant-descriptions-item-label": {
76
- justifyContent: "flex-end",
77
- width: "var(--ap-descriptions-item-label-width, auto)",
78
- color: "#8896B0",
79
- ".ap-descriptions-item-content__help": {
80
- fontSize: t.fontSizeLG,
81
- marginInlineStart: "4px",
82
- color: "#8896B0"
83
- }
84
- },
85
- ".ant-descriptions-item-content": {
86
- color: "#182948",
87
- ".ap-descriptions-item-content__link": {
88
- color: "#0070FF",
89
- cursor: "pointer"
90
- }
58
+ },
59
+ ".ant-descriptions-item-content": {
60
+ color: t.textColor1,
61
+ ".ap-descriptions-item-content__link": {
62
+ color: t.colorLink,
63
+ cursor: "pointer"
91
64
  }
92
65
  }
93
66
  }
94
67
  }
95
68
  };
96
- }, s = n("ApDescriptions", (t) => [
69
+ }, r = n("ApDescriptions", (t) => [
97
70
  e(t)
98
71
  ]);
99
72
  export {
100
- s as default
73
+ r as default
101
74
  };
@@ -1,20 +1,20 @@
1
- import { defineComponent as F, ref as A, useSlots as L, computed as s, unref as t, createBlock as S, openBlock as i, mergeProps as x, withCtx as j, createElementVNode as u, normalizeClass as I, createElementBlock as f, createCommentVNode as g, createVNode as M, renderSlot as T, toDisplayString as U } from "vue";
2
- import { Button as V } from "@aplus-frontend/antdv";
3
- import { LoadingOutlined as D } from "@ant-design/icons-vue";
1
+ import { defineComponent as O, ref as z, useSlots as A, computed as s, unref as t, createBlock as L, openBlock as i, mergeProps as S, withCtx as x, createElementVNode as m, normalizeClass as j, createElementBlock as f, createCommentVNode as u, createVNode as I, renderSlot as F, toDisplayString as T } from "vue";
2
+ import { Button as U } from "@aplus-frontend/antdv";
3
+ import { LoadingOutlined as V } from "@ant-design/icons-vue";
4
4
  import "../config-provider/index.mjs";
5
- import { useOssInit as E } from "./hooks/index.mjs";
6
- import { getFileInfo as y } from "./utils/getFileInfo.mjs";
7
- import { useStyle as P } from "./hooks/useStyle.mjs";
8
- import { omit as G } from "lodash-unified";
9
- import { useLocale as R } from "../config-provider/hooks/use-locale.mjs";
10
- import { useGlobalConfig as r } from "../config-provider/hooks/use-global-config.mjs";
11
- const W = {
5
+ import { useOssInit as D } from "./hooks/index.mjs";
6
+ import { getFileInfo as g } from "./utils/getFileInfo.mjs";
7
+ import { useStyle as E } from "./hooks/useStyle.mjs";
8
+ import { omit as P } from "lodash-unified";
9
+ import { useLocale as G } from "../config-provider/hooks/use-locale.mjs";
10
+ import { useGlobalConfig as y } from "../config-provider/hooks/use-global-config.mjs";
11
+ const M = {
12
12
  key: 0,
13
13
  class: "spin"
14
- }, $ = {
14
+ }, R = {
15
15
  key: 1,
16
16
  class: "icon"
17
- }, q = { class: "text" }, ae = /* @__PURE__ */ F({
17
+ }, W = { class: "text" }, oe = /* @__PURE__ */ O({
18
18
  name: "ApDownload",
19
19
  __name: "ap-download",
20
20
  props: {
@@ -45,57 +45,57 @@ const W = {
45
45
  },
46
46
  emits: ["downloadCallback"],
47
47
  setup(C, { emit: N }) {
48
- const c = N, l = A(!1), { lang: b } = R(), v = L(), w = s(() => b.value === "zh-cn" ? "zh_CN" : "en_US"), h = r("uiMode"), e = C, n = r("apUpload"), d = r(
48
+ const r = N, n = z(!1), { lang: b } = G(), w = A(), h = s(() => b.value === "zh-cn" ? "zh_CN" : "en_US"), e = C, l = y("apUpload"), c = y(
49
49
  "downloadCenterTriggerConfig"
50
- ), p = s(() => e.disabled), _ = s(() => e.color ? e.color : h.value === "aplus" ? "#0070FF" : "#1890FF"), k = s(() => e.size), { getInnerWrapperClass: B } = P(_, k, p), O = s(() => e.getOssAccess || n.value?.getOssAccess), z = async () => {
50
+ ), d = s(() => e.disabled), v = s(() => e.size), { getInnerWrapperClass: _ } = E(v, d), k = s(() => e.getOssAccess || l.value?.getOssAccess), B = async () => {
51
51
  if (!e.disabled) {
52
- l.value = !0;
52
+ n.value = !0;
53
53
  try {
54
- if (d.value?.trigger) {
55
- let a = y(
56
- e.needName ?? n?.value?.needName,
54
+ if (c.value?.trigger) {
55
+ let a = g(
56
+ e.needName ?? l?.value?.needName,
57
57
  e.fileName
58
- ).map((m) => ({
59
- objectName: m.path,
60
- fileName: m.fileName
58
+ ).map((p) => ({
59
+ objectName: p.path,
60
+ fileName: p.fileName
61
61
  }));
62
- await d.value?.trigger(a), c("downloadCallback", a);
62
+ await c.value?.trigger(a), r("downloadCallback", a);
63
63
  } else {
64
- const a = await (await E(
65
- O.value,
66
- t(w)
64
+ const a = await (await D(
65
+ k.value,
66
+ t(h)
67
67
  )).downloadFile(
68
- y(
69
- e.needName ?? n?.value?.needName,
68
+ g(
69
+ e.needName ?? l?.value?.needName,
70
70
  e.fileName
71
71
  )
72
72
  );
73
- c("downloadCallback", a);
73
+ r("downloadCallback", a);
74
74
  }
75
75
  } catch (o) {
76
76
  console.error(o);
77
77
  } finally {
78
- l.value = !1;
78
+ n.value = !1;
79
79
  }
80
80
  }
81
81
  };
82
- return (o, a) => (i(), S(t(V), x(t(G)(e, ["getOssAccess", "fileName", "needName"]), {
82
+ return (o, a) => (i(), L(t(U), S(t(P)(e, ["getOssAccess", "fileName", "needName"]), {
83
83
  type: e.type,
84
84
  size: e.size,
85
- disabled: p.value,
86
- onClick: z
85
+ disabled: d.value,
86
+ onClick: B
87
87
  }), {
88
- default: j(() => [
89
- u("div", {
90
- class: I(t(B))
88
+ default: x(() => [
89
+ m("div", {
90
+ class: j(t(_))
91
91
  }, [
92
- l.value ? (i(), f("span", W, [
93
- M(t(D), { spin: !0 })
94
- ])) : g("", !0),
95
- t(v).icon ? (i(), f("span", $, [
96
- T(o.$slots, "icon")
97
- ])) : g("", !0),
98
- u("span", q, U(o.text), 1)
92
+ n.value ? (i(), f("span", M, [
93
+ I(t(V), { spin: !0 })
94
+ ])) : u("", !0),
95
+ t(w).icon ? (i(), f("span", R, [
96
+ F(o.$slots, "icon")
97
+ ])) : u("", !0),
98
+ m("span", W, T(o.text), 1)
99
99
  ], 2)
100
100
  ]),
101
101
  _: 3
@@ -103,5 +103,5 @@ const W = {
103
103
  }
104
104
  });
105
105
  export {
106
- ae as default
106
+ oe as default
107
107
  };
@@ -1,5 +1,5 @@
1
1
  import { ComputedRef } from 'vue';
2
- export declare function useStyle(color: ComputedRef<string>, size: ComputedRef<string>, disabled: ComputedRef<boolean>): {
2
+ export declare function useStyle(size: ComputedRef<string>, disabled: ComputedRef<boolean>): {
3
3
  wrapperStyle: ComputedRef<Record<string, any>>;
4
4
  getWrapperClass: ComputedRef<string[]>;
5
5
  getInnerWrapperClass: ComputedRef<string[]>;
@@ -1,25 +1,28 @@
1
1
  import { computed as o } from "vue";
2
- import { getHexWithOpacity as m } from "../utils/getFileInfo.mjs";
2
+ import { getHexWithOpacity as c } from "../utils/getFileInfo.mjs";
3
3
  import "../../config-provider/index.mjs";
4
- import c from "../style/index.mjs";
4
+ import m from "../style/index.mjs";
5
+ import { useToken as d } from "../../config-provider/hooks/use-token.mjs";
5
6
  import { useNamespace as w } from "../../config-provider/hooks/use-namespace.mjs";
6
- import { useGlobalConfig as f } from "../../config-provider/hooks/use-global-config.mjs";
7
- function S(p, n, l) {
8
- const { b: r, bm: e } = w("ap-download"), t = c("ap-download"), i = f("uiMode"), s = o(() => ({
9
- "--download-main-color": p.value,
10
- "--download-main-color-opacity": m(p.value, 0.6)
11
- })), u = o(() => [r("wrapper"), e("wrapper", n.value), t.value].filter(
7
+ function g(a, l) {
8
+ const { b: r, bm: e } = w("ap-download"), n = m("ap-download"), { token: p } = d(), s = o(() => ({
9
+ "--download-main-color": p.value?.colorLink,
10
+ "--download-main-color-opacity": c(
11
+ p.value?.colorLink,
12
+ 0.6
13
+ )
14
+ })), i = o(() => [r("wrapper"), e("wrapper", a.value), n.value].filter(
12
15
  Boolean
13
- )), d = o(() => {
14
- const a = [r(), r("inner-wrapper"), e("inner-wrapper", n.value)];
15
- return l.value && (i.value === "aplus" ? a.push(e("inner-wrapper", "disabled")) : a.push(e("inner-wrapper", "disabled-admin"))), [...a, t.value];
16
+ )), u = o(() => {
17
+ const t = [r(), r("inner-wrapper"), e("inner-wrapper", a.value)];
18
+ return l.value && t.push(e("inner-wrapper", "disabled")), [...t, n.value];
16
19
  });
17
20
  return {
18
21
  wrapperStyle: s,
19
- getWrapperClass: u,
20
- getInnerWrapperClass: d
22
+ getWrapperClass: i,
23
+ getInnerWrapperClass: u
21
24
  };
22
25
  }
23
26
  export {
24
- S as useStyle
27
+ g as useStyle
25
28
  };
@@ -1,6 +1,6 @@
1
1
  import { genComponentStyleHook as l } from "../../utils/cssinjs/index.mjs";
2
- const i = (o) => {
3
- const { componentCls: e } = o, n = `${e}-inner-wrapper`;
2
+ const r = (o) => {
3
+ const { componentCls: e, textColor3: n } = o, i = `${e}-inner-wrapper`;
4
4
  return {
5
5
  [e]: {
6
6
  "&-wrapper": {
@@ -8,7 +8,7 @@ const i = (o) => {
8
8
  display: "inline-block"
9
9
  }
10
10
  },
11
- [n]: {
11
+ [i]: {
12
12
  display: "flex",
13
13
  color: "var(--download-main-color)",
14
14
  cursor: "pointer",
@@ -40,23 +40,16 @@ const i = (o) => {
40
40
  fontSize: o.fontSizeSM
41
41
  },
42
42
  "&--disabled": {
43
- color: "#8896b0",
43
+ color: n,
44
44
  cursor: "not-allowed",
45
45
  "&:hover": {
46
- color: "#8896b0"
47
- }
48
- },
49
- "&--disabled-admin": {
50
- cursor: "not-allowed",
51
- color: "#999",
52
- "&:hover": {
53
- color: "#999"
46
+ color: n
54
47
  }
55
48
  }
56
49
  }
57
50
  };
58
51
  }, a = l("ApDownload", (o) => [
59
- i(o)
52
+ r(o)
60
53
  ]);
61
54
  export {
62
55
  a as default
@@ -1,20 +1,19 @@
1
- import { isVNode as z, defineComponent as E, useSlots as $, ref as d, watch as q, cloneVNode as A, computed as D, createVNode as n, mergeProps as m, unref as a, createElementBlock as L, openBlock as b, Fragment as G, createBlock as T, createCommentVNode as K, withCtx as v, createElementVNode as W, normalizeClass as H, normalizeStyle as J, renderSlot as C, resolveDynamicComponent as B, createTextVNode as Q, toDisplayString as X } from "vue";
2
- import { Button as y, Flex as Y, Space as Z, Modal as ee } from "@aplus-frontend/antdv";
1
+ import { isVNode as O, defineComponent as z, useSlots as E, ref as d, watch as $, cloneVNode as q, computed as A, createVNode as n, mergeProps as m, unref as o, createElementBlock as D, openBlock as p, Fragment as L, createBlock as T, createCommentVNode as K, withCtx as b, createElementVNode as W, normalizeClass as G, normalizeStyle as H, renderSlot as C, resolveDynamicComponent as B, createTextVNode as J, toDisplayString as Q } from "vue";
2
+ import { Button as v, Flex as X, Space as Y, Modal as Z } from "@aplus-frontend/antdv";
3
3
  import "../ap-form.vue.mjs";
4
4
  import "../../hooks/index.mjs";
5
- import { getSingleVNode as te } from "../../utils/slot.mjs";
5
+ import { getSingleVNode as ee } from "../../utils/slot.mjs";
6
6
  import "../../config-provider/index.mjs";
7
- import { omit as le } from "lodash-unified";
8
- import oe from "../style/modal-form.mjs";
7
+ import { omit as te } from "lodash-unified";
8
+ import le from "../style/modal-form.mjs";
9
9
  import { useControllableValue as ae } from "../../hooks/useControllableValue.mjs";
10
- import { useLocale as se } from "../../config-provider/hooks/use-locale.mjs";
11
- import { useGlobalConfig as ne } from "../../config-provider/hooks/use-global-config.mjs";
12
- import { useNamespace as re } from "../../config-provider/hooks/use-namespace.mjs";
13
- import ie from "../ap-form.vue2.mjs";
10
+ import { useLocale as oe } from "../../config-provider/hooks/use-locale.mjs";
11
+ import { useNamespace as se } from "../../config-provider/hooks/use-namespace.mjs";
12
+ import ne from "../ap-form.vue2.mjs";
14
13
  function k(r) {
15
- return typeof r == "function" || Object.prototype.toString.call(r) === "[object Object]" && !z(r);
14
+ return typeof r == "function" || Object.prototype.toString.call(r) === "[object Object]" && !O(r);
16
15
  }
17
- const Re = /* @__PURE__ */ E({
16
+ const Ne = /* @__PURE__ */ z({
18
17
  name: "ApFormModalForm",
19
18
  __name: "index",
20
19
  props: {
@@ -97,49 +96,49 @@ const Re = /* @__PURE__ */ E({
97
96
  expose: P,
98
97
  emit: S
99
98
  }) {
100
- const t = r, c = $(), w = S, o = d(), F = d(0), i = d(), s = d(!1), {
99
+ const t = r, c = E(), w = S, a = d(), y = d(0), i = d(), s = d(!1), {
101
100
  value: N,
102
101
  updateValue: u
103
102
  } = ae(t, w, {
104
103
  valuePropName: "open",
105
104
  defaultValue: !1,
106
105
  beforeUpdateValue(e) {
107
- return e && (F.value += 1), !0;
106
+ return e && (y.value += 1), !0;
108
107
  }
109
108
  }), {
110
109
  t: f
111
- } = se(), x = ne("uiMode", "aplus"), M = oe("ap-form-modal-form"), {
110
+ } = oe(), x = le("ap-form-modal-form"), {
112
111
  b: R,
113
- e: p
114
- } = re("ap-form-modal-form");
115
- q(() => o.value, (e) => {
112
+ e: F
113
+ } = se("ap-form-modal-form");
114
+ $(() => a.value, (e) => {
116
115
  e && i.value && (e.setFieldsValue?.(i.value), i.value = void 0);
117
116
  });
118
- const h = te(c.trigger), g = h ? A(h, {
117
+ const h = ee(c.trigger), g = h ? q(h, {
119
118
  onClick: () => {
120
119
  u(!0);
121
120
  }
122
- }) : null, _ = D(() => {
121
+ }) : null, _ = A(() => {
123
122
  const e = [];
124
123
  if (t.submitter === !1)
125
124
  return null;
126
125
  if (t.showCancel) {
127
126
  let l;
128
- e.push(n(y, {
127
+ e.push(n(v, {
129
128
  onClick: V,
130
129
  disabled: s.value
131
130
  }, k(l = f("ap.common.cancelText")) ? l : {
132
131
  default: () => [l]
133
132
  }));
134
133
  }
135
- return t.submitter?.resetButtonProps !== !1 && e.push(n(y, m(t.submitter?.resetButtonProps || {}, {
134
+ return t.submitter?.resetButtonProps !== !1 && e.push(n(v, m(t.submitter?.resetButtonProps || {}, {
136
135
  key: "reset",
137
136
  disabled: s.value,
138
137
  onClick: I,
139
138
  htmlType: "reset"
140
139
  }), {
141
140
  default: () => [t.submitter?.resetText || f("ap.common.resetText")]
142
- })), t.submitter?.submitButtonProps !== !1 && e.push(n(y, m({
141
+ })), t.submitter?.submitButtonProps !== !1 && e.push(n(v, m({
143
142
  type: "primary",
144
143
  key: "submit",
145
144
  htmlType: "submit"
@@ -147,28 +146,28 @@ const Re = /* @__PURE__ */ E({
147
146
  loading: s.value
148
147
  }), {
149
148
  default: () => [t.submitter?.submitText || f("ap.common.okText")]
150
- })), n(Y, {
149
+ })), n(X, {
151
150
  justify: "flex-end",
152
- key: a(F),
153
- class: [p("footer"), a(x) === "admin" ? p("footer-admin") : null]
151
+ key: o(y),
152
+ class: [F("footer")]
154
153
  }, {
155
- default: () => [c.submitter ? c.submitter(e) : n(Z, null, k(e) ? e : {
154
+ default: () => [c.submitter ? c.submitter(e) : n(Y, null, k(e) ? e : {
156
155
  default: () => [e]
157
156
  })]
158
157
  });
159
158
  });
160
159
  function I() {
161
- t.submitter !== !1 && (o.value?.resetFields(), t.submitter?.onReset?.());
160
+ t.submitter !== !1 && (a.value?.resetFields(), t.submitter?.onReset?.());
162
161
  }
163
- async function U(e) {
162
+ async function M(e) {
164
163
  if (t.submitter !== !1)
165
164
  try {
166
165
  t.submitter?.onSubmit?.(), s.value = !0;
167
166
  const l = t.onFinish?.(e);
168
167
  if (t.submitTimeout && l instanceof Promise) {
169
- const O = setTimeout(() => s.value = !1, t.submitTimeout);
168
+ const j = setTimeout(() => s.value = !1, t.submitTimeout);
170
169
  l.finally(() => {
171
- clearTimeout(O), s.value = !1;
170
+ clearTimeout(j), s.value = !1;
172
171
  });
173
172
  }
174
173
  await l && u(!1);
@@ -177,71 +176,71 @@ const Re = /* @__PURE__ */ E({
177
176
  }
178
177
  }
179
178
  function V() {
180
- a(s) || u(!1);
179
+ o(s) || u(!1);
181
180
  }
182
- function j(e) {
183
- !e && a(s) || u(e);
181
+ function U(e) {
182
+ !e && o(s) || u(e);
184
183
  }
185
184
  return P({
186
185
  resetFields: async () => {
187
- o.value?.resetFields();
186
+ a.value?.resetFields();
188
187
  },
189
188
  clearValidate: (e) => {
190
- o.value?.clearValidate(e);
189
+ a.value?.clearValidate(e);
191
190
  },
192
- validateFields: (e, l) => o.value?.validateFields(e, l),
193
- getFieldsValue: (e) => o.value?.getFieldsValue(e),
194
- validate: (e, l) => o.value?.validate(e, l),
191
+ validateFields: (e, l) => a.value?.validateFields(e, l),
192
+ getFieldsValue: (e) => a.value?.getFieldsValue(e),
193
+ validate: (e, l) => a.value?.validate(e, l),
195
194
  scrollToField: (e, l = {}) => {
196
- o.value?.scrollToField(e, l);
195
+ a.value?.scrollToField(e, l);
197
196
  },
198
197
  setFieldValue: (e, l) => {
199
- o.value?.setFieldValue?.(e, l);
198
+ a.value?.setFieldValue?.(e, l);
200
199
  },
201
200
  setFieldsValue: (e) => {
202
- if (!o.value) {
201
+ if (!a.value) {
203
202
  i.value = e;
204
203
  return;
205
204
  }
206
- o.value?.setFieldsValue?.(e);
205
+ a.value?.setFieldsValue?.(e);
207
206
  },
208
- getInternalInstance: (e) => o.value?.getInternalInstance(e),
207
+ getInternalInstance: (e) => a.value?.getInternalInstance(e),
209
208
  getFieldsValueTransformed(e) {
210
- return o.value?.getFieldsValueTransformed(e);
209
+ return a.value?.getFieldsValueTransformed(e);
211
210
  },
212
211
  validateFieldsReturnTransformed(e, l) {
213
- return o.value?.validateFieldsReturnTransformed(e, l);
212
+ return a.value?.validateFieldsReturnTransformed(e, l);
214
213
  }
215
- }), (e, l) => (b(), L(G, null, [n(a(ee), m(e.modalProps, {
216
- open: a(N),
214
+ }), (e, l) => (p(), D(L, null, [n(o(Z), m(e.modalProps, {
215
+ open: o(N),
217
216
  footer: null,
218
217
  width: e.width,
219
- class: [a(R)(), a(M)],
218
+ class: [o(R)(), o(x)],
220
219
  "body-style": {
221
220
  padding: "0px !important"
222
221
  },
223
- "onUpdate:open": j,
222
+ "onUpdate:open": U,
224
223
  onCancel: V
225
224
  }), {
226
- title: v(() => [C(e.$slots, "title", {}, () => [Q(X(t.title), 1)])]),
227
- default: v(() => [n(ie, m({
225
+ title: b(() => [C(e.$slots, "title", {}, () => [J(Q(t.title), 1)])]),
226
+ default: b(() => [n(ne, m({
228
227
  ref_key: "formRef",
229
- ref: o
230
- }, a(le)(t, ["modalProps", "open", "onUpdate:open", "title", "width", "onFinish", "submitter"]), {
231
- onFinish: U
228
+ ref: a
229
+ }, o(te)(t, ["modalProps", "open", "onUpdate:open", "title", "width", "onFinish", "submitter"]), {
230
+ onFinish: M
232
231
  }), {
233
- default: v(() => [W("div", {
234
- style: J(e.modalProps?.bodyStyle),
235
- class: H(a(p)("content"))
236
- }, [C(e.$slots, "default")], 6), (b(), T(B(_.value)))]),
232
+ default: b(() => [W("div", {
233
+ style: H(e.modalProps?.bodyStyle),
234
+ class: G(o(F)("content"))
235
+ }, [C(e.$slots, "default")], 6), (p(), T(B(_.value)))]),
237
236
  _: 3
238
237
  }, 16)]),
239
238
  _: 3
240
- }, 16, ["open", "width", "class"]), a(g) ? (b(), T(B(a(g)), {
239
+ }, 16, ["open", "width", "class"]), o(g) ? (p(), T(B(o(g)), {
241
240
  key: 0
242
241
  })) : K("", !0)], 64));
243
242
  }
244
243
  });
245
244
  export {
246
- Re as default
245
+ Ne as default
247
246
  };
@@ -1,5 +1,5 @@
1
1
  import { genComponentStyleHook as a } from "../../utils/cssinjs/index.mjs";
2
- const i = (n) => {
2
+ const r = (n) => {
3
3
  const { componentCls: e, namespace: t } = n;
4
4
  return {
5
5
  [e]: {
@@ -42,7 +42,8 @@ const i = (n) => {
42
42
  },
43
43
  ".ant-select-selector": {
44
44
  borderWidth: "0 !important",
45
- boxShadow: "none !important"
45
+ boxShadow: "none !important",
46
+ background: "unset !important"
46
47
  },
47
48
  ".ant-select-single .ant-select-selector": {
48
49
  height: "30px !important"
@@ -124,8 +125,8 @@ const i = (n) => {
124
125
  }
125
126
  }
126
127
  };
127
- }, o = a("ApForm", (n) => [i(n)]);
128
+ }, o = a("ApForm", (n) => [r(n)]);
128
129
  export {
129
130
  o as default,
130
- i as genApFormItemStyle
131
+ r as genApFormItemStyle
131
132
  };
@@ -1,6 +1,6 @@
1
- import { genComponentStyleHook as d } from "../../utils/cssinjs/index.mjs";
1
+ import { genComponentStyleHook as r } from "../../utils/cssinjs/index.mjs";
2
2
  const e = (o) => {
3
- const { componentCls: a } = o;
3
+ const { componentCls: a, apFormModalCloseSize: d } = o;
4
4
  return {
5
5
  [a]: {
6
6
  ".ant-modal-content": {
@@ -16,19 +16,17 @@ const e = (o) => {
16
16
  padding: o.apFormModalContentPadding
17
17
  },
18
18
  [`${a}__footer`]: {
19
- padding: o.apFormModalFooterPadding
20
- },
21
- [`${a}__footer-admin`]: {
22
- borderTop: "1px solid #E9EDF3"
19
+ padding: o.apFormModalFooterPadding,
20
+ borderTop: o.apFormModalFooterBorderTop
23
21
  },
24
22
  ".ant-modal-close": {
25
- top: `calc(${o.apFormModalHeaderPaddingBlock} - (${o.apFormModalCloseSize} - 22px) / 2)`,
26
- width: o.apFormModalCloseSize,
27
- height: o.apFormModalCloseSize
23
+ top: o.calc(o.apFormModalHeaderPaddingBlock).sub(o.calc(d).sub("22px").div(2)).equal(),
24
+ width: d,
25
+ height: d
28
26
  }
29
27
  }
30
28
  };
31
- }, r = d(
29
+ }, n = r(
32
30
  "ApForm.Modal",
33
31
  (o) => [e(o)],
34
32
  {
@@ -36,10 +34,11 @@ const e = (o) => {
36
34
  apFormModalHeaderPaddingBlock: 15,
37
35
  apFormModalContentPadding: "20px 20px 0px",
38
36
  apFormModalFooterPadding: "12px 20px",
39
- apFormModalCloseSize: 32
37
+ apFormModalCloseSize: 32,
38
+ apFormModalFooterBorderTop: "unset"
40
39
  }
41
40
  );
42
41
  export {
43
- r as default,
42
+ n as default,
44
43
  e as genModalFormStyle
45
44
  };