adtec-core-package 2.3.7 → 2.3.8
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 +1 -1
- package/src/utils/FrameworkUtils.ts +16 -4
package/package.json
CHANGED
|
@@ -251,7 +251,7 @@ export default {
|
|
|
251
251
|
s: {
|
|
252
252
|
alignment: {
|
|
253
253
|
vertical: 'center', // 垂直居中
|
|
254
|
-
horizontal:
|
|
254
|
+
horizontal: c.align, // 水平居中
|
|
255
255
|
},
|
|
256
256
|
// border 边框属性
|
|
257
257
|
border: {
|
|
@@ -287,7 +287,7 @@ export default {
|
|
|
287
287
|
// STEP 4: Write Excel file to browser
|
|
288
288
|
XLSX.writeFile(wb, fileName+'.xlsx')
|
|
289
289
|
},
|
|
290
|
-
|
|
290
|
+
generateHeader(
|
|
291
291
|
columns: any[],
|
|
292
292
|
rows: any[],
|
|
293
293
|
columnIndex: number,
|
|
@@ -302,6 +302,10 @@ export default {
|
|
|
302
302
|
row = []
|
|
303
303
|
rows.push(row)
|
|
304
304
|
}
|
|
305
|
+
let headerAlign='left'
|
|
306
|
+
if(c.headerAlign){
|
|
307
|
+
headerAlign = c.headerAlign.replace('is-','')
|
|
308
|
+
}
|
|
305
309
|
row[columnIndex] = {
|
|
306
310
|
v: c.label,
|
|
307
311
|
t: 's',
|
|
@@ -309,7 +313,7 @@ export default {
|
|
|
309
313
|
font: { bold: true },
|
|
310
314
|
alignment: {
|
|
311
315
|
vertical: 'center', // 垂直居中
|
|
312
|
-
horizontal:
|
|
316
|
+
horizontal: headerAlign, // 水平居中
|
|
313
317
|
},
|
|
314
318
|
// border 边框属性
|
|
315
319
|
border: {
|
|
@@ -343,7 +347,15 @@ export default {
|
|
|
343
347
|
if (c.children) {
|
|
344
348
|
this.generateColumns(c.children, dataColumns)
|
|
345
349
|
} else {
|
|
346
|
-
|
|
350
|
+
let headerAlign='left'
|
|
351
|
+
let align='left'
|
|
352
|
+
if(c.headerAlign){
|
|
353
|
+
headerAlign = c.headerAlign.replace('is-','')
|
|
354
|
+
}
|
|
355
|
+
if(c.align){
|
|
356
|
+
align = c.align.replace('is-','')
|
|
357
|
+
}
|
|
358
|
+
dataColumns.push({ property: c.property, width: c.width ? c.width : c.minWidth,headerAlign,align })
|
|
347
359
|
}
|
|
348
360
|
})
|
|
349
361
|
}
|