Merge branch 'release/2.2.8'

This commit is contained in:
purocean
2020-03-13 18:24:46 +08:00
5 changed files with 49 additions and 5 deletions
+6 -2
View File
@@ -94,6 +94,7 @@
+ `Ctrl + K, Ctrl + L` 转换小写
+ `Ctrl + Alt + R` 在内置终端里面运行选中内容
+ `Ctrl + B + V` 粘贴 html 富文本
+ `Ctrl + Alt + Left/Right` 切换编辑器 Tab
## 开发
依赖安装和编译比较麻烦,请保证自己有足够耐心且有科学上网的手段。
@@ -140,12 +141,15 @@ yarn run start
## 更新日志
[最新发布](https://github.com/purocean/yn/releases)
### [v2.2.7](https://github.com/purocean/yn/releases/tag/v2.2.7) 2020-01-19
1. 调整渲染的表格宽度
### [v2.2.8](https://github.com/purocean/yn/releases/tag/v2.2.8) 2020-03-13
1. 增加切换编辑器标签快捷键 `Ctrl + Alt + Left/Right`
<details>
<summary>展开查看更多版本记录</summary>
### [v2.2.7](https://github.com/purocean/yn/releases/tag/v2.2.7) 2020-01-19
1. 调整渲染的表格宽度
### [v2.2.6](https://github.com/purocean/yn/releases/tag/v2.2.6) 2020-01-16
1. 修复插入文档名称问题
+39
View File
@@ -18,7 +18,46 @@ export default {
current: blankUri
}
},
created () {
window.addEventListener('keydown', this.keydownHandler, true)
},
beforeDestroy () {
window.removeEventListener('keydown', this.keydownHandler)
},
methods: {
keydownHandler (e) {
const findTab = offset => {
const tabs = [...this.tabs]
if (tabs.length < 1) {
return null
}
const currentIndex = tabs.findIndex(x => x.key === this.current)
let index = currentIndex + offset
if (index < 0) {
index = tabs.length - 1
}
if (index >= tabs.length) {
index = 0
}
return tabs[index]
}
// 快捷键切换最近文档
if (e.altKey && e.ctrlKey) {
if (e.key === 'ArrowLeft') {
const prev = findTab(-1)
prev && this.switchTab(prev)
} else if (e.key === 'ArrowRight') {
const next = findTab(1)
next && this.switchTab(next)
}
}
},
setTabs (list) {
this.$store.commit('app/setTabs', list)
},
+1 -1
View File
@@ -210,7 +210,7 @@ export default {
return list.sort((a, b) => {
const at = map[`${a.repo}|${a.path}`] || 0
const bt = map[`${a.repo}|${b.path}`] || 0
const bt = map[`${b.repo}|${b.path}`] || 0
return bt - at
})
+2 -1
View File
@@ -296,4 +296,5 @@ xml 代码块 第一行注释需要有 `--drawio--` 文字
1. 切换编辑器自动换行:`Alt + W` 或点击状态栏 `切换换行` 按钮
1. 粘贴 HTML 富文本为 Markdown `Ctrl + B + V`
1. 打开文件快速切换面板 `Ctrl + P`
1. 复制文档标题链接 `Ctrl + P`
1. 复制文档标题链接 `Ctrl + 单击标题`
1. 切换编辑器 Tab `Ctrl + Alt + Left/Right`
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "yank.note.yang",
"version": "2.2.7",
"version": "2.2.8",
"description": "Yank Note 一款面向程序员的 Markdown 笔记应用",
"main": "dist/app.js",
"license": "Apache-2.0",