@aplus-frontend/ui 0.1.23 → 0.1.25

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 (134) hide show
  1. package/es/index.mjs +86 -80
  2. package/es/src/ap-download/ap-download.vue.d.ts +0 -3
  3. package/es/src/ap-download/ap-download.vue.mjs +10 -10
  4. package/es/src/ap-field/number/index.vue.mjs +20 -19
  5. package/es/src/ap-form/ap-form-item.vue.mjs +27 -25
  6. package/es/src/ap-form/ap-form.vue.d.ts +1 -1
  7. package/es/src/ap-form/ap-form.vue2.mjs +18 -18
  8. package/es/src/ap-form/interface.d.ts +2 -2
  9. package/es/src/ap-form/modal-form/index.vue.d.ts +2 -2
  10. package/es/src/ap-form/search-form/index.vue.d.ts +2 -2
  11. package/es/src/ap-form/search-form/index.vue.mjs +1 -0
  12. package/es/src/ap-layout/ApInfoLayout.vue.d.ts +81 -0
  13. package/es/src/ap-layout/ApInfoLayout.vue.mjs +41 -0
  14. package/es/src/ap-layout/ApInfoLayout.vue2.mjs +4 -0
  15. package/es/src/ap-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue.d.ts +48 -0
  16. package/es/src/ap-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue.mjs +4 -0
  17. package/es/src/ap-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue2.mjs +42 -0
  18. package/es/src/ap-layout/{ap-info-layout → ap-info-layout-aplus}/ap-info-layout.vue.d.ts +3 -3
  19. package/es/src/ap-layout/ap-info-layout-aplus/ap-info-layout.vue.mjs +4 -0
  20. package/es/src/ap-layout/index.d.ts +2 -1
  21. package/es/src/ap-layout/index.mjs +2 -1
  22. package/es/src/ap-layout/interface.d.ts +8 -2
  23. package/es/src/ap-layout/interface.mjs +1 -0
  24. package/es/src/ap-layout/style/ap-info-layout.css +17 -0
  25. package/es/src/ap-table/utils.mjs +1 -1
  26. package/es/src/business/ap-attachment/ApAttachment.d.ts +97 -0
  27. package/es/src/business/ap-attachment/ApAttachment.mjs +82 -0
  28. package/es/src/business/ap-attachment/constans.d.ts +44 -0
  29. package/es/src/business/ap-attachment/constans.mjs +42 -0
  30. package/es/src/business/ap-attachment/index.d.ts +3 -0
  31. package/es/src/business/ap-attachment/interface.d.ts +13 -0
  32. package/es/src/business/ap-attachment/style.css +62 -0
  33. package/es/src/business/ap-input-radio/ApInputRadio.vue.d.ts +2 -0
  34. package/es/src/business/ap-input-radio/ApInputRadio.vue2.mjs +37 -24
  35. package/es/src/business/ap-input-radio/interface.d.ts +9 -2
  36. package/es/src/business/ap-ladder/ApLadder.vue.d.ts +159 -0
  37. package/es/src/business/ap-ladder/ApLadder.vue.mjs +4 -0
  38. package/es/src/business/ap-ladder/ApLadder.vue2.mjs +146 -0
  39. package/es/src/business/ap-ladder/interface.d.ts +92 -0
  40. package/es/src/business/ap-ladder/style.css +56 -0
  41. package/es/src/business/hooks/index.d.ts +2 -0
  42. package/es/src/business/hooks/index.mjs +6 -0
  43. package/es/src/business/hooks/usePageListApTable.d.ts +46 -0
  44. package/es/src/business/hooks/usePageListApTable.mjs +68 -0
  45. package/es/src/business/hooks/useTableRefresh.d.ts +18 -0
  46. package/es/src/business/hooks/useTableRefresh.mjs +16 -0
  47. package/es/src/business/index.d.ts +835 -5
  48. package/es/src/business/index.mjs +34 -28
  49. package/es/src/components.d.ts +1 -0
  50. package/es/src/editable-table/form-item.vue.mjs +80 -77
  51. package/es/src/editable-table/hooks/use-get-columns.mjs +30 -30
  52. package/es/src/editable-table/interface.d.ts +2 -2
  53. package/es/src/index.mjs +219 -213
  54. package/es/src/locale/lang/en.mjs +4 -0
  55. package/es/src/locale/lang/zh-cn.mjs +4 -0
  56. package/es/src/theme/antd-global-overwrite/aplus/index.css +8 -0
  57. package/es/src/theme/antd-global-overwrite/aplus/table.css +8 -0
  58. package/es/src/theme/ap-attachment/ap-attachment.css +62 -0
  59. package/es/src/theme/ap-ladder/ap-ladder.css +56 -0
  60. package/es/src/theme/ap-layout/ap-info-layout.css +17 -0
  61. package/lib/index.js +1 -1
  62. package/lib/src/ap-download/ap-download.vue.d.ts +0 -3
  63. package/lib/src/ap-download/ap-download.vue.js +1 -1
  64. package/lib/src/ap-field/number/index.vue.js +1 -1
  65. package/lib/src/ap-form/ap-form-item.vue.js +1 -1
  66. package/lib/src/ap-form/ap-form.vue.d.ts +1 -1
  67. package/lib/src/ap-form/ap-form.vue2.js +1 -1
  68. package/lib/src/ap-form/interface.d.ts +2 -2
  69. package/lib/src/ap-form/modal-form/index.vue.d.ts +2 -2
  70. package/lib/src/ap-form/search-form/index.vue.d.ts +2 -2
  71. package/lib/src/ap-form/search-form/index.vue.js +1 -1
  72. package/lib/src/ap-layout/ApInfoLayout.vue.d.ts +81 -0
  73. package/lib/src/ap-layout/ApInfoLayout.vue.js +1 -0
  74. package/lib/src/ap-layout/ApInfoLayout.vue2.js +1 -0
  75. package/lib/src/ap-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue.d.ts +48 -0
  76. package/lib/src/ap-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue.js +1 -0
  77. package/lib/src/ap-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue2.js +1 -0
  78. package/lib/src/ap-layout/{ap-info-layout → ap-info-layout-aplus}/ap-info-layout.vue.d.ts +3 -3
  79. package/lib/src/ap-layout/{ap-info-layout/ap-info-layout.vue2.js → ap-info-layout-aplus/ap-info-layout.vue.js} +1 -1
  80. package/lib/src/ap-layout/index.d.ts +2 -1
  81. package/lib/src/ap-layout/index.js +1 -1
  82. package/lib/src/ap-layout/interface.d.ts +8 -2
  83. package/lib/src/ap-layout/interface.js +1 -0
  84. package/lib/src/ap-layout/style/ap-info-layout.css +17 -0
  85. package/lib/src/ap-table/utils.js +1 -1
  86. package/lib/src/business/ap-attachment/ApAttachment.d.ts +97 -0
  87. package/lib/src/business/ap-attachment/ApAttachment.js +1 -0
  88. package/lib/src/business/ap-attachment/constans.d.ts +44 -0
  89. package/lib/src/business/ap-attachment/constans.js +1 -0
  90. package/lib/src/business/ap-attachment/index.d.ts +3 -0
  91. package/lib/src/business/ap-attachment/interface.d.ts +13 -0
  92. package/lib/src/business/ap-attachment/style.css +62 -0
  93. package/lib/src/business/ap-input-radio/ApInputRadio.vue.d.ts +2 -0
  94. package/lib/src/business/ap-input-radio/ApInputRadio.vue2.js +1 -1
  95. package/lib/src/business/ap-input-radio/interface.d.ts +9 -2
  96. package/lib/src/business/ap-ladder/ApLadder.vue.d.ts +159 -0
  97. package/lib/src/business/ap-ladder/ApLadder.vue.js +1 -0
  98. package/lib/src/business/ap-ladder/ApLadder.vue2.js +1 -0
  99. package/lib/src/business/ap-ladder/interface.d.ts +92 -0
  100. package/lib/src/business/ap-ladder/style.css +56 -0
  101. package/lib/src/business/hooks/index.d.ts +2 -0
  102. package/lib/src/business/hooks/index.js +1 -0
  103. package/lib/src/business/hooks/usePageListApTable.d.ts +46 -0
  104. package/lib/src/business/hooks/usePageListApTable.js +1 -0
  105. package/lib/src/business/hooks/useTableRefresh.d.ts +18 -0
  106. package/lib/src/business/hooks/useTableRefresh.js +1 -0
  107. package/lib/src/business/index.d.ts +835 -5
  108. package/lib/src/business/index.js +1 -1
  109. package/lib/src/components.d.ts +1 -0
  110. package/lib/src/editable-table/form-item.vue.js +1 -1
  111. package/lib/src/editable-table/hooks/use-get-columns.js +1 -1
  112. package/lib/src/editable-table/interface.d.ts +2 -2
  113. package/lib/src/index.js +1 -1
  114. package/lib/src/locale/lang/en.js +1 -1
  115. package/lib/src/locale/lang/zh-cn.js +1 -1
  116. package/lib/src/theme/antd-global-overwrite/aplus/index.css +8 -0
  117. package/lib/src/theme/antd-global-overwrite/aplus/table.css +8 -0
  118. package/lib/src/theme/ap-attachment/ap-attachment.css +62 -0
  119. package/lib/src/theme/ap-ladder/ap-ladder.css +56 -0
  120. package/lib/src/theme/ap-layout/ap-info-layout.css +17 -0
  121. package/package.json +2 -2
  122. package/es/src/ap-layout/ap-info-layout/ap-info-layout.vue2.mjs +0 -4
  123. /package/es/src/ap-layout/{ap-info-layout/ap-info-layout.vue.mjs → ap-info-layout-aplus/ap-info-layout.vue2.mjs} +0 -0
  124. /package/es/src/business/{expandAlert → ap-expand-alert}/ApExpandAlert.vue.d.ts +0 -0
  125. /package/es/src/business/{expandAlert → ap-expand-alert}/ApExpandAlert.vue.mjs +0 -0
  126. /package/es/src/business/{expandAlert → ap-expand-alert}/ApExpandAlert.vue2.mjs +0 -0
  127. /package/es/src/business/{expandAlert → ap-expand-alert}/interface.d.ts +0 -0
  128. /package/es/src/business/{expandAlert → ap-expand-alert}/style.css +0 -0
  129. /package/lib/src/ap-layout/{ap-info-layout/ap-info-layout.vue.js → ap-info-layout-aplus/ap-info-layout.vue2.js} +0 -0
  130. /package/lib/src/business/{expandAlert → ap-expand-alert}/ApExpandAlert.vue.d.ts +0 -0
  131. /package/lib/src/business/{expandAlert → ap-expand-alert}/ApExpandAlert.vue.js +0 -0
  132. /package/lib/src/business/{expandAlert → ap-expand-alert}/ApExpandAlert.vue2.js +0 -0
  133. /package/lib/src/business/{expandAlert → ap-expand-alert}/interface.d.ts +0 -0
  134. /package/lib/src/business/{expandAlert → ap-expand-alert}/style.css +0 -0
