mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-09-24 13:03:30 +08:00
数据存储结构调整
This commit is contained in:
@@ -15,6 +15,7 @@ export default {
|
||||
type: "fromUtools",
|
||||
data: {},
|
||||
},
|
||||
featureCode: this.$route.path.slice(1),
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
@@ -22,16 +23,10 @@ export default {
|
||||
this.runCurrentCommand();
|
||||
},
|
||||
computed: {
|
||||
featureCode() {
|
||||
return this.$route.params.type + "_" + this.$route.params.uid;
|
||||
},
|
||||
currentCommand() {
|
||||
return this.$utools.whole.db.get("qc_" + this.featureCode).data;
|
||||
},
|
||||
},
|
||||
beforeRouteUpdate(to, from, next) {
|
||||
this.runCurrentCommand();
|
||||
},
|
||||
methods: {
|
||||
runCurrentCommand() {
|
||||
this.$refs.result.runCurrentCommand(this.currentCommand);
|
||||
|
@@ -191,17 +191,25 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { defineAsyncComponent } from "vue";
|
||||
import quickcommandParser from "../js/common/quickcommandParser.js";
|
||||
import CommandCard from "components/CommandCard";
|
||||
import CommandEditor from "components/CommandEditor.vue";
|
||||
import ConfigurationMenu from "components/ConfigurationMenu.vue";
|
||||
import importAll from "../js/common/importAll.js";
|
||||
|
||||
const CommandEditor = defineAsyncComponent(() =>
|
||||
import("components/CommandEditor.vue")
|
||||
);
|
||||
|
||||
// 默认命令
|
||||
let defaultCommands = importAll(require.context("../json/", false, /\.json$/));
|
||||
|
||||
export default {
|
||||
components: { CommandCard, CommandEditor, ConfigurationMenu },
|
||||
components: {
|
||||
CommandCard,
|
||||
ConfigurationMenu,
|
||||
CommandEditor,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
currentTag: "默认",
|
||||
|
Reference in New Issue
Block a user