zartui 3.1.53 → 3.1.55
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/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/media-picker/MediaPicker.mjs +1 -1
- package/es/table/Table.mjs +23 -7
- package/es/table/index.css +1 -1
- package/lib/index.css +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/media-picker/MediaPicker.js +1 -1
- package/lib/table/Table.js +23 -7
- package/lib/table/index.css +1 -1
- package/lib/web-types.json +1 -1
- package/lib/zartui.cjs.js +25 -9
- package/lib/zartui.es.js +25 -9
- package/lib/zartui.js +25 -9
- package/lib/zartui.min.js +1 -1
- package/package.json +6 -6
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -182,7 +182,7 @@ __reExport(stdin_exports, require("./timeline"), module.exports);
|
|
|
182
182
|
__reExport(stdin_exports, require("./toast"), module.exports);
|
|
183
183
|
__reExport(stdin_exports, require("./uploader"), module.exports);
|
|
184
184
|
__reExport(stdin_exports, require("./video"), module.exports);
|
|
185
|
-
const version = "3.1.
|
|
185
|
+
const version = "3.1.54";
|
|
186
186
|
function install(app) {
|
|
187
187
|
const components = [
|
|
188
188
|
import_action_sheet.ActionSheet,
|
|
@@ -849,7 +849,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
|
849
849
|
"onSelect": selectAction
|
|
850
850
|
}, null), (0, import_vue.withDirectives)((0, import_vue.createVNode)("div", {
|
|
851
851
|
"class": bem("line")
|
|
852
|
-
}, [renderButtons()]), [[import_vue.vShow, showButtons]]), (0, import_vue.withDirectives)((0, import_vue.createVNode)(import_grid.default, {
|
|
852
|
+
}, [renderButtons(), slots["extend"] ? slots.extend() : ""]), [[import_vue.vShow, showButtons]]), (0, import_vue.withDirectives)((0, import_vue.createVNode)(import_grid.default, {
|
|
853
853
|
"column-num": "3",
|
|
854
854
|
"border": false,
|
|
855
855
|
"square": true,
|
package/lib/table/Table.js
CHANGED
|
@@ -70,7 +70,8 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
|
70
70
|
}) {
|
|
71
71
|
const sortOrder = (0, import_vue.ref)("");
|
|
72
72
|
const sortKey = (0, import_vue.ref)("");
|
|
73
|
-
const
|
|
73
|
+
const tableRef = (0, import_vue.ref)();
|
|
74
|
+
const fixedColumn = (0, import_vue.computed)(() => props.headList.filter((v) => v.fixed || v.fixedRight));
|
|
74
75
|
const formatColumns = (0, import_vue.computed)(() => {
|
|
75
76
|
const columns = [];
|
|
76
77
|
let left = 0;
|
|
@@ -85,7 +86,7 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
|
85
86
|
} else {
|
|
86
87
|
column.left = 0;
|
|
87
88
|
}
|
|
88
|
-
if (element.fixed && !nextColumn.fixed) {
|
|
89
|
+
if (element.fixed && !(nextColumn == null ? void 0 : nextColumn.fixed)) {
|
|
89
90
|
column.lastFixLeft = true;
|
|
90
91
|
}
|
|
91
92
|
columns.push(column);
|
|
@@ -93,8 +94,12 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
|
93
94
|
return columns;
|
|
94
95
|
});
|
|
95
96
|
const pingedLeft = (0, import_vue.ref)(false);
|
|
97
|
+
const pingedRight = (0, import_vue.ref)(false);
|
|
96
98
|
const resortHeadList = (0, import_vue.computed)(() => fixedColumn.value.concat(props.headList.filter((v) => !v.fixed)));
|
|
97
99
|
(0, import_vue.onMounted)(() => {
|
|
100
|
+
if (tableRef.value) {
|
|
101
|
+
pingedRight.value = tableRef.value.scrollWidth > tableRef.value.clientWidth;
|
|
102
|
+
}
|
|
98
103
|
const fixedIndexList = props.headList.map((v, i) => {
|
|
99
104
|
if (v.sorter && v.defaultSortOrder) {
|
|
100
105
|
sortOrder.value = v.defaultSortOrder || "";
|
|
@@ -142,18 +147,24 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
|
142
147
|
} = event;
|
|
143
148
|
const mergedScrollLeft = typeof scrollLeft === "number" ? scrollLeft : currentTarget == null ? void 0 : currentTarget.scrollLeft;
|
|
144
149
|
pingedLeft.value = mergedScrollLeft > 0;
|
|
150
|
+
const rightRemain = currentTarget.scrollWidth - currentTarget.scrollLeft - currentTarget.clientWidth;
|
|
151
|
+
pingedRight.value = rightRemain > 0;
|
|
145
152
|
};
|
|
146
153
|
const getHead = (colData) => {
|
|
147
154
|
const headSlot = slots[`head-${colData.id}`];
|
|
148
155
|
const headEllipsisType = colData.sorter ? "flat" : "dialog";
|
|
149
156
|
if ((colData == null ? void 0 : colData.colSpan) !== 0) {
|
|
150
157
|
return (0, import_vue.createVNode)("th", {
|
|
151
|
-
"class": bem("left", {
|
|
158
|
+
"class": [bem("left", {
|
|
152
159
|
fixed: colData.fixed,
|
|
153
160
|
last: colData.lastFixLeft && pingedLeft.value
|
|
154
|
-
}),
|
|
161
|
+
}), bem("right", {
|
|
162
|
+
fixed: colData.fixedRight,
|
|
163
|
+
last: colData.lastRight && pingedRight.value
|
|
164
|
+
})],
|
|
155
165
|
"style": {
|
|
156
|
-
left: colData.fixed ? colData.left : ""
|
|
166
|
+
left: colData.fixed ? colData.left : "",
|
|
167
|
+
right: colData.fixedRight ? colData.right : ""
|
|
157
168
|
},
|
|
158
169
|
"colspan": (colData == null ? void 0 : colData.colSpan) !== 1 ? colData == null ? void 0 : colData.colSpan : null
|
|
159
170
|
}, [headSlot ? headSlot(colData) : (0, import_vue.createVNode)("div", {
|
|
@@ -210,12 +221,16 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
|
210
221
|
}
|
|
211
222
|
const style = Object.assign({}, colData.style);
|
|
212
223
|
style.left = colData.fixed ? colData.left : "";
|
|
224
|
+
style.right = colData.fixedRight ? colData.right : "";
|
|
213
225
|
return (additionalCellProps == null ? void 0 : additionalCellProps.rowSpan) !== 0 && (additionalCellProps == null ? void 0 : additionalCellProps.colSpan) !== 0 && (0, import_vue.createVNode)("td", {
|
|
214
226
|
"onClick": () => colData.click && colData.click(rowData, rowIndex),
|
|
215
|
-
"class": bem("left", {
|
|
227
|
+
"class": [bem("left", {
|
|
216
228
|
fixed: colData.fixed,
|
|
217
229
|
last: colData.lastFixLeft && pingedLeft.value
|
|
218
|
-
}),
|
|
230
|
+
}), bem("right", {
|
|
231
|
+
fixed: colData.fixedRight,
|
|
232
|
+
last: colData.lastRight && pingedRight.value
|
|
233
|
+
})],
|
|
219
234
|
"colspan": (additionalCellProps == null ? void 0 : additionalCellProps.colSpan) !== 1 ? additionalCellProps == null ? void 0 : additionalCellProps.colSpan : null,
|
|
220
235
|
"rowspan": (additionalCellProps == null ? void 0 : additionalCellProps.rowSpan) !== 1 ? additionalCellProps == null ? void 0 : additionalCellProps.rowSpan : null,
|
|
221
236
|
"style": style
|
|
@@ -250,6 +265,7 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
|
250
265
|
skeleton: true
|
|
251
266
|
})
|
|
252
267
|
}, [getLoadingColumn()]) : (0, import_vue.createVNode)("div", {
|
|
268
|
+
"ref": tableRef,
|
|
253
269
|
"class": bem({
|
|
254
270
|
fixed: fixedColumn.value.length > 0,
|
|
255
271
|
bordered: props.border,
|
package/lib/table/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--zt-table-head-color: var(--zt-primary-color);--zt-table-head-height: 40px;--zt-table-head-background: #e6f5ff;--zt-table-body-height: 40px;--zt-table-body-color: var(--zt-gray);--zt-table-body-background: var(--zt-white);--zt-table-sort-default: var(--zt-gray-5);--zt-table-sort-active: var(--zt-primary-color)}:root[zt-theme-size=large]{--zt-table-head-height: 52px}.zt-base-hair{position:relative}.zt-base-hair:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid var(--zt-border-color);transform:scale(.5)}.zt-table table{border-collapse:separate;border-spacing:0;width:100%;table-layout:auto;box-sizing:border-box}.zt-table--fixed{overflow:auto scroll}.zt-table--fixed::-webkit-scrollbar{width:0;height:0}.zt-table--fixed table{table-layout:fixed}.zt-table--thead-fixed{position:-webkit-sticky!important;position:sticky!important;z-index:2}.zt-table--bordered{position:relative}.zt-table--bordered:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid var(--zt-border-color);transform:scale(.5)}.zt-table--bordered:after{border-left-width:var(--zt-border-width)}.zt-table--bordered>table{position:relative}.zt-table--bordered>table:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid var(--zt-border-color);transform:scale(.5)}.zt-table--bordered>table:after{border-top-width:var(--zt-border-width)}.zt-table--bordered .zt-table__thead>tr>th{position:relative}.zt-table--bordered .zt-table__thead>tr>th:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid var(--zt-border-color);transform:scale(.5)}.zt-table--bordered .zt-table__thead>tr>th:after{border-right-width:var(--zt-border-width);border-bottom-width:var(--zt-border-width)}.zt-table--bordered .zt-table__tbody>tr>td{position:relative}.zt-table--bordered .zt-table__tbody>tr>td:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid var(--zt-border-color);transform:scale(.5)}.zt-table--bordered .zt-table__tbody>tr>td:after{border-right-width:var(--zt-border-width);border-bottom-width:var(--zt-border-width)}.zt-table__thead>tr>th{box-sizing:border-box;overflow-wrap:break-word;min-height:var(--zt-table-head-height);font-weight:600;font-size:var(--zt-font-size-md);color:var(--zt-table-head-color);text-align:center;line-height:var(--zt-table-head-height);background:var(--zt-table-head-background)}.zt-table__tbody>tr>td{box-sizing:border-box;overflow-wrap:break-word;min-height:var(--zt-table-body-height);font-size:var(--zt-font-size-md);color:var(--zt-table-body-color);text-align:center;line-height:var(--zt-line-height-md);background:var(--zt-table-body-background);padding:10px 16px}.zt-table--striped .zt-table__tbody>tr:nth-child(2n)>td{background:var(--zt-table-head-background)}.zt-table__left--last{border-right:none!important}.zt-table__left--last:after{content:"";position:absolute;top:0;right:-10px;width:10px;height:100%;opacity:.06;background-image:linear-gradient(90deg,#000000 0%,rgba(0,0,0,0) 100%)}.zt-table__left--fixed{position:-webkit-sticky!important;position:sticky!important;z-index:2}.zt-table__head{display:flex;justify-content:center}.zt-table__head-sort{display:inline-flex;align-items:center;justify-content:center;flex-direction:column;color:var(--zt-table-sort-default)}.zt-table__head-label{line-height:var(--zt-table-head-height)}.zt-table__head-label-ellipsis{width:100%}.zt-table__sort-active{color:var(--zt-table-sort-active)}.zt-table--skeleton{background-color:#fff;padding-bottom:10px}.zt-table__row{display:flex;box-sizing:border-box;padding:0 10px;height:40px}.zt-table__row--head{display:flex;justify-content:center;align-items:center;background-color:#e7f0fb;margin-bottom:8px}.zt-table__row--head .zt-table__col-item{background-color:#cfdae9;height:20px}.zt-table__col{display:flex;align-items:center;justify-content:center;box-sizing:border-box;flex:1;padding:4px 6px;height:40px}.zt-table__col-item{width:100%;height:100%;border-radius:4px;background-color:rgba(45,75,115,.06)}.zt-table--animate{animation:zt-table-blink var(--zt-skeleton-duration) ease-in-out infinite}@keyframes zt-table-blink{50%{opacity:.6}}
|
|
1
|
+
:root{--zt-table-head-color: var(--zt-primary-color);--zt-table-head-height: 40px;--zt-table-head-background: #e6f5ff;--zt-table-body-height: 40px;--zt-table-body-color: var(--zt-gray);--zt-table-body-background: var(--zt-white);--zt-table-sort-default: var(--zt-gray-5);--zt-table-sort-active: var(--zt-primary-color)}:root[zt-theme-size=large]{--zt-table-head-height: 52px}.zt-base-hair{position:relative}.zt-base-hair:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid var(--zt-border-color);transform:scale(.5)}.zt-table table{border-collapse:separate;border-spacing:0;width:100%;table-layout:auto;box-sizing:border-box}.zt-table--fixed{overflow:auto scroll}.zt-table--fixed::-webkit-scrollbar{width:0;height:0}.zt-table--fixed table{table-layout:fixed}.zt-table--thead-fixed{position:-webkit-sticky!important;position:sticky!important;z-index:2}.zt-table--bordered{position:relative}.zt-table--bordered:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid var(--zt-border-color);transform:scale(.5)}.zt-table--bordered:after{border-left-width:var(--zt-border-width)}.zt-table--bordered>table{position:relative}.zt-table--bordered>table:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid var(--zt-border-color);transform:scale(.5)}.zt-table--bordered>table:after{border-top-width:var(--zt-border-width)}.zt-table--bordered .zt-table__thead>tr>th{position:relative}.zt-table--bordered .zt-table__thead>tr>th:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid var(--zt-border-color);transform:scale(.5)}.zt-table--bordered .zt-table__thead>tr>th:after{border-right-width:var(--zt-border-width);border-bottom-width:var(--zt-border-width)}.zt-table--bordered .zt-table__tbody>tr>td{position:relative}.zt-table--bordered .zt-table__tbody>tr>td:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid var(--zt-border-color);transform:scale(.5)}.zt-table--bordered .zt-table__tbody>tr>td:after{border-right-width:var(--zt-border-width);border-bottom-width:var(--zt-border-width)}.zt-table__thead>tr>th{box-sizing:border-box;overflow-wrap:break-word;min-height:var(--zt-table-head-height);font-weight:600;font-size:var(--zt-font-size-md);color:var(--zt-table-head-color);text-align:center;line-height:var(--zt-table-head-height);background:var(--zt-table-head-background)}.zt-table__tbody>tr>td{box-sizing:border-box;overflow-wrap:break-word;min-height:var(--zt-table-body-height);font-size:var(--zt-font-size-md);color:var(--zt-table-body-color);text-align:center;line-height:var(--zt-line-height-md);background:var(--zt-table-body-background);padding:10px 16px}.zt-table--striped .zt-table__tbody>tr:nth-child(2n)>td{background:var(--zt-table-head-background)}.zt-table__left--last{border-right:none!important}.zt-table__left--last:after{content:"";position:absolute;top:0;right:-10px;width:10px;height:100%;opacity:.06;background-image:linear-gradient(90deg,#000000 0%,rgba(0,0,0,0) 100%)}.zt-table__right--last{border-left:none!important}.zt-table__right--last:after{content:"";position:absolute;top:0;left:-10px;width:10px;height:100%;opacity:.06;background-image:linear-gradient(-90deg,#000000 0%,rgba(0,0,0,0) 100%)}.zt-table__right--fixed,.zt-table__left--fixed{position:-webkit-sticky!important;position:sticky!important;z-index:2}.zt-table__head{display:flex;justify-content:center}.zt-table__head-sort{display:inline-flex;align-items:center;justify-content:center;flex-direction:column;color:var(--zt-table-sort-default)}.zt-table__head-label{line-height:var(--zt-table-head-height)}.zt-table__head-label-ellipsis{width:100%}.zt-table__sort-active{color:var(--zt-table-sort-active)}.zt-table--skeleton{background-color:#fff;padding-bottom:10px}.zt-table__row{display:flex;box-sizing:border-box;padding:0 10px;height:40px}.zt-table__row--head{display:flex;justify-content:center;align-items:center;background-color:#e7f0fb;margin-bottom:8px}.zt-table__row--head .zt-table__col-item{background-color:#cfdae9;height:20px}.zt-table__col{display:flex;align-items:center;justify-content:center;box-sizing:border-box;flex:1;padding:4px 6px;height:40px}.zt-table__col-item{width:100%;height:100%;border-radius:4px;background-color:rgba(45,75,115,.06)}.zt-table--animate{animation:zt-table-blink var(--zt-skeleton-duration) ease-in-out infinite}@keyframes zt-table-blink{50%{opacity:.6}}
|