mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-12-19 18:25:44 +08:00
可视化编排添加命令配置功能
This commit is contained in:
@@ -57,9 +57,6 @@
|
||||
<q-btn dense flat icon="save" @click="$emit('action', 'save')">
|
||||
<q-tooltip>保存</q-tooltip>
|
||||
</q-btn>
|
||||
<q-btn dense flat icon="history" @click="$emit('action', 'load')">
|
||||
<q-tooltip>载入</q-tooltip>
|
||||
</q-btn>
|
||||
<q-btn flat dense icon="preview" @click="isVisible = true">
|
||||
<q-tooltip>预览代码</q-tooltip>
|
||||
</q-btn>
|
||||
@@ -92,15 +89,12 @@
|
||||
|
||||
<script>
|
||||
import { defineComponent } from "vue";
|
||||
import { generateFlowsCode } from "js/composer/generateCode";
|
||||
|
||||
export default defineComponent({
|
||||
name: "ComposerButtons",
|
||||
|
||||
props: {
|
||||
generateCode: {
|
||||
type: Function,
|
||||
required: true,
|
||||
},
|
||||
isAllCollapsed: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
@@ -109,6 +103,10 @@ export default defineComponent({
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
flows: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
},
|
||||
|
||||
emits: ["action"],
|
||||
@@ -124,7 +122,7 @@ export default defineComponent({
|
||||
watch: {
|
||||
isVisible(val) {
|
||||
if (val) {
|
||||
this.code = this.generateCode();
|
||||
this.code = generateFlowsCode(this.flows);
|
||||
}
|
||||
},
|
||||
},
|
||||
@@ -172,16 +170,6 @@ export default defineComponent({
|
||||
|
||||
/* 自定义滚动条 */
|
||||
.preview-code::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
}
|
||||
|
||||
.preview-code::-webkit-scrollbar-thumb {
|
||||
background: var(--q-primary-opacity-20);
|
||||
border-radius: 3px;
|
||||
transition: background 0.3s;
|
||||
}
|
||||
|
||||
.preview-code::-webkit-scrollbar-thumb:hover {
|
||||
background: var(--q-primary-opacity-30);
|
||||
width: 5px;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user