@aplus-frontend/ui 0.0.2 → 0.0.4

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 (55) hide show
  1. package/es/src/ap-table/ap-table.vue.d.ts +1 -5
  2. package/es/src/ap-table/ap-table.vue.mjs +133 -123
  3. package/es/src/ap-table/components/interface.d.ts +12 -0
  4. package/es/src/ap-table/components/status/index.vue.d.ts +14 -0
  5. package/es/src/ap-table/components/status/index.vue.mjs +4 -0
  6. package/es/src/ap-table/components/status/index.vue2.mjs +17 -0
  7. package/es/src/ap-table/constants.d.ts +20 -25
  8. package/es/src/ap-table/constants.mjs +19 -16
  9. package/es/src/ap-table/interface.d.ts +32 -7
  10. package/es/src/ap-table/utils.d.ts +204 -2
  11. package/es/src/ap-table/utils.mjs +87 -40
  12. package/es/src/ap-tag/style/ap-tag-group.css +1 -0
  13. package/es/src/ap-tag/style/ap-tag.css +1 -0
  14. package/es/src/pro-form/components/form-action.vue2.mjs +37 -35
  15. package/es/src/pro-form/hooks/use-advanced.mjs +45 -45
  16. package/es/src/pro-table/style/pro-table.css +3 -0
  17. package/es/src/theme/antd-global-overwrite/admin/index.css +104 -49
  18. package/es/src/theme/antd-global-overwrite/admin/pagination.css +30 -14
  19. package/es/src/theme/antd-global-overwrite/admin/steps.css +39 -15
  20. package/es/src/theme/antd-global-overwrite/admin/table.css +35 -20
  21. package/es/src/theme/antd-global-overwrite/aplus/index.css +110 -53
  22. package/es/src/theme/antd-global-overwrite/aplus/pagination.css +38 -18
  23. package/es/src/theme/antd-global-overwrite/aplus/steps.css +37 -15
  24. package/es/src/theme/antd-global-overwrite/aplus/table.css +35 -20
  25. package/es/src/theme/ap-tag/ap-tag-group.css +1 -0
  26. package/es/src/theme/ap-tag/ap-tag.css +1 -0
  27. package/es/src/theme/pro-table/pro-table.css +3 -0
  28. package/lib/src/ap-table/ap-table.vue.d.ts +1 -5
  29. package/lib/src/ap-table/ap-table.vue.js +1 -1
  30. package/lib/src/ap-table/components/interface.d.ts +12 -0
  31. package/lib/src/ap-table/components/status/index.vue.d.ts +14 -0
  32. package/lib/src/ap-table/components/status/index.vue.js +1 -0
  33. package/lib/src/ap-table/components/status/index.vue2.js +1 -0
  34. package/lib/src/ap-table/constants.d.ts +20 -25
  35. package/lib/src/ap-table/constants.js +1 -1
  36. package/lib/src/ap-table/interface.d.ts +32 -7
  37. package/lib/src/ap-table/utils.d.ts +204 -2
  38. package/lib/src/ap-table/utils.js +1 -1
  39. package/lib/src/ap-tag/style/ap-tag-group.css +1 -0
  40. package/lib/src/ap-tag/style/ap-tag.css +1 -0
  41. package/lib/src/pro-form/components/form-action.vue2.js +1 -1
  42. package/lib/src/pro-form/hooks/use-advanced.js +1 -1
  43. package/lib/src/pro-table/style/pro-table.css +3 -0
  44. package/lib/src/theme/antd-global-overwrite/admin/index.css +104 -49
  45. package/lib/src/theme/antd-global-overwrite/admin/pagination.css +30 -14
  46. package/lib/src/theme/antd-global-overwrite/admin/steps.css +39 -15
  47. package/lib/src/theme/antd-global-overwrite/admin/table.css +35 -20
  48. package/lib/src/theme/antd-global-overwrite/aplus/index.css +110 -53
  49. package/lib/src/theme/antd-global-overwrite/aplus/pagination.css +38 -18
  50. package/lib/src/theme/antd-global-overwrite/aplus/steps.css +37 -15
  51. package/lib/src/theme/antd-global-overwrite/aplus/table.css +35 -20
  52. package/lib/src/theme/ap-tag/ap-tag-group.css +1 -0
  53. package/lib/src/theme/ap-tag/ap-tag.css +1 -0
  54. package/lib/src/theme/pro-table/pro-table.css +3 -0
  55. package/package.json +1 -1
