zartui 3.1.54 → 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 CHANGED
@@ -84,4 +84,4 @@ declare namespace _default {
84
84
  }
85
85
  export default _default;
86
86
  export function install(app: any): void;
87
- export const version: "3.1.53";
87
+ export const version: "3.1.54";
package/es/index.mjs CHANGED
@@ -77,7 +77,7 @@ import { Timeline } from "./timeline/index.mjs";
77
77
  import { Toast } from "./toast/index.mjs";
78
78
  import { Uploader } from "./uploader/index.mjs";
79
79
  import { Video } from "./video/index.mjs";
80
- const version = "3.1.53";
80
+ const version = "3.1.54";
81
81
  function install(app) {
82
82
  const components = [
83
83
  ActionSheet,
@@ -37,7 +37,8 @@ var stdin_default = defineComponent({
37
37
  }) {
38
38
  const sortOrder = ref("");
39
39
  const sortKey = ref("");
40
- const fixedColumn = computed(() => props.headList.filter((v) => v.fixed));
40
+ const tableRef = ref();
41
+ const fixedColumn = computed(() => props.headList.filter((v) => v.fixed || v.fixedRight));
41
42
  const formatColumns = computed(() => {
42
43
  const columns = [];
43
44
  let left = 0;
@@ -52,7 +53,7 @@ var stdin_default = defineComponent({
52
53
  } else {
53
54
  column.left = 0;
54
55
  }
55
- if (element.fixed && !nextColumn.fixed) {
56
+ if (element.fixed && !(nextColumn == null ? void 0 : nextColumn.fixed)) {
56
57
  column.lastFixLeft = true;
57
58
  }
58
59
  columns.push(column);
@@ -60,8 +61,12 @@ var stdin_default = defineComponent({
60
61
  return columns;
61
62
  });
62
63
  const pingedLeft = ref(false);
64
+ const pingedRight = ref(false);
63
65
  const resortHeadList = computed(() => fixedColumn.value.concat(props.headList.filter((v) => !v.fixed)));
64
66
  onMounted(() => {
67
+ if (tableRef.value) {
68
+ pingedRight.value = tableRef.value.scrollWidth > tableRef.value.clientWidth;
69
+ }
65
70
  const fixedIndexList = props.headList.map((v, i) => {
66
71
  if (v.sorter && v.defaultSortOrder) {
67
72
  sortOrder.value = v.defaultSortOrder || "";
@@ -109,18 +114,24 @@ var stdin_default = defineComponent({
109
114
  } = event;
110
115
  const mergedScrollLeft = typeof scrollLeft === "number" ? scrollLeft : currentTarget == null ? void 0 : currentTarget.scrollLeft;
111
116
  pingedLeft.value = mergedScrollLeft > 0;
117
+ const rightRemain = currentTarget.scrollWidth - currentTarget.scrollLeft - currentTarget.clientWidth;
118
+ pingedRight.value = rightRemain > 0;
112
119
  };
113
120
  const getHead = (colData) => {
114
121
  const headSlot = slots[`head-${colData.id}`];
115
122
  const headEllipsisType = colData.sorter ? "flat" : "dialog";
116
123
  if ((colData == null ? void 0 : colData.colSpan) !== 0) {
117
124
  return _createVNode("th", {
118
- "class": bem("left", {
125
+ "class": [bem("left", {
119
126
  fixed: colData.fixed,
120
127
  last: colData.lastFixLeft && pingedLeft.value
121
- }),
128
+ }), bem("right", {
129
+ fixed: colData.fixedRight,
130
+ last: colData.lastRight && pingedRight.value
131
+ })],
122
132
  "style": {
123
- left: colData.fixed ? colData.left : ""
133
+ left: colData.fixed ? colData.left : "",
134
+ right: colData.fixedRight ? colData.right : ""
124
135
  },
125
136
  "colspan": (colData == null ? void 0 : colData.colSpan) !== 1 ? colData == null ? void 0 : colData.colSpan : null
126
137
  }, [headSlot ? headSlot(colData) : _createVNode("div", {
@@ -177,12 +188,16 @@ var stdin_default = defineComponent({
177
188
  }
178
189
  const style = Object.assign({}, colData.style);
179
190
  style.left = colData.fixed ? colData.left : "";
191
+ style.right = colData.fixedRight ? colData.right : "";
180
192
  return (additionalCellProps == null ? void 0 : additionalCellProps.rowSpan) !== 0 && (additionalCellProps == null ? void 0 : additionalCellProps.colSpan) !== 0 && _createVNode("td", {
181
193
  "onClick": () => colData.click && colData.click(rowData, rowIndex),
182
- "class": bem("left", {
194
+ "class": [bem("left", {
183
195
  fixed: colData.fixed,
184
196
  last: colData.lastFixLeft && pingedLeft.value
185
- }),
197
+ }), bem("right", {
198
+ fixed: colData.fixedRight,
199
+ last: colData.lastRight && pingedRight.value
200
+ })],
186
201
  "colspan": (additionalCellProps == null ? void 0 : additionalCellProps.colSpan) !== 1 ? additionalCellProps == null ? void 0 : additionalCellProps.colSpan : null,
187
202
  "rowspan": (additionalCellProps == null ? void 0 : additionalCellProps.rowSpan) !== 1 ? additionalCellProps == null ? void 0 : additionalCellProps.rowSpan : null,
188
203
  "style": style
@@ -217,6 +232,7 @@ var stdin_default = defineComponent({
217
232
  skeleton: true
218
233
  })
219
234
  }, [getLoadingColumn()]) : _createVNode("div", {
235
+ "ref": tableRef,
220
236
  "class": bem({
221
237
  fixed: fixedColumn.value.length > 0,
222
238
  bordered: props.border,
@@ -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}}