npm i vue-command
App.vue
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
<template> <vue-command :commands="commands" /> </template> <script> import VueCommand, { createStdout } from "vue-command"; import "vue-command/dist/vue-command.css"; export default { components: { VueCommand, }, data: () => ({ commands: { "hello-world": () => createStdout("Hello world"), }, }), }; </script> |