@@ -1,4 +1,16 @@
1
- import { ValueEnum, ValueEnumType } from './interface';
1
+ import { ApColumnType, ApTableValueFields, ValueEnum, ValueEnumType } from './interface';
2
+ import { Translator } from '../config-provider';
3
+ import { AlignType, FixedType, Key, CellEllipsisType, DataIndex, ColumnType, GetComponentProps, ColumnGroupType } from 'ant-design-vue/es/vc-table/interface';
4
+ import { ColumnTitle, CompareFn, SortOrder, FilterDropdownProps, FilterValue, FilterSearchType, ColumnFilterItem } from 'ant-design-vue/es/table/interface';
5
+ import { Breakpoint } from 'ant-design-vue/es/_util/responsiveObserve';
6
+ import { ExtractPropTypes, PropType, CSSProperties } from 'vue';
7
+ import { VueTypeValidableDef } from '../../node_modules/vue-types';
8
+ import { TriggerType } from 'ant-design-vue/es/tooltip/abstractTooltipProps';
9
+ import { TooltipPlacement, AdjustOverflow } from 'ant-design-vue/es/tooltip';
10
+ import { LiteralUnion, VueNode } from 'ant-design-vue/es/_util/type';
11
+ import { PresetColorType } from 'ant-design-vue/es/_util/colors';
12
+ import { AlignType, BuildInPlacements } from 'ant-design-vue/es/vc-trigger/interface';
13
+ import { TableColumnType } from 'ant-design-vue';
2
14
 
3
15
  export type FieldValueType = 'multiple' | 'multipleNumber' | 'dayjs' | 'dayjsRange' | 'dayjsDayRange' | 'number' | 'boolean' | 'object';
4
16
  export declare const formatParamsValueType: (type: FieldValueType | Record<string, FieldValueType>, value: any, cb: (t: FieldValueType, value: any) => any) => any;
@@ -28,5 +40,195 @@ export declare const objectToMap: (value: ValueEnum | undefined) => ValueEnumMap
28
40
  * @param valueEnumParams
29
41
  * @returns
30
42
  */
