@qin-ui/antdv-next-pro 1.1.11 → 1.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/antdv-next-pro.css +3 -3
- package/es/index.d.ts +5 -3
- package/es/table/index.js +46 -41
- package/package.json +8 -8
- package/LICENSE +0 -9
package/api.json
CHANGED
package/es/antdv-next-pro.css
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
.pro-table_search-form[data-v-
|
|
1
|
+
.pro-table_search-form[data-v-88be5fd7] [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-88be5fd7] {
|
|
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-88be5fd7] {
|
|
11
11
|
transition: all 0.25s;
|
|
12
12
|
}
|
|
13
13
|
.pro-table_search-form-container[data-v-f115fbbe] {
|
package/es/index.d.ts
CHANGED
|
@@ -1081,9 +1081,11 @@ declare type SearchFormProps = {
|
|
|
1081
1081
|
form: Form;
|
|
1082
1082
|
layout?: 'grid' | 'inline';
|
|
1083
1083
|
expand?: boolean | Expand;
|
|
1084
|
-
searchButton?: Component<ButtonProps> | DefineComponent<ButtonProps
|
|
1085
|
-
resetButton?: Component<ButtonProps> | DefineComponent<ButtonProps
|
|
1086
|
-
expandButton?: Component<ExpandButtonProps> | DefineComponent<ExpandButtonProps
|
|
1084
|
+
searchButton?: Component<ButtonProps> | DefineComponent<ButtonProps> | false;
|
|
1085
|
+
resetButton?: Component<ButtonProps> | DefineComponent<ButtonProps> | false;
|
|
1086
|
+
expandButton?: Component<ExpandButtonProps> | DefineComponent<ExpandButtonProps> | false;
|
|
1087
|
+
rowGap?: number;
|
|
1088
|
+
columnGap?: number;
|
|
1087
1089
|
} & /* @vue-ignore */ _FormProps & AllowedComponentProps;
|
|
1088
1090
|
|
|
1089
1091
|
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, h, mergeModels, inject, useAttrs, useSlots, onMounted, normalizeClass, createSlots, renderList, normalizeProps, guardReactiveProps, nextTick } from "vue";
|
|
2
2
|
import { Space, Button, theme, useConfig, Dropdown, Menu, Checkbox, Table } from "antdv-next";
|
|
3
3
|
import "antdv-next/dist/config-provider/DisabledContext";
|
|
4
4
|
import { _ as _sfc_main$9, t as tableProps, a as _sfc_main$a } from "../form/index-7clzY8ZD.js";
|
|
@@ -35,9 +35,11 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
35
35
|
form: {},
|
|
36
36
|
layout: { default: "grid" },
|
|
37
37
|
expand: { type: [Boolean, Object], default: true },
|
|
38
|
-
searchButton: { type: [Object, Function], default: void 0 },
|
|
39
|
-
resetButton: { type: [Object, Function], default: void 0 },
|
|
40
|
-
expandButton: { type: [Object, Function], default: void 0 },
|
|
38
|
+
searchButton: { type: [Object, Function, Boolean], default: void 0 },
|
|
39
|
+
resetButton: { type: [Object, Function, Boolean], default: void 0 },
|
|
40
|
+
expandButton: { type: [Object, Function, Boolean], default: void 0 },
|
|
41
|
+
rowGap: { default: 16 },
|
|
42
|
+
columnGap: { default: 24 },
|
|
41
43
|
class: {},
|
|
42
44
|
style: {}
|
|
43
45
|
},
|
|
@@ -47,8 +49,6 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
47
49
|
const proFormHeight = ref("unset");
|
|
48
50
|
const collapseHeight = ref(0);
|
|
49
51
|
let rowHeight = 32;
|
|
50
|
-
const rowGap = 16;
|
|
51
|
-
const columnGap = 24;
|
|
52
52
|
const computedExpand = computed(() => {
|
|
53
53
|
if (!__props.expand) return false;
|
|
54
54
|
if (__props.expand === true) return { minExpandRows: 2, expandStatus: false };
|
|
@@ -95,11 +95,12 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
95
95
|
var _a, _b, _c;
|
|
96
96
|
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;
|
|
97
97
|
},
|
|
98
|
-
() => formRef.value
|
|
98
|
+
() => formRef.value,
|
|
99
|
+
() => __props.expand
|
|
99
100
|
],
|
|
100
101
|
() => {
|
|
101
102
|
var _a, _b, _c, _d, _e;
|
|
102
|
-
if (!expandStatus.value || !formRef.value) return;
|
|
103
|
+
if (!__props.expand || !expandStatus.value || !formRef.value) return;
|
|
103
104
|
const proFormEl = (_a = formRef.value) == null ? void 0 : _a.$el;
|
|
104
105
|
const { height = 0 } = ((_b = proFormEl == null ? void 0 : proFormEl.getBoundingClientRect) == null ? void 0 : _b.call(proFormEl)) || {};
|
|
105
106
|
proFormHeight.value = height;
|
|
@@ -113,7 +114,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
113
114
|
if (__props.layout === "grid" && computedExpand.value) {
|
|
114
115
|
const { minExpandRows } = computedExpand.value;
|
|
115
116
|
collapseHeight.value = Math.min(
|
|
116
|
-
minExpandRows * rowHeight + (minExpandRows - 1) * rowGap,
|
|
117
|
+
minExpandRows * rowHeight + (minExpandRows - 1) * __props.rowGap,
|
|
117
118
|
+proFormHeight.value
|
|
118
119
|
);
|
|
119
120
|
showExpandToggle.value = +proFormHeight.value - collapseHeight.value > 1;
|
|
@@ -129,7 +130,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
129
130
|
const layoutProps = computed(
|
|
130
131
|
() => __props.layout === "grid" ? {
|
|
131
132
|
grid: {
|
|
132
|
-
gutter: [columnGap, rowGap],
|
|
133
|
+
gutter: [__props.columnGap, __props.rowGap],
|
|
133
134
|
style: { flex: 1, marginRight: "12px" }
|
|
134
135
|
},
|
|
135
136
|
style: {
|
|
@@ -139,7 +140,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
139
140
|
}
|
|
140
141
|
} : {
|
|
141
142
|
layout: "inline",
|
|
142
|
-
style: { gap: `${rowGap}px ${columnGap}px` },
|
|
143
|
+
style: { gap: `${__props.rowGap}px ${__props.columnGap}px` },
|
|
143
144
|
grid: false
|
|
144
145
|
}
|
|
145
146
|
);
|
|
@@ -161,39 +162,43 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
161
162
|
}, {
|
|
162
163
|
default: withCtx(() => [
|
|
163
164
|
renderSlot(_ctx.$slots, "reset-button", { onClick: onReset }, () => [
|
|
164
|
-
__props.resetButton ? (openBlock(),
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
165
|
+
__props.resetButton !== false ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
166
|
+
__props.resetButton ? (openBlock(), createBlock(resolveDynamicComponent(__props.resetButton), {
|
|
167
|
+
key: 0,
|
|
168
|
+
onClick: onReset
|
|
169
|
+
})) : (openBlock(), createBlock(unref(Button), {
|
|
170
|
+
key: 1,
|
|
171
|
+
class: "pro-table_search-form_reset-button",
|
|
172
|
+
onClick: onReset
|
|
173
|
+
}, {
|
|
174
|
+
default: withCtx(() => [..._cache[0] || (_cache[0] = [
|
|
175
|
+
createTextVNode("重置", -1)
|
|
176
|
+
])]),
|
|
177
|
+
_: 1
|
|
178
|
+
}))
|
|
179
|
+
], 64)) : createCommentVNode("", true)
|
|
177
180
|
], true),
|
|
178
181
|
renderSlot(_ctx.$slots, "search-button", { onClick: onSearch }, () => [
|
|
179
|
-
__props.searchButton ? (openBlock(),
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
182
|
+
__props.searchButton !== false ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
183
|
+
__props.searchButton ? (openBlock(), createBlock(resolveDynamicComponent(__props.searchButton), {
|
|
184
|
+
key: 0,
|
|
185
|
+
onClick: onSearch
|
|
186
|
+
})) : (openBlock(), createBlock(unref(Button), {
|
|
187
|
+
key: 1,
|
|
188
|
+
class: "pro-table_search-form_search-button",
|
|
189
|
+
type: "primary",
|
|
190
|
+
"html-type": "submit",
|
|
191
|
+
onClick: onSearch
|
|
192
|
+
}, {
|
|
193
|
+
default: withCtx(() => [..._cache[1] || (_cache[1] = [
|
|
194
|
+
createTextVNode(" 查询 ", -1)
|
|
195
|
+
])]),
|
|
196
|
+
_: 1
|
|
197
|
+
}))
|
|
198
|
+
], 64)) : createCommentVNode("", true)
|
|
194
199
|
], true),
|
|
195
200
|
renderSlot(_ctx.$slots, "expand-button", { onClick: changeExpandStatus }, () => [
|
|
196
|
-
showExpandToggle.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
201
|
+
__props.expandButton !== false && showExpandToggle.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
197
202
|
__props.expandButton ? (openBlock(), createBlock(resolveDynamicComponent(__props.expandButton), {
|
|
198
203
|
key: 0,
|
|
199
204
|
"expand-status": expandStatus.value,
|
|
@@ -224,7 +229,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
224
229
|
};
|
|
225
230
|
}
|
|
226
231
|
});
|
|
227
|
-
const SearchForm = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-
|
|
232
|
+
const SearchForm = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-88be5fd7"]]);
|
|
228
233
|
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
229
234
|
__name: "DefaultSearchFormContainer",
|
|
230
235
|
setup(__props) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qin-ui/antdv-next-pro",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.13",
|
|
4
4
|
"description": "基于 antdv-next 的二次封装组件",
|
|
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 antdv-next-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
|
"antdv-next": "^1.1.0",
|
|
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 antdv-next-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.
|