no message
Former-commit-id: 9593f54f182e94d413e0b4fc1fcd82a52a779178 Former-commit-id: fb046e79ef923ced449c8e313209963b7106bc9d Former-commit-id: 82dcc467d302e3b556b1c0dbcb43b6c0d29be11c
This commit is contained in:
@@ -17,25 +17,20 @@ function generateArray(table) {
|
||||
var rowspan = cell.getAttribute('rowspan');
|
||||
var cellValue = cell.innerText;
|
||||
if (cellValue !== "" && cellValue == +cellValue) cellValue = +cellValue;
|
||||
|
||||
//Skip ranges
|
||||
ranges.forEach(function (range) {
|
||||
if (R >= range.s.r && R <= range.e.r && outRow.length >= range.s.c && outRow.length <= range.e.c) {
|
||||
for (var i = 0; i <= range.e.c - range.s.c; ++i) outRow.push(null);
|
||||
}
|
||||
});
|
||||
|
||||
//Handle Row Span
|
||||
if (rowspan || colspan) {
|
||||
rowspan = rowspan || 1;
|
||||
colspan = colspan || 1;
|
||||
ranges.push({s: {r: R, c: outRow.length}, e: {r: R + rowspan - 1, c: outRow.length + colspan - 1}});
|
||||
}
|
||||
;
|
||||
|
||||
};
|
||||
//Handle Value
|
||||
outRow.push(cellValue !== "" ? cellValue : null);
|
||||
|
||||
//Handle Colspan
|
||||
if (colspan) for (var k = 0; k < colspan - 1; ++k) outRow.push(null);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// 库
|
||||
import Csv from './_csv'
|
||||
import ExportCsv from './_export-csv'
|
||||
import * as excel from './_export2Excel'
|
||||
import * as Excel from './_export2Excel'
|
||||
export default {
|
||||
install (Vue, options) {
|
||||
Vue.prototype.$export = {
|
||||
@@ -29,7 +29,7 @@ export default {
|
||||
excel () {
|
||||
const tHeader = ['Id', 'Title', 'Author', 'Readings', 'Date']
|
||||
const data = []
|
||||
excel.export_json_to_excel(tHeader, data, 'demo')
|
||||
Excel.export_json_to_excel(tHeader, data, 'demo')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user