31
- export declare const valueEnumToArray: (valueEnumParams: ValueEnum) => OptionType;
43
+ export declare const valueEnumToArray: (valueEnumParams: ValueEnum) => Partial<OptionType>[];
44
+ /**
45
+ * 获取列在查询表单中的排序
46
+ * @param order
47
+ * @returns
48
+ */
49
+ export declare const getColumnOrder: (order?: number) => number;
50
+ /**
51
+ * 获取查询表单的placeholder
52
+ * @param t
53
+ * @param valueType
54
+ * @param placeholder
55
+ * @returns
56
+ */
57
+ export declare const getPlaceholder: (t: Translator, valueType?: keyof ApTableValueFields, placeholder?: string) => string | string[] | undefined;
58
+ /**
59
+ * 获取对象形式的FieldProps
60
+ * @param fieldProps
61
+ * @param record
62
+ * @returns
63
+ */
64
+ export declare function getFieldProps<RecordType = any>(fieldProps: ApColumnType<any, any>['fieldProps'], opt?: {
65
+ value: any;
66
+ text: any;
67
+ record: any;
68
+ index: number;
69
+ renderIndex: number;
70
+ column: ApColumnType<any, RecordType>;
71
+ }): any;
72
+ /**
73
+ * 获取表格的渲染类型
74
+ * @param item
75
+ * @returns
76
+ */
77
+ export declare function getTableRenderType(item: ApColumnType<any, any>): "number" | "text" | "select" | "switch" | "index" | "status" | "checkbox" | "radio" | "date" | "action" | "dateRange" | "textArea";
78
+ /**
79
+ * 处理表格render组件的props
80
+ * @param item
81
+ * @param renderOption
82
+ * @returns
83
+ */
84
+ export declare function getTableRenderProps(item: ApColumnType<any, any>, renderOption: any): any;
85
+ /**
86
+ * 将apColumn转化为column
87
+ * @param column
88
+ * @returns
89
+ */
90
+ export declare function apColumnToColumn(column: ApColumnType<any>): {
91
+ align?: AlignType | undefined;
92
+ class?: string | undefined;
93
+ title?: ColumnTitle<any>;
94
+ width?: string | number | undefined;
95
+ slots?: {
96
+ filterIcon?: string | undefined;
97
+ filterDropdown?: string | undefined;
98
+ customRender?: string | undefined;
99
+ title?: string | undefined;
100
+ } | undefined;
101
+ fixed?: FixedType | undefined;
102
+ key?: Key | undefined;
103
+ responsive?: Breakpoint[] | undefined;
104
+ maxWidth?: number | undefined;
105
+ minWidth?: number | undefined;
106
+ ellipsis?: CellEllipsisType | undefined;
107
+ colSpan?: number | undefined;
108
+ dataIndex?: DataIndex | undefined;
109
+ customRender?: ((opt: {
110
+ value: any;
111
+ text: any;
112
+ record: any;
113
+ index: number;
114
+ renderIndex: number;
115
+ column: ColumnType<any>;
116
+ }) => any) | undefined;
117
+ rowSpan?: number | undefined;
118
+ resizable?: boolean | undefined;
119
+ customCell?: GetComponentProps<any> | undefined;
120
+ onCellClick?: ((record: any, e: MouseEvent) => void) | undefined;
121
+ className?: string | undefined;
122
+ customHeaderCell?: GetComponentProps< ColumnType<any> | ColumnGroupType<any>> | undefined;
123
+ customFilterDropdown?: boolean | undefined;
124
+ __originColumn__?: any;
125
+ sorter?: ((boolean | CompareFn<any> | {
126
+ compare?: CompareFn<any> | undefined;
127
+ multiple?: number | undefined;
128
+ }) & (string | boolean | CompareFn<any> | {
129
+ compare?: CompareFn<any> | undefined;
130
+ multiple?: number | undefined;
131
+ })) | undefined;
132
+ sortOrder?: SortOrder | undefined;
133
+ defaultSortOrder?: SortOrder | undefined;
134
+ sortDirections?: SortOrder[] | undefined;
135
+ showSorterTooltip?: boolean | Partial< ExtractPropTypes<{
136
+ title: VueTypeValidableDef<any>;
137
+ trigger: PropType< TriggerType | TriggerType[]>;
138
+ open: {
139
+ type: BooleanConstructor;
140
+ default: any;
141
+ };
142
+ visible: {
143
+ type: BooleanConstructor;
144
+ default: any;
145
+ };
146
+ placement: PropType<TooltipPlacement>;
147
+ color: PropType<LiteralUnion<PresetColorType>>;
148
+ transitionName: StringConstructor;
149
+ overlayStyle: {
150
+ type: PropType<CSSProperties>;
151
+ default: CSSProperties;
152
+ };
153
+ overlayInnerStyle: {
154
+ type: PropType<CSSProperties>;
155
+ default: CSSProperties;
156
+ };
157
+ overlayClassName: StringConstructor;
158
+ openClassName: StringConstructor;
159
+ prefixCls: StringConstructor;
160
+ mouseEnterDelay: NumberConstructor;
161
+ mouseLeaveDelay: NumberConstructor;
162
+ getPopupContainer: PropType<(triggerNode: HTMLElement) => HTMLElement>;
163
+ arrowPointAtCenter: {
164
+ type: BooleanConstructor;
165
+ default: any;
166
+ };
167
+ arrow: {
168
+ type: PropType<boolean | {
169
+ pointAtCenter?: boolean | undefined;
170
+ }>;
171
+ default: boolean | {
172
+ pointAtCenter?: boolean | undefined;
173
+ };
174
+ };
175
+ autoAdjustOverflow: {
176
+ type: PropType<boolean | AdjustOverflow>;
177
+ default: boolean | AdjustOverflow;
178
+ };
179
+ destroyTooltipOnHide: {
180
+ type: BooleanConstructor;
181
+ default: any;
182
+ };
183
+ align: {
184
+ type: PropType<AlignType>;
185
+ default: AlignType;
186
+ };
187
+ builtinPlacements: {
188
+ type: PropType<BuildInPlacements>;
189
+ default: BuildInPlacements;
190
+ };
191
+ children: ArrayConstructor;
192
+ onVisibleChange: PropType<(vis: boolean) => void>;
193
+ 'onUpdate:visible': PropType<(vis: boolean) => void>;
194
+ onOpenChange: PropType<(vis: boolean) => void>;
195
+ 'onUpdate:open': PropType<(vis: boolean) => void>;
196
+ }>> | undefined;
197
+ filtered?: boolean | undefined;
198
+ filterDropdown?: VueNode | ((props: FilterDropdownProps<any>) => VueNode);
199
+ filterMultiple?: boolean | undefined;
200
+ filteredValue?: FilterValue | null | undefined;
201
+ defaultFilteredValue?: FilterValue | null | undefined;
202
+ filterIcon?: VueNode | ((opt: {
203
+ filtered: boolean;
204
+ column: TableColumnType<any>;
205
+ }) => VueNode);
206
+ filterMode?: "menu" | "tree" | undefined;
207
+ filterSearch?: FilterSearchType<ColumnFilterItem> | undefined;
208
+ onFilter?: ((value: string | number | boolean, record: any) => boolean) | undefined;
209
+ filterDropdownOpen?: boolean | undefined;
210
+ onFilterDropdownOpenChange?: ((visible: boolean) => void) | undefined;
211
+ filterResetToDefaultFilteredValue?: boolean | undefined;
212
+ filterDropdownVisible?: boolean | undefined;
213
+ onFilterDropdownVisibleChange?: ((visible: boolean) => void) | undefined;
214
+ children?: ApColumnType<any, any>[] | undefined;
215
+ span?: number | undefined;
216
+ tooltip?: string | undefined;
217
+ copyable?: boolean | undefined;
218
+ hideInSearch?: boolean | undefined;
219
+ hideInTable?: boolean | undefined;
220
+ valueEnum?: ValueEnum | undefined;
221
+ customRenderFormItem?: ((config: ApColumnType<"text", any>) => any) | undefined;
222
+ valueType?: keyof ApTableValueFields | undefined;
223
+ fieldProps?: any;
224
+ order?: number | undefined;
225
+ filters?: true | ColumnFilterItem[] | undefined;
226
+ };
227
+ /**
228
+ * 更新查询表单的的props
229
+ * @param item
230
+ * @param fieldProps
231
+ * @returns
232
+ */
233
+ export declare function updateFormProps(item: ApColumnType<any, any>, fieldProps: any): any;
32
234
  export {};
