shijiplus-web-plugin 0.1.53 → 0.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/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shijiplus-web-plugin",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.55",
|
|
4
4
|
"files": [
|
|
5
5
|
"src"
|
|
6
6
|
],
|
|
7
7
|
"description": "A company project update table component fixedheader",
|
|
8
|
-
"author": "
|
|
8
|
+
"author": "super_jex",
|
|
9
9
|
"license": "ISC",
|
|
10
10
|
"private": false,
|
|
11
11
|
"main": "./src/index.js",
|
|
@@ -122,6 +122,18 @@ export default {
|
|
|
122
122
|
margin-top: 10px;
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
|
+
&.position-top {
|
|
126
|
+
flex-wrap: wrap;
|
|
127
|
+
.ivu-form-item-label {
|
|
128
|
+
width: 100% !important;
|
|
129
|
+
text-align: left;
|
|
130
|
+
margin-bottom: 5px;
|
|
131
|
+
display: inline-flex;
|
|
132
|
+
}
|
|
133
|
+
.ivu-form-item-content {
|
|
134
|
+
margin-left: 0 !important;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
125
137
|
&.compact-form-item {
|
|
126
138
|
margin-bottom: 0px;
|
|
127
139
|
}
|
|
@@ -325,63 +325,70 @@ export default {
|
|
|
325
325
|
}
|
|
326
326
|
},
|
|
327
327
|
methods: {
|
|
328
|
-
|
|
329
|
-
this.$
|
|
330
|
-
|
|
331
|
-
|
|
328
|
+
getClientHeight(count) {
|
|
329
|
+
let clientHeight = this.$refs.plusTableInnerRef.clientHeight
|
|
330
|
+
if (!clientHeight && count < 3) {
|
|
331
|
+
return new Promise((resolve) => {
|
|
332
332
|
setTimeout(() => {
|
|
333
|
-
this.
|
|
333
|
+
resolve(this.getClientHeight(count + 1))
|
|
334
334
|
}, 100)
|
|
335
|
-
|
|
336
|
-
|
|
335
|
+
})
|
|
336
|
+
}
|
|
337
|
+
return Promise.resolve(clientHeight)
|
|
338
|
+
},
|
|
339
|
+
calcTableHeight() {
|
|
340
|
+
this.$nextTick(() => {
|
|
337
341
|
let tableWidth = this.$refs.plusTableInnerRef.clientWidth
|
|
342
|
+
this.getClientHeight(0).then((tHeight) => {
|
|
343
|
+
// 获取元素的所有计算样式
|
|
344
|
+
var styles = window.getComputedStyle(this.$refs.plusTableInnerRef)
|
|
338
345
|
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
)
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
346
|
+
var styleHeight = parseFloat(styles.getPropertyValue('height'))
|
|
347
|
+
// 如果您只想获取特定方向的padding值,例如padding-top
|
|
348
|
+
var paddingLeft = parseFloat(styles.getPropertyValue('padding-left'))
|
|
349
|
+
var paddingRight = parseFloat(
|
|
350
|
+
styles.getPropertyValue('padding-right')
|
|
351
|
+
)
|
|
352
|
+
var paddingTop = parseFloat(styles.getPropertyValue('padding-top'))
|
|
353
|
+
var paddingBottom = parseFloat(
|
|
354
|
+
styles.getPropertyValue('padding-bottom')
|
|
355
|
+
)
|
|
356
|
+
if (paddingLeft) {
|
|
357
|
+
tableWidth -= paddingLeft
|
|
358
|
+
}
|
|
359
|
+
if (paddingRight) {
|
|
360
|
+
tableWidth -= paddingRight
|
|
361
|
+
}
|
|
362
|
+
if (paddingTop) {
|
|
363
|
+
tHeight -= paddingTop
|
|
364
|
+
}
|
|
365
|
+
if (paddingBottom) {
|
|
366
|
+
tHeight -= paddingBottom
|
|
367
|
+
}
|
|
368
|
+
this.tableWidth = tableWidth
|
|
369
|
+
if (this.$refs.searchAreaRef) {
|
|
370
|
+
tHeight -= this.$refs.searchAreaRef.clientHeight
|
|
371
|
+
}
|
|
372
|
+
if (this.$refs.headerRef) {
|
|
373
|
+
tHeight -= this.$refs.headerRef.clientHeight
|
|
374
|
+
}
|
|
375
|
+
if (this.$refs.footerRef) {
|
|
376
|
+
tHeight -= this.$refs.footerRef.clientHeight
|
|
377
|
+
}
|
|
378
|
+
if (this.fixedHeader) {
|
|
379
|
+
this.height = tHeight
|
|
380
|
+
} else {
|
|
381
|
+
let tableWrap =
|
|
382
|
+
this.$refs.plusTableInnerRef.getElementsByClassName(
|
|
383
|
+
'ivu-table-wrapper'
|
|
384
|
+
)[0]
|
|
385
|
+
if (tableWrap) {
|
|
386
|
+
if (!this.data.data || !this.data.data.length) {
|
|
387
|
+
tableWrap.style.minHeight = tHeight + 'px'
|
|
388
|
+
}
|
|
382
389
|
}
|
|
383
390
|
}
|
|
384
|
-
}
|
|
391
|
+
})
|
|
385
392
|
})
|
|
386
393
|
},
|
|
387
394
|
slotValue(col, row) {
|