dfish-widget 1.0.103 → 1.0.105
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 +30 -8
- package/lib/index.esm.js.map +1 -1
- package/package.json +1 -1
package/lib/index.esm.js
CHANGED
|
@@ -5004,12 +5004,13 @@ var script$_ = {
|
|
|
5004
5004
|
},
|
|
5005
5005
|
data() {
|
|
5006
5006
|
return {
|
|
5007
|
-
sticky: {left: null, right: null},
|
|
5007
|
+
sticky: {left: null, right: null, observers: []},
|
|
5008
5008
|
}
|
|
5009
5009
|
},
|
|
5010
5010
|
mounted() {
|
|
5011
|
-
|
|
5012
|
-
|
|
5011
|
+
this.$watch('hasSticky', (v) => {
|
|
5012
|
+
this.observeSticky();
|
|
5013
|
+
}, {immediate: true});
|
|
5013
5014
|
this.$el.setAttribute('w-scroll-x', 'left');
|
|
5014
5015
|
if ($$1.br.chrome && $$1.br.chrome <= 60) { //低版本谷歌表格宽度有变化时,sticky的td内容会不可见。因此执行一个强制重新渲染的步骤
|
|
5015
5016
|
new ResizeObserver$1(() => {
|
|
@@ -5019,6 +5020,19 @@ var script$_ = {
|
|
|
5019
5020
|
}
|
|
5020
5021
|
},
|
|
5021
5022
|
methods: {
|
|
5023
|
+
observeSticky() {
|
|
5024
|
+
const observe = (e) => this.initFixedCells('left').concat(this.initFixedCells('right'));
|
|
5025
|
+
for (let ob of this.sticky.observers) {
|
|
5026
|
+
ob.disconnect();
|
|
5027
|
+
}
|
|
5028
|
+
let observers = [];
|
|
5029
|
+
$$1.lodash.each(observe(), cell => {
|
|
5030
|
+
let ob = new ResizeObserver$1(observe);
|
|
5031
|
+
ob.observe(cell);
|
|
5032
|
+
observers.push(ob);
|
|
5033
|
+
});
|
|
5034
|
+
this.sticky.observers = observers;
|
|
5035
|
+
},
|
|
5022
5036
|
initFixedCells(dir) {
|
|
5023
5037
|
let sticky = null;
|
|
5024
5038
|
let offset = 0;
|
|
@@ -5054,6 +5068,13 @@ var script$_ = {
|
|
|
5054
5068
|
colgroup() {
|
|
5055
5069
|
return $$1.slotsChildren(this.slotHooks.columns.children).map(v => v.props)
|
|
5056
5070
|
},
|
|
5071
|
+
hasSticky() {
|
|
5072
|
+
let s = '';
|
|
5073
|
+
for (let col of this.colgroup) {
|
|
5074
|
+
if (col.fixed) s += col.fixed;
|
|
5075
|
+
}
|
|
5076
|
+
return s
|
|
5077
|
+
},
|
|
5057
5078
|
html_class() {
|
|
5058
5079
|
return ['f-flex-column', this.x.face && 'z-face-' + this.x.face]
|
|
5059
5080
|
},
|
|
@@ -12142,12 +12163,13 @@ var script$6 = {
|
|
|
12142
12163
|
class: 'w-combobox-input',
|
|
12143
12164
|
style: {
|
|
12144
12165
|
width: this.sensor_width,
|
|
12145
|
-
},
|
|
12166
|
+
},
|
|
12167
|
+
readonly: !this.isNormal,
|
|
12146
12168
|
placeholder: this.input_value ? null : this.input_placeholder,
|
|
12147
12169
|
oninput: this.oninput,
|
|
12148
12170
|
onkeydown: this.onkeydown,
|
|
12149
|
-
onblur: this.onblur,
|
|
12150
|
-
onfocus: this.onfocus,
|
|
12171
|
+
onblur: this.isNormal && this.onblur,
|
|
12172
|
+
onfocus: this.isNormal && this.onfocus,
|
|
12151
12173
|
})
|
|
12152
12174
|
])
|
|
12153
12175
|
},
|
|
@@ -12155,9 +12177,9 @@ var script$6 = {
|
|
|
12155
12177
|
const r = [
|
|
12156
12178
|
this.html_options()
|
|
12157
12179
|
];
|
|
12158
|
-
if (this.isNormal) {
|
|
12180
|
+
//if (this.isNormal) {
|
|
12159
12181
|
r.push(this.html_var());
|
|
12160
|
-
}
|
|
12182
|
+
//}
|
|
12161
12183
|
if (this.showSuggest) {
|
|
12162
12184
|
let dropProps = {
|
|
12163
12185
|
context: this,
|