@vue-ui-kit/ant 2.1.0 → 2.1.1
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/dist/cjs/index.js +2 -2
- package/dist/declarations/antProxy.d.ts +1 -0
- package/dist/es/index.js +401 -398
- package/package.json +2 -2
- package/src/declarations/antProxy.ts +1 -0
- package/src/packages/components/PCanvasGrid.vue +1 -0
- package/src/packages/components/PCanvasTable.vue +2 -0
- package/src/packages/components/PGrid.vue +1 -0
- package/src/packages/store/renderStore.tsx +22 -11
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue-ui-kit/ant",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"description": "Vue3 UI Kit based on Ant Design",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/cjs/index.js",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"email": "adoin@qq.com"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"e-virt-table": "^1.2.
|
|
49
|
+
"e-virt-table": "^1.2.35",
|
|
50
50
|
"uuid": "^10.0.0",
|
|
51
51
|
"xe-utils": "^3.7.6"
|
|
52
52
|
},
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
const propsWithDefaults = computed(() => ({
|
|
39
39
|
...props,
|
|
40
40
|
config: {
|
|
41
|
+
AUTO_ROW_HEIGHT: true,
|
|
41
42
|
DISABLED: true, // 内部写死的默认配置
|
|
42
43
|
...canvasTableDefaults, // 全局配置
|
|
43
44
|
...props.config, // 用户传入的配置
|
|
@@ -299,6 +300,7 @@
|
|
|
299
300
|
v-for="cell in view.cells"
|
|
300
301
|
:key="`${cell.rowKey}_${cell.key}`"
|
|
301
302
|
:style="cell.style"
|
|
303
|
+
v-bind="cell.domDataset"
|
|
302
304
|
>
|
|
303
305
|
<component
|
|
304
306
|
v-if="typeof cell.render === 'function'"
|
|
@@ -210,12 +210,20 @@ const renderBasic = (name: string) => {
|
|
|
210
210
|
},
|
|
211
211
|
};
|
|
212
212
|
};
|
|
213
|
-
type GetPopupContainer = () => HTMLElement
|
|
214
|
-
const renderBtn = (
|
|
213
|
+
type GetPopupContainer = () => HTMLElement;
|
|
214
|
+
const renderBtn = (
|
|
215
|
+
btnOpt: BtnOptions,
|
|
216
|
+
params: RenderTableParams,
|
|
217
|
+
getPopupContainer?: GetPopupContainer,
|
|
218
|
+
) =>
|
|
215
219
|
btnOpt.dropdowns &&
|
|
216
220
|
btnOpt.dropdowns.length > 0 &&
|
|
217
221
|
btnOpt.dropdowns.filter((f) => !f.hiddenIf?.(params)).length > 0 ? (
|
|
218
|
-
<Dropdown
|
|
222
|
+
<Dropdown
|
|
223
|
+
getPopupContainer={
|
|
224
|
+
getPopupContainer ?? (() => document.querySelector('.p-wrapper') as HTMLElement)
|
|
225
|
+
}
|
|
226
|
+
>
|
|
219
227
|
{{
|
|
220
228
|
default: () => (
|
|
221
229
|
<Button
|
|
@@ -456,23 +464,26 @@ const renders: RenderFactory = {
|
|
|
456
464
|
},
|
|
457
465
|
ButtonTree: {
|
|
458
466
|
renderDefault({ children = [], props = {} as Recordable }, params: RenderTableParams) {
|
|
459
|
-
const spanRef = ref<HTMLElement | null>(null)
|
|
467
|
+
const spanRef = ref<HTMLElement | null>(null);
|
|
460
468
|
return (
|
|
461
469
|
<span ref={spanRef} class={props.noGap ? 'align-no-gap-box' : 'align-gap-box'}>
|
|
462
|
-
{
|
|
463
|
-
|
|
470
|
+
{(children as BtnOptions[])
|
|
471
|
+
.filter((f) => !f.hiddenIf?.(params))
|
|
472
|
+
.map((item) =>
|
|
464
473
|
renderBtn(item, params, () => {
|
|
465
|
-
return
|
|
474
|
+
return (
|
|
475
|
+
spanRef.value?.parentElement?.parentElement?.parentElement?.parentElement ||
|
|
476
|
+
document.body
|
|
477
|
+
);
|
|
466
478
|
}),
|
|
467
|
-
) ?? []
|
|
468
|
-
}
|
|
479
|
+
) ?? []}
|
|
469
480
|
</span>
|
|
470
|
-
)
|
|
481
|
+
);
|
|
471
482
|
},
|
|
472
483
|
},
|
|
473
484
|
$radio: {
|
|
474
485
|
renderItemContent(
|
|
475
|
-
{ props = {}, events = {}, options, defaultValue
|
|
486
|
+
{ props = {}, events = {}, options, defaultValue }: RenderOptions,
|
|
476
487
|
{ data, field }: RenderFormParams,
|
|
477
488
|
) {
|
|
478
489
|
if (isGoodValue(defaultValue) && valued(field) && isBadValue(data[field!])) {
|