dfish-widget 1.0.113 → 1.0.115
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/lib/index.esm.js +38 -26
- package/lib/index.esm.js.map +1 -1
- package/package.json +1 -1
package/lib/index.esm.js
CHANGED
|
@@ -2,7 +2,7 @@ import lodash from 'lodash';
|
|
|
2
2
|
import jquery from 'jquery';
|
|
3
3
|
import http from 'axios';
|
|
4
4
|
import Qs from 'qs';
|
|
5
|
-
import { nextTick, h, mergeProps, toRaw, resolveComponent, openBlock, createElementBlock, createStaticVNode, createElementVNode, createBlock, withCtx, Fragment, createVNode, renderList, toDisplayString, createTextVNode, createCommentVNode, inject, provide, renderSlot, Teleport, computed, resolveDirective, withDirectives, unref, ref, onMounted, watch, normalizeStyle, normalizeClass, TransitionGroup, getCurrentInstance, createSlots, resolveDynamicComponent, withModifiers } from 'vue';
|
|
5
|
+
import { nextTick, h, mergeProps, toRaw, resolveComponent, openBlock, createElementBlock, createStaticVNode, createElementVNode, createBlock, withCtx, Fragment, createVNode, renderList, toDisplayString, createTextVNode, createCommentVNode, inject, provide, renderSlot, Teleport, computed, resolveDirective, withDirectives, unref, markRaw, ref, onMounted, watch, normalizeStyle, normalizeClass, TransitionGroup, getCurrentInstance, createSlots, resolveDynamicComponent, withModifiers } from 'vue';
|
|
6
6
|
import ResizeObserver$1 from 'resize-observer-polyfill';
|
|
7
7
|
|
|
8
8
|
let u = navigator.userAgent.toLowerCase();
|
|
@@ -5008,19 +5008,7 @@ var script$_ = {
|
|
|
5008
5008
|
},
|
|
5009
5009
|
data() {
|
|
5010
5010
|
return {
|
|
5011
|
-
sticky: {left: null, right: null, observers: []},
|
|
5012
|
-
}
|
|
5013
|
-
},
|
|
5014
|
-
mounted() {
|
|
5015
|
-
this.$watch('hasSticky', (v) => {
|
|
5016
|
-
this.$nextTick(() => this.observeSticky());
|
|
5017
|
-
}, {immediate: true});
|
|
5018
|
-
this.$el.setAttribute('w-scroll-x', 'left');
|
|
5019
|
-
if ($$1.br.chrome && $$1.br.chrome <= 60) { //低版本谷歌表格宽度有变化时,sticky的td内容会不可见。因此执行一个强制重新渲染的步骤
|
|
5020
|
-
new ResizeObserver$1(() => {
|
|
5021
|
-
this.$el.setAttribute('w-compact-resize-sticky', '');
|
|
5022
|
-
requestAnimationFrame(() => this.$el.removeAttribute('w-compact-resize-sticky'));
|
|
5023
|
-
}).observe(this.$el);
|
|
5011
|
+
sticky: markRaw({left: null, right: null, observers: []}),
|
|
5024
5012
|
}
|
|
5025
5013
|
},
|
|
5026
5014
|
methods: {
|
|
@@ -5036,6 +5024,18 @@ var script$_ = {
|
|
|
5036
5024
|
observers.push(ob);
|
|
5037
5025
|
});
|
|
5038
5026
|
this.sticky.observers = observers;
|
|
5027
|
+
let r = {};
|
|
5028
|
+
if (this.sticky.left) {
|
|
5029
|
+
this.sticky.left.forEach(v => r[`--w-td-fixed-left-${v.colIndex}`] = `${v.offset}px`);
|
|
5030
|
+
}
|
|
5031
|
+
if (this.sticky.right) {
|
|
5032
|
+
this.sticky.right.forEach(v => r[`--w-td-fixed-right-${v.colIndex}`] = `${v.offset}px`);
|
|
5033
|
+
}
|
|
5034
|
+
if (this.$el) {
|
|
5035
|
+
for (let k in r) {
|
|
5036
|
+
this.$el.style.setProperty(k, r[k]);
|
|
5037
|
+
}
|
|
5038
|
+
}
|
|
5039
5039
|
},
|
|
5040
5040
|
initFixedCells(dir) {
|
|
5041
5041
|
let sticky = null;
|
|
@@ -5082,15 +5082,27 @@ var script$_ = {
|
|
|
5082
5082
|
html_class() {
|
|
5083
5083
|
return ['f-flex-column', this.x.face && 'z-face-' + this.x.face]
|
|
5084
5084
|
},
|
|
5085
|
-
html_style() {
|
|
5086
|
-
|
|
5087
|
-
|
|
5088
|
-
|
|
5089
|
-
|
|
5090
|
-
|
|
5091
|
-
|
|
5092
|
-
|
|
5093
|
-
|
|
5085
|
+
// html_style() {
|
|
5086
|
+
// let r = {}
|
|
5087
|
+
// if (this.sticky.left) {
|
|
5088
|
+
// this.sticky.left.forEach(v => r[`--w-td-fixed-left-${v.colIndex}`] = `${v.offset}px`)
|
|
5089
|
+
// }
|
|
5090
|
+
// if (this.sticky.right) {
|
|
5091
|
+
// this.sticky.right.forEach(v => r[`--w-td-fixed-right-${v.colIndex}`] = `${v.offset}px`)
|
|
5092
|
+
// }
|
|
5093
|
+
// return r
|
|
5094
|
+
// }
|
|
5095
|
+
},
|
|
5096
|
+
mounted() {
|
|
5097
|
+
this.$watch('hasSticky', (v) => {
|
|
5098
|
+
this.$nextTick(() => this.observeSticky());
|
|
5099
|
+
}, {immediate: true});
|
|
5100
|
+
this.$el.setAttribute('w-scroll-x', 'left');
|
|
5101
|
+
if ($$1.br.chrome && $$1.br.chrome <= 60) { //低版本谷歌表格宽度有变化时,sticky的td内容会不可见。因此执行一个强制重新渲染的步骤
|
|
5102
|
+
new ResizeObserver$1(() => {
|
|
5103
|
+
this.$el.setAttribute('w-compact-resize-sticky', '');
|
|
5104
|
+
requestAnimationFrame(() => this.$el.removeAttribute('w-compact-resize-sticky'));
|
|
5105
|
+
}).observe(this.$el);
|
|
5094
5106
|
}
|
|
5095
5107
|
}
|
|
5096
5108
|
};
|
|
@@ -5216,7 +5228,7 @@ var script$V = {
|
|
|
5216
5228
|
style.minWidth = $$1.unitSize(mw);
|
|
5217
5229
|
}
|
|
5218
5230
|
}
|
|
5219
|
-
this.rows = {};
|
|
5231
|
+
this.rows = markRaw({});
|
|
5220
5232
|
return h('div', {
|
|
5221
5233
|
class: 'w-table-tbl-wrap'
|
|
5222
5234
|
}, h('table', {
|
|
@@ -5306,7 +5318,7 @@ var script$U = {
|
|
|
5306
5318
|
});
|
|
5307
5319
|
}
|
|
5308
5320
|
},
|
|
5309
|
-
html_slots() {
|
|
5321
|
+
html_slots() {
|
|
5310
5322
|
return this.html_scroll_slots(this.html_tbody())
|
|
5311
5323
|
}
|
|
5312
5324
|
},
|
|
@@ -5379,7 +5391,7 @@ var script$T = {
|
|
|
5379
5391
|
let rs = this.pubParent.rows;
|
|
5380
5392
|
let ci = 0;
|
|
5381
5393
|
return this.slots_children().map(td => {
|
|
5382
|
-
|
|
5394
|
+
while (rs[ri] && rs[ri][ci]) {
|
|
5383
5395
|
ci += rs[ri][ci];
|
|
5384
5396
|
}
|
|
5385
5397
|
td.dfishColIndex = ci;
|