@@ -1,63 +1,110 @@
1
- import { isObject as c, isArray as a } from "lodash-unified";
2
- const u = (t, r, n) => {
1
+ import { isObject as s, isArray as c, isUndefined as f, isFunction as l, omit as d, isBoolean as p } from "lodash-unified";
2
+ const m = (e, t, n) => {
3
3
  let o = {};
4
- return c(t) ? Object.keys(t).forEach((s) => {
5
- c(t[s]) ? o[s] = u(t[s], r[s], n) : o[s] = n(t[s], r);
6
- }) : o = n(t, r), o;
7
- }, d = (t, r) => {
8
- switch (t) {
4
+ return s(e) ? Object.keys(e).forEach((u) => {
5
+ s(e[u]) ? o[u] = m(e[u], t[u], n) : o[u] = n(e[u], t);
6
+ }) : o = n(e, t), o;
7
+ }, h = (e, t) => {
8
+ switch (e) {
9
9
  case "dayjs":
10
- return r.valueOf();
10
+ return t.valueOf();
11
11
  case "dayjsRange":
12
- return r.map((n) => n.valueOf());
12
+ return t.map((n) => n.valueOf());
13
13
  case "dayjsDayRange": {
14
- const [n, o] = r;
14
+ const [n, o] = t;
15
15
  return [n.startOf("day").valueOf(), o.endOf("day").valueOf()];
16
16
  }
17
17
  case "multiple":
18
18
  case "multipleNumber":
19
- return a(r) ? r : [r];
19
+ return c(t) ? t : [t];
20
20
  case "boolean":
21
- return r;
21
+ return t;
22
22
  case "object":
23
- return r;
23
+ return t;
24
24
  default:
25
- return r;
25
+ return t;
26
26
  }
27
27
  };
28
- function p(t) {
29
- return a(t) ? t.join(".") : t;
28
+ function y(e) {
29
+ return c(e) ? e.join(".") : e;
30
30
  }
31
- function f(t) {
32
- const r = Object.prototype.toString.call(t).match(/^\[object (.*)\]$/)[1].toLowerCase();
33
- return r === "string" && typeof t == "object" ? "object" : t === null ? "null" : t === void 0 ? "undefined" : r;
31
+ function x(e) {
32
+ const t = Object.prototype.toString.call(e).match(/^\[object (.*)\]$/)[1].toLowerCase();
33
+ return t === "string" && typeof e == "object" ? "object" : e === null ? "null" : e === void 0 ? "undefined" : t;
34
34
  }
35
- const i = (t) => f(t) === "map" ? t : new Map(Object.entries(t || {})), b = (t) => {
36
- const r = [], n = i(t);
37
- return n.forEach((o, s) => {
38
- const e = n.get(s) || n.get(`${s}`);
39
- if (e) {
40
- if (typeof e == "object" && (e != null && e.text)) {
41
- r.push({
42
- text: e == null ? void 0 : e.text,
43
- value: s,
44
- label: e == null ? void 0 : e.text,
45
- disabled: e.disabled
35
+ const T = (e) => x(e) === "map" ? e : new Map(Object.entries(e || {})), a = (e) => {
36
+ const t = [], n = T(e);
37
+ return n.forEach((o, u) => {
38
+ const r = n.get(u) || n.get(`${u}`);
39
+ if (r) {
40
+ if (typeof r == "object" && (r != null && r.text)) {
41
+ t.push({
42
+ text: r == null ? void 0 : r.text,
43
+ value: u,
44
+ label: r == null ? void 0 : r.text,
45
+ disabled: r.disabled
46
46
  });
47
47
  return;
48
48
  }
49
- r.push({
50
- text: e,
51
- label: e,
52
- value: s
49
+ t.push({
50
+ text: r,
51
+ label: r,
52
+ value: u
53
53
  });
54
54
  }
55
- }), r;
55
+ }), t;
56
+ }, E = (e) => f(e) || e < 0 ? 0 : e, j = (e, t, n) => {
57
+ if (n)
58
+ return n;
59
+ const o = ["select", "date"], u = [
60
+ "text",
61
+ "textArea",
62
+ "number"
63
+ ];
64
+ if (t === "dateRange")
65
+ return [e("ap.common.chooseText"), e("ap.common.chooseText")];
66
+ if (o.includes(t))
67
+ return e("ap.common.chooseText");
68
+ if (u.includes(t))
69
+ return e("ap.common.inputText");
56
70
  };
71
+ function b(e, t) {
72
+ return !e || !l(e) ? e : e(t);
73
+ }
74
+ function O(e) {
75
+ let t = e.valueType || "text";
76
+ return e.valueEnum && (t = "status"), t;
77
+ }
78
+ function F(e, t) {
79
+ const n = b(e.fieldProps, t), o = (n == null ? void 0 : n.field) || n || {}, u = e.valueType === "switch", r = e.valueType === "index", i = u ? { checked: t.value } : { value: r ? t.index + 1 : t.value };
80
+ return e.valueEnum && (o.valueEnum = e.valueEnum), {
81
+ ...d(o, ["request"]),
82
+ ...i
83
+ };
84
+ }
85
+ function v(e) {
86
+ const t = { ...e };
87
+ return p(e.filters) && e.filters && e.valueEnum && (t.filters = a(e.valueEnum)), t;
88
+ }
89
+ function w(e, t) {
90
+ var o;
91
+ const n = t || {};
92
+ return e.valueEnum && !((o = n.field) != null && o.options) && (n.field = {
93
+ ...n.field,
94
+ options: a(e.valueEnum)
95
+ }), n;
96
+ }
57
97
  export {
58
- p as dataIndexToStr,
59
- u as formatParamsValueType,
60
- i as objectToMap,
61
- d as parseFieldValue,
62
- b as valueEnumToArray
98
+ v as apColumnToColumn,
99
+ y as dataIndexToStr,
100
+ m as formatParamsValueType,
101
+ E as getColumnOrder,
102
+ b as getFieldProps,
103
+ j as getPlaceholder,
104
+ F as getTableRenderProps,
105
+ O as getTableRenderType,
106
+ T as objectToMap,
107
+ h as parseFieldValue,
108
+ w as updateFormProps,
109
+ a as valueEnumToArray
63
110
  };
@@ -2,5 +2,6 @@
2
2
  text-wrap: nowrap;
3
3
  display: flex;
4
4
  flex-wrap: nowrap;
5
+ white-space: nowrap;
5
6
  align-items: center;
6
7
  }
@@ -1,5 +1,6 @@
1
1
  .aplus-tag-wrapper {
2
2
  text-wrap: nowrap;
3
+ white-space: nowrap;
3
4
  display: inline-block;
4
5
  }
5
6
  .aplus-tag-inner-wrapper {
@@ -1,12 +1,13 @@
1
- import { defineComponent as T, computed as u, openBlock as a, createBlock as s, unref as e, normalizeProps as z, mergeProps as p, withCtx as o, createElementVNode as V, normalizeStyle as $, createVNode as C, renderSlot as i, createTextVNode as m, toDisplayString as d, createCommentVNode as l, normalizeClass as j } from "vue";
2
- import { Col as F, Form as R } from "ant-design-vue";
3
- import { BaseButton as B } from "../../base-button/index.mjs";
4
- import { BasicArrow as G } from "../../basic/index.mjs";
5
- import { useFormContext as P } from "../hooks/use-form-context.mjs";
1
+ import { defineComponent as T, computed as s, openBlock as a, createBlock as l, unref as e, normalizeProps as z, mergeProps as m, withCtx as o, createElementVNode as V, normalizeStyle as A, createVNode as g, renderSlot as i, createTextVNode as p, toDisplayString as d, createCommentVNode as r, normalizeClass as $ } from "vue";
2
+ import { Col as F, Form as G } from "ant-design-vue";
3
+ import { BaseButton as f } from "../../base-button/index.mjs";
4
+ import { BasicArrow as R } from "../../basic/index.mjs";
5
+ import { useFormContext as j } from "../hooks/use-form-context.mjs";
6
6
  import "../../config-provider/index.mjs";
7
7
  import "./style/form-action.css";
8
- import { useLocale as q } from "../../config-provider/hooks/use-locale.mjs";
9
- import { useNamespace as D } from "../../config-provider/hooks/use-namespace.mjs";
8
+ import { useGlobalConfig as P } from "../../config-provider/hooks/use-global-config.mjs";
9
+ import { useLocale as W } from "../../config-provider/hooks/use-locale.mjs";
10
+ import { useNamespace as q } from "../../config-provider/hooks/use-namespace.mjs";
10
11
  const X = /* @__PURE__ */ T({
11
12
  name: "BasicFormAction",
12
13
  __name: "form-action",
@@ -23,75 +24,76 @@ const X = /* @__PURE__ */ T({
23
24
  hideAdvanceBtn: { type: Boolean }
24
25
  },
25
26
  emits: ["toggle-advanced"],
26
- setup(h, { emit: O }) {
27
- const r = h, b = O, { t: n } = q(), { em: c } = D("form-action"), { resetAction: k, submitAction: w } = P(), f = u(() => {
28
- const { showAdvancedButton: t, actionSpan: A, actionColOptions: x } = r, g = 24 - A, N = t ? { span: g < 6 ? 24 : g } : {};
27
+ setup(h, { emit: C }) {
28
+ const u = h, b = C, O = P("uiMode"), k = s(() => O.value === "aplus" ? {} : {
29
+ color: "#34b77c"
30
+ }), { t: n } = W(), { em: c } = q("form-action"), { resetAction: w, submitAction: x } = j(), B = s(() => {
31
+ const { actionColOptions: t } = u;
29
32
  return {
30
- style: { textAlign: "right" },
31
- span: t ? 6 : 4,
32
- ...N,
33
- ...x
33
+ style: { textAlign: "right", flex: 1, maxWidth: "100%", minWidth: "25%" },
34
+ ...t
34
35
  };
35
- }), v = u(() => Object.assign(
36
+ }), y = s(() => Object.assign(
36
37
  {
37
38
  text: n("ap.common.resetText")
38
39
  },
39
- r.resetButtonOptions
40
- )), y = u(() => Object.assign(
40
+ u.resetButtonOptions
41
+ )), v = s(() => Object.assign(
41
42
  {
42
43
  text: n("ap.common.queryText")
43
44
  },
44
- r.submitButtonOptions
45
+ u.submitButtonOptions
45
46
  ));
46
47
  function S() {
47
48
  b("toggle-advanced");
48
49
  }
49
- return (t, A) => t.showActionButtonGroup ? (a(), s(e(F), z(p({ key: 0 }, f.value)), {
50
+ return (t, N) => t.showActionButtonGroup ? (a(), l(e(F), z(m({ key: 0 }, B.value)), {
50
51
  default: o(() => [
51
52
  V("div", {
52
- style: $([{ width: "100%" }, { textAlign: f.value.style.textAlign }])
53
+ style: A([{ width: "100%" }, { textAlign: B.value.style.textAlign }])
53
54
  }, [
54
- C(e(R).Item, null, {
55
+ g(e(G).Item, null, {
55
56
  default: o(() => [
56
57
  i(t.$slots, "resetBefore"),
57
- t.showResetButton ? (a(), s(e(B), p({
58
+ t.showResetButton ? (a(), l(e(f), m({
58
59
  key: 0,
59
60
  type: "default",
60
61
  class: e(c)("button", "space")
61
- }, v.value, { onClick: e(k) }), {
62
+ }, y.value, { onClick: e(w) }), {
62
63
  default: o(() => [
63
- m(d(v.value.text), 1)
64
+ p(d(y.value.text), 1)
64
65
  ]),
65
66
  _: 1
66
- }, 16, ["class", "onClick"])) : l("", !0),
67
+ }, 16, ["class", "onClick"])) : r("", !0),
67
68
  i(t.$slots, "submitBefore"),
68
- t.showSubmitButton ? (a(), s(e(B), p({
69
+ t.showSubmitButton ? (a(), l(e(f), m({
69
70
  key: 1,
70
71
  type: "primary",
71
72
  class: e(c)("button", "space")
72
- }, y.value, { onClick: e(w) }), {
73
+ }, v.value, { onClick: e(x) }), {
73
74
  default: o(() => [
74
- m(d(y.value.text), 1)
75
+ p(d(v.value.text), 1)
75
76
  ]),
76
77
  _: 1
77
- }, 16, ["class", "onClick"])) : l("", !0),
78
+ }, 16, ["class", "onClick"])) : r("", !0),
78
79
  i(t.$slots, "advanceBefore"),
79
- t.showAdvancedButton && !t.hideAdvanceBtn ? (a(), s(e(B), {
80
+ t.showAdvancedButton && !t.hideAdvanceBtn ? (a(), l(e(f), {
80
81
  key: 2,
81
82
  type: "link",
82
83
  size: "small",
84
+ style: A(k.value),
83
85
  onClick: S
84
86
  }, {
85
87
  default: o(() => [
86
- m(d(t.isAdvanced ? e(n)("ap.common.closeText") : e(n)("ap.common.expandText")) + " ", 1),
87
- C(e(G), {
88
- class: j(e(c)("item", "space")),
88
+ p(d(t.isAdvanced ? e(n)("ap.common.closeText") : e(n)("ap.common.expandText")) + " ", 1),
89
+ g(e(R), {
90
+ class: $(e(c)("item", "space")),
89
91
  expand: !t.isAdvanced,
90
92
  up: ""
91
93
  }, null, 8, ["class", "expand"])
92
94
  ]),
93
95
  _: 1
94
- })) : l("", !0),
96
+ }, 8, ["style"])) : r("", !0),
95
97
  i(t.$slots, "advanceAfter")
96
98
  ]),
97
99
  _: 3
@@ -99,7 +101,7 @@ const X = /* @__PURE__ */ T({
99
101
  ], 4)
100
102
  ]),
101
103
  _: 3
102
- }, 16)) : l("", !0);
104
+ }, 16)) : r("", !0);
103
105
  }
104
106
  });
105
107
  export {
@@ -1,79 +1,79 @@
1
- import { getCurrentInstance as X, computed as g, unref as d, watch as F, shallowReactive as N } from "vue";
2
- import { isNumber as U, isObject as _, isBoolean as j, isFunction as k } from "lodash-unified";
1
+ import { getCurrentInstance as N, computed as T, unref as d, watch as X, shallowReactive as g } from "vue";
2
+ import { isNumber as F, isObject as U, isBoolean as j, isFunction as k } from "lodash-unified";
3
3
  import { useDebounceFn as D } from "@vueuse/core";
4
4
  import { useBreakpoint as G, ScreenEnum as A } from "./use-break-point.mjs";
5
- const o = 24;
6
- function H({
7
- advanceState: e,
8
- emit: x,
9
- getProps: t,
10
- getSchema: l,
11
- formModel: h,
12
- defaultValueRef: B
5
+ const f = 24, l = 18;
6
+ function J({
7
+ advanceState: s,
8
+ emit: B,
9
+ getProps: o,
10
+ getSchema: h,
11
+ formModel: v,
12
+ defaultValueRef: b
13
13
  }) {
14
- const p = X(), { screenRef: b, realWidthRef: v } = G(), y = g(() => {
15
- if (!e.isAdvanced)
14
+ const p = N(), { screenRef: y, realWidthRef: L } = G(), E = T(() => {
15
+ if (!s.isAdvanced)
16
16
  return 0;
17
- const n = d(t).emptySpan || 0;
18
- if (U(n))
17
+ const n = d(o).emptySpan || 0;
18
+ if (F(n))
19
19
  return n;
20
- if (_(n)) {
21
- const { span: s = 0 } = n, f = d(b);
22
- return n[f.toLowerCase()] || s || 0;
20
+ if (U(n)) {
21
+ const { span: e = 0 } = n, t = d(y);
22
+ return n[t.toLowerCase()] || e || 0;
23
23
  }
24
24
  return 0;
25
- }), W = D(E, 30);
26
- F(
25
+ }), R = D(W, 30);
26
+ X(
27
27
  [
28
- () => d(l),
29
- () => e.isAdvanced,
30
- () => d(v)
28
+ () => d(h),
29
+ () => s.isAdvanced,
30
+ () => d(L)
31
31
  ],
32
32
  () => {
33
- const { showAdvancedButton: n } = d(t);
34
- n && W();
33
+ const { showAdvancedButton: n } = d(o);
34
+ n && R();
35
35
  },
36
36
  { immediate: !0 }
37
37
  );
38
- function I(n, s = 0, f = !1) {
39
- const c = d(v), i = parseInt(n.md) || parseInt(n.xs) || parseInt(n.sm) || n.span || o, r = parseInt(n.lg) || i, a = parseInt(n.xl) || r, u = parseInt(n.xxl) || a;
40
- return c <= A.LG ? s += i : c < A.XL ? s += r : c < A.XXL ? s += a : s += u, f ? (e.hideAdvanceBtn = !1, s <= o * 2 ? (e.hideAdvanceBtn = !0, e.isAdvanced = !0) : s > o * 2 && s <= o * (d(t).autoAdvancedLine || 3) ? e.hideAdvanceBtn = !1 : e.isLoad || (e.isLoad = !0, e.isAdvanced = !e.isAdvanced), { isAdvanced: e.isAdvanced, itemColSum: s }) : s > o * (d(t).alwaysShowLines || 1) ? { isAdvanced: e.isAdvanced, itemColSum: s } : { isAdvanced: !0, itemColSum: s };
38
+ function I(n, e = 0, t = !1) {
39
+ const c = d(L), i = parseInt(n.md) || parseInt(n.xs) || parseInt(n.sm) || n.span || f, r = parseInt(n.lg) || i, a = parseInt(n.xl) || r, u = parseInt(n.xxl) || a;
40
+ return c <= A.LG ? e += i : c < A.XL ? e += r : c < A.XXL ? e += a : e += u, t ? (s.hideAdvanceBtn = !1, e <= f + l ? (s.hideAdvanceBtn = !0, s.isAdvanced = !0) : e > f + l && e <= f * (d(o).autoAdvancedLine || 3) ? s.hideAdvanceBtn = !1 : s.isLoad || (s.isLoad = !0, s.isAdvanced = !0), { isAdvanced: s.isAdvanced, itemColSum: e }) : e > l * (d(o).alwaysShowLines || 1) ? { isAdvanced: s.isAdvanced, itemColSum: e } : { isAdvanced: !0, itemColSum: e };
41
41
  }
42
- const L = N({});
43
- function E() {
42
+ const w = g({});
43
+ function W() {
44
44
  var c;
45
- let n = 0, s = 0;
46
- const { baseColProps: f = {} } = d(t);
47
- for (const i of d(l)) {
45
+ let n = 0, e = 0;
46
+ const { baseColProps: t = {} } = d(o);
47
+ for (const i of d(h)) {
48
48
  const { show: r, colProps: a } = i;
49
49
  let u = !0;
50
50
  if (j(r) && (u = r), k(r) && (u = r({
51
51
  schema: i,
52
- model: h,
52
+ model: v,
53
53
  field: i.field,
54
54
  values: {
55
- ...d(B),
56
- ...h
55
+ ...d(b),
56
+ ...v
57
57
  }
58
- })), u && (a || f)) {
59
- const { itemColSum: R, isAdvanced: w } = I(
60
- { ...f, ...a },
58
+ })), u && (a || t)) {
59
+ const { itemColSum: _, isAdvanced: x } = I(
60
+ { ...t, ...a },
61
61
  n
62
62
  );
63
- n = R || 0, w && (s = n), L[i.field] = w;
63
+ n = _ || 0, x && (e = n), w[i.field] = x;
64
64
  }
65
65
  }
66
- (c = p == null ? void 0 : p.proxy) == null || c.$forceUpdate(), e.actionSpan = s % o + d(y), I(
67
- d(t).actionColOptions || { span: o },
66
+ (c = p == null ? void 0 : p.proxy) == null || c.$forceUpdate(), s.actionSpan = e % f + d(E), I(
67
+ d(o).actionColOptions || { span: f },
68
68
  n,
69
69
  !0
70
- ), x("advanced-change");
70
+ ), B("advanced-change");
71
71
  }
72
72
  function O() {
73
- e.isAdvanced = !e.isAdvanced;
73
+ s.isAdvanced = !s.isAdvanced;
74
74
  }
75
- return { handleToggleAdvanced: O, fieldsIsAdvancedMap: L };
75
+ return { handleToggleAdvanced: O, fieldsIsAdvancedMap: w };
76
76
  }
77
77
  export {
78
- H as default
78
+ J as default
79
79
  };
@@ -16,6 +16,9 @@
16
16
  border-radius: 2px;
17
17
  background-color: #fff;
18
18
  }
19
+ .aplus-pro-table-form-container .ant-form .ant-form-item {
20
+ margin-bottom: 16px;
21
+ }
19
22
  .aplus-pro-table-form-container-no-divide .ant-form {
20
23
  border-bottom-left-radius: 0 !important;
21
24
  border-bottom-right-radius: 0 !important;