1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
| /*
| redo-menu
| */
| import $ from '../../util/dom-core.js'
|
| // 构造函数
| function Redo(editor) {
| this.editor = editor
| this.$elem = $(
| `<div class="w-e-menu">
| <i class="w-e-icon-redo"></i>
| </div>`
| )
| this.type = 'click'
|
| // 当前是否 active 状态
| this._active = false
| }
|
| // 原型
| Redo.prototype = {
| constructor: Redo,
|
| // 点击事件
| onClick: function (e) {
| // 点击菜单将触发这里
|
| const editor = this.editor
|
| // 执行 redo 命令
| editor.cmd.do('redo')
| }
| }
|
| export default Redo
|
|