@qin-ui/element-plus-pro 1.0.5 → 1.0.6
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/element-plus-pro.css +3 -3
- package/es/index.d.ts +5 -3
- package/es/table/index.js +45 -41
- package/package.json +1 -1
package/api.json
CHANGED
package/es/element-plus-pro.css
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
[class*='-form-item'] [class*='-form-item'][data-v-1dd9fcdd] {
|
|
2
2
|
margin-bottom: 18px;
|
|
3
3
|
}
|
|
4
|
-
.pro-table_search-form[data-v-
|
|
4
|
+
.pro-table_search-form[data-v-70679e47] [class*='-form-item'] {
|
|
5
5
|
margin: 0;
|
|
6
6
|
}
|
|
7
|
-
.pro-table_search-form_expand-toggle-button[data-v-
|
|
7
|
+
.pro-table_search-form_expand-toggle-button[data-v-70679e47] {
|
|
8
8
|
display: flex;
|
|
9
9
|
align-items: center;
|
|
10
10
|
padding: 0;
|
|
11
11
|
padding-left: 4px;
|
|
12
12
|
}
|
|
13
|
-
.pro-table_search-form .transition[data-v-
|
|
13
|
+
.pro-table_search-form .transition[data-v-70679e47] {
|
|
14
14
|
transition: all 0.25s;
|
|
15
15
|
}
|
|
16
16
|
.pro-table_search-form-container[data-v-45e627f4] {
|
package/es/index.d.ts
CHANGED
|
@@ -1017,9 +1017,11 @@ declare type SearchFormProps = {
|
|
|
1017
1017
|
form: Form;
|
|
1018
1018
|
layout?: 'grid' | 'inline';
|
|
1019
1019
|
expand?: boolean | Expand;
|
|
1020
|
-
searchButton?: Component<ButtonProps> | DefineComponent<ButtonProps
|
|
1021
|
-
resetButton?: Component<ButtonProps> | DefineComponent<ButtonProps
|
|
1022
|
-
expandButton?: Component<ExpandButtonProps> | DefineComponent<ExpandButtonProps
|
|
1020
|
+
searchButton?: Component<ButtonProps> | DefineComponent<ButtonProps> | false;
|
|
1021
|
+
resetButton?: Component<ButtonProps> | DefineComponent<ButtonProps> | false;
|
|
1022
|
+
expandButton?: Component<ExpandButtonProps> | DefineComponent<ExpandButtonProps> | false;
|
|
1023
|
+
rowGap?: number;
|
|
1024
|
+
columnGap?: number;
|
|
1023
1025
|
} & /* @vue-ignore */ _FormProps & AllowedComponentProps;
|
|
1024
1026
|
|
|
1025
1027
|
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, withKeys, withCtx, createVNode, renderSlot,
|
|
1
|
+
import { createElementBlock, openBlock, createElementVNode, defineComponent, ref, computed, watch, watchEffect, createBlock, unref, mergeProps, withKeys, withCtx, createVNode, renderSlot, createCommentVNode, Fragment, resolveDynamicComponent, createTextVNode, toDisplayString, normalizeStyle, useModel, renderList, withModifiers, mergeModels, inject, useAttrs, useSlots, onMounted, resolveDirective, normalizeClass, withDirectives, createSlots, normalizeProps, guardReactiveProps, nextTick } from "vue";
|
|
2
2
|
import { ElSpace, ElButton, ElDropdown, ElDropdownMenu, ElDropdownItem, ElCheckbox, ElTableColumn, ElTable, ElPagination } from "element-plus";
|
|
3
3
|
import { _ as _export_sfc, a as _sfc_main$a, t as tableProps, p as paginationProps, b as _sfc_main$b } from "../form/index-D8btGgqa.js";
|
|
4
4
|
import { I as INJECT_CONFIG } from "../component-provider/index-Bmx9Q9Q-.js";
|
|
@@ -27,9 +27,11 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
27
27
|
form: {},
|
|
28
28
|
layout: { default: "grid" },
|
|
29
29
|
expand: { type: [Boolean, Object], default: true },
|
|
30
|
-
searchButton: { type: [Object, Function], default: void 0 },
|
|
31
|
-
resetButton: { type: [Object, Function], default: void 0 },
|
|
32
|
-
expandButton: { type: [Object, Function], default: void 0 },
|
|
30
|
+
searchButton: { type: [Object, Function, Boolean], default: void 0 },
|
|
31
|
+
resetButton: { type: [Object, Function, Boolean], default: void 0 },
|
|
32
|
+
expandButton: { type: [Object, Function, Boolean], default: void 0 },
|
|
33
|
+
rowGap: { default: 16 },
|
|
34
|
+
columnGap: { default: 24 },
|
|
33
35
|
class: {},
|
|
34
36
|
style: {}
|
|
35
37
|
},
|
|
@@ -39,8 +41,6 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
39
41
|
const proFormHeight = ref("unset");
|
|
40
42
|
const collapseHeight = ref(0);
|
|
41
43
|
let rowHeight = 32;
|
|
42
|
-
const rowGap = 16;
|
|
43
|
-
const columnGap = 24;
|
|
44
44
|
const computedExpand = computed(() => {
|
|
45
45
|
if (!__props.expand) return false;
|
|
46
46
|
if (__props.expand === true) return { minExpandRows: 2, expandStatus: false };
|
|
@@ -106,7 +106,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
106
106
|
if (__props.layout === "grid" && computedExpand.value) {
|
|
107
107
|
const { minExpandRows } = computedExpand.value;
|
|
108
108
|
collapseHeight.value = Math.min(
|
|
109
|
-
minExpandRows * rowHeight + (minExpandRows - 1) * rowGap,
|
|
109
|
+
minExpandRows * rowHeight + (minExpandRows - 1) * __props.rowGap,
|
|
110
110
|
+proFormHeight.value
|
|
111
111
|
);
|
|
112
112
|
showExpandToggle.value = +proFormHeight.value - collapseHeight.value > 1;
|
|
@@ -122,13 +122,13 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
122
122
|
const layoutProps = computed(
|
|
123
123
|
() => __props.layout === "grid" ? {
|
|
124
124
|
grid: {
|
|
125
|
-
gutter: columnGap,
|
|
126
|
-
style: { rowGap: `${rowGap}px` }
|
|
125
|
+
gutter: __props.columnGap,
|
|
126
|
+
style: { rowGap: `${__props.rowGap}px` }
|
|
127
127
|
},
|
|
128
128
|
style: {
|
|
129
129
|
display: "flex",
|
|
130
130
|
overflow: "hidden",
|
|
131
|
-
columnGap: `${columnGap}px`,
|
|
131
|
+
columnGap: `${__props.columnGap}px`,
|
|
132
132
|
height: `${expandStatus.value ? proFormHeight.value : collapseHeight.value}px`
|
|
133
133
|
}
|
|
134
134
|
} : {
|
|
@@ -136,7 +136,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
136
136
|
style: {
|
|
137
137
|
display: "flex",
|
|
138
138
|
flexWrap: "wrap",
|
|
139
|
-
gap: `${rowGap}px ${columnGap}px`
|
|
139
|
+
gap: `${__props.rowGap}px ${__props.columnGap}px`
|
|
140
140
|
},
|
|
141
141
|
grid: false
|
|
142
142
|
}
|
|
@@ -160,39 +160,43 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
160
160
|
}, {
|
|
161
161
|
default: withCtx(() => [
|
|
162
162
|
renderSlot(_ctx.$slots, "reset-button", { onClick: onReset }, () => [
|
|
163
|
-
__props.resetButton ? (openBlock(),
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
163
|
+
__props.resetButton !== false ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
164
|
+
__props.resetButton ? (openBlock(), createBlock(resolveDynamicComponent(__props.resetButton), {
|
|
165
|
+
key: 0,
|
|
166
|
+
onClick: onReset
|
|
167
|
+
})) : (openBlock(), createBlock(unref(ElButton), {
|
|
168
|
+
key: 1,
|
|
169
|
+
class: "pro-table_search-form_reset-button",
|
|
170
|
+
onClick: onReset
|
|
171
|
+
}, {
|
|
172
|
+
default: withCtx(() => [..._cache[0] || (_cache[0] = [
|
|
173
|
+
createTextVNode("重置", -1)
|
|
174
|
+
])]),
|
|
175
|
+
_: 1
|
|
176
|
+
}))
|
|
177
|
+
], 64)) : createCommentVNode("", true)
|
|
176
178
|
], true),
|
|
177
179
|
renderSlot(_ctx.$slots, "search-button", { onClick: onSearch }, () => [
|
|
178
|
-
__props.searchButton ? (openBlock(),
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
180
|
+
__props.searchButton !== false ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
181
|
+
__props.searchButton ? (openBlock(), createBlock(resolveDynamicComponent(__props.searchButton), {
|
|
182
|
+
key: 0,
|
|
183
|
+
onClick: onSearch
|
|
184
|
+
})) : (openBlock(), createBlock(unref(ElButton), {
|
|
185
|
+
key: 1,
|
|
186
|
+
class: "pro-table_search-form_search-button",
|
|
187
|
+
type: "primary",
|
|
188
|
+
"native-type": "submit",
|
|
189
|
+
onClick: onSearch
|
|
190
|
+
}, {
|
|
191
|
+
default: withCtx(() => [..._cache[1] || (_cache[1] = [
|
|
192
|
+
createTextVNode(" 查询 ", -1)
|
|
193
|
+
])]),
|
|
194
|
+
_: 1
|
|
195
|
+
}))
|
|
196
|
+
], 64)) : createCommentVNode("", true)
|
|
193
197
|
], true),
|
|
194
198
|
renderSlot(_ctx.$slots, "expand-button", { onClick: changeExpandStatus }, () => [
|
|
195
|
-
showExpandToggle.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
199
|
+
__props.expandButton !== false && showExpandToggle.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
196
200
|
__props.expandButton ? (openBlock(), createBlock(resolveDynamicComponent(__props.expandButton), {
|
|
197
201
|
key: 0,
|
|
198
202
|
"expand-status": expandStatus.value,
|
|
@@ -223,7 +227,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
223
227
|
};
|
|
224
228
|
}
|
|
225
229
|
});
|
|
226
|
-
const SearchForm = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-
|
|
230
|
+
const SearchForm = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-70679e47"]]);
|
|
227
231
|
const _sfc_main$7 = {};
|
|
228
232
|
const _hoisted_1$4 = { class: "pro-table_search-form-container" };
|
|
229
233
|
function _sfc_render$3(_ctx, _cache) {
|