mirror of
https://github.com/ElemeFE/element.git
synced 2025-12-16 11:44:01 +08:00
* update es fr i18n * update no need edit pages * move var name to frontend * add i18n * update i18n * fix bug * update style * add callback * add shortcut * redo undo logic * update picker style * update shadow style * save config to local * button color * button color * add message * update save logic
27 lines
488 B
Vue
27 lines
488 B
Vue
|
|
<script>
|
|
export default {
|
|
data() {
|
|
return {
|
|
downloading: false
|
|
};
|
|
},
|
|
methods: {
|
|
shortcut(e) {
|
|
if (e.keyCode === 90 && (e.ctrlKey || e.metaKey)) {
|
|
if (e.shiftKey) {
|
|
this.redo();
|
|
} else {
|
|
this.undo();
|
|
}
|
|
}
|
|
},
|
|
enableShortcut() {
|
|
document.addEventListener('keydown', this.shortcut);
|
|
},
|
|
disableShortcut() {
|
|
document.removeEventListener('keydown', this.shortcut);
|
|
}
|
|
}
|
|
};
|
|
</script> |