新增文件自动加上文件名做标题

This commit is contained in:
purocean
2018-07-07 09:47:45 +08:00
parent 5b9f5361c7
commit f8e2b94b35
+1 -1
View File
@@ -78,7 +78,7 @@ export default {
}
const path = this.item.path + '/' + filename
File.write(path, '# 新文件', () => {
File.write(path, `# ${filename.replace(/\.md$/i, '')}`, () => {
this.$emit('change', path)
}, e => {
alert(e.message)