Adding keyboard shortcuts

parent 23310dac
...@@ -143,6 +143,7 @@ ...@@ -143,6 +143,7 @@
</div> </div>
</div> </div>
</el-form> </el-form>
<button v-shortkey="['b']" @shortkey="pushRoute({name: 'admin.page.page.index'})" style="display: none"></button>
</div> </div>
</template> </template>
...@@ -150,10 +151,11 @@ ...@@ -150,10 +151,11 @@
import axios from 'axios' import axios from 'axios'
import Slugify from '../../../../Core/Assets/js/mixins/Slugify' import Slugify from '../../../../Core/Assets/js/mixins/Slugify'
import TranslationHelper from '../../../../Core/Assets/js/mixins/TranslationHelper' import TranslationHelper from '../../../../Core/Assets/js/mixins/TranslationHelper'
import ShortcutHelper from '../../../../Core/Assets/js/mixins/ShortcutHelper'
import Form from 'form-backend-validation' import Form from 'form-backend-validation'
export default { export default {
mixins: [Slugify, TranslationHelper], mixins: [Slugify, TranslationHelper, ShortcutHelper],
props: { props: {
locales: {default: null}, locales: {default: null},
pageTitle: {default: null, String}, pageTitle: {default: null, String},
......
...@@ -71,6 +71,7 @@ ...@@ -71,6 +71,7 @@
</div> </div>
</div> </div>
</div> </div>
<button v-shortkey="['c']" @shortkey="pushRoute({name: 'admin.page.page.create'})" style="display: none"></button>
</div> </div>
</template> </template>
...@@ -78,11 +79,12 @@ ...@@ -78,11 +79,12 @@
import axios from 'axios' import axios from 'axios'
import _ from "lodash"; import _ from "lodash";
import TranslationHelper from '../../../../Core/Assets/js/mixins/TranslationHelper' import TranslationHelper from '../../../../Core/Assets/js/mixins/TranslationHelper'
import ShortcutHelper from '../../../../Core/Assets/js/mixins/ShortcutHelper'
let data; let data;
export default { export default {
mixins: [TranslationHelper], mixins: [TranslationHelper, ShortcutHelper],
data() { data() {
return { return {
data, data,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment