no message

Former-commit-id: 5ad7ba5e0ab03190c9d778ccf41d9bef4c7eb7c8
Former-commit-id: f4b384d5efbec542b2953009e99338b3cb3bed63
Former-commit-id: f9914c43cef036556edd17c04ca7424078fbb2c7
This commit is contained in:
李杨
2018-02-15 23:24:31 +08:00
parent bc6b701769
commit 34630dca3b
4 changed files with 70 additions and 19 deletions

View File

@@ -21,6 +21,11 @@ export default {
type: String,
required: false,
default: ''
},
highlight: {
type: Boolean,
required: false,
default: false
}
},
data () {
@@ -55,7 +60,7 @@ export default {
},
marked (data) {
return marked(data, {
highlight: (code) => highlight.highlightAuto(code).value
...this.highlight ? {highlight: (code) => highlight.highlightAuto(code).value} : {}
})
}
}

View File

@@ -46,7 +46,7 @@ export default {
},
methods: {
handleUpload (file) {
this.$import.excel(file)
this.$import.xlsx(file)
.then(({header, results}) => {
this.table.columns = header.map(e => {
return {

View File

@@ -19,8 +19,8 @@ export default {
})
})
},
// 导入 excel
excel (file) {
// 导入 xlsx
xlsx (file) {
return new Promise((resolve, reject) => {
const reader = new FileReader()
const fixdata = data => {