@qin-ui/antd-vue-pro 2.1.5 → 2.1.7
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/antd-vue-pro.css
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
.pro-table_search-form[data-v-
|
|
1
|
+
.pro-table_search-form[data-v-fffc2a28] [class*='-form-item'] {
|
|
2
2
|
margin: 0;
|
|
3
3
|
}
|
|
4
|
-
.pro-table_search-form_expand-toggle-button[data-v-
|
|
4
|
+
.pro-table_search-form_expand-toggle-button[data-v-fffc2a28] {
|
|
5
5
|
display: flex;
|
|
6
6
|
align-items: center;
|
|
7
7
|
padding: 0;
|
|
8
8
|
padding-left: 4px;
|
|
9
9
|
}
|
|
10
|
-
.pro-table_search-form .transition[data-v-
|
|
10
|
+
.pro-table_search-form .transition[data-v-fffc2a28] {
|
|
11
11
|
transition: all 0.25s;
|
|
12
12
|
}
|
|
13
13
|
.pro-table_search-form-container[data-v-c385cd54] {
|
|
@@ -36,23 +36,23 @@
|
|
|
36
36
|
.pro-table_column-control_button[data-v-d503f78a] svg {
|
|
37
37
|
transform: scale(1.2, 1.4);
|
|
38
38
|
}
|
|
39
|
-
.pro-table_header[data-v-
|
|
39
|
+
.pro-table_header[data-v-0e17ddec] {
|
|
40
40
|
display: flex;
|
|
41
41
|
align-items: center;
|
|
42
42
|
justify-content: flex-end;
|
|
43
43
|
}
|
|
44
|
-
.pro-table_header[data-v-
|
|
44
|
+
.pro-table_header[data-v-0e17ddec]:empty {
|
|
45
45
|
display: none;
|
|
46
46
|
}
|
|
47
|
-
.pro-table_header + .pro-table_header_content[data-v-
|
|
47
|
+
.pro-table_header + .pro-table_header_content[data-v-0e17ddec] {
|
|
48
48
|
margin-top: 16px;
|
|
49
49
|
}
|
|
50
|
-
.pro-table_header_button-bar[data-v-
|
|
50
|
+
.pro-table_header_button-bar[data-v-0e17ddec] {
|
|
51
51
|
flex: 1;
|
|
52
52
|
}
|
|
53
|
-
.pro-table_header_toolbar[data-v-
|
|
53
|
+
.pro-table_header_toolbar[data-v-0e17ddec] {
|
|
54
54
|
margin-left: 12px;
|
|
55
55
|
}
|
|
56
|
-
.pro-table[data-v-
|
|
56
|
+
.pro-table[data-v-0e17ddec] [class*='-pagination'] [class*='-pagination-total-text'] {
|
|
57
57
|
flex: 1;
|
|
58
58
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, provide, renderSlot } from "vue";
|
|
2
|
-
import { g as getObject } from "../core/index-
|
|
3
|
-
const getPopupContainer = (triggerNode) => triggerNode.closest("
|
|
2
|
+
import { g as getObject } from "../core/index-BWMfavD1.js";
|
|
3
|
+
const getPopupContainer = (triggerNode) => triggerNode.closest("form[class*='-form']");
|
|
4
4
|
const INJECT_COMPONENTS = Symbol("INJECT_COMPONENTS");
|
|
5
5
|
const INJECT_CONFIG = {
|
|
6
6
|
"pro-table": {
|
package/es/form/index.js
CHANGED
|
@@ -6,8 +6,8 @@ import { colProps } from "ant-design-vue/es/grid/Col";
|
|
|
6
6
|
import { formItemProps, useInjectFormItemContext } from "ant-design-vue/es/form";
|
|
7
7
|
import { defineComponent, provide, inject, useSlots, watchEffect, createBlock, openBlock, unref, mergeProps, withCtx, createVNode, renderSlot, computed, toValue, normalizeProps, guardReactiveProps, resolveComponent, createElementBlock, Fragment, renderList, createSlots, ref, useAttrs, createCommentVNode, resolveDynamicComponent, isVNode, createTextVNode, toDisplayString } from "vue";
|
|
8
8
|
import { INJECT_CONFIG, getInjectConfig, INJECT_COMPONENTS } from "../component-provider/index.js";
|
|
9
|
-
import { I as InjectionFormKey, c as camelizeProperties, a as InjectionPathKey, g as getObject, u as useForm$1, b as useFields$1, d as useFormRef$1 } from "../core/index-
|
|
10
|
-
import { e } from "../core/index-
|
|
9
|
+
import { I as InjectionFormKey, c as camelizeProperties, a as InjectionPathKey, g as getObject, u as useForm$1, b as useFields$1, d as useFormRef$1 } from "../core/index-BWMfavD1.js";
|
|
10
|
+
import { e } from "../core/index-BWMfavD1.js";
|
|
11
11
|
import { i as isPlainObject, t as toPath, o as omit, c as cloneDeep } from "../vendor/utils/lodash-es-p6jau26B.js";
|
|
12
12
|
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
13
13
|
...{ name: "ProForm", inheritAttrs: false },
|
|
@@ -241,7 +241,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
241
241
|
key: 0,
|
|
242
242
|
grid: field.grid ?? __props.grid,
|
|
243
243
|
fields: field.fields,
|
|
244
|
-
disabled: field.disabled
|
|
244
|
+
disabled: toValue(field.disabled)
|
|
245
245
|
}, null, 8, ["grid", "fields", "disabled"])) : (openBlock(), createBlock(unref(_sfc_main$2), mergeProps({
|
|
246
246
|
key: 1,
|
|
247
247
|
ref_for: true,
|
|
@@ -343,7 +343,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
343
343
|
const groupedAttrs = computed(() => {
|
|
344
344
|
const initProps = getInitProps({
|
|
345
345
|
component: __props.component,
|
|
346
|
-
|
|
346
|
+
picker: attrs.picker
|
|
347
347
|
});
|
|
348
348
|
const mergedProps = mergeProps(
|
|
349
349
|
initProps,
|
package/es/index.d.ts
CHANGED
|
@@ -124,7 +124,16 @@ declare type AllowStringKey<T, Prefix extends string = ''> = {
|
|
|
124
124
|
/**
|
|
125
125
|
* @type {Object} Base - 基础公共字段类型
|
|
126
126
|
*/
|
|
127
|
-
export declare
|
|
127
|
+
export declare type Base<D extends Data = Data> = BaseWithFields<D> | BaseWithoutFields<D>;
|
|
128
|
+
|
|
129
|
+
declare interface BaseColumn<D extends Data = Data> {
|
|
130
|
+
key?: Path<D>;
|
|
131
|
+
dataIndex?: Path<D> | Path<D>[];
|
|
132
|
+
children?: BaseColumn<D>[];
|
|
133
|
+
[key: string]: any;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
declare type BaseCommon<D extends Data = Data> = {
|
|
128
137
|
/**
|
|
129
138
|
* @description 字段标识namePath, 同name
|
|
130
139
|
* @example 'name' | 'age' | 'sex' | ...
|
|
@@ -134,6 +143,10 @@ export declare interface Base<D extends Data = Data> {
|
|
|
134
143
|
* @description 字段是否隐藏
|
|
135
144
|
*/
|
|
136
145
|
hidden?: boolean;
|
|
146
|
+
/**
|
|
147
|
+
* @description 字段是否禁用
|
|
148
|
+
*/
|
|
149
|
+
disabled?: boolean;
|
|
137
150
|
/**
|
|
138
151
|
* @description 字段中文名称,支持字符串或组件
|
|
139
152
|
* @example '姓名' | '年龄' | '性别' | () => h('span', '自定义标签')
|
|
@@ -161,16 +174,6 @@ export declare interface Base<D extends Data = Data> {
|
|
|
161
174
|
* @example 'custom-form-item' | 'required-field'
|
|
162
175
|
*/
|
|
163
176
|
formItemClass?: string;
|
|
164
|
-
/**
|
|
165
|
-
* @description 嵌套子字段配置
|
|
166
|
-
* @example [{ key: 'firstName', label: '名' }, { key: 'lastName', label: '姓' }]
|
|
167
|
-
*/
|
|
168
|
-
fields?: Fields<D>;
|
|
169
|
-
/**
|
|
170
|
-
* @description 网格布局属性,true表示使用默认网格布局,针对具有嵌套字段的字段
|
|
171
|
-
* @example boolean | { gutter: 24 }
|
|
172
|
-
*/
|
|
173
|
-
grid?: Grid;
|
|
174
177
|
/**
|
|
175
178
|
* @description 字段formItem容器包裹组件
|
|
176
179
|
* @example (props, ctx) => h('div', { class: 'custom-container' }, ctx.slots.default?.())
|
|
@@ -181,48 +184,12 @@ export declare interface Base<D extends Data = Data> {
|
|
|
181
184
|
* @example { 'data-form-item-test': 'test-value', 'aria-label': 'name' }
|
|
182
185
|
*/
|
|
183
186
|
formItemDataAttrs?: Record<string, string>;
|
|
184
|
-
/**
|
|
185
|
-
* @description 字段component样式属性
|
|
186
|
-
* @example { width: '100%', borderColor: '#d9d9d9' }
|
|
187
|
-
*/
|
|
188
|
-
componentStyle?: CSSProperties;
|
|
189
|
-
/**
|
|
190
|
-
* @description 字段component样式类名
|
|
191
|
-
* @example 'custom-input' | 'error-input'
|
|
192
|
-
*/
|
|
193
|
-
componentClass?: string;
|
|
194
|
-
/**
|
|
195
|
-
* @description 字段component容器包裹组件
|
|
196
|
-
* @example (props, ctx) => h('div', { class: 'input-wrapper' }, ctx.slots.default?.())
|
|
197
|
-
*/
|
|
198
|
-
componentContainer?: ContainerComponent;
|
|
199
|
-
/**
|
|
200
|
-
* @description 字段值处理函数,在onUpdateValue前执行,函数返回值将作为更新值,也可设置get和set函数,用于处理字段值
|
|
201
|
-
* @example (val) => val?.trim()
|
|
202
|
-
*/
|
|
203
|
-
valueFormatter?: ValueFormatter;
|
|
204
|
-
/**
|
|
205
|
-
* @description 组件v-model双向绑定更新属性名,默认'value'
|
|
206
|
-
*/
|
|
207
|
-
modelProp?: string;
|
|
208
|
-
/**
|
|
209
|
-
* @description 将属性附加到表单组件的 DOM 节点
|
|
210
|
-
* @example { 'data-test': 'input-value', 'aria-label': 'name' }
|
|
211
|
-
*/
|
|
212
|
-
componentDataAttrs?: Record<string, string>;
|
|
213
187
|
/**
|
|
214
188
|
* @description 额外的自定义属性,不会被当作组件参数,仅用做给字段添加标识属性等功能
|
|
215
189
|
* @example { group: 'group-1' }
|
|
216
190
|
*/
|
|
217
191
|
extraProps?: Record<string, any>;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
declare interface BaseColumn<D extends Data = Data> {
|
|
221
|
-
key?: Path<D>;
|
|
222
|
-
dataIndex?: Path<D> | Path<D>[];
|
|
223
|
-
children?: BaseColumn<D>[];
|
|
224
|
-
[key: string]: any;
|
|
225
|
-
}
|
|
192
|
+
};
|
|
226
193
|
|
|
227
194
|
export declare type BaseComponentMap = {
|
|
228
195
|
'input': typeof Input;
|
|
@@ -286,6 +253,60 @@ export declare const BaseForm: <F extends Form<any> = Form>(__VLS_props: NonNull
|
|
|
286
253
|
|
|
287
254
|
export declare const BaseFormItem: DefineComponent<Props_4, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<Props_4> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
288
255
|
|
|
256
|
+
declare type BaseWithFields<D extends Data = Data> = BaseCommon<D> & {
|
|
257
|
+
/**
|
|
258
|
+
* @description 嵌套子字段配置
|
|
259
|
+
* @example [{ key: 'firstName', label: '名' }, { key: 'lastName', label: '姓' }]
|
|
260
|
+
*/
|
|
261
|
+
fields: Fields<D>;
|
|
262
|
+
/**
|
|
263
|
+
* @description 网格布局属性,true表示使用默认网格布局,针对具有嵌套字段的字段
|
|
264
|
+
* @example boolean | { gutter: 24 }
|
|
265
|
+
*/
|
|
266
|
+
grid?: Grid;
|
|
267
|
+
component?: never;
|
|
268
|
+
componentStyle?: never;
|
|
269
|
+
componentClass?: never;
|
|
270
|
+
componentContainer?: never;
|
|
271
|
+
valueFormatter?: never;
|
|
272
|
+
modelProp?: never;
|
|
273
|
+
componentDataAttrs?: never;
|
|
274
|
+
};
|
|
275
|
+
|
|
276
|
+
declare type BaseWithoutFields<D extends Data = Data> = BaseCommon<D> & {
|
|
277
|
+
fields?: undefined;
|
|
278
|
+
grid?: never;
|
|
279
|
+
/**
|
|
280
|
+
* @description 字段component样式属性
|
|
281
|
+
* @example { width: '100%', borderColor: '#d9d9d9' }
|
|
282
|
+
*/
|
|
283
|
+
componentStyle?: CSSProperties;
|
|
284
|
+
/**
|
|
285
|
+
* @description 字段component样式类名
|
|
286
|
+
* @example 'custom-input' | 'error-input'
|
|
287
|
+
*/
|
|
288
|
+
componentClass?: string;
|
|
289
|
+
/**
|
|
290
|
+
* @description 字段component容器包裹组件
|
|
291
|
+
* @example (props, ctx) => h('div', { class: 'input-wrapper' }, ctx.slots.default?.())
|
|
292
|
+
*/
|
|
293
|
+
componentContainer?: ContainerComponent;
|
|
294
|
+
/**
|
|
295
|
+
* @description 字段值处理函数,在onUpdateValue前执行,函数返回值将作为更新值,也可设置get和set函数,用于处理字段值
|
|
296
|
+
* @example (val) => val?.trim()
|
|
297
|
+
*/
|
|
298
|
+
valueFormatter?: ValueFormatter;
|
|
299
|
+
/**
|
|
300
|
+
* @description 组件v-model双向绑定更新属性名,默认'value'
|
|
301
|
+
*/
|
|
302
|
+
modelProp?: string;
|
|
303
|
+
/**
|
|
304
|
+
* @description 将属性附加到表单组件的 DOM 节点
|
|
305
|
+
* @example { 'data-test': 'input-value', 'aria-label': 'name' }
|
|
306
|
+
*/
|
|
307
|
+
componentDataAttrs?: Record<string, string>;
|
|
308
|
+
};
|
|
309
|
+
|
|
289
310
|
declare type ButtonProps = {
|
|
290
311
|
onClick: () => void;
|
|
291
312
|
};
|
|
@@ -449,7 +470,7 @@ declare type ExtendWithAny<D> = {
|
|
|
449
470
|
* @description 字段配置类型,包含所有字段属性和响应式支持
|
|
450
471
|
* @template D - 数据对象类型
|
|
451
472
|
*/
|
|
452
|
-
export declare type Field<C extends ComponentName = ComponentName, D extends Data = Data> = FieldTypeMap<D>[C]
|
|
473
|
+
export declare type Field<C extends ComponentName = ComponentName, D extends Data = Data> = FieldTypeMap<D>[C] | WithFields<D>;
|
|
453
474
|
|
|
454
475
|
declare type FieldFindBy<D extends Data, F extends BaseField_2<D> = BaseField_2<D>> = (field: Readonly<F>) => boolean;
|
|
455
476
|
|
|
@@ -948,7 +969,9 @@ export declare type VModelProps<T = any> = {
|
|
|
948
969
|
'onUpdate:value'?: (val: T) => void;
|
|
949
970
|
};
|
|
950
971
|
|
|
951
|
-
declare type WithCommon<T, D extends Data = Data> = WithRef<T
|
|
972
|
+
declare type WithCommon<T, D extends Data = Data> = WithRef<WithCommonBase<T> & BaseWithoutFields<D>>;
|
|
973
|
+
|
|
974
|
+
declare type WithCommonBase<T = unknown> = T & Omit<FormItemProps, 'label'> & ColProps;
|
|
952
975
|
|
|
953
976
|
/**
|
|
954
977
|
* @description 自动从 Vue 组件提取 Props 和 Slots,并加上公共表单字段属性
|
|
@@ -959,6 +982,8 @@ declare type WithComponent<T extends abstract new (...args: any) => any, D exten
|
|
|
959
982
|
slots?: ComponentSlots<T>;
|
|
960
983
|
} & Omit<ComponentProps<T>, keyof VNodeProps>, D>;
|
|
961
984
|
|
|
985
|
+
declare type WithFields<D extends Data = Data> = WithRef<WithCommonBase & BaseWithFields<D>>;
|
|
986
|
+
|
|
962
987
|
/**
|
|
963
988
|
* @description 为对象属性添加响应式支持的类型
|
|
964
989
|
* @template T - 原始类型
|
package/es/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import BaseTable from "./table/index.js";
|
|
|
5
5
|
import { useTable } from "./table/index.js";
|
|
6
6
|
import _sfc_main$1 from "./component-provider/index.js";
|
|
7
7
|
import { INJECT_COMPONENTS, INJECT_CONFIG, ensureInjectConfig, getInjectConfig } from "./component-provider/index.js";
|
|
8
|
-
import { I, a, e } from "./core/index-
|
|
8
|
+
import { I, a, e } from "./core/index-BWMfavD1.js";
|
|
9
9
|
const withInstall = (comp) => {
|
|
10
10
|
comp.install = (app) => {
|
|
11
11
|
app.component(comp.name, comp);
|
package/es/table/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { INJECT_CONFIG } from "../component-provider/index.js";
|
|
|
3
3
|
import _sfc_main$9, { ContainerFragment as _sfc_main$a } from "../form/index.js";
|
|
4
4
|
import { Space, Button, theme, Dropdown, Menu, MenuItem, Checkbox, MenuDivider, Table } from "ant-design-vue";
|
|
5
5
|
import { p as pick } from "../vendor/utils/lodash-es-p6jau26B.js";
|
|
6
|
-
import { g as getObject, c as camelizeProperties, f as useTable$1 } from "../core/index-
|
|
6
|
+
import { g as getObject, c as camelizeProperties, f as useTable$1 } from "../core/index-BWMfavD1.js";
|
|
7
7
|
import { useConfigContextInject } from "ant-design-vue/es/config-provider/context";
|
|
8
8
|
import { tableProps } from "ant-design-vue/es/table";
|
|
9
9
|
const _export_sfc = (sfc, props) => {
|
|
@@ -68,7 +68,9 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
68
68
|
expandStatus.value = false;
|
|
69
69
|
if (formRef.value && __props.expand) {
|
|
70
70
|
const formEl = formRef.value.$el;
|
|
71
|
-
const formItemsEl = formEl.querySelectorAll(
|
|
71
|
+
const formItemsEl = formEl.querySelectorAll(
|
|
72
|
+
"[class*='-form-item'] > [path]"
|
|
73
|
+
);
|
|
72
74
|
const observer = new IntersectionObserver(
|
|
73
75
|
(entries) => {
|
|
74
76
|
expandStatus.value = entries.some((e) => {
|
|
@@ -102,7 +104,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
102
104
|
const proFormEl = (_a = formRef.value) == null ? void 0 : _a.$el;
|
|
103
105
|
const { height = 0 } = ((_b = proFormEl == null ? void 0 : proFormEl.getBoundingClientRect) == null ? void 0 : _b.call(proFormEl)) || {};
|
|
104
106
|
proFormHeight.value = height;
|
|
105
|
-
rowHeight = (_e = (_d = (_c = proFormEl == null ? void 0 : proFormEl.querySelector("
|
|
107
|
+
rowHeight = (_e = (_d = (_c = proFormEl == null ? void 0 : proFormEl.querySelector("[class*='-form-item']")) == null ? void 0 : _c.getBoundingClientRect) == null ? void 0 : _d.call(_c)) == null ? void 0 : _e.height;
|
|
106
108
|
},
|
|
107
109
|
{ flush: "post", immediate: true }
|
|
108
110
|
);
|
|
@@ -223,7 +225,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
223
225
|
};
|
|
224
226
|
}
|
|
225
227
|
});
|
|
226
|
-
const SearchForm = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-
|
|
228
|
+
const SearchForm = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-fffc2a28"]]);
|
|
227
229
|
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
228
230
|
__name: "DefaultSearchFormContainer",
|
|
229
231
|
setup(__props) {
|
|
@@ -688,7 +690,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
688
690
|
};
|
|
689
691
|
}
|
|
690
692
|
});
|
|
691
|
-
const BaseTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
693
|
+
const BaseTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-0e17ddec"]]);
|
|
692
694
|
const useTable = useTable$1;
|
|
693
695
|
export {
|
|
694
696
|
BaseTable as default,
|