@qin-ui/antd-vue-pro 2.1.12 → 2.1.13
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/api.json +1 -1
- package/es/antd-vue-pro.css +3 -3
- package/es/index.d.ts +5 -3
- package/es/table/index.js +43 -39
- package/package.json +1 -1
package/api.json
CHANGED
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-a2af360f] [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-a2af360f] {
|
|
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-a2af360f] {
|
|
11
11
|
transition: all 0.25s;
|
|
12
12
|
}
|
|
13
13
|
.pro-table_search-form-container[data-v-c385cd54] {
|
package/es/index.d.ts
CHANGED
|
@@ -1155,9 +1155,11 @@ declare type SearchFormProps = {
|
|
|
1155
1155
|
form: Form;
|
|
1156
1156
|
layout?: 'grid' | 'inline';
|
|
1157
1157
|
expand?: boolean | Expand;
|
|
1158
|
-
searchButton?: Component<ButtonProps> | DefineComponent<ButtonProps
|
|
1159
|
-
resetButton?: Component<ButtonProps> | DefineComponent<ButtonProps
|
|
1160
|
-
expandButton?: Component<ExpandButtonProps> | DefineComponent<ExpandButtonProps
|
|
1158
|
+
searchButton?: Component<ButtonProps> | DefineComponent<ButtonProps> | false;
|
|
1159
|
+
resetButton?: Component<ButtonProps> | DefineComponent<ButtonProps> | false;
|
|
1160
|
+
expandButton?: Component<ExpandButtonProps> | DefineComponent<ExpandButtonProps> | false;
|
|
1161
|
+
rowGap?: number;
|
|
1162
|
+
columnGap?: number;
|
|
1161
1163
|
} & /* @vue-ignore */ _FormProps & AllowedComponentProps;
|
|
1162
1164
|
|
|
1163
1165
|
declare type SetColumn<T extends Data = Data, C extends BaseColumn<T> = BaseColumn<T>> = (key: Path<T>, column: C | ((pre: Readonly<C>) => C), options?: {
|
package/es/table/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createElementBlock, openBlock, createElementVNode, defineComponent, ref, computed, watch, watchEffect, createBlock, unref, mergeProps, withCtx, createVNode, renderSlot,
|
|
1
|
+
import { createElementBlock, openBlock, createElementVNode, defineComponent, ref, computed, watch, watchEffect, createBlock, unref, mergeProps, withCtx, createVNode, renderSlot, createCommentVNode, Fragment, resolveDynamicComponent, createTextVNode, toDisplayString, normalizeStyle, useModel, renderList, withModifiers, mergeModels, inject, useAttrs, useSlots, onMounted, normalizeClass, createSlots, normalizeProps, guardReactiveProps, nextTick } from "vue";
|
|
2
2
|
import { I as INJECT_CONFIG } from "../component-provider/index-Dmz32tSB.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";
|
|
@@ -36,9 +36,11 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
36
36
|
form: {},
|
|
37
37
|
layout: { default: "grid" },
|
|
38
38
|
expand: { type: [Boolean, Object], default: true },
|
|
39
|
-
searchButton: { type: [Object, Function], default: void 0 },
|
|
40
|
-
resetButton: { type: [Object, Function], default: void 0 },
|
|
41
|
-
expandButton: { type: [Object, Function], default: void 0 },
|
|
39
|
+
searchButton: { type: [Object, Function, Boolean], default: void 0 },
|
|
40
|
+
resetButton: { type: [Object, Function, Boolean], default: void 0 },
|
|
41
|
+
expandButton: { type: [Object, Function, Boolean], default: void 0 },
|
|
42
|
+
rowGap: { default: 16 },
|
|
43
|
+
columnGap: { default: 24 },
|
|
42
44
|
class: {},
|
|
43
45
|
style: {}
|
|
44
46
|
},
|
|
@@ -48,8 +50,6 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
48
50
|
const proFormHeight = ref("unset");
|
|
49
51
|
const collapseHeight = ref(0);
|
|
50
52
|
let rowHeight = 32;
|
|
51
|
-
const rowGap = 16;
|
|
52
|
-
const columnGap = 24;
|
|
53
53
|
const computedExpand = computed(() => {
|
|
54
54
|
if (!__props.expand) return false;
|
|
55
55
|
if (__props.expand === true) return { minExpandRows: 2, expandStatus: false };
|
|
@@ -115,7 +115,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
115
115
|
if (__props.layout === "grid" && computedExpand.value) {
|
|
116
116
|
const { minExpandRows } = computedExpand.value;
|
|
117
117
|
collapseHeight.value = Math.min(
|
|
118
|
-
minExpandRows * rowHeight + (minExpandRows - 1) * rowGap,
|
|
118
|
+
minExpandRows * rowHeight + (minExpandRows - 1) * __props.rowGap,
|
|
119
119
|
+proFormHeight.value
|
|
120
120
|
);
|
|
121
121
|
showExpandToggle.value = +proFormHeight.value - collapseHeight.value > 1;
|
|
@@ -131,7 +131,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
131
131
|
const layoutProps = computed(
|
|
132
132
|
() => __props.layout === "grid" ? {
|
|
133
133
|
grid: {
|
|
134
|
-
gutter: [columnGap, rowGap],
|
|
134
|
+
gutter: [__props.columnGap, __props.rowGap],
|
|
135
135
|
style: { flex: 1, marginRight: "12px" }
|
|
136
136
|
},
|
|
137
137
|
style: {
|
|
@@ -141,7 +141,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
141
141
|
}
|
|
142
142
|
} : {
|
|
143
143
|
layout: "inline",
|
|
144
|
-
style: { gap: `${rowGap}px ${columnGap}px` },
|
|
144
|
+
style: { gap: `${__props.rowGap}px ${__props.columnGap}px` },
|
|
145
145
|
grid: false
|
|
146
146
|
}
|
|
147
147
|
);
|
|
@@ -163,39 +163,43 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
163
163
|
}, {
|
|
164
164
|
default: withCtx(() => [
|
|
165
165
|
renderSlot(_ctx.$slots, "reset-button", { onClick: onReset }, () => [
|
|
166
|
-
__props.resetButton ? (openBlock(),
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
166
|
+
__props.resetButton !== false ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
167
|
+
__props.resetButton ? (openBlock(), createBlock(resolveDynamicComponent(__props.resetButton), {
|
|
168
|
+
key: 0,
|
|
169
|
+
onClick: onReset
|
|
170
|
+
})) : (openBlock(), createBlock(unref(Button), {
|
|
171
|
+
key: 1,
|
|
172
|
+
class: "pro-table_search-form_reset-button",
|
|
173
|
+
onClick: onReset
|
|
174
|
+
}, {
|
|
175
|
+
default: withCtx(() => [..._cache[0] || (_cache[0] = [
|
|
176
|
+
createTextVNode("重置", -1)
|
|
177
|
+
])]),
|
|
178
|
+
_: 1
|
|
179
|
+
}))
|
|
180
|
+
], 64)) : createCommentVNode("", true)
|
|
179
181
|
], true),
|
|
180
182
|
renderSlot(_ctx.$slots, "search-button", { onClick: onSearch }, () => [
|
|
181
|
-
__props.searchButton ? (openBlock(),
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
183
|
+
__props.searchButton !== false ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
184
|
+
__props.searchButton ? (openBlock(), createBlock(resolveDynamicComponent(__props.searchButton), {
|
|
185
|
+
key: 0,
|
|
186
|
+
onClick: onSearch
|
|
187
|
+
})) : (openBlock(), createBlock(unref(Button), {
|
|
188
|
+
key: 1,
|
|
189
|
+
class: "pro-table_search-form_search-button",
|
|
190
|
+
type: "primary",
|
|
191
|
+
"html-type": "submit",
|
|
192
|
+
onClick: onSearch
|
|
193
|
+
}, {
|
|
194
|
+
default: withCtx(() => [..._cache[1] || (_cache[1] = [
|
|
195
|
+
createTextVNode("查询 ", -1)
|
|
196
|
+
])]),
|
|
197
|
+
_: 1
|
|
198
|
+
}))
|
|
199
|
+
], 64)) : createCommentVNode("", true)
|
|
196
200
|
], true),
|
|
197
201
|
renderSlot(_ctx.$slots, "expand-button", { onClick: changeExpandStatus }, () => [
|
|
198
|
-
showExpandToggle.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
202
|
+
__props.expandButton !== false && showExpandToggle.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
199
203
|
__props.expandButton ? (openBlock(), createBlock(resolveDynamicComponent(__props.expandButton), {
|
|
200
204
|
key: 0,
|
|
201
205
|
"expand-status": expandStatus.value,
|
|
@@ -226,7 +230,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
226
230
|
};
|
|
227
231
|
}
|
|
228
232
|
});
|
|
229
|
-
const SearchForm = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-
|
|
233
|
+
const SearchForm = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-a2af360f"]]);
|
|
230
234
|
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
231
235
|
__name: "DefaultSearchFormContainer",
|
|
232
236
|
setup(__props) {
|