@aplus-frontend/ui 7.13.12 → 7.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/index.mjs +58 -56
- package/es/src/ap-field/text/index.vue2.mjs +2 -2
- package/es/src/ap-field/text/password.vue.mjs +8 -8
- package/es/src/ap-form/ap-form.vue.d.ts +1 -0
- package/es/src/ap-form/ap-form.vue2.mjs +122 -106
- package/es/src/ap-form/drawer-form/index.vue.d.ts +4 -0
- package/es/src/ap-form/drawer-form/index.vue.mjs +13 -10
- package/es/src/ap-form/interface.d.ts +5 -0
- package/es/src/ap-form/item/index.vue.d.ts +1 -0
- package/es/src/ap-form/item/index.vue.mjs +84 -70
- package/es/src/ap-form/items/checkbox/index.vue.mjs +9 -8
- package/es/src/ap-form/items/date/index.vue.mjs +10 -9
- package/es/src/ap-form/items/date-range/index.vue.mjs +10 -9
- package/es/src/ap-form/items/number/index.vue.mjs +7 -6
- package/es/src/ap-form/items/radio/index.vue.mjs +9 -8
- package/es/src/ap-form/items/select/index.vue.mjs +3 -2
- package/es/src/ap-form/items/switch/index.vue.mjs +10 -9
- package/es/src/ap-form/items/text/index.vue2.mjs +6 -5
- package/es/src/ap-form/items/text/password.vue.mjs +10 -9
- package/es/src/ap-form/items/text-area/index.vue.mjs +4 -3
- package/es/src/ap-form/items/tree-select/index.vue.mjs +1 -0
- package/es/src/ap-form/modal-form/index.vue.d.ts +4 -0
- package/es/src/ap-form/modal-form/index.vue.mjs +3 -0
- package/es/src/ap-form/render/item.vue.mjs +6 -5
- package/es/src/ap-form/search-form/index.vue.d.ts +4 -0
- package/es/src/ap-form/search-form/index.vue.mjs +26 -23
- package/es/src/ap-table/ap-table.vue2.mjs +2 -2
- package/es/src/ap-table/components/setting/index.d.ts +2 -0
- package/es/src/ap-table/components/setting/index.mjs +5 -0
- package/es/src/ap-table/components/setting/modal/index.vue.mjs +277 -2
- package/es/src/ap-table/components/setting/modal/index.vue2.mjs +2 -273
- package/es/src/ap-table/components/setting/select-group/index.vue2.mjs +11 -8
- package/es/src/ap-table/components/setting/template/edit-form.vue.d.ts +2 -0
- package/es/src/ap-table/components/setting/template/item.vue2.mjs +35 -35
- package/es/src/ap-table/hooks/use-table-template-storage.mjs +55 -54
- package/es/src/ap-table/index.d.ts +2 -2
- package/es/src/ap-table/index.mjs +7 -6
- package/es/src/ap-table/interface.d.ts +16 -0
- package/es/src/business/ap-image/ApImage.vue2.mjs +32 -32
- package/es/src/business/ap-image/style/index.mjs +9 -8
- package/es/src/business/ap-size-input/form-item.vue.mjs +6 -5
- package/es/src/business/ap-view/components/main-button-content.vue.d.ts +2 -0
- package/es/src/business/ap-view/components/menu-list-content.vue.d.ts +2 -0
- package/es/src/business/batch-input-group/form-item.vue.mjs +8 -7
- package/es/src/index.mjs +54 -52
- package/es/src/locale/lang/en.mjs +1 -0
- package/es/src/locale/lang/zh-cn.mjs +1 -0
- package/es/src/render/render.d.ts +7 -4
- package/es/src/render/render.mjs +17 -7
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/index.js +1 -1
- package/lib/src/ap-field/text/index.vue2.js +1 -1
- package/lib/src/ap-field/text/password.vue.js +1 -1
- package/lib/src/ap-form/ap-form.vue.d.ts +1 -0
- package/lib/src/ap-form/ap-form.vue2.js +1 -1
- package/lib/src/ap-form/drawer-form/index.vue.d.ts +4 -0
- package/lib/src/ap-form/drawer-form/index.vue.js +1 -1
- package/lib/src/ap-form/interface.d.ts +5 -0
- package/lib/src/ap-form/item/index.vue.d.ts +1 -0
- package/lib/src/ap-form/item/index.vue.js +1 -1
- package/lib/src/ap-form/items/checkbox/index.vue.js +1 -1
- package/lib/src/ap-form/items/date/index.vue.js +1 -1
- package/lib/src/ap-form/items/date-range/index.vue.js +1 -1
- package/lib/src/ap-form/items/number/index.vue.js +1 -1
- package/lib/src/ap-form/items/radio/index.vue.js +1 -1
- package/lib/src/ap-form/items/select/index.vue.js +1 -1
- package/lib/src/ap-form/items/switch/index.vue.js +1 -1
- package/lib/src/ap-form/items/text/index.vue2.js +1 -1
- package/lib/src/ap-form/items/text/password.vue.js +1 -1
- package/lib/src/ap-form/items/text-area/index.vue.js +1 -1
- package/lib/src/ap-form/items/tree-select/index.vue.js +1 -1
- package/lib/src/ap-form/modal-form/index.vue.d.ts +4 -0
- package/lib/src/ap-form/modal-form/index.vue.js +1 -1
- package/lib/src/ap-form/render/item.vue.js +1 -1
- package/lib/src/ap-form/search-form/index.vue.d.ts +4 -0
- package/lib/src/ap-form/search-form/index.vue.js +1 -1
- package/lib/src/ap-table/ap-table.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/index.d.ts +2 -0
- package/lib/src/ap-table/components/setting/index.js +1 -0
- package/lib/src/ap-table/components/setting/modal/index.vue.js +1 -1
- package/lib/src/ap-table/components/setting/modal/index.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/select-group/index.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/template/edit-form.vue.d.ts +2 -0
- package/lib/src/ap-table/components/setting/template/item.vue2.js +1 -1
- package/lib/src/ap-table/hooks/use-table-template-storage.js +1 -1
- package/lib/src/ap-table/index.d.ts +2 -2
- package/lib/src/ap-table/index.js +1 -1
- package/lib/src/ap-table/interface.d.ts +16 -0
- package/lib/src/business/ap-image/ApImage.vue2.js +1 -1
- package/lib/src/business/ap-image/style/index.js +1 -1
- package/lib/src/business/ap-size-input/form-item.vue.js +1 -1
- package/lib/src/business/ap-view/components/main-button-content.vue.d.ts +2 -0
- package/lib/src/business/ap-view/components/menu-list-content.vue.d.ts +2 -0
- package/lib/src/business/batch-input-group/form-item.vue.js +1 -1
- package/lib/src/index.js +1 -1
- package/lib/src/locale/lang/en.js +1 -1
- package/lib/src/locale/lang/zh-cn.js +1 -1
- package/lib/src/render/render.d.ts +7 -4
- package/lib/src/render/render.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +3 -3
|
@@ -9,8 +9,8 @@ import "../ap-form.vue.mjs";
|
|
|
9
9
|
import he from "../style/drawer-form.mjs";
|
|
10
10
|
import { useControllableValue as ve } from "../../hooks/useControllableValue.mjs";
|
|
11
11
|
import { useLocale as be } from "../../config-provider/hooks/use-locale.mjs";
|
|
12
|
-
import { useNamespace as
|
|
13
|
-
import
|
|
12
|
+
import { useNamespace as Fe } from "../../config-provider/hooks/use-namespace.mjs";
|
|
13
|
+
import ge from "../ap-form.vue2.mjs";
|
|
14
14
|
function L(r) {
|
|
15
15
|
return typeof r == "function" || Object.prototype.toString.call(r) === "[object Object]" && !Q(r);
|
|
16
16
|
}
|
|
@@ -67,6 +67,9 @@ const De = /* @__PURE__ */ Y({
|
|
|
67
67
|
syncToUrlPriority: {
|
|
68
68
|
type: Boolean
|
|
69
69
|
},
|
|
70
|
+
autoFocusFirstInput: {
|
|
71
|
+
type: Boolean
|
|
72
|
+
},
|
|
70
73
|
open: {
|
|
71
74
|
type: Boolean,
|
|
72
75
|
default: void 0
|
|
@@ -122,12 +125,12 @@ const De = /* @__PURE__ */ Y({
|
|
|
122
125
|
resizeOnOpen: me(t.resize?.resizeOnOpen) ? e.onResize : t.resize.resizeOnOpen
|
|
123
126
|
};
|
|
124
127
|
}), u = y(T()), {
|
|
125
|
-
t:
|
|
128
|
+
t: F
|
|
126
129
|
} = be(), D = he("ap-form-drawer-form"), {
|
|
127
130
|
b: $,
|
|
128
131
|
e: q,
|
|
129
132
|
em: V
|
|
130
|
-
} =
|
|
133
|
+
} = Fe("ap-form-drawer-form"), A = w(() => [q("resize-bar"), {
|
|
131
134
|
[V("resize-bar", "min-disabled")]: n(u) === n(l).minWidth
|
|
132
135
|
}, {
|
|
133
136
|
[V("resize-bar", "max-disabled")]: n(u) === n(l).maxWidth
|
|
@@ -154,7 +157,7 @@ const De = /* @__PURE__ */ Y({
|
|
|
154
157
|
e.push(s(z, {
|
|
155
158
|
onClick: k,
|
|
156
159
|
disabled: a.value
|
|
157
|
-
}, L(i =
|
|
160
|
+
}, L(i = F("ap.common.cancelText")) ? i : {
|
|
158
161
|
default: () => [i]
|
|
159
162
|
}));
|
|
160
163
|
}
|
|
@@ -163,7 +166,7 @@ const De = /* @__PURE__ */ Y({
|
|
|
163
166
|
disabled: a.value,
|
|
164
167
|
onClick: H
|
|
165
168
|
}), {
|
|
166
|
-
default: () => [t.submitter?.resetText ||
|
|
169
|
+
default: () => [t.submitter?.resetText || F("ap.common.resetText")]
|
|
167
170
|
})), t.submitter?.submitButtonProps !== !1 && e.push(s(z, p({
|
|
168
171
|
type: "primary",
|
|
169
172
|
key: "submit"
|
|
@@ -171,7 +174,7 @@ const De = /* @__PURE__ */ Y({
|
|
|
171
174
|
loading: a.value,
|
|
172
175
|
onClick: J
|
|
173
176
|
}), {
|
|
174
|
-
default: () => [t.submitter?.submitText ||
|
|
177
|
+
default: () => [t.submitter?.submitText || F("ap.common.okText")]
|
|
175
178
|
})), s(le, {
|
|
176
179
|
justify: "flex-end"
|
|
177
180
|
}, {
|
|
@@ -185,8 +188,8 @@ const De = /* @__PURE__ */ Y({
|
|
|
185
188
|
}
|
|
186
189
|
function B(e) {
|
|
187
190
|
const i = n(l), c = (document.body.offsetWidth || 1e3) - (e.clientX - document.body.offsetLeft), f = i?.minWidth ?? (t.width || 800), O = i?.maxWidth ?? window.innerWidth * 0.8;
|
|
188
|
-
let
|
|
189
|
-
c < f && (
|
|
191
|
+
let g = c;
|
|
192
|
+
c < f && (g = f), c > O && (g = O), u.value = g;
|
|
190
193
|
}
|
|
191
194
|
function x() {
|
|
192
195
|
document.removeEventListener("mousemove", B), document.removeEventListener("mouseup", x);
|
|
@@ -252,7 +255,7 @@ const De = /* @__PURE__ */ Y({
|
|
|
252
255
|
}), {
|
|
253
256
|
title: v(() => [_(e.$slots, "title", {}, () => [ae(se(t.title), 1)])]),
|
|
254
257
|
footer: v(() => [(h(), S(I(X.value)))]),
|
|
255
|
-
default: v(() => [s(
|
|
258
|
+
default: v(() => [s(ge, p({
|
|
256
259
|
ref_key: "formRef",
|
|
257
260
|
ref: o
|
|
258
261
|
}, n(ce)(t, ["drawerProps", "open", "onUpdate:open", "title", "width", "onFinish", "submitter"])), {
|
|
@@ -50,6 +50,7 @@ export type ApFormItemProps = FormItemProps & Partial<ApFormColProps> & {
|
|
|
50
50
|
* 是否禁用,禁用时将会有特殊样式,配合bordered=true使用生效
|
|
51
51
|
*/
|
|
52
52
|
disabled?: boolean;
|
|
53
|
+
autoFocus?: boolean;
|
|
53
54
|
};
|
|
54
55
|
export type ApFormItemGroupProps = RowProps & {
|
|
55
56
|
countPerRow?: number;
|
|
@@ -72,6 +73,10 @@ export type ApFormProps = Omit<FormProps, 'model' | 'onValuesChange'> & {
|
|
|
72
73
|
* syncToUrl和initialValues合并是否优先,默认为false
|
|
73
74
|
*/
|
|
74
75
|
syncToUrlPriority?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* 是否自动聚焦第一个控件(仅支持聚焦的控件)
|
|
78
|
+
*/
|
|
79
|
+
autoFocusFirstInput?: boolean;
|
|
75
80
|
};
|
|
76
81
|
export type WatchFunc = (values?: Recordable) => void;
|
|
77
82
|
export type UpdateModelOptimizeFn = (currentModelValue: any, name: string | number) => void;
|
|
@@ -802,6 +802,7 @@ declare const __VLS_component: DefineComponent<ApFormItemProps, {
|
|
|
802
802
|
hasFeedback: boolean;
|
|
803
803
|
autoLink: boolean;
|
|
804
804
|
validateFirst: boolean;
|
|
805
|
+
autoFocus: boolean;
|
|
805
806
|
valuePropName: string;
|
|
806
807
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
807
808
|
formItemRef: ({
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import { defineComponent as L, useSlots as _, ref as
|
|
2
|
-
import { QuestionCircleOutlined as
|
|
3
|
-
import { Form as
|
|
4
|
-
import { useToken as
|
|
5
|
-
import { isFunction as
|
|
6
|
-
import
|
|
1
|
+
import { defineComponent as L, useSlots as _, ref as $, shallowRef as j, onMounted as D, computed as E, unref as r, cloneVNode as M, createBlock as O, openBlock as q, mergeProps as K, createSlots as Q, withCtx as n, createVNode as u, renderSlot as c, renderList as U, createElementVNode as Y, normalizeClass as G, normalizeStyle as H, normalizeProps as J, guardReactiveProps as W } from "vue";
|
|
2
|
+
import { QuestionCircleOutlined as X } from "@ant-design/icons-vue";
|
|
3
|
+
import { Form as Z, Tooltip as ee, TypographyText as oe } from "@aplus-frontend/antdv";
|
|
4
|
+
import { useToken as te } from "@aplus-frontend/antdv/es/theme/internal";
|
|
5
|
+
import { isFunction as y, cloneDeep as re, isArray as le, omit as b } from "lodash-unified";
|
|
6
|
+
import "../../render/index.mjs";
|
|
7
|
+
import { isPromise as ae } from "../../utils/is.mjs";
|
|
7
8
|
import "../../config-provider/index.mjs";
|
|
8
|
-
import { getValidVNodeList as
|
|
9
|
-
import { apFormItemColPropKeys as
|
|
10
|
-
import { useInjectForm as
|
|
11
|
-
import
|
|
12
|
-
import { useNamespace as
|
|
13
|
-
|
|
9
|
+
import { getValidVNodeList as ne } from "../../utils/slot.mjs";
|
|
10
|
+
import { apFormItemColPropKeys as ie } from "../constant.mjs";
|
|
11
|
+
import { useInjectForm as se } from "../context.mjs";
|
|
12
|
+
import ue from "../style/item.mjs";
|
|
13
|
+
import { useNamespace as de } from "../../config-provider/hooks/use-namespace.mjs";
|
|
14
|
+
import fe from "../../render/render.mjs";
|
|
15
|
+
const Ne = /* @__PURE__ */ L({
|
|
14
16
|
name: "ApFormItem",
|
|
15
17
|
__name: "index",
|
|
16
18
|
props: {
|
|
@@ -55,113 +57,125 @@ const ke = /* @__PURE__ */ L({
|
|
|
55
57
|
transform: {},
|
|
56
58
|
description: {},
|
|
57
59
|
customFilled: {},
|
|
58
|
-
disabled: { type: Boolean }
|
|
60
|
+
disabled: { type: Boolean },
|
|
61
|
+
autoFocus: { type: Boolean, default: void 0 }
|
|
59
62
|
},
|
|
60
|
-
setup(
|
|
61
|
-
const o =
|
|
62
|
-
|
|
63
|
-
let e =
|
|
64
|
-
|
|
63
|
+
setup(v, { expose: F }) {
|
|
64
|
+
const o = v, V = _(), { model: p, updateModel: h, internalInstance: g } = se(), { m: d, b: B } = de("ap-form-item"), k = ue("ap-form-item"), f = $(!1), i = j(), [, C] = te();
|
|
65
|
+
D(async () => {
|
|
66
|
+
let e = y(o.initialValue) ? o.initialValue() : o.initialValue;
|
|
67
|
+
ae(e) && (e = await e), g?.registerField({
|
|
65
68
|
name: o.name,
|
|
66
|
-
initialValue:
|
|
69
|
+
initialValue: re(e),
|
|
67
70
|
transform: o.transform
|
|
68
71
|
});
|
|
69
72
|
});
|
|
70
|
-
const
|
|
71
|
-
function
|
|
73
|
+
const m = E(() => o.name ? le(o.name) ? o.name.reduce((e, t) => e?.[t], r(p)) : p?.value[o.name] : null);
|
|
74
|
+
function P(e, t) {
|
|
72
75
|
const l = Object.keys(t), a = { ...t };
|
|
73
76
|
return l.forEach((s) => {
|
|
74
77
|
s in e || delete a[s];
|
|
75
78
|
}), a;
|
|
76
79
|
}
|
|
77
|
-
function N() {
|
|
78
|
-
const e = m.default?.() || [];
|
|
80
|
+
function N(e) {
|
|
79
81
|
if (!o.name)
|
|
80
82
|
return e[0];
|
|
81
|
-
const t =
|
|
83
|
+
const t = ne(e)[0];
|
|
82
84
|
if (!t)
|
|
83
85
|
return null;
|
|
84
86
|
const l = t?.type?.props ?? {}, a = {
|
|
87
|
+
autofocus: o.autoFocus ?? t?.props?.autofocus,
|
|
85
88
|
variant: o.bordered ? "borderless" : t?.props?.variant,
|
|
86
89
|
bordered: o.bordered ? !1 : t?.props?.bordered,
|
|
87
|
-
onFocus:
|
|
88
|
-
onBlur:
|
|
90
|
+
onFocus: I,
|
|
91
|
+
onBlur: S
|
|
89
92
|
};
|
|
90
|
-
return
|
|
91
|
-
...
|
|
92
|
-
[o.valuePropName]: r(
|
|
93
|
-
[`onUpdate:${o.valuePropName}`]:
|
|
93
|
+
return M(t, {
|
|
94
|
+
...P(l, a),
|
|
95
|
+
[o.valuePropName]: r(m),
|
|
96
|
+
[`onUpdate:${o.valuePropName}`]: x
|
|
94
97
|
});
|
|
95
98
|
}
|
|
96
|
-
function
|
|
97
|
-
|
|
99
|
+
function x(e) {
|
|
100
|
+
h?.(o.name, e);
|
|
101
|
+
}
|
|
102
|
+
function I() {
|
|
103
|
+
f.value = !0;
|
|
98
104
|
}
|
|
99
105
|
function S() {
|
|
100
|
-
|
|
106
|
+
f.value = !1;
|
|
101
107
|
}
|
|
102
108
|
function T() {
|
|
103
|
-
|
|
109
|
+
i.value?.onFieldBlur();
|
|
104
110
|
}
|
|
105
111
|
function w() {
|
|
106
|
-
|
|
112
|
+
i.value?.onFieldChange();
|
|
107
113
|
}
|
|
108
114
|
function R() {
|
|
109
|
-
|
|
115
|
+
i.value?.clearValidate();
|
|
110
116
|
}
|
|
111
117
|
function z() {
|
|
112
|
-
|
|
113
|
-
}
|
|
114
|
-
function A() {
|
|
115
|
-
n.value?.resetField();
|
|
118
|
+
i.value?.resetField();
|
|
116
119
|
}
|
|
117
|
-
function
|
|
118
|
-
const t = r(
|
|
120
|
+
function A(e = !1) {
|
|
121
|
+
const t = r(m);
|
|
119
122
|
if (!e || !o.transform)
|
|
120
123
|
return t;
|
|
121
|
-
const l =
|
|
124
|
+
const l = y(o.transform) ? o.transform : o.transform.transformer;
|
|
122
125
|
return o.transform ? l(t) : t;
|
|
123
126
|
}
|
|
124
|
-
return
|
|
125
|
-
onFieldBlur:
|
|
126
|
-
onFieldChange:
|
|
127
|
-
clearValidate:
|
|
128
|
-
resetField:
|
|
129
|
-
getFieldValue:
|
|
130
|
-
}), (e, t) => (
|
|
127
|
+
return F({
|
|
128
|
+
onFieldBlur: T,
|
|
129
|
+
onFieldChange: w,
|
|
130
|
+
clearValidate: R,
|
|
131
|
+
resetField: z,
|
|
132
|
+
getFieldValue: A
|
|
133
|
+
}), (e, t) => (q(), O(r(Z).Item, K(
|
|
131
134
|
{
|
|
132
135
|
ref_key: "formItemRef",
|
|
133
|
-
ref:
|
|
136
|
+
ref: i
|
|
134
137
|
},
|
|
135
|
-
r(
|
|
138
|
+
r(b)(o, [
|
|
139
|
+
...r(ie),
|
|
140
|
+
"tooltip",
|
|
141
|
+
"label",
|
|
142
|
+
"description",
|
|
143
|
+
"autoFocus"
|
|
144
|
+
]),
|
|
136
145
|
{
|
|
137
146
|
class: {
|
|
138
|
-
[r(
|
|
139
|
-
[r(
|
|
140
|
-
[r(
|
|
141
|
-
[r(
|
|
147
|
+
[r(d)("bordered")]: e.bordered,
|
|
148
|
+
[r(d)("focused")]: e.bordered && f.value,
|
|
149
|
+
[r(d)("disabled")]: e.bordered && e.disabled,
|
|
150
|
+
[r(B)()]: !0,
|
|
142
151
|
[r(k)]: !0
|
|
143
152
|
},
|
|
144
153
|
colon: e.bordered ? !1 : o.colon
|
|
145
154
|
}
|
|
146
|
-
),
|
|
147
|
-
default:
|
|
148
|
-
(
|
|
155
|
+
), Q({
|
|
156
|
+
default: n(() => [
|
|
157
|
+
u(r(fe), { renderer: N }, {
|
|
158
|
+
default: n(() => [
|
|
159
|
+
c(e.$slots, "default")
|
|
160
|
+
]),
|
|
161
|
+
_: 3
|
|
162
|
+
})
|
|
149
163
|
]),
|
|
150
164
|
_: 2
|
|
151
165
|
}, [
|
|
152
166
|
o.tooltip ? {
|
|
153
167
|
name: "tooltip",
|
|
154
|
-
fn:
|
|
168
|
+
fn: n(({ class: l }) => [
|
|
155
169
|
Y("span", {
|
|
156
170
|
class: G(l)
|
|
157
171
|
}, [
|
|
158
|
-
|
|
172
|
+
u(r(ee), {
|
|
159
173
|
title: o.tooltip
|
|
160
174
|
}, {
|
|
161
|
-
default:
|
|
162
|
-
|
|
175
|
+
default: n(() => [
|
|
176
|
+
u(r(X), {
|
|
163
177
|
style: H({
|
|
164
|
-
color: r(
|
|
178
|
+
color: r(C).colorTextTertiary,
|
|
165
179
|
fontSize: "14px",
|
|
166
180
|
transform: "translateY(1px)"
|
|
167
181
|
})
|
|
@@ -175,8 +189,8 @@ const ke = /* @__PURE__ */ L({
|
|
|
175
189
|
} : void 0,
|
|
176
190
|
e.label ? {
|
|
177
191
|
name: "label",
|
|
178
|
-
fn:
|
|
179
|
-
|
|
192
|
+
fn: n(() => [
|
|
193
|
+
u(r(oe), {
|
|
180
194
|
content: e.label,
|
|
181
195
|
ellipsis: { tooltip: e.label },
|
|
182
196
|
style: { "min-width": "0px", flex: "1" }
|
|
@@ -184,15 +198,15 @@ const ke = /* @__PURE__ */ L({
|
|
|
184
198
|
]),
|
|
185
199
|
key: "1"
|
|
186
200
|
} : void 0,
|
|
187
|
-
U(r(
|
|
201
|
+
U(r(b)(V, "default"), (l, a) => ({
|
|
188
202
|
name: a,
|
|
189
|
-
fn:
|
|
190
|
-
|
|
203
|
+
fn: n((s) => [
|
|
204
|
+
c(e.$slots, a, J(W(s || {})))
|
|
191
205
|
])
|
|
192
206
|
}))
|
|
193
207
|
]), 1040, ["class", "colon"]));
|
|
194
208
|
}
|
|
195
209
|
});
|
|
196
210
|
export {
|
|
197
|
-
|
|
211
|
+
Ne as default
|
|
198
212
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as u, useSlots as f, createBlock as m, openBlock as c, normalizeProps as a, guardReactiveProps as t, unref as o, createSlots as B, withCtx as r, createVNode as b, mergeProps as y, renderList as _, renderSlot as v } from "vue";
|
|
2
2
|
import { omit as i } from "lodash-unified";
|
|
3
3
|
import "../../../ap-field/index.mjs";
|
|
4
4
|
import "../../item/index.vue2.mjs";
|
|
5
|
-
import
|
|
5
|
+
import x from "../../item/index.vue.mjs";
|
|
6
6
|
import g from "../../../ap-field/checkbox/index.vue.mjs";
|
|
7
|
-
const w = /* @__PURE__ */
|
|
7
|
+
const w = /* @__PURE__ */ u({
|
|
8
8
|
name: "ApFormItemCheckbox",
|
|
9
9
|
__name: "index",
|
|
10
10
|
props: {
|
|
@@ -49,20 +49,21 @@ const w = /* @__PURE__ */ f({
|
|
|
49
49
|
description: {},
|
|
50
50
|
customFilled: {},
|
|
51
51
|
disabled: { type: Boolean, default: void 0 },
|
|
52
|
+
autoFocus: { type: Boolean },
|
|
52
53
|
field: { default: () => ({}) }
|
|
53
54
|
},
|
|
54
55
|
setup(s) {
|
|
55
|
-
const
|
|
56
|
-
return (e, h) => (c(),
|
|
56
|
+
const n = s, d = f();
|
|
57
|
+
return (e, h) => (c(), m(x, a(t(o(i)(n, ["field"]))), B({
|
|
57
58
|
default: r(() => [
|
|
58
|
-
|
|
59
|
+
b(o(g), y({ disabled: e.disabled }, e.field), null, 16, ["disabled"])
|
|
59
60
|
]),
|
|
60
61
|
_: 2
|
|
61
62
|
}, [
|
|
62
|
-
|
|
63
|
+
_(o(i)(d, "default"), (C, l) => ({
|
|
63
64
|
name: l,
|
|
64
65
|
fn: r((p) => [
|
|
65
|
-
|
|
66
|
+
v(e.$slots, l, a(t(p || {})))
|
|
66
67
|
])
|
|
67
68
|
}))
|
|
68
69
|
]), 1040));
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as B, useSlots as h, computed as y, createBlock as v, openBlock as x, normalizeProps as t, guardReactiveProps as a, unref as l, createSlots as s, withCtx as d, createVNode as g, renderList as p, renderSlot as f } from "vue";
|
|
2
2
|
import { isUndefined as F, omit as m, pick as S } from "lodash-unified";
|
|
3
3
|
import "../../../ap-field/date/index.vue2.mjs";
|
|
4
4
|
import { apFormItemSlotNames as u } from "../../constant.mjs";
|
|
5
5
|
import "../../item/index.vue2.mjs";
|
|
6
6
|
import k from "../../item/index.vue.mjs";
|
|
7
7
|
import C from "../../../ap-field/date/index.vue.mjs";
|
|
8
|
-
const L = /* @__PURE__ */
|
|
8
|
+
const L = /* @__PURE__ */ B({
|
|
9
9
|
name: "ApFormItemDate",
|
|
10
10
|
__name: "index",
|
|
11
11
|
props: {
|
|
@@ -51,23 +51,24 @@ const L = /* @__PURE__ */ h({
|
|
|
51
51
|
description: {},
|
|
52
52
|
customFilled: {},
|
|
53
53
|
disabled: { type: Boolean, default: void 0 },
|
|
54
|
+
autoFocus: { type: Boolean },
|
|
54
55
|
field: { default: () => ({}) },
|
|
55
56
|
placeholder: {}
|
|
56
57
|
},
|
|
57
58
|
setup(c) {
|
|
58
|
-
const e = c, i =
|
|
59
|
+
const e = c, i = h(), b = y(() => ({
|
|
59
60
|
placeholder: e.placeholder,
|
|
60
61
|
disabled: e.disabled,
|
|
61
62
|
...e.field,
|
|
62
63
|
bordered: e.bordered ? !1 : F(e.field?.bordered) ? !0 : e.field.bordered
|
|
63
64
|
}));
|
|
64
|
-
return (n, P) => (x(),
|
|
65
|
+
return (n, P) => (x(), v(k, t(a(l(m)(e, ["field", "placeholder"]))), s({
|
|
65
66
|
default: d(() => [
|
|
66
|
-
g(C,
|
|
67
|
+
g(C, t(a(b.value)), s({ _: 2 }, [
|
|
67
68
|
p(l(m)(i, l(u)), (_, o) => ({
|
|
68
69
|
name: o,
|
|
69
|
-
fn: d((
|
|
70
|
-
f(n.$slots, o,
|
|
70
|
+
fn: d((r) => [
|
|
71
|
+
f(n.$slots, o, t(a(r || {})))
|
|
71
72
|
])
|
|
72
73
|
}))
|
|
73
74
|
]), 1040)
|
|
@@ -76,8 +77,8 @@ const L = /* @__PURE__ */ h({
|
|
|
76
77
|
}, [
|
|
77
78
|
p(l(S)(i, l(u)), (_, o) => ({
|
|
78
79
|
name: o,
|
|
79
|
-
fn: d((
|
|
80
|
-
f(n.$slots, o,
|
|
80
|
+
fn: d((r) => [
|
|
81
|
+
f(n.$slots, o, t(a(r || {})))
|
|
81
82
|
])
|
|
82
83
|
}))
|
|
83
84
|
]), 1040));
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as B, useSlots as h, computed as y, createBlock as g, openBlock as v, normalizeProps as a, guardReactiveProps as t, unref as o, createSlots as s, withCtx as d, createVNode as x, renderList as p, renderSlot as f } from "vue";
|
|
2
2
|
import { isUndefined as F, omit as m, pick as S } from "lodash-unified";
|
|
3
3
|
import "../../../ap-field/index.mjs";
|
|
4
4
|
import { apFormItemSlotNames as u } from "../../constant.mjs";
|
|
5
5
|
import "../../item/index.vue2.mjs";
|
|
6
6
|
import k from "../../item/index.vue.mjs";
|
|
7
7
|
import C from "../../../ap-field/date-range/index.vue.mjs";
|
|
8
|
-
const I = /* @__PURE__ */
|
|
8
|
+
const I = /* @__PURE__ */ B({
|
|
9
9
|
name: "ApFormItemDateRange",
|
|
10
10
|
__name: "index",
|
|
11
11
|
props: {
|
|
@@ -51,23 +51,24 @@ const I = /* @__PURE__ */ h({
|
|
|
51
51
|
description: {},
|
|
52
52
|
customFilled: {},
|
|
53
53
|
disabled: { type: Boolean, default: void 0 },
|
|
54
|
+
autoFocus: { type: Boolean },
|
|
54
55
|
field: { default: () => ({}) },
|
|
55
56
|
placeholder: {}
|
|
56
57
|
},
|
|
57
58
|
setup(c) {
|
|
58
|
-
const e = c, n =
|
|
59
|
+
const e = c, n = h(), b = y(() => ({
|
|
59
60
|
placeholder: e.placeholder,
|
|
60
61
|
disabled: e.disabled,
|
|
61
62
|
...e.field,
|
|
62
63
|
bordered: e.bordered ? !1 : F(e.field?.bordered) ? !0 : e.field?.bordered
|
|
63
64
|
}));
|
|
64
|
-
return (i, P) => (
|
|
65
|
+
return (i, P) => (v(), g(k, a(t(o(m)(e, ["field", "placeholder"]))), s({
|
|
65
66
|
default: d(() => [
|
|
66
|
-
x(o(C), a(
|
|
67
|
+
x(o(C), a(t(b.value)), s({ _: 2 }, [
|
|
67
68
|
p(o(m)(n, o(u)), (_, l) => ({
|
|
68
69
|
name: l,
|
|
69
|
-
fn: d((
|
|
70
|
-
f(i.$slots, l, a(r
|
|
70
|
+
fn: d((r) => [
|
|
71
|
+
f(i.$slots, l, a(t(r || {})))
|
|
71
72
|
])
|
|
72
73
|
}))
|
|
73
74
|
]), 1040)
|
|
@@ -76,8 +77,8 @@ const I = /* @__PURE__ */ h({
|
|
|
76
77
|
}, [
|
|
77
78
|
p(o(S)(n, o(u)), (_, l) => ({
|
|
78
79
|
name: l,
|
|
79
|
-
fn: d((
|
|
80
|
-
f(i.$slots, l, a(r
|
|
80
|
+
fn: d((r) => [
|
|
81
|
+
f(i.$slots, l, a(t(r || {})))
|
|
81
82
|
])
|
|
82
83
|
}))
|
|
83
84
|
]), 1040));
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as B, useSlots as v, shallowRef as _, createBlock as g, openBlock as x, normalizeProps as t, guardReactiveProps as s, unref as l, createSlots as d, withCtx as n, createVNode as F, mergeProps as k, renderList as i, renderSlot as u } from "vue";
|
|
2
2
|
import { omit as f, pick as N } from "lodash-unified";
|
|
3
3
|
import "../../../ap-field/number/index.vue2.mjs";
|
|
4
4
|
import { apFormItemSlotNames as m } from "../../constant.mjs";
|
|
5
5
|
import "../../item/index.vue2.mjs";
|
|
6
6
|
import S from "../../item/index.vue.mjs";
|
|
7
7
|
import C from "../../../ap-field/number/index.vue.mjs";
|
|
8
|
-
const T = /* @__PURE__ */
|
|
8
|
+
const T = /* @__PURE__ */ B({
|
|
9
9
|
name: "ApFormItemNumber",
|
|
10
10
|
__name: "index",
|
|
11
11
|
props: {
|
|
@@ -51,11 +51,12 @@ const T = /* @__PURE__ */ y({
|
|
|
51
51
|
description: {},
|
|
52
52
|
customFilled: {},
|
|
53
53
|
disabled: { type: Boolean, default: void 0 },
|
|
54
|
+
autoFocus: { type: Boolean },
|
|
54
55
|
field: { default: () => ({}) },
|
|
55
56
|
placeholder: {}
|
|
56
57
|
},
|
|
57
58
|
setup(c, { expose: b }) {
|
|
58
|
-
const h = c, p =
|
|
59
|
+
const h = c, p = v(), a = _();
|
|
59
60
|
return b({
|
|
60
61
|
focus: () => {
|
|
61
62
|
a.value?.focus();
|
|
@@ -65,13 +66,13 @@ const T = /* @__PURE__ */ y({
|
|
|
65
66
|
}
|
|
66
67
|
}), (e, $) => (x(), g(S, t(s(l(f)(h, ["field", "placeholder"]))), d({
|
|
67
68
|
default: n(() => [
|
|
68
|
-
|
|
69
|
+
F(C, k({
|
|
69
70
|
ref_key: "inputNumberRef",
|
|
70
71
|
ref: a,
|
|
71
72
|
placeholder: e.placeholder,
|
|
72
73
|
disabled: e.disabled
|
|
73
74
|
}, e.field), d({ _: 2 }, [
|
|
74
|
-
i(l(f)(p, l(m)), (
|
|
75
|
+
i(l(f)(p, l(m)), (y, o) => ({
|
|
75
76
|
name: o,
|
|
76
77
|
fn: n((r) => [
|
|
77
78
|
u(e.$slots, o, t(s(r || {})))
|
|
@@ -81,7 +82,7 @@ const T = /* @__PURE__ */ y({
|
|
|
81
82
|
]),
|
|
82
83
|
_: 2
|
|
83
84
|
}, [
|
|
84
|
-
i(l(N)(p, l(m)), (
|
|
85
|
+
i(l(N)(p, l(m)), (y, o) => ({
|
|
85
86
|
name: o,
|
|
86
87
|
fn: n((r) => [
|
|
87
88
|
u(e.$slots, o, t(s(r || {})))
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as f, useSlots as m, shallowRef as c, createBlock as b, openBlock as v, normalizeProps as a, guardReactiveProps as t, unref as r, createSlots as y, withCtx as s, createVNode as B, mergeProps as _, renderList as x, renderSlot as g } from "vue";
|
|
2
2
|
import { omit as h } from "lodash-unified";
|
|
3
3
|
import "../../../ap-field/index.mjs";
|
|
4
4
|
import "../../item/index.vue2.mjs";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
const q = /* @__PURE__ */
|
|
5
|
+
import F from "../../item/index.vue.mjs";
|
|
6
|
+
import k from "../../../ap-field/radio/index.vue.mjs";
|
|
7
|
+
const q = /* @__PURE__ */ f({
|
|
8
8
|
name: "ApFormItemRadio",
|
|
9
9
|
__name: "index",
|
|
10
10
|
props: {
|
|
@@ -49,6 +49,7 @@ const q = /* @__PURE__ */ u({
|
|
|
49
49
|
description: {},
|
|
50
50
|
customFilled: {},
|
|
51
51
|
disabled: { type: Boolean, default: void 0 },
|
|
52
|
+
autoFocus: { type: Boolean },
|
|
52
53
|
field: { default: () => ({}) }
|
|
53
54
|
},
|
|
54
55
|
setup(i, { expose: n }) {
|
|
@@ -60,9 +61,9 @@ const q = /* @__PURE__ */ u({
|
|
|
60
61
|
blur: () => {
|
|
61
62
|
e.value?.blur();
|
|
62
63
|
}
|
|
63
|
-
}), (o, S) => (v(), b(
|
|
64
|
+
}), (o, S) => (v(), b(F, a(t(r(h)(d, ["field"]))), y({
|
|
64
65
|
default: s(() => [
|
|
65
|
-
|
|
66
|
+
B(r(k), _({
|
|
66
67
|
ref_key: "radioRef",
|
|
67
68
|
ref: e,
|
|
68
69
|
disabled: o.disabled
|
|
@@ -72,8 +73,8 @@ const q = /* @__PURE__ */ u({
|
|
|
72
73
|
}, [
|
|
73
74
|
x(p, (P, l) => ({
|
|
74
75
|
name: l,
|
|
75
|
-
fn: s((
|
|
76
|
-
g(o.$slots, l, a(t(
|
|
76
|
+
fn: s((u) => [
|
|
77
|
+
g(o.$slots, l, a(t(u || {})))
|
|
77
78
|
])
|
|
78
79
|
}))
|
|
79
80
|
]), 1040));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as y, useSlots as B, shallowRef as x, computed as g, createBlock as
|
|
1
|
+
import { defineComponent as y, useSlots as B, shallowRef as x, computed as g, createBlock as F, openBlock as S, normalizeProps as a, guardReactiveProps as s, unref as o, createSlots as p, withCtx as d, createVNode as k, mergeProps as C, renderList as u, renderSlot as f } from "vue";
|
|
2
2
|
import { isUndefined as P, omit as c, pick as q } from "lodash-unified";
|
|
3
3
|
import "../../../ap-field/index.mjs";
|
|
4
4
|
import { apFormItemSlotNames as m } from "../../constant.mjs";
|
|
@@ -51,6 +51,7 @@ const E = /* @__PURE__ */ y({
|
|
|
51
51
|
description: {},
|
|
52
52
|
customFilled: {},
|
|
53
53
|
disabled: { type: Boolean, default: void 0 },
|
|
54
|
+
autoFocus: { type: Boolean },
|
|
54
55
|
field: { default: () => ({}) },
|
|
55
56
|
placeholder: {}
|
|
56
57
|
},
|
|
@@ -71,7 +72,7 @@ const E = /* @__PURE__ */ y({
|
|
|
71
72
|
request: () => {
|
|
72
73
|
r.value?.request();
|
|
73
74
|
}
|
|
74
|
-
}), (i, A) => (
|
|
75
|
+
}), (i, A) => (S(), F(R, a(s(o(c)(e, ["field", "placeholder"]))), p({
|
|
75
76
|
default: d(() => [
|
|
76
77
|
k(o($), C(v.value, {
|
|
77
78
|
ref_key: "selectRef",
|