@@ -1,9 +1,9 @@
1
1
  import { defineComponent as A, ref as E, reactive as N, nextTick as O, toRaw as m, computed as j, openBlock as S, createBlock as W, unref as C, mergeProps as q, withCtx as z, renderSlot as D } from "vue";
2
2
  import { Form as L } from "ant-design-vue";
3
3
  import { useProvideForm as P } from "./context.mjs";
4
- import { isArray as g, cloneDeep as V, omit as K } from "lodash-unified";
4
+ import { isArray as p, cloneDeep as V, omit as K } from "lodash-unified";
5
5
  import { INTERNAL_FORM_INSTANCE_MARK as $ } from "./constant.mjs";
6
- import { isDef as p } from "../utils/index.mjs";
6
+ import { isDef as h } from "../utils/index.mjs";
7
7
  const Y = /* @__PURE__ */ A({
8
8
  __name: "ap-form",
9
9
  props: {
@@ -34,26 +34,26 @@ const Y = /* @__PURE__ */ A({
34
34
  },
35
35
  setup(_, { expose: R }) {
36
36
  const i = _;
37
- function h(e, t, l = !0) {
37
+ function f(e, t, l = !0) {
38
38
  var y;
39
- if (g(e)) {
39
+ if (p(e)) {
40
40
  let n = o;
41
41
  for (let u = 0; u < e.length - 1; u++)
42
42
  e[u] in n || (n[e[u]] = {}), n = n[e[u]];
43
43
  n[e[e.length - 1]] = t;
44
44
  } else
45
45
  o[e] = t;
46
- let r = g(e) ? e[0] : e;
46
+ let r = p(e) ? e[0] : e;
47
47
  l && ((y = i.onValuesChange) == null || y.call(i, { [r]: o[r] }, o)), d();
48
48
  }
49
49
  const a = E();
50
- let f = i.initialValues ? V(i.initialValues) : {};
50
+ let c = i.initialValues ? V(i.initialValues) : {};
51
51
  const o = N(i.initialValues || {});
52
52
  let s = [];
53
53
  const B = async () => {
54
54
  var e;
55
55
  (e = a.value) == null || e.resetFields(), await O(() => {
56
- Object.keys(o).forEach((t) => delete o[t]), Object.assign(o, V(f)), d();
56
+ Object.keys(o).forEach((t) => delete o[t]), Object.assign(o, V(c)), d();
57
57
  });
58
58
  }, I = (e) => {
59
59
  var t;
@@ -73,22 +73,22 @@ const Y = /* @__PURE__ */ A({
73
73
  }, w = (e) => {
74
74
  Object.assign(o, e), d();
75
75
  }, F = (e, t) => {
76
- o[e] = t, d();
76
+ f(e, t), d();
77
77
  };
78
- function c(e, t) {
78
+ function g(e, t) {
79
79
  return t || e(m(o)), s.push(e), () => {
80
80
  s = s.filter((l) => l !== e);
81
81
  };
82
82
  }
83
83
  function v({ initialValue: e, name: t }) {
84
- if (p(e) && p(t))
85
- if (h(t, e, !1), g(t)) {
86
- let l = f;
84
+ if (h(e) && h(t))
85
+ if (f(t, e, !1), p(t)) {
86
+ let l = c;
87
87
  for (let r = 0; r < t.length - 1; r++)
88
- p(l[t[r]]) || (l[t[r]] = {}), l = l[t[r]];
88
+ h(l[t[r]]) || (l[t[r]] = {}), l = l[t[r]];
89
89
  l[t[t.length - 1]] = e;
90
90
  } else
91
- f[t] = e;
91
+ c[t] = e;
92
92
  }
93
93
  function x(e) {
94
94
  if (e !== $) {
@@ -97,7 +97,7 @@ const Y = /* @__PURE__ */ A({
97
97
  }
98
98
  return {
99
99
  registerField: v,
100
- registerWatch: c
100
+ registerWatch: g
101
101
  };
102
102
  }
103
103
  function d() {
@@ -110,9 +110,9 @@ const Y = /* @__PURE__ */ A({
110
110
  }
111
111
  return P({
112
112
  model: j(() => o),
113
- updateModel: h,
113
+ updateModel: f,
114
114
  internalInstance: {
115
- registerWatch: c,
115
+ registerWatch: g,
116
116
  registerField: v,
117
117
  setFieldValue: F
118
118
  }
@@ -125,7 +125,7 @@ const Y = /* @__PURE__ */ A({
125
125
  scrollToField: k,
126
126
  setFieldsValue: w,
127
127
  setFieldValue: F,
128
- registerWatch: c,
128
+ registerWatch: g,
129
129
  getInternalInstance: x
130
130
  }), (e, t) => (S(), W(C(L), q({
131
131
  ref_key: "formRef",
@@ -11,7 +11,7 @@ export type ApFormItemProps = FormItemProps & Partial<ApFormColProps> & {
11
11
  bordered?: boolean;
12
12
  valuePropName?: string;
13
13
  /**
14
- * 表单项的默认值(只生效一次)
14
+ * 表单项的默认值(只生效一次),支持传入异步函数
15
15
  */
16
16
  initialValue?: any;
17
17
  /**
@@ -35,7 +35,7 @@ export type ApFormProps = Omit<FormProps, 'model'> & {
35
35
  export type WatchFunc = (values?: Recordable) => void;
36
36
  export type ApFormExpose<ModelType = any> = {
37
37
  setFieldsValue: (fields: Partial<ModelType>) => void;
38
- setFieldValue: (key: keyof ModelType, value: any) => void;
38
+ setFieldValue: (name: NamePath, value: any) => void;
39
39
  resetFields: () => Promise<void>;
40
40
  clearValidate: (name?: NamePath) => void;
41
41
  validateFields: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<Partial<ModelType>> | undefined;
@@ -440,7 +440,7 @@ declare function __VLS_template(): {
440
440
  }> | undefined;
441
441
  scrollToField: (name: NamePath, options?: {}) => void;
442
442
  setFieldsValue: (values: Record<string, any>) => void;
443
- setFieldValue: (key: any, newValue: any) => void;
443
+ setFieldValue: (name: NamePath, newValue: any) => void;
444
444
  registerWatch: (callback: WatchFunc, inner: boolean) => () => void;
445
445
  getInternalInstance: (mark: string) => {
446
446
  registerField: ({ initialValue, name }: RegistedFieldType) => void;
@@ -632,7 +632,7 @@ declare function __VLS_template(): {
632
632
  }> | undefined;
633
633
  scrollToField: (name: NamePath, options?: {}) => void;
634
634
  setFieldsValue: (values: Record<string, any>) => void;
635
- setFieldValue: (key: any, newValue: any) => void;
635
+ setFieldValue: (name: NamePath, newValue: any) => void;
636
636
  registerWatch: (callback: WatchFunc, inner: boolean) => () => void;
637
637
  getInternalInstance: (mark: string) => {
638
638
  registerField: ({ initialValue, name }: RegistedFieldType) => void;
@@ -435,7 +435,7 @@ declare function __VLS_template(): {
435
435
  }> | undefined;
436
436
  scrollToField: (name: NamePath, options?: {}) => void;
437
437
  setFieldsValue: (values: Record<string, any>) => void;
438
- setFieldValue: (key: any, newValue: any) => void;
438
+ setFieldValue: (name: NamePath, newValue: any) => void;
439
439
  registerWatch: (callback: WatchFunc, inner: boolean) => () => void;
440
440
  getInternalInstance: (mark: string) => {
441
441
  registerField: ({ initialValue, name }: RegistedFieldType) => void;
@@ -627,7 +627,7 @@ declare function __VLS_template(): {
627
627
  }> | undefined;
628
628
  scrollToField: (name: NamePath, options?: {}) => void;
629
629
  setFieldsValue: (values: Record<string, any>) => void;
630
- setFieldValue: (key: any, newValue: any) => void;
630
+ setFieldValue: (name: NamePath, newValue: any) => void;
631
631
  registerWatch: (callback: WatchFunc, inner: boolean) => () => void;
632
632
  getInternalInstance: (mark: string) => {
633
633
  registerField: ({ initialValue, name }: RegistedFieldType) => void;
@@ -148,6 +148,7 @@ const i = 24, ze = /* @__PURE__ */ le({
148
148
  const x = c.props, O = x.span || r;
149
149
  if (P += O, !a.forceExpand && o(u) && P > I) {
150
150
  t.push(ie(c, {
151
+ class: "ant-form-item-hidden",
151
152
  hidden: !0
152
153
  }));
153
154
  return;
@@ -0,0 +1,81 @@
1
+ import { ApInfoLayoutPropsMixed } from './interface';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
3
+ declare function __VLS_template(): {
4
+ slots: Readonly<{
5
+ [key: string]: any;
6
+ /**
7
+ * 默认插槽
8
+ */
9
+ default(): any;
10
+ /**
11
+ * 整个 header 区域
12
+ */
13
+ header(): any;
14
+ /**
15
+ * 仅Aplus- header标题,位于左侧
16
+ */
17
+ title(): any;
18
+ /**
19
+ * 仅Aplus- 操作区域
20
+ */
21
+ actions(): any;
22
+ /**
23
+ *
24
+ * 仅Aplus- header下方的分割线
25
+ *
26
+ */
27
+ divider(): any;
28
+ /**
29
+ * content 内容区
30
+ */
31
+ content(): any;
32
+ }> & {
33
+ [key: string]: any;
34
+ /**
35
+ * 默认插槽
36
+ */
37
+ default(): any;
38
+ /**
39
+ * 整个 header 区域
40
+ */
41
+ header(): any;
42
+ /**
43
+ * 仅Aplus- header标题,位于左侧
44
+ */
45
+ title(): any;
46
+ /**
47
+ * 仅Aplus- 操作区域
48
+ */
49
+ actions(): any;
50
+ /**
51
+ *
52
+ * 仅Aplus- header下方的分割线
53
+ *
54
+ */
55
+ divider(): any;
56
+ /**
57
+ * content 内容区
58
+ */
59
+ content(): any;
60
+ };
61
+ refs: {};
62
+ attrs: Partial<{}>;
63
+ };
64
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
65
+ declare const __VLS_component: DefineComponent<__VLS_TypePropsToOption<ApInfoLayoutPropsMixed>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_TypePropsToOption<ApInfoLayoutPropsMixed>>>, {}, {}>;
66
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
67
+ export default _default;
68
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
69
+ type __VLS_TypePropsToOption<T> = {
70
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
71
+ type: PropType<__VLS_NonUndefinedable<T[K]>>;
72
+ } : {
73
+ type: PropType<T[K]>;
74
+ required: true;
75
+ };
76
+ };
77
+ type __VLS_WithTemplateSlots<T, S> = T & {
78
+ new (): {
79
+ $slots: S;
80
+ };
81
+ };
@@ -0,0 +1,41 @@
1
+ import { defineComponent as a, computed as n, openBlock as p, createBlock as s, resolveDynamicComponent as i, normalizeProps as l, guardReactiveProps as m, createSlots as c, renderList as u, withCtx as d, renderSlot as f } from "vue";
2
+ import "./ap-info-layout-aplus/ap-info-layout.vue.mjs";
3
+ import "./ap-info-layout-admin/ApInfoLayoutAdmin.vue.mjs";
4
+ import "../config-provider/index.mjs";
5
+ import { useGlobalConfig as _ } from "../config-provider/hooks/use-global-config.mjs";
6
+ import y from "./ap-info-layout-admin/ApInfoLayoutAdmin.vue2.mjs";
7
+ import b from "./ap-info-layout-aplus/ap-info-layout.vue2.mjs";
8
+ const D = /* @__PURE__ */ a({
9
+ __name: "ApInfoLayout",
10
+ props: {
11
+ headerStyle: {},
12
+ bordered: { type: Boolean },
13
+ toEl: {},
14
+ telDisabled: { type: Boolean }
15
+ },
16
+ setup($) {
17
+ const r = _("uiMode", "aplus"), t = n(() => {
18
+ let e;
19
+ switch (r.value) {
20
+ case "aplus":
21
+ e = b;
22
+ break;
23
+ case "admin":
24
+ e = y;
25
+ break;
26
+ }
27
+ return e;
28
+ });
29
+ return (e, h) => (p(), s(i(t.value), l(m(e.$props)), c({ _: 2 }, [
30
+ u(e.$slots, (k, o) => ({
31
+ name: o,
32
+ fn: d(() => [
33
+ f(e.$slots, o)
34
+ ])
35
+ }))
36
+ ]), 1040));
37
+ }
38
+ });
39
+ export {
40
+ D as default
41
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./ApInfoLayout.vue.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,48 @@
1
+ import { CSSProperties, DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
2
+ import { ApInfoLayoutAdminProps } from '../interface';
3
+ declare function __VLS_template(): {
4
+ slots: {
5
+ header?(_: {}): any;
6
+ default?(_: {}): any;
7
+ };
8
+ refs: {
9
+ containerRef: HTMLDivElement;
10
+ headerRef: HTMLDivElement;
11
+ };
12
+ attrs: Partial<{}>;
13
+ };
14
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
15
+ declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<ApInfoLayoutAdminProps>, {
16
+ bordered: boolean;
17
+ headerStyle: () => CSSProperties;
18
+ }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<ApInfoLayoutAdminProps>, {
19
+ bordered: boolean;
20
+ headerStyle: () => CSSProperties;
21
+ }>>>, {
22
+ bordered: boolean;
23
+ headerStyle: CSSProperties;
24
+ }, {}>;
25
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
26
+ export default _default;
27
+ type __VLS_WithDefaults<P, D> = {
28
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
29
+ default: D[K];
30
+ }> : P[K];
31
+ };
32
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
33
+ type __VLS_TypePropsToOption<T> = {
34
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
35
+ type: PropType<__VLS_NonUndefinedable<T[K]>>;
36
+ } : {
37
+ type: PropType<T[K]>;
38
+ required: true;
39
+ };
40
+ };
41
+ type __VLS_WithTemplateSlots<T, S> = T & {
42
+ new (): {
43
+ $slots: S;
44
+ };
45
+ };
46
+ type __VLS_PrettifyLocal<T> = {
47
+ [K in keyof T]: T[K];
48
+ } & {};
@@ -0,0 +1,4 @@
1
+ import f from "./ApInfoLayoutAdmin.vue2.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,42 @@
1
+ import { defineComponent as u, ref as t, openBlock as p, createElementBlock as y, normalizeClass as s, unref as e, createElementVNode as n, normalizeStyle as h, renderSlot as d } from "vue";
2
+ import "../../config-provider/index.mjs";
3
+ import "../style/ap-info-layout.css";
4
+ import { useNamespace as v } from "../../config-provider/hooks/use-namespace.mjs";
5
+ import { useGlobalConfig as _ } from "../../config-provider/hooks/use-global-config.mjs";
6
+ const $ = /* @__PURE__ */ u({
7
+ __name: "ApInfoLayoutAdmin",
8
+ props: {
9
+ headerStyle: { default: () => ({}) },
10
+ bordered: { type: Boolean, default: !1 }
11
+ },
12
+ setup(b) {
13
+ const l = t(), a = t(), i = () => {
14
+ l.value && a.value && (l.value.scrollTop > 0 ? a.value.classList.add(o("header-shadow")) : a.value.classList.remove(o("header-shadow")));
15
+ }, { b: f, e: o, m: c } = v("ap-info-layout-admin"), m = _("uiMode", "admin");
16
+ return (r, k) => (p(), y("div", {
17
+ class: s([e(f)(), `${e(c)(e(m))}`]),
18
+ onScroll: i,
19
+ ref_key: "containerRef",
20
+ ref: l
21
+ }, [
22
+ n("div", {
23
+ class: s([e(o)("sticky_box"), r.bordered ? e(o)("sticky_box-bordered") : ""]),
24
+ style: h({
25
+ ...r.headerStyle
26
+ }),
27
+ ref_key: "headerRef",
28
+ ref: a
29
+ }, [
30
+ d(r.$slots, "header")
31
+ ], 6),
32
+ n("div", {
33
+ class: s(e(o)("default_content"))
34
+ }, [
35
+ d(r.$slots, "default")
36
+ ], 2)
37
+ ], 34));
38
+ }
39
+ });
40
+ export {
41
+ $ as default
42
+ };
@@ -1,4 +1,4 @@
1
- import { APInfoLayoutProps } from '../interface';
1
+ import { ApInfoLayoutAplusProps } from '../interface';
2
2
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
3
3
  declare function __VLS_template(): {
4
4
  slots: {
@@ -12,12 +12,12 @@ declare function __VLS_template(): {
12
12
  attrs: Partial<{}>;
13
13
  };
14
14
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
15
- declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<APInfoLayoutProps>, {
15
+ declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<ApInfoLayoutAplusProps>, {
16
16
  toEl: string;
17
17
  telDisabled: boolean;
18
18
  }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
19
19
  "update:telDisabled": (...args: any[]) => void;
20
- }, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<APInfoLayoutProps>, {
20
+ }, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<ApInfoLayoutAplusProps>, {
21
21
  toEl: string;
22
22
  telDisabled: boolean;
23
23
  }>>> & {
@@ -0,0 +1,4 @@
1
+ import f from "./ap-info-layout.vue2.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -1,2 +1,3 @@
1
- import { default as ApInfoLayout } from './ap-info-layout/ap-info-layout.vue';
1
+ import { default as ApInfoLayout } from './ApInfoLayout.vue';
2
+ export * from './interface';
2
3
  export { ApInfoLayout };
@@ -1 +1,2 @@
1
- import "./ap-info-layout/ap-info-layout.vue2.mjs";
1
+ import "./ApInfoLayout.vue2.mjs";
2
+ import "./interface.mjs";
@@ -1,4 +1,10 @@
1
- export interface APInfoLayoutProps {
1
+ import { CSSProperties } from 'vue';
2
+ export type ApInfoLayoutAdminProps = {
3
+ headerStyle?: CSSProperties;
4
+ bordered?: boolean;
5
+ };
6
+ export type ApInfoLayoutAplusProps = {
2
7
  toEl?: string | HTMLElement;
3
8
  telDisabled?: boolean;
4
- }
9
+ };
10
+ export type ApInfoLayoutPropsMixed = ApInfoLayoutAdminProps & ApInfoLayoutAplusProps;
@@ -0,0 +1 @@
1
+
@@ -17,3 +17,20 @@
17
17
  .aplus-info-layout-contant {
18
18
  border-bottom-color: #fff;
19
19
  }
20
+ .aplus-ap-info-layout-admin {
21
+ margin: 16px;
22
+ height: calc(100% - 32px);
23
+ overflow: auto;
24
+ }
25
+ div.aplus-ap-info-layout-admin__header-shadow.aplus-ap-info-layout-admin__sticky_box {
26
+ box-shadow: 0 4px 6px 0 rgba(73, 107, 158, 0.1);
27
+ border-bottom: none;
28
+ }
29
+ .aplus-ap-info-layout-admin__sticky_box {
30
+ position: sticky;
31
+ top: 0;
32
+ z-index: 100;
33
+ }
34
+ .aplus-ap-info-layout-admin__sticky_box-bordered {
35
+ border-bottom: 1px solid #e9e9e9;
36
+ }
@@ -154,7 +154,7 @@ function k(t, e, n) {
154
154
  title: t.title,
155
155
  column: t
156
156
  });
157
- if (o && (o.length > 1 || o[0].children !== "v-if"))
157
+ if (o && (o.length > 1 || o[0].children && o[0].children !== "v-if"))
158
158
  return o;
159
159
  const r = c(t.title) ? u("span", {
160
160
  style: E,
@@ -0,0 +1,97 @@
1
+ import { AttachmentItemProps, ApAttachmentProps } from './interface';
2
+ import { DefineComponent, PropType, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue';
3
+ import { TooltipPlacement } from 'ant-design-vue/es/tooltip';
4
+ declare const _default: DefineComponent<{
5
+ attachmentList: {
6
+ type: PropType<Array<AttachmentItemProps>>;
7
+ default: never[];
8
+ required: boolean;
9
+ };
10
+ textToolTipPlacement: {
11
+ type: PropType< ApAttachmentProps["textToolTipPlacement"]>;
12
+ default: string;
13
+ };
14
+ fileMorePopoverPlacement: {
15
+ type: PropType< ApAttachmentProps["fileMorePopoverPlacement"]>;
16
+ default: string;
17
+ };
18
+ color: {
19
+ type: StringConstructor;
20
+ };
21
+ size: {
22
+ type: StringConstructor;
23
+ default: string;
24
+ };
25
+ needName: {
26
+ type: PropType<{
27
+ nameKey?: string;
28
+ pathKey?: string;
29
+ }>;
30
+ default: () => {
31
+ nameKey: string;
32
+ pathKey: string;
33
+ };
34
+ };
35
+ getOssAccess: {
36
+ type: PropType< ApAttachmentProps["getOssAccess"]>;
37
+ };
38
+ disabled: {
39
+ type: BooleanConstructor;
40
+ default: boolean;
41
+ };
42
+ toolTipBgColor: {
43
+ type: StringConstructor;
44
+ };
45
+ }, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
46
+ attachmentList: {
47
+ type: PropType<Array<AttachmentItemProps>>;
48
+ default: never[];
49
+ required: boolean;
50
+ };
51
+ textToolTipPlacement: {
52
+ type: PropType< ApAttachmentProps["textToolTipPlacement"]>;
53
+ default: string;
54
+ };
55
+ fileMorePopoverPlacement: {
56
+ type: PropType< ApAttachmentProps["fileMorePopoverPlacement"]>;
57
+ default: string;
58
+ };
59
+ color: {
60
+ type: StringConstructor;
61
+ };
62
+ size: {
63
+ type: StringConstructor;
64
+ default: string;
65
+ };
66
+ needName: {
67
+ type: PropType<{
68
+ nameKey?: string;
69
+ pathKey?: string;
70
+ }>;
71
+ default: () => {
72
+ nameKey: string;
73
+ pathKey: string;
74
+ };
75
+ };
76
+ getOssAccess: {
77
+ type: PropType< ApAttachmentProps["getOssAccess"]>;
78
+ };
79
+ disabled: {
80
+ type: BooleanConstructor;
81
+ default: boolean;
82
+ };
83
+ toolTipBgColor: {
84
+ type: StringConstructor;
85
+ };
86
+ }>>, {
87
+ size: string;
88
+ disabled: boolean;
89
+ needName: {
90
+ nameKey?: string;
91
+ pathKey?: string;
92
+ };
93
+ textToolTipPlacement: TooltipPlacement;
94
+ attachmentList: AttachmentItemProps[];
95
+ fileMorePopoverPlacement: TooltipPlacement;
96
+ }, {}>;
97
+ export default _default;
@@ -0,0 +1,82 @@
1
+ import { defineComponent as O, useSlots as T, computed as a, cloneVNode as P, unref as k, toRaw as u, createVNode as o, createTextVNode as S } from "vue";
2
+ import { Tooltip as V, Popover as b } from "ant-design-vue";
3
+ import "../../config-provider/index.mjs";
4
+ import { ApAttachmentProps as z } from "./constans.mjs";
5
+ import { getHexWithOpacity as I, getFileInfo as M } from "../../ap-download/utils/getFileInfo.mjs";
6
+ import "./style.css";
7
+ import { useOssInit as U } from "../../ap-download/hooks/index.mjs";
8
+ import { isArray as _ } from "lodash-unified";
9
+ import { useNamespace as B } from "../../config-provider/hooks/use-namespace.mjs";
10
+ import { useGlobalConfig as h } from "../../config-provider/hooks/use-global-config.mjs";
11
+ import { useLocale as G } from "../../config-provider/hooks/use-locale.mjs";
12
+ const Y = /* @__PURE__ */ O({
13
+ name: "ApAttachment",
14
+ props: z(),
15
+ setup(t) {
16
+ const {
17
+ b: p,
18
+ e: l
19
+ } = B("ap-attachment"), A = h("uiMode"), g = h("apUpload"), {
20
+ lang: w,
21
+ t: i
22
+ } = G(), s = T(), C = a(() => w.value === "zh-cn" ? "zh_CN" : "en_US"), n = a(() => t.attachmentList.length === 1), d = a(() => t.attachmentList.length > 0 ? t.attachmentList[0].fileName : ""), N = a(() => n.value ? d.value : i("ap.apAttachment.downloadall")), f = a(() => t.color ? t.color : A.value === "aplus" ? "#0070FF" : "#1890FF"), y = a(() => ({
23
+ width: n.value ? "auto" : "266px"
24
+ })), v = a(() => ({
25
+ "--download-main-color": f.value,
26
+ "--download-main-color-opacity": I(f.value, 0.6)
27
+ })), F = a(() => {
28
+ var e;
29
+ return t.getOssAccess || ((e = g.value) == null ? void 0 : e.getOssAccess);
30
+ }), L = a(() => {
31
+ const e = s.default ? s.default()[0] : null;
32
+ return e ? P(e, {
33
+ style: {
34
+ "font-size": "16px"
35
+ }
36
+ }) : null;
37
+ }), r = async (e) => {
38
+ if (!t.disabled) {
39
+ const c = await U(F.value, k(C)), m = _(u(e)) ? u(e) : [u(e)];
40
+ await c.downloadFile(M(t.needName, m));
41
+ }
42
+ }, x = (e) => e && e.length > 0 ? o("ul", {
43
+ class: [l("file-list")],
44
+ style: v.value
45
+ }, [e.map((c, m) => o("li", {
46
+ key: m,
47
+ class: [l("file-item")],
48
+ onClick: () => r(c)
49
+ }, [c.fileName])), o("li", {
50
+ class: [l("down-load-all")],
51
+ onClick: () => r(t.attachmentList)
52
+ }, [i("ap.apAttachment.downloadall")])]) : null;
53
+ return () => o("div", {
54
+ class: [p()],
55
+ style: [y.value, v.value]
56
+ }, [o(V, {
57
+ title: N.value,
58
+ placement: t.textToolTipPlacement,
59
+ color: t.toolTipBgColor
60
+ }, {
61
+ default: () => [o("div", {
62
+ class: [l("content")],
63
+ onClick: () => r(n.value ? t.attachmentList[0] : t.attachmentList)
64
+ }, [s.default ? o("div", {
65
+ class: [l("text-render")]
66
+ }, [L.value, S(" ")]) : null, o("div", {
67
+ class: [l("text-inner")]
68
+ }, [d.value])])]
69
+ }), o(b, {
70
+ content: x(t.attachmentList),
71
+ placement: t.fileMorePopoverPlacement,
72
+ color: "#fff"
73
+ }, {
74
+ default: () => [!n.value && o("div", {
75
+ class: [l("more")]
76
+ }, [i("ap.apAttachment.more")])]
77
+ })]);
78
+ }
79
+ });
80
+ export {
81
+ Y as default
82
+ };