no message
Former-commit-id: 5ad7ba5e0ab03190c9d778ccf41d9bef4c7eb7c8 Former-commit-id: f4b384d5efbec542b2953009e99338b3cb3bed63 Former-commit-id: f9914c43cef036556edd17c04ca7424078fbb2c7
This commit is contained in:
@@ -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} : {}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -19,8 +19,8 @@ export default {
|
||||
})
|
||||
})
|
||||
},
|
||||
// 导入 excel
|
||||
excel (file) {
|
||||
// 导入 xlsx
|
||||
xlsx (file) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const reader = new FileReader()
|
||||
const fixdata = data => {
|
||||
|
||||
Reference in New Issue
Block a user