mirror of
https://github.com/purocean/yn.git
synced 2026-10-13 15:49:22 +08:00
新增文件自动加上文件名做标题
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user