@vrojs/element-plus 0.0.16 → 0.0.18
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/index.js +24 -26
- package/dist/style/index.css +1 -1
- package/dist/vro-el-table/index.d.ts +9 -4
- package/dist/vro-el-table/index.js +7 -9
- package/dist/vro-el-table/types.d.ts +19 -2
- package/dist/vro-el-table/types.js +8 -0
- package/dist/vro-el-table/useVroElTable.d.ts +36 -27
- package/dist/vro-el-table/useVroElTable.js +27 -32
- package/dist/vro-el-table/vro-el-table.vue.d.ts +6 -2
- package/dist/vro-el-table/vro-el-table.vue.js +32 -32
- package/dist/vro-el-table-actions-column/index.d.ts +15 -0
- package/dist/vro-el-table-actions-column/types.d.ts +17 -13
- package/dist/vro-el-table-actions-column/types.js +9 -2
- package/dist/vro-el-table-actions-column/vro-el-table-actions-column.vue.d.ts +9 -0
- package/dist/vro-el-table-actions-column/vro-el-table-actions-column.vue.js +51 -54
- package/dist/vro-el-table-column/index.d.ts +6 -6
- package/dist/vro-el-table-column/style/index.css +1 -1
- package/dist/vro-el-table-column/types.d.ts +21 -10
- package/dist/vro-el-table-column/types.js +8 -8
- package/dist/vro-el-table-column/vro-el-table-column.vue.d.ts +4 -4
- package/dist/vro-el-table-column/vro-el-table-column.vue.js +48 -46
- package/dist/vro-el-table-column-group/types.d.ts +5 -6
- package/package.json +4 -4
- package/dist/vro-el-table/createUseVroElTable.d.ts +0 -10
- package/dist/vro-el-table/createUseVroElTable.js +0 -7
package/dist/index.js
CHANGED
|
@@ -12,7 +12,7 @@ import { VroElImage as P } from "./vro-el-image/index.js";
|
|
|
12
12
|
import { VroElImageUpload as d } from "./vro-el-image-upload/index.js";
|
|
13
13
|
import { VroElRadioGroup as b } from "./vro-el-radio-group/index.js";
|
|
14
14
|
import { VroElSchemaFilter as D } from "./vro-el-schema-filter/index.js";
|
|
15
|
-
import { VroElSchemaForm as
|
|
15
|
+
import { VroElSchemaForm as w } from "./vro-el-schema-form/index.js";
|
|
16
16
|
import { VroElSchemaFormDialog as O } from "./vro-el-schema-form-dialog/index.js";
|
|
17
17
|
import { VroElSchemaFormDrawer as y } from "./vro-el-schema-form-drawer/index.js";
|
|
18
18
|
import { VroElSelect as j } from "./vro-el-select/index.js";
|
|
@@ -35,7 +35,7 @@ import { getVroElImageOptions as Fo, setVroElImageOptions as ho } from "./vro-el
|
|
|
35
35
|
import { vroElImageUploadProps as Po } from "./vro-el-image-upload/types.js";
|
|
36
36
|
import { getVroElImageUploadOptions as To, setVroElImageUploadOptions as bo } from "./vro-el-image-upload/utils.js";
|
|
37
37
|
import { vroElRadioGroupProps as Do } from "./vro-el-radio-group/types.js";
|
|
38
|
-
import { vroElSchemaFilterProps as
|
|
38
|
+
import { vroElSchemaFilterProps as wo } from "./vro-el-schema-filter/types.js";
|
|
39
39
|
import { defineVroElSchemaFormCreateField as Oo } from "./vro-el-schema-form/defineVroElSchemaFormCreateField.js";
|
|
40
40
|
import { defineVroElSchemaFormFieldTrigger as yo } from "./vro-el-schema-form/defineVroElSchemaFormFieldTrigger.js";
|
|
41
41
|
import { vroElSchemaFormProps as jo } from "./vro-el-schema-form/types.js";
|
|
@@ -51,17 +51,16 @@ import { vroElSchemaFormDrawerProps as er } from "./vro-el-schema-form-drawer/ty
|
|
|
51
51
|
import { useVroElSchemaFormDrawer as mr } from "./vro-el-schema-form-drawer/useVroElSchemaFormDrawer.js";
|
|
52
52
|
import { vroElSelectProps as tr } from "./vro-el-select/types.js";
|
|
53
53
|
import { vroElSkeletonProps as fr } from "./vro-el-skeleton/types.js";
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import { vroElWithConfigProps as Ur } from "./vro-el-with-config/types.js";
|
|
54
|
+
import { vroElTableProps as Er } from "./vro-el-table/types.js";
|
|
55
|
+
import { useVroElTable as ir } from "./vro-el-table/useVroElTable.js";
|
|
56
|
+
import { vroElTableActionsColumnProps as Vr } from "./vro-el-table-actions-column/types.js";
|
|
57
|
+
import { vroElTableColumnProps as gr } from "./vro-el-table-column/types.js";
|
|
58
|
+
import { vroElTableColumnGroupProps as vr } from "./vro-el-table-column-group/types.js";
|
|
59
|
+
import { useVroElTableColumnGroup as hr } from "./vro-el-table-column-group/useVroElTableColumnGroup.js";
|
|
60
|
+
import { vroElTableColumnGroupColumnManager as Pr } from "./vro-el-table-column-group/vroElTableColumnGroupColumnManager.js";
|
|
61
|
+
import { vroElTagsProps as dr } from "./vro-el-tags/types.js";
|
|
62
|
+
import { vroElTreeProps as br } from "./vro-el-tree/types.js";
|
|
63
|
+
import { vroElWithConfigProps as Dr } from "./vro-el-with-config/types.js";
|
|
65
64
|
export {
|
|
66
65
|
V as VroElCheckboxGroup,
|
|
67
66
|
g as VroElConfigProvider,
|
|
@@ -71,7 +70,7 @@ export {
|
|
|
71
70
|
d as VroElImageUpload,
|
|
72
71
|
b as VroElRadioGroup,
|
|
73
72
|
D as VroElSchemaFilter,
|
|
74
|
-
|
|
73
|
+
w as VroElSchemaForm,
|
|
75
74
|
O as VroElSchemaFormDialog,
|
|
76
75
|
y as VroElSchemaFormDrawer,
|
|
77
76
|
j as VroElSelect,
|
|
@@ -83,7 +82,6 @@ export {
|
|
|
83
82
|
Q as VroElTags,
|
|
84
83
|
Y as VroElTree,
|
|
85
84
|
_ as VroElWithConfig,
|
|
86
|
-
Er as createUseVroElTable,
|
|
87
85
|
f as datePickerValueFormat,
|
|
88
86
|
Oo as defineVroElSchemaFormCreateField,
|
|
89
87
|
yo as defineVroElSchemaFormFieldTrigger,
|
|
@@ -108,8 +106,8 @@ export {
|
|
|
108
106
|
qo as useVroElSchemaFormDialogInstance,
|
|
109
107
|
mr as useVroElSchemaFormDrawer,
|
|
110
108
|
$o as useVroElSchemaFormDrawerInstance,
|
|
111
|
-
|
|
112
|
-
|
|
109
|
+
ir as useVroElTable,
|
|
110
|
+
hr as useVroElTableColumnGroup,
|
|
113
111
|
oo as vroElCheckboxGroupProps,
|
|
114
112
|
to as vroElConfigContextKey,
|
|
115
113
|
fo as vroElConfigProviderProps,
|
|
@@ -118,7 +116,7 @@ export {
|
|
|
118
116
|
uo as vroElImageProps,
|
|
119
117
|
Po as vroElImageUploadProps,
|
|
120
118
|
Do as vroElRadioGroupProps,
|
|
121
|
-
|
|
119
|
+
wo as vroElSchemaFilterProps,
|
|
122
120
|
Bo as vroElSchemaFormDialogInjectionKey,
|
|
123
121
|
Jo as vroElSchemaFormDialogProps,
|
|
124
122
|
or as vroElSchemaFormDrawerInjectionKey,
|
|
@@ -127,13 +125,13 @@ export {
|
|
|
127
125
|
jo as vroElSchemaFormProps,
|
|
128
126
|
tr as vroElSelectProps,
|
|
129
127
|
fr as vroElSkeletonProps,
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
128
|
+
Vr as vroElTableActionsColumnProps,
|
|
129
|
+
Pr as vroElTableColumnGroupColumnManager,
|
|
130
|
+
vr as vroElTableColumnGroupProps,
|
|
131
|
+
gr as vroElTableColumnProps,
|
|
132
|
+
Er as vroElTableProps,
|
|
133
|
+
dr as vroElTagsProps,
|
|
134
|
+
br as vroElTreeProps,
|
|
135
|
+
Dr as vroElWithConfigProps,
|
|
138
136
|
m as zhCN
|
|
139
137
|
};
|
package/dist/style/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";:root,:host{--vro-el-file-upload-gap: 8px;--vro-el-file-upload-item-font-size: 14px;--vro-el-file-upload-item-line-height: 1.5;--vro-el-file-upload-link-color: var(--el-color-primary);--vro-el-file-upload-clear-gap: 10px;--vro-el-file-upload-clear-color: var(--el-color-danger);--vro-el-file-upload-clear-background: var(--el-fill-color-light)}.vro-el-file-upload-btn{position:relative}.vro-el-file-upload-btn input{cursor:pointer;position:absolute;top:0;left:0;width:100%;height:100%;opacity:0}.vro-el-file-upload-content{padding:0;margin:var(--vro-el-file-upload-gap) 0 0;list-style:none}.vro-el-file-upload-item{position:relative;box-sizing:border-box;display:flex;align-items:center;margin-top:var(--vro-el-file-upload-gap);font-size:var(--vro-el-file-upload-item-font-size);line-height:var(--vro-el-file-upload-item-line-height)}.vro-el-file-upload-item a{min-width:0;margin-right:var(--vro-el-file-upload-clear-gap);color:var(--vro-el-file-upload-link-color);text-decoration:underline;word-break:break-all}.vro-el-file-upload-clear{flex:none;color:var(--vro-el-file-upload-clear-color);background-color:var(--vro-el-file-upload-clear-background);cursor:pointer}:root,:host{--vro-el-image-placeholder-background: var(--el-fill-color-light);--vro-el-image-loading-color: var(--el-text-color-placeholder);--vro-el-image-loading-size: 16px;--vro-el-image-error-background: var(--el-fill-color-light);--vro-el-image-error-color: var(--el-text-color-placeholder);--vro-el-image-error-icon-size: 24px}.vro-el-image-placeholder,.vro-el-image-error{display:flex;align-items:center;justify-content:center;width:100%;height:100%;overflow:hidden}.vro-el-image-placeholder{--vro-loading-color: var(--vro-el-image-loading-color);--vro-loading-size: var(--vro-el-image-loading-size);background-color:var(--vro-el-image-placeholder-background)}.vro-el-image-error{color:var(--vro-el-image-error-color);background-color:var(--vro-el-image-error-background)}.vro-el-image-error-icon{font-size:var(--vro-el-image-error-icon-size)}:root,:host{--vro-el-image-upload-gap: 10px;--vro-el-image-upload-item-size: 100px;--vro-el-image-upload-item-radius: 4px;--vro-el-image-upload-item-border-color: var(--el-border-color);--vro-el-image-upload-item-icon-size: 24px;--vro-el-image-upload-checkerboard-size: 8px;--vro-el-image-upload-clear-size: 20px;--vro-el-image-upload-clear-color: #fff;--vro-el-image-upload-clear-background: var(--el-color-danger)}.vro-el-image-upload-content{display:flex;flex-wrap:wrap;margin-top:calc(var(--vro-el-image-upload-gap) * -1)}.vro-el-image-upload-item{cursor:pointer;position:relative;box-sizing:border-box;display:flex;align-items:center;justify-content:center;width:var(--vro-el-image-upload-item-size);height:var(--vro-el-image-upload-item-size);margin-top:var(--vro-el-image-upload-gap);margin-right:var(--vro-el-image-upload-gap);font-size:var(--vro-el-image-upload-item-icon-size);border:1px dashed var(--vro-el-image-upload-item-border-color);border-radius:var(--vro-el-image-upload-item-radius)}.vro-el-image-upload-item .vro-el-image-upload-image,.vro-el-image-upload-item img{position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover;object-position:center;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAgMAAABinRfyAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAlQTFRFyMjI////1tbWF77ztQAAABZJREFUeJxjYGAIDWUggggNbWAgggAA918Ooanz2WEAAAAASUVORK5CYII=) center!important;background-size:var(--vro-el-image-upload-checkerboard-size)!important;border-radius:var(--vro-el-image-upload-item-radius);transform:translateZ(0)}.vro-el-image-upload-item input{cursor:pointer;position:absolute;top:0;left:0;width:100%;height:100%;border-radius:var(--vro-el-image-upload-item-radius);opacity:0}.vro-el-image-upload-clear{position:absolute;top:-6px;right:-6px;color:var(--vro-el-image-upload-clear-color);font-size:var(--vro-el-image-upload-clear-size);background:var(--vro-el-image-upload-clear-background);border-radius:50%;cursor:pointer}:root,:host{--vro-el-schema-filter-padding: 0 16px 16px;--vro-el-schema-filter-background: var(--el-bg-color);--vro-el-schema-filter-col-margin-top: 16px}.vro-el-schema-filter{display:block;box-sizing:border-box;overflow:hidden;padding:var(--vro-el-schema-filter-padding);background-color:var(--vro-el-schema-filter-background)}.vro-el-schema-filter .el-form-item__label{display:flex;align-items:center;text-align:right;line-height:1.1;margin-bottom:0}.vro-el-schema-filter .el-form-item{margin-bottom:0}.vro-el-schema-filter .el-col{margin-top:var(--vro-el-schema-filter-col-margin-top)}.vro-el-schema-form{display:block;width:100%}.vro-el-schema-form .el-date-editor{--el-date-editor-width: 100%}.vro-el-schema-form .el-cascader,.vro-el-schema-form .el-input-number.is-controls-right{width:100%}:root,:host{--vro-el-schema-form-dialog-width: 520px}.vro-el-schema-form-dialog{--el-dialog-width: var(--vro-el-schema-form-dialog-width);width:var(--el-dialog-width)}:root,:host{--vro-el-schema-form-drawer-padding: 20px;--vro-el-schema-form-drawer-border-color: var(--el-border-color);--vro-el-schema-form-drawer-size: 520px}.vro-el-schema-form-drawer .el-drawer__header{margin-bottom:0;border-bottom:1px solid var(--vro-el-schema-form-drawer-border-color);padding:var(--vro-el-schema-form-drawer-padding)}.vro-el-schema-form-drawer .el-drawer__body{min-width:0;overflow-y:auto}.vro-el-schema-form-drawer .el-drawer__footer{padding:var(--vro-el-schema-form-drawer-padding);border-top:1px solid var(--vro-el-schema-form-drawer-border-color)}.vro-el-schema-form-drawer-footer{display:flex;justify-content:flex-end}:root,:host{--vro-el-skeleton-min-height: 240px;--vro-el-skeleton-color: var(--el-text-color-secondary);--vro-el-skeleton-description-margin-top: 16px;--vro-el-skeleton-description-color: var(--el-text-color-secondary);--vro-el-skeleton-description-font-size: var(--el-font-size-base);--vro-el-skeleton-description-line-height: 1.5}.vro-el-skeleton{width:100%;min-height:var(--vro-el-skeleton-min-height)}.vro-el-skeleton-state{display:flex;align-items:center;justify-content:center;width:100%;min-height:inherit}.vro-el-skeleton-loading{flex-direction:column;color:var(--vro-el-skeleton-color)}.vro-el-skeleton-description{margin:var(--vro-el-skeleton-description-margin-top) 0 0;color:var(--vro-el-skeleton-description-color);font-size:var(--vro-el-skeleton-description-font-size);line-height:var(--vro-el-skeleton-description-line-height);text-align:center}:root,:host{--vro-el-table-gap: 16px;--vro-el-table-padding: 16px;--vro-el-table-inner-gap: var(--vro-el-table-gap)}.vro-el-table{display:flex;flex-direction:column;width:100%;box-sizing:border-box;gap:var(--vro-el-table-gap)}.vro-el-table .el-table-column--selection{line-height:normal}.vro-el-table .el-table__expand-icon{display:flex;align-items:center;justify-content:center}.vro-el-table-inner{flex:1;position:relative;background-color:var(--el-bg-color);padding:var(--vro-el-table-padding);display:flex;flex-direction:column;gap:var(--vro-el-table-inner-gap)}.vro-el-table-header{display:flex;align-items:center;flex-wrap:wrap}.vro-el-table-header h2{font-size:16px}.vro-el-table-actions{flex-shrink:0;margin-left:auto}.vro-el-table-content{flex:1}.vro-el-table-content .el-table{width:100%;--el-table-bg-color: transparent}.vro-el-table-content .el-table__header{--el-table-header-bg-color: var(--el-bg-color-page);--el-table-header-text-color: var(--el-text-color-primary)}.vro-el-table-content .el-table__body-wrapper .cell{line-height:1.4}.vro-el-table-content .el-table__body-wrapper strong{font-weight:700;font-size:14px}.vro-el-table-content .el-table__body-wrapper dl dt{font-weight:700;margin-bottom:8px;font-size:14px}.vro-el-table-content .el-table__body-wrapper dl dt:last-child{margin-bottom:0}.vro-el-table-content .el-table__body-wrapper dl dd{margin-bottom:4px}.vro-el-table-content .el-table__body-wrapper dl dd:last-of-type{margin-bottom:0}.vro-el-table-content .el-table__body-wrapper ul li{margin-bottom:4px}.vro-el-table-content .el-table__body-wrapper ul li:last-of-type{margin-bottom:0}.vro-el-table-pagination{justify-content:flex-end}:root,:host{--vro-el-table-actions-column-row-gap: 4px;--vro-el-table-actions-column-column-gap: 12px}.vro-el-table-actions-column-cell .cell{display:flex;flex-wrap:wrap;row-gap:var(--vro-el-table-actions-column-row-gap);column-gap:var(--vro-el-table-actions-column-column-gap)}.vro-el-table-actions-column-cell .cell>.el-button+.el-button{margin-left:0}.vro-el-table-actions-column-dropdown-action.is-primary{color:var(--el-color-primary)}.vro-el-table-actions-column-dropdown-action.is-success{color:var(--el-color-success)}.vro-el-table-actions-column-dropdown-action.is-warning{color:var(--el-color-warning)}.vro-el-table-actions-column-dropdown-action.is-danger{color:var(--el-color-danger)}.vro-el-table-actions-column-dropdown-action.is-info{color:var(--el-color-info)}:root,:host{--vro-el-table-column-gap: 4px;--vro-el-table-column-icon-size: 14px;--vro-el-table-column-line-clamp: 1}.vro-el-table-column-content{display:inline-flex;width:100%;max-width:100%;min-width:0;align-items:center;gap:var(--vro-el-table-column-gap);vertical-align:middle}.vro-el-table-column-content.is-center{justify-content:center}.vro-el-table-column-content.is-right{justify-content:flex-end}.vro-el-table-column-content .vro-el-icon{flex:none;font-size:var(--vro-el-table-column-icon-size)}.vro-el-table-column-prefix,.vro-el-table-column-suffix{display:inline-flex;flex:none;min-width:0;align-items:center}.vro-el-table-column-text{flex:0 1 auto;max-width:100%;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vro-el-table-column-text.is-line-clamp{display:-webkit-box;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:var(--vro-el-table-column-line-clamp)}:root,:host{--vro-el-tags-gap: 8px;--vro-el-tags-input-width: 120px}.vro-el-tags{display:flex;flex-wrap:wrap;align-items:center;gap:var(--vro-el-tags-gap)}.vro-el-tags-tag,.vro-el-tags-button{flex:none}.vro-el-tags-input{width:var(--vro-el-tags-input-width)}.vro-el-tree{width:100%;min-width:0;box-sizing:border-box;-webkit-user-select:none;user-select:none}
|
|
1
|
+
@charset "UTF-8";:root,:host{--vro-el-file-upload-gap: 8px;--vro-el-file-upload-item-font-size: 14px;--vro-el-file-upload-item-line-height: 1.5;--vro-el-file-upload-link-color: var(--el-color-primary);--vro-el-file-upload-clear-gap: 10px;--vro-el-file-upload-clear-color: var(--el-color-danger);--vro-el-file-upload-clear-background: var(--el-fill-color-light)}.vro-el-file-upload-btn{position:relative}.vro-el-file-upload-btn input{cursor:pointer;position:absolute;top:0;left:0;width:100%;height:100%;opacity:0}.vro-el-file-upload-content{padding:0;margin:var(--vro-el-file-upload-gap) 0 0;list-style:none}.vro-el-file-upload-item{position:relative;box-sizing:border-box;display:flex;align-items:center;margin-top:var(--vro-el-file-upload-gap);font-size:var(--vro-el-file-upload-item-font-size);line-height:var(--vro-el-file-upload-item-line-height)}.vro-el-file-upload-item a{min-width:0;margin-right:var(--vro-el-file-upload-clear-gap);color:var(--vro-el-file-upload-link-color);text-decoration:underline;word-break:break-all}.vro-el-file-upload-clear{flex:none;color:var(--vro-el-file-upload-clear-color);background-color:var(--vro-el-file-upload-clear-background);cursor:pointer}:root,:host{--vro-el-image-placeholder-background: var(--el-fill-color-light);--vro-el-image-loading-color: var(--el-text-color-placeholder);--vro-el-image-loading-size: 16px;--vro-el-image-error-background: var(--el-fill-color-light);--vro-el-image-error-color: var(--el-text-color-placeholder);--vro-el-image-error-icon-size: 24px}.vro-el-image-placeholder,.vro-el-image-error{display:flex;align-items:center;justify-content:center;width:100%;height:100%;overflow:hidden}.vro-el-image-placeholder{--vro-loading-color: var(--vro-el-image-loading-color);--vro-loading-size: var(--vro-el-image-loading-size);background-color:var(--vro-el-image-placeholder-background)}.vro-el-image-error{color:var(--vro-el-image-error-color);background-color:var(--vro-el-image-error-background)}.vro-el-image-error-icon{font-size:var(--vro-el-image-error-icon-size)}:root,:host{--vro-el-image-upload-gap: 10px;--vro-el-image-upload-item-size: 100px;--vro-el-image-upload-item-radius: 4px;--vro-el-image-upload-item-border-color: var(--el-border-color);--vro-el-image-upload-item-icon-size: 24px;--vro-el-image-upload-checkerboard-size: 8px;--vro-el-image-upload-clear-size: 20px;--vro-el-image-upload-clear-color: #fff;--vro-el-image-upload-clear-background: var(--el-color-danger)}.vro-el-image-upload-content{display:flex;flex-wrap:wrap;margin-top:calc(var(--vro-el-image-upload-gap) * -1)}.vro-el-image-upload-item{cursor:pointer;position:relative;box-sizing:border-box;display:flex;align-items:center;justify-content:center;width:var(--vro-el-image-upload-item-size);height:var(--vro-el-image-upload-item-size);margin-top:var(--vro-el-image-upload-gap);margin-right:var(--vro-el-image-upload-gap);font-size:var(--vro-el-image-upload-item-icon-size);border:1px dashed var(--vro-el-image-upload-item-border-color);border-radius:var(--vro-el-image-upload-item-radius)}.vro-el-image-upload-item .vro-el-image-upload-image,.vro-el-image-upload-item img{position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover;object-position:center;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAgMAAABinRfyAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAlQTFRFyMjI////1tbWF77ztQAAABZJREFUeJxjYGAIDWUggggNbWAgggAA918Ooanz2WEAAAAASUVORK5CYII=) center!important;background-size:var(--vro-el-image-upload-checkerboard-size)!important;border-radius:var(--vro-el-image-upload-item-radius);transform:translateZ(0)}.vro-el-image-upload-item input{cursor:pointer;position:absolute;top:0;left:0;width:100%;height:100%;border-radius:var(--vro-el-image-upload-item-radius);opacity:0}.vro-el-image-upload-clear{position:absolute;top:-6px;right:-6px;color:var(--vro-el-image-upload-clear-color);font-size:var(--vro-el-image-upload-clear-size);background:var(--vro-el-image-upload-clear-background);border-radius:50%;cursor:pointer}:root,:host{--vro-el-schema-filter-padding: 0 16px 16px;--vro-el-schema-filter-background: var(--el-bg-color);--vro-el-schema-filter-col-margin-top: 16px}.vro-el-schema-filter{display:block;box-sizing:border-box;overflow:hidden;padding:var(--vro-el-schema-filter-padding);background-color:var(--vro-el-schema-filter-background)}.vro-el-schema-filter .el-form-item__label{display:flex;align-items:center;text-align:right;line-height:1.1;margin-bottom:0}.vro-el-schema-filter .el-form-item{margin-bottom:0}.vro-el-schema-filter .el-col{margin-top:var(--vro-el-schema-filter-col-margin-top)}.vro-el-schema-form{display:block;width:100%}.vro-el-schema-form .el-date-editor{--el-date-editor-width: 100%}.vro-el-schema-form .el-cascader,.vro-el-schema-form .el-input-number.is-controls-right{width:100%}:root,:host{--vro-el-schema-form-dialog-width: 520px}.vro-el-schema-form-dialog{--el-dialog-width: var(--vro-el-schema-form-dialog-width);width:var(--el-dialog-width)}:root,:host{--vro-el-schema-form-drawer-padding: 20px;--vro-el-schema-form-drawer-border-color: var(--el-border-color);--vro-el-schema-form-drawer-size: 520px}.vro-el-schema-form-drawer .el-drawer__header{margin-bottom:0;border-bottom:1px solid var(--vro-el-schema-form-drawer-border-color);padding:var(--vro-el-schema-form-drawer-padding)}.vro-el-schema-form-drawer .el-drawer__body{min-width:0;overflow-y:auto}.vro-el-schema-form-drawer .el-drawer__footer{padding:var(--vro-el-schema-form-drawer-padding);border-top:1px solid var(--vro-el-schema-form-drawer-border-color)}.vro-el-schema-form-drawer-footer{display:flex;justify-content:flex-end}:root,:host{--vro-el-skeleton-min-height: 240px;--vro-el-skeleton-color: var(--el-text-color-secondary);--vro-el-skeleton-description-margin-top: 16px;--vro-el-skeleton-description-color: var(--el-text-color-secondary);--vro-el-skeleton-description-font-size: var(--el-font-size-base);--vro-el-skeleton-description-line-height: 1.5}.vro-el-skeleton{width:100%;min-height:var(--vro-el-skeleton-min-height)}.vro-el-skeleton-state{display:flex;align-items:center;justify-content:center;width:100%;min-height:inherit}.vro-el-skeleton-loading{flex-direction:column;color:var(--vro-el-skeleton-color)}.vro-el-skeleton-description{margin:var(--vro-el-skeleton-description-margin-top) 0 0;color:var(--vro-el-skeleton-description-color);font-size:var(--vro-el-skeleton-description-font-size);line-height:var(--vro-el-skeleton-description-line-height);text-align:center}:root,:host{--vro-el-table-gap: 16px;--vro-el-table-padding: 16px;--vro-el-table-inner-gap: var(--vro-el-table-gap)}.vro-el-table{display:flex;flex-direction:column;width:100%;box-sizing:border-box;gap:var(--vro-el-table-gap)}.vro-el-table .el-table-column--selection{line-height:normal}.vro-el-table .el-table__expand-icon{display:flex;align-items:center;justify-content:center}.vro-el-table-inner{flex:1;position:relative;background-color:var(--el-bg-color);padding:var(--vro-el-table-padding);display:flex;flex-direction:column;gap:var(--vro-el-table-inner-gap)}.vro-el-table-header{display:flex;align-items:center;flex-wrap:wrap}.vro-el-table-header h2{font-size:16px}.vro-el-table-actions{flex-shrink:0;margin-left:auto}.vro-el-table-content{flex:1}.vro-el-table-content .el-table{width:100%;--el-table-bg-color: transparent}.vro-el-table-content .el-table__header{--el-table-header-bg-color: var(--el-bg-color-page);--el-table-header-text-color: var(--el-text-color-primary)}.vro-el-table-content .el-table__body-wrapper .cell{line-height:1.4}.vro-el-table-content .el-table__body-wrapper strong{font-weight:700;font-size:14px}.vro-el-table-content .el-table__body-wrapper dl dt{font-weight:700;margin-bottom:8px;font-size:14px}.vro-el-table-content .el-table__body-wrapper dl dt:last-child{margin-bottom:0}.vro-el-table-content .el-table__body-wrapper dl dd{margin-bottom:4px}.vro-el-table-content .el-table__body-wrapper dl dd:last-of-type{margin-bottom:0}.vro-el-table-content .el-table__body-wrapper ul li{margin-bottom:4px}.vro-el-table-content .el-table__body-wrapper ul li:last-of-type{margin-bottom:0}.vro-el-table-pagination{justify-content:flex-end}:root,:host{--vro-el-table-actions-column-row-gap: 4px;--vro-el-table-actions-column-column-gap: 12px}.vro-el-table-actions-column-cell .cell{display:flex;flex-wrap:wrap;row-gap:var(--vro-el-table-actions-column-row-gap);column-gap:var(--vro-el-table-actions-column-column-gap)}.vro-el-table-actions-column-cell .cell>.el-button+.el-button{margin-left:0}.vro-el-table-actions-column-dropdown-action.is-primary{color:var(--el-color-primary)}.vro-el-table-actions-column-dropdown-action.is-success{color:var(--el-color-success)}.vro-el-table-actions-column-dropdown-action.is-warning{color:var(--el-color-warning)}.vro-el-table-actions-column-dropdown-action.is-danger{color:var(--el-color-danger)}.vro-el-table-actions-column-dropdown-action.is-info{color:var(--el-color-info)}:root,:host{--vro-el-table-column-gap: 4px;--vro-el-table-column-icon-size: 14px;--vro-el-table-column-line-clamp: 1}.vro-el-table-column-content{display:inline-flex;width:100%;max-width:100%;min-width:0;align-items:center;gap:var(--vro-el-table-column-gap);vertical-align:middle}.vro-el-table-column-content.is-left{justify-content:flex-start}.vro-el-table-column-content.is-center{justify-content:center}.vro-el-table-column-content.is-right{justify-content:flex-end}.vro-el-table-column-content .vro-el-icon{flex:none;font-size:var(--vro-el-table-column-icon-size)}.vro-el-table-column-prefix,.vro-el-table-column-suffix{display:inline-flex;flex:none;min-width:0;align-items:center}.vro-el-table-column-text{flex:0 1 auto;max-width:100%;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vro-el-table-column-text.is-line-clamp{display:-webkit-box;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:var(--vro-el-table-column-line-clamp)}:root,:host{--vro-el-tags-gap: 8px;--vro-el-tags-input-width: 120px}.vro-el-tags{display:flex;flex-wrap:wrap;align-items:center;gap:var(--vro-el-tags-gap)}.vro-el-tags-tag,.vro-el-tags-button{flex:none}.vro-el-tags-input{width:var(--vro-el-tags-input-width)}.vro-el-tree{width:100%;min-width:0;box-sizing:border-box;-webkit-user-select:none;user-select:none}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export * from './createUseVroElTable';
|
|
2
1
|
export * from './types';
|
|
3
2
|
export * from './useVroElTable';
|
|
4
3
|
export declare const VroElTable: import('@vrojs/base').WithInstall<{
|
|
@@ -7,7 +6,8 @@ export declare const VroElTable: import('@vrojs/base').WithInstall<{
|
|
|
7
6
|
type: BooleanConstructor;
|
|
8
7
|
default: boolean;
|
|
9
8
|
};
|
|
10
|
-
|
|
9
|
+
schema: import('vue').PropType<import('..').VroElSchemaFormSchema>;
|
|
10
|
+
filterProps: import('vue').PropType<Partial<Pick<import('..').VroElSchemaFilterProps, "schema">>>;
|
|
11
11
|
columns: {
|
|
12
12
|
type: import('vue').PropType<import('..').VroElTableColumnGroupColumn[]>;
|
|
13
13
|
default: () => never[];
|
|
@@ -23,6 +23,7 @@ export declare const VroElTable: import('@vrojs/base').WithInstall<{
|
|
|
23
23
|
default: boolean;
|
|
24
24
|
};
|
|
25
25
|
paginationProps: import('vue').PropType<Partial<import('element-plus').PaginationProps>>;
|
|
26
|
+
pagination: import('vue').PropType<Partial<Pick<import('element-plus').PaginationProps, "currentPage" | "total" | "pageSize">>>;
|
|
26
27
|
showRefresh: {
|
|
27
28
|
type: BooleanConstructor;
|
|
28
29
|
default: boolean;
|
|
@@ -61,7 +62,8 @@ export declare const VroElTable: import('@vrojs/base').WithInstall<{
|
|
|
61
62
|
type: BooleanConstructor;
|
|
62
63
|
default: boolean;
|
|
63
64
|
};
|
|
64
|
-
|
|
65
|
+
schema: import('vue').PropType<import('..').VroElSchemaFormSchema>;
|
|
66
|
+
filterProps: import('vue').PropType<Partial<Pick<import('..').VroElSchemaFilterProps, "schema">>>;
|
|
65
67
|
columns: {
|
|
66
68
|
type: import('vue').PropType<import('..').VroElTableColumnGroupColumn[]>;
|
|
67
69
|
default: () => never[];
|
|
@@ -77,6 +79,7 @@ export declare const VroElTable: import('@vrojs/base').WithInstall<{
|
|
|
77
79
|
default: boolean;
|
|
78
80
|
};
|
|
79
81
|
paginationProps: import('vue').PropType<Partial<import('element-plus').PaginationProps>>;
|
|
82
|
+
pagination: import('vue').PropType<Partial<Pick<import('element-plus').PaginationProps, "currentPage" | "total" | "pageSize">>>;
|
|
80
83
|
showRefresh: {
|
|
81
84
|
type: BooleanConstructor;
|
|
82
85
|
default: boolean;
|
|
@@ -107,7 +110,8 @@ export declare const VroElTable: import('@vrojs/base').WithInstall<{
|
|
|
107
110
|
type: BooleanConstructor;
|
|
108
111
|
default: boolean;
|
|
109
112
|
};
|
|
110
|
-
|
|
113
|
+
schema: import('vue').PropType<import('..').VroElSchemaFormSchema>;
|
|
114
|
+
filterProps: import('vue').PropType<Partial<Pick<import('..').VroElSchemaFilterProps, "schema">>>;
|
|
111
115
|
columns: {
|
|
112
116
|
type: import('vue').PropType<import('..').VroElTableColumnGroupColumn[]>;
|
|
113
117
|
default: () => never[];
|
|
@@ -123,6 +127,7 @@ export declare const VroElTable: import('@vrojs/base').WithInstall<{
|
|
|
123
127
|
default: boolean;
|
|
124
128
|
};
|
|
125
129
|
paginationProps: import('vue').PropType<Partial<import('element-plus').PaginationProps>>;
|
|
130
|
+
pagination: import('vue').PropType<Partial<Pick<import('element-plus').PaginationProps, "currentPage" | "total" | "pageSize">>>;
|
|
126
131
|
showRefresh: {
|
|
127
132
|
type: BooleanConstructor;
|
|
128
133
|
default: boolean;
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { withInstall as o } from "@vrojs/base";
|
|
2
2
|
import r from "./vro-el-table.vue.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
const t = o(r);
|
|
3
|
+
import { vroElTableProps as f } from "./types.js";
|
|
4
|
+
import { useVroElTable as s } from "./useVroElTable.js";
|
|
5
|
+
const e = o(r);
|
|
7
6
|
export {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
s as vroElTableProps
|
|
7
|
+
e as VroElTable,
|
|
8
|
+
e as default,
|
|
9
|
+
s as useVroElTable,
|
|
10
|
+
f as vroElTableProps
|
|
13
11
|
};
|
|
@@ -1,14 +1,23 @@
|
|
|
1
1
|
import { PaginationProps, TableProps } from 'element-plus';
|
|
2
2
|
import { ExtractPropTypes, PropType } from 'vue';
|
|
3
3
|
import { VroElSchemaFilterProps } from '../vro-el-schema-filter';
|
|
4
|
+
import { VroElSchemaFormSchema } from '../vro-el-schema-form';
|
|
4
5
|
import { VroElTableColumnGroupColumn } from '../vro-el-table-column-group';
|
|
5
6
|
export interface VroElTableRequestPayload {
|
|
6
7
|
currentPage?: number;
|
|
7
8
|
pageSize?: number;
|
|
8
9
|
query?: Record<string, any>;
|
|
9
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* 请求函数的分页参数:[currentPage, pageSize]。
|
|
13
|
+
*/
|
|
14
|
+
export type VroElTableRequestParams = [currentPage: number, pageSize: number];
|
|
15
|
+
/**
|
|
16
|
+
* 请求函数的查询参数。
|
|
17
|
+
*/
|
|
18
|
+
export type VroElTableRequestQuery = Record<string, any>;
|
|
10
19
|
export interface VroElTableRequest<T = any> {
|
|
11
|
-
(state:
|
|
20
|
+
(state: VroElTableRequestParams, query: VroElTableRequestQuery): Promise<[T[], number]>;
|
|
12
21
|
}
|
|
13
22
|
export interface VroElTableEmits {
|
|
14
23
|
request: [payload?: VroElTableRequestPayload];
|
|
@@ -42,10 +51,14 @@ export declare const vroElTableProps: {
|
|
|
42
51
|
type: BooleanConstructor;
|
|
43
52
|
default: boolean;
|
|
44
53
|
};
|
|
54
|
+
/**
|
|
55
|
+
* 表单字段 schema 配置。
|
|
56
|
+
*/
|
|
57
|
+
schema: PropType<VroElSchemaFormSchema>;
|
|
45
58
|
/**
|
|
46
59
|
* 筛选区属性,透传给 VroElSchemaFilter。
|
|
47
60
|
*/
|
|
48
|
-
filterProps: PropType<Partial<VroElSchemaFilterProps
|
|
61
|
+
filterProps: PropType<Partial<Pick<VroElSchemaFilterProps, "schema">>>;
|
|
49
62
|
/**
|
|
50
63
|
* 表格列配置。
|
|
51
64
|
*/
|
|
@@ -79,6 +92,10 @@ export declare const vroElTableProps: {
|
|
|
79
92
|
* 分页属性,透传给 ElPagination。
|
|
80
93
|
*/
|
|
81
94
|
paginationProps: PropType<Partial<PaginationProps>>;
|
|
95
|
+
/**
|
|
96
|
+
* 分页属性,透传给 ElPagination。
|
|
97
|
+
*/
|
|
98
|
+
pagination: PropType<Partial<Pick<PaginationProps, "currentPage" | "total" | "pageSize">>>;
|
|
82
99
|
/**
|
|
83
100
|
* 是否显示刷新按钮。
|
|
84
101
|
*/
|
|
@@ -9,6 +9,10 @@ const t = {
|
|
|
9
9
|
type: Boolean,
|
|
10
10
|
default: !0
|
|
11
11
|
},
|
|
12
|
+
/**
|
|
13
|
+
* 表单字段 schema 配置。
|
|
14
|
+
*/
|
|
15
|
+
schema: Object,
|
|
12
16
|
/**
|
|
13
17
|
* 筛选区属性,透传给 VroElSchemaFilter。
|
|
14
18
|
*/
|
|
@@ -46,6 +50,10 @@ const t = {
|
|
|
46
50
|
* 分页属性,透传给 ElPagination。
|
|
47
51
|
*/
|
|
48
52
|
paginationProps: Object,
|
|
53
|
+
/**
|
|
54
|
+
* 分页属性,透传给 ElPagination。
|
|
55
|
+
*/
|
|
56
|
+
pagination: Object,
|
|
49
57
|
/**
|
|
50
58
|
* 是否显示刷新按钮。
|
|
51
59
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UseAsyncTaskOptions } from '@vrojs/use';
|
|
2
|
-
import { Ref } from 'vue';
|
|
2
|
+
import { ComputedRef, Ref } from 'vue';
|
|
3
3
|
import { VroElSchemaFormSchema, VroElSchemaFormSchemaFieldBase } from '../vro-el-schema-form';
|
|
4
4
|
import { VroElTableColumnGroupColumns } from '../vro-el-table-column-group';
|
|
5
5
|
import { VroElTableRequest } from './types';
|
|
@@ -12,33 +12,42 @@ export type UseVroElTableAsyncTaskParams = {
|
|
|
12
12
|
pageSize?: number;
|
|
13
13
|
query?: Record<string, any>;
|
|
14
14
|
} | number;
|
|
15
|
-
export type UseVroElTableRawColumns<T extends Record<string, any> = any> = (() => VroElTableColumnGroupColumns<T>) | VroElTableColumnGroupColumns<T>;
|
|
16
15
|
export type UseVroElTableSchema<T extends VroElSchemaFormSchema> = {
|
|
17
16
|
[P in keyof T]: VroElSchemaFormSchemaFieldBase;
|
|
18
17
|
};
|
|
19
|
-
export
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
18
|
+
export interface UseVroElTablePagination {
|
|
19
|
+
currentPage: number;
|
|
20
|
+
pageSize: number;
|
|
21
|
+
total: number;
|
|
22
|
+
}
|
|
23
|
+
export interface UseVroElTableTableProps<Row extends Record<string, any> = any, R extends VroElSchemaFormSchema = never> {
|
|
24
|
+
schema: UseVroElTableSchema<R> | undefined;
|
|
25
|
+
loading: boolean;
|
|
26
|
+
columns: VroElTableColumnGroupColumns<Row>;
|
|
27
|
+
data: Row[];
|
|
28
|
+
pagination: UseVroElTablePagination;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* 传入了筛选表单时返回 schema 类型,未传入时返回 undefined。
|
|
32
|
+
*/
|
|
33
|
+
export type UseVroElTableSchemaResult<R extends VroElSchemaFormSchema> = [R] extends [never] ? undefined : UseVroElTableSchema<R>;
|
|
34
|
+
export interface UseVroElTableReturn<Row extends Record<string, any> = any, R extends VroElSchemaFormSchema = never> {
|
|
35
|
+
tableProps: ComputedRef<UseVroElTableTableProps<Row, R>>;
|
|
36
|
+
query: Ref<Record<string, any> | undefined>;
|
|
37
|
+
schema: UseVroElTableSchemaResult<R>;
|
|
38
|
+
columns: VroElTableColumnGroupColumns<Row>;
|
|
36
39
|
trigger: (params?: UseVroElTableAsyncTaskParams) => Promise<Row[]>;
|
|
37
|
-
data: Ref<Row[]
|
|
38
|
-
loading: Ref<boolean
|
|
39
|
-
pagination:
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
40
|
+
data: Ref<Row[]>;
|
|
41
|
+
loading: Ref<boolean>;
|
|
42
|
+
pagination: UseVroElTablePagination;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* 表格请求状态管理。
|
|
46
|
+
*
|
|
47
|
+
* 参数统一按「筛选表单 → 请求函数 → 列配置 → 选项」排列,`request` 始终紧跟筛选表单,
|
|
48
|
+
* 因此 `Row` 在解析列配置之前就能从 `request` 的返回值推断出来,列配置里的 `row` 可以直接拿到具体类型。
|
|
49
|
+
*/
|
|
50
|
+
export declare function useVroElTable<Row extends Record<string, any>, R extends VroElSchemaFormSchema = VroElSchemaFormSchema>(rowSchema: R, request: VroElTableRequest<Row>, rawColumns: VroElTableColumnGroupColumns<Row>, options?: UseVroElTableOptions<Row>): UseVroElTableReturn<Row, R>;
|
|
51
|
+
export declare function useVroElTable<Row extends Record<string, any>>(request: VroElTableRequest<Row>, rawColumns: VroElTableColumnGroupColumns<Row>, options?: UseVroElTableOptions<Row>): UseVroElTableReturn<Row, never>;
|
|
52
|
+
export declare function useVroElTable<Row extends Record<string, any>, R extends VroElSchemaFormSchema = VroElSchemaFormSchema>(rowSchema: R, request: VroElTableRequest<Row>, options?: UseVroElTableOptions<Row>): UseVroElTableReturn<Row, R>;
|
|
53
|
+
export declare function useVroElTable<Row extends Record<string, any>>(request: VroElTableRequest<Row>, options?: UseVroElTableOptions<Row>): UseVroElTableReturn<Row, never>;
|
|
@@ -1,49 +1,44 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import { useAsyncTask as
|
|
4
|
-
import { reactive as
|
|
5
|
-
|
|
6
|
-
function
|
|
7
|
-
const { query: d, ...P } = y, a = n(
|
|
8
|
-
p(i) ? i() : i
|
|
9
|
-
), u = n(p(o) ? o() : o), r = d ?? T(), t = n({
|
|
1
|
+
import E from "../node_modules/.pnpm/@ajuanjs_banana@0.0.3/node_modules/@ajuanjs/banana/dist/index.js";
|
|
2
|
+
import { isNumber as T, filterEmptyValue as V } from "@daysnap/utils";
|
|
3
|
+
import { useAsyncTask as h } from "@vrojs/use";
|
|
4
|
+
import { reactive as c, ref as k, computed as j } from "vue";
|
|
5
|
+
function C(e, u, d, m) {
|
|
6
|
+
const i = !Array.isArray(e) && typeof e != "function", s = i ? e : void 0, v = i ? u : e, a = i ? d : u, A = Array.isArray(a) ? a : [], w = (Array.isArray(a) ? m : a) ?? {}, n = s ? c(s) : void 0, l = c(A), { query: P, ...b } = w, o = P ?? k(), t = c({
|
|
10
7
|
currentPage: 1,
|
|
11
8
|
pageSize: 10,
|
|
12
9
|
total: 0
|
|
13
|
-
}), { trigger:
|
|
14
|
-
async (
|
|
15
|
-
|
|
16
|
-
const { currentPage:
|
|
17
|
-
|
|
18
|
-
const [
|
|
19
|
-
return t.total =
|
|
10
|
+
}), { trigger: S, data: y, loading: g } = h(
|
|
11
|
+
async (r) => {
|
|
12
|
+
T(r) && (r = { currentPage: r });
|
|
13
|
+
const { currentPage: f, pageSize: p } = Object.assign({}, t, r);
|
|
14
|
+
r?.query && (o.value = r.query), o.value || (o.value = n ? V(await E.extract(n), !0) : {}), t.currentPage = f, t.pageSize = p;
|
|
15
|
+
const [x, z] = await v([f, p], o.value);
|
|
16
|
+
return t.total = z, x || [];
|
|
20
17
|
},
|
|
21
18
|
{
|
|
22
19
|
immediate: !0,
|
|
23
20
|
throwError: !0,
|
|
24
21
|
initialValue: [],
|
|
25
|
-
...
|
|
22
|
+
...b
|
|
26
23
|
}
|
|
27
24
|
);
|
|
28
25
|
return {
|
|
29
|
-
tableProps:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
data: c.value,
|
|
36
|
-
paginationProps: t
|
|
26
|
+
tableProps: j(() => ({
|
|
27
|
+
schema: n,
|
|
28
|
+
loading: g.value,
|
|
29
|
+
columns: l,
|
|
30
|
+
data: y.value,
|
|
31
|
+
pagination: t
|
|
37
32
|
})),
|
|
38
|
-
query:
|
|
39
|
-
schema:
|
|
40
|
-
columns:
|
|
41
|
-
trigger:
|
|
42
|
-
data:
|
|
43
|
-
loading:
|
|
33
|
+
query: o,
|
|
34
|
+
schema: n,
|
|
35
|
+
columns: l,
|
|
36
|
+
trigger: S,
|
|
37
|
+
data: y,
|
|
38
|
+
loading: g,
|
|
44
39
|
pagination: t
|
|
45
40
|
};
|
|
46
41
|
}
|
|
47
42
|
export {
|
|
48
|
-
|
|
43
|
+
C as useVroElTable
|
|
49
44
|
};
|
|
@@ -14,7 +14,8 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
14
14
|
type: BooleanConstructor;
|
|
15
15
|
default: boolean;
|
|
16
16
|
};
|
|
17
|
-
|
|
17
|
+
schema: import('vue').PropType<import('..').VroElSchemaFormSchema>;
|
|
18
|
+
filterProps: import('vue').PropType<Partial<Pick<import('..').VroElSchemaFilterProps, "schema">>>;
|
|
18
19
|
columns: {
|
|
19
20
|
type: import('vue').PropType<import('..').VroElTableColumnGroupColumn[]>;
|
|
20
21
|
default: () => never[];
|
|
@@ -30,6 +31,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
30
31
|
default: boolean;
|
|
31
32
|
};
|
|
32
33
|
paginationProps: import('vue').PropType<Partial<import('element-plus').PaginationProps>>;
|
|
34
|
+
pagination: import('vue').PropType<Partial<Pick<import('element-plus').PaginationProps, "currentPage" | "total" | "pageSize">>>;
|
|
33
35
|
showRefresh: {
|
|
34
36
|
type: BooleanConstructor;
|
|
35
37
|
default: boolean;
|
|
@@ -48,7 +50,8 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
48
50
|
type: BooleanConstructor;
|
|
49
51
|
default: boolean;
|
|
50
52
|
};
|
|
51
|
-
|
|
53
|
+
schema: import('vue').PropType<import('..').VroElSchemaFormSchema>;
|
|
54
|
+
filterProps: import('vue').PropType<Partial<Pick<import('..').VroElSchemaFilterProps, "schema">>>;
|
|
52
55
|
columns: {
|
|
53
56
|
type: import('vue').PropType<import('..').VroElTableColumnGroupColumn[]>;
|
|
54
57
|
default: () => never[];
|
|
@@ -64,6 +67,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
64
67
|
default: boolean;
|
|
65
68
|
};
|
|
66
69
|
paginationProps: import('vue').PropType<Partial<import('element-plus').PaginationProps>>;
|
|
70
|
+
pagination: import('vue').PropType<Partial<Pick<import('element-plus').PaginationProps, "currentPage" | "total" | "pageSize">>>;
|
|
67
71
|
showRefresh: {
|
|
68
72
|
type: BooleanConstructor;
|
|
69
73
|
default: boolean;
|
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import { defineComponent as $,
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { VroElTableColumnGroup as j } from "../vro-el-table-column-group/index.js";
|
|
1
|
+
import { defineComponent as $, computed as k, useTemplateRef as y, createElementBlock as i, openBlock as r, createBlock as s, createCommentVNode as a, createElementVNode as p, unref as l, mergeProps as u, withDirectives as P, renderSlot as n, withCtx as g, createTextVNode as T, toDisplayString as V, createVNode as q } from "vue";
|
|
2
|
+
import { RefreshRight as w } from "@element-plus/icons-vue";
|
|
3
|
+
import { ElLoading as C, ElButton as S, ElTable as z, ElPagination as R } from "element-plus";
|
|
4
|
+
import { useLocale as B } from "../locale/useLocale.js";
|
|
5
|
+
import { VroElSchemaFilter as N } from "../vro-el-schema-filter/index.js";
|
|
6
|
+
import { VroElTableColumnGroup as L } from "../vro-el-table-column-group/index.js";
|
|
8
7
|
import { vroElTableProps as D } from "./types.js";
|
|
9
|
-
const U = { class: "vro-el-table" },
|
|
8
|
+
const U = { class: "vro-el-table" }, j = { class: "vro-el-table-inner" }, F = {
|
|
10
9
|
key: 0,
|
|
11
10
|
class: "vro-el-table-header"
|
|
12
|
-
},
|
|
11
|
+
}, G = { class: "vro-el-table-actions" }, H = { class: "vro-el-table-content" }, W = /* @__PURE__ */ $({
|
|
13
12
|
name: "VroElTable",
|
|
14
13
|
__name: "vro-el-table",
|
|
15
14
|
props: D,
|
|
16
15
|
emits: ["request", "selection-change"],
|
|
17
|
-
setup(f, { expose:
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
});
|
|
22
|
-
return
|
|
16
|
+
setup(f, { expose: b }) {
|
|
17
|
+
const m = f, { t: v } = B(), c = k(() => ({
|
|
18
|
+
...m.paginationProps,
|
|
19
|
+
...m.pagination
|
|
20
|
+
})), h = z, E = C.directive, d = y("refElTable");
|
|
21
|
+
return b({
|
|
23
22
|
get elTable() {
|
|
24
|
-
return
|
|
23
|
+
return d.value;
|
|
25
24
|
}
|
|
26
25
|
}), (e, o) => (r(), i("div", U, [
|
|
27
|
-
|
|
26
|
+
e.filterable && e.schema ? (r(), s(l(N), u({ key: 0 }, e.filterProps, {
|
|
27
|
+
schema: e.schema,
|
|
28
28
|
loading: e.loading,
|
|
29
29
|
class: "vro-el-table-filter",
|
|
30
30
|
onQuery: o[0] || (o[0] = (t) => e.$emit("request", { query: t, currentPage: 1 }))
|
|
31
|
-
}), null, 16, ["loading"])) : a("", !0),
|
|
32
|
-
|
|
33
|
-
e.showHeader && (e.$slots.title || e.$slots.actions || e.showRefresh) ? (r(), i("div",
|
|
31
|
+
}), null, 16, ["schema", "loading"])) : a("", !0),
|
|
32
|
+
p("div", j, [
|
|
33
|
+
e.showHeader && (e.$slots.title || e.$slots.actions || e.showRefresh) ? (r(), i("div", F, [
|
|
34
34
|
n(e.$slots, "title"),
|
|
35
|
-
|
|
36
|
-
e.showRefresh ? (r(), s(l(
|
|
35
|
+
p("div", G, [
|
|
36
|
+
e.showRefresh ? (r(), s(l(S), {
|
|
37
37
|
key: 0,
|
|
38
38
|
plain: "",
|
|
39
|
-
icon: l(
|
|
39
|
+
icon: l(w),
|
|
40
40
|
loading: e.loading,
|
|
41
41
|
onClick: o[1] || (o[1] = (t) => e.$emit("request"))
|
|
42
42
|
}, {
|
|
43
|
-
default:
|
|
43
|
+
default: g(() => [
|
|
44
44
|
T(V(l(v)("table.refresh")), 1)
|
|
45
45
|
]),
|
|
46
46
|
_: 1
|
|
@@ -48,19 +48,19 @@ const U = { class: "vro-el-table" }, F = { class: "vro-el-table-inner" }, G = {
|
|
|
48
48
|
n(e.$slots, "actions")
|
|
49
49
|
])
|
|
50
50
|
])) : a("", !0),
|
|
51
|
-
P((r(), i("div",
|
|
52
|
-
q(l(
|
|
51
|
+
P((r(), i("div", H, [
|
|
52
|
+
q(l(h), u({
|
|
53
53
|
ref_key: "refElTable",
|
|
54
|
-
ref:
|
|
54
|
+
ref: d,
|
|
55
55
|
width: "100%",
|
|
56
56
|
"table-layout": "fixed"
|
|
57
57
|
}, e.tableProps, {
|
|
58
58
|
data: e.data,
|
|
59
59
|
onSelectionChange: o[2] || (o[2] = (t) => e.$emit("selection-change", t))
|
|
60
60
|
}), {
|
|
61
|
-
default:
|
|
61
|
+
default: g(() => [
|
|
62
62
|
n(e.$slots, "content-prefix"),
|
|
63
|
-
e.columns.length ? (r(), s(l(
|
|
63
|
+
e.columns.length ? (r(), s(l(L), {
|
|
64
64
|
key: 0,
|
|
65
65
|
columns: e.columns
|
|
66
66
|
}, null, 8, ["columns"])) : a("", !0),
|
|
@@ -69,7 +69,7 @@ const U = { class: "vro-el-table" }, F = { class: "vro-el-table-inner" }, G = {
|
|
|
69
69
|
_: 3
|
|
70
70
|
}, 16, ["data"])
|
|
71
71
|
])), [
|
|
72
|
-
[l(
|
|
72
|
+
[l(E), e.loading]
|
|
73
73
|
]),
|
|
74
74
|
e.pageable ? (r(), s(l(R), u({
|
|
75
75
|
key: 1,
|
|
@@ -78,7 +78,7 @@ const U = { class: "vro-el-table" }, F = { class: "vro-el-table-inner" }, G = {
|
|
|
78
78
|
background: "",
|
|
79
79
|
size: "small",
|
|
80
80
|
"page-sizes": [10, 20, 50, 100]
|
|
81
|
-
},
|
|
81
|
+
}, c.value, {
|
|
82
82
|
"onUpdate:currentPage": o[3] || (o[3] = (t) => e.$emit("request", { currentPage: t })),
|
|
83
83
|
"onUpdate:pageSize": o[4] || (o[4] = (t) => e.$emit("request", { pageSize: t, currentPage: 1 }))
|
|
84
84
|
}), null, 16)) : a("", !0)
|
|
@@ -87,5 +87,5 @@ const U = { class: "vro-el-table" }, F = { class: "vro-el-table-inner" }, G = {
|
|
|
87
87
|
}
|
|
88
88
|
});
|
|
89
89
|
export {
|
|
90
|
-
|
|
90
|
+
W as default
|
|
91
91
|
};
|