@qin-ui/element-plus-pro 1.0.4 → 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 +48 -43
- package/package.json +8 -8
- package/LICENSE +0 -9
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 };
|
|
@@ -87,11 +87,12 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
87
87
|
var _a, _b, _c;
|
|
88
88
|
return (_c = (_b = (_a = __props.form) == null ? void 0 : _a.fields.value) == null ? void 0 : _b.filter((f) => !f.hidden)) == null ? void 0 : _c.length;
|
|
89
89
|
},
|
|
90
|
-
() => formRef.value
|
|
90
|
+
() => formRef.value,
|
|
91
|
+
() => __props.expand
|
|
91
92
|
],
|
|
92
93
|
() => {
|
|
93
94
|
var _a, _b, _c, _d, _e;
|
|
94
|
-
if (!expandStatus.value || !formRef.value) return;
|
|
95
|
+
if (!__props.expand || !expandStatus.value || !formRef.value) return;
|
|
95
96
|
const proFormEl = (_a = formRef.value) == null ? void 0 : _a.$el;
|
|
96
97
|
const { height = 0 } = ((_b = proFormEl == null ? void 0 : proFormEl.getBoundingClientRect) == null ? void 0 : _b.call(proFormEl)) || {};
|
|
97
98
|
proFormHeight.value = height;
|
|
@@ -105,7 +106,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
105
106
|
if (__props.layout === "grid" && computedExpand.value) {
|
|
106
107
|
const { minExpandRows } = computedExpand.value;
|
|
107
108
|
collapseHeight.value = Math.min(
|
|
108
|
-
minExpandRows * rowHeight + (minExpandRows - 1) * rowGap,
|
|
109
|
+
minExpandRows * rowHeight + (minExpandRows - 1) * __props.rowGap,
|
|
109
110
|
+proFormHeight.value
|
|
110
111
|
);
|
|
111
112
|
showExpandToggle.value = +proFormHeight.value - collapseHeight.value > 1;
|
|
@@ -121,13 +122,13 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
121
122
|
const layoutProps = computed(
|
|
122
123
|
() => __props.layout === "grid" ? {
|
|
123
124
|
grid: {
|
|
124
|
-
gutter: columnGap,
|
|
125
|
-
style: { rowGap: `${rowGap}px` }
|
|
125
|
+
gutter: __props.columnGap,
|
|
126
|
+
style: { rowGap: `${__props.rowGap}px` }
|
|
126
127
|
},
|
|
127
128
|
style: {
|
|
128
129
|
display: "flex",
|
|
129
130
|
overflow: "hidden",
|
|
130
|
-
columnGap: `${columnGap}px`,
|
|
131
|
+
columnGap: `${__props.columnGap}px`,
|
|
131
132
|
height: `${expandStatus.value ? proFormHeight.value : collapseHeight.value}px`
|
|
132
133
|
}
|
|
133
134
|
} : {
|
|
@@ -135,7 +136,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
135
136
|
style: {
|
|
136
137
|
display: "flex",
|
|
137
138
|
flexWrap: "wrap",
|
|
138
|
-
gap: `${rowGap}px ${columnGap}px`
|
|
139
|
+
gap: `${__props.rowGap}px ${__props.columnGap}px`
|
|
139
140
|
},
|
|
140
141
|
grid: false
|
|
141
142
|
}
|
|
@@ -159,39 +160,43 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
159
160
|
}, {
|
|
160
161
|
default: withCtx(() => [
|
|
161
162
|
renderSlot(_ctx.$slots, "reset-button", { onClick: onReset }, () => [
|
|
162
|
-
__props.resetButton ? (openBlock(),
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
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)
|
|
175
178
|
], true),
|
|
176
179
|
renderSlot(_ctx.$slots, "search-button", { onClick: onSearch }, () => [
|
|
177
|
-
__props.searchButton ? (openBlock(),
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
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)
|
|
192
197
|
], true),
|
|
193
198
|
renderSlot(_ctx.$slots, "expand-button", { onClick: changeExpandStatus }, () => [
|
|
194
|
-
showExpandToggle.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
199
|
+
__props.expandButton !== false && showExpandToggle.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
195
200
|
__props.expandButton ? (openBlock(), createBlock(resolveDynamicComponent(__props.expandButton), {
|
|
196
201
|
key: 0,
|
|
197
202
|
"expand-status": expandStatus.value,
|
|
@@ -222,7 +227,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
222
227
|
};
|
|
223
228
|
}
|
|
224
229
|
});
|
|
225
|
-
const SearchForm = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-
|
|
230
|
+
const SearchForm = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-70679e47"]]);
|
|
226
231
|
const _sfc_main$7 = {};
|
|
227
232
|
const _hoisted_1$4 = { class: "pro-table_search-form-container" };
|
|
228
233
|
function _sfc_render$3(_ctx, _cache) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qin-ui/element-plus-pro",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"description": "基于 element-plus 的二次封装组件",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -24,6 +24,10 @@
|
|
|
24
24
|
"type": "git",
|
|
25
25
|
"url": "git+https://github.com/dufan3715/pro-components.git"
|
|
26
26
|
},
|
|
27
|
+
"scripts": {
|
|
28
|
+
"prebuild": "tsx ../../scripts/generate-api-json.ts element-plus-pro",
|
|
29
|
+
"build": "vue-tsc && vite build"
|
|
30
|
+
},
|
|
27
31
|
"author": "dufan3715",
|
|
28
32
|
"license": "MIT",
|
|
29
33
|
"private": false,
|
|
@@ -35,17 +39,13 @@
|
|
|
35
39
|
"vue-component-type-helpers": "^3.2.5"
|
|
36
40
|
},
|
|
37
41
|
"devDependencies": {
|
|
42
|
+
"@qin-ui/core": "workspace:^",
|
|
38
43
|
"@types/lodash-es": "^4.17.12",
|
|
39
44
|
"element-plus": "^2.13.6",
|
|
40
|
-
"lodash-es": "^4.17.21"
|
|
41
|
-
"@qin-ui/core": "^1.0.0"
|
|
45
|
+
"lodash-es": "^4.17.21"
|
|
42
46
|
},
|
|
43
47
|
"publishConfig": {
|
|
44
48
|
"access": "public",
|
|
45
49
|
"registry": "https://registry.npmjs.org/"
|
|
46
|
-
},
|
|
47
|
-
"scripts": {
|
|
48
|
-
"prebuild": "tsx ../../scripts/generate-api-json.ts element-plus-pro",
|
|
49
|
-
"build": "vue-tsc && vite build"
|
|
50
50
|
}
|
|
51
|
-
}
|
|
51
|
+
}
|
package/LICENSE
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2023-present pro-components
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
-
|
|
7
|
-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
-
|
|
9
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|