mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-06-08 14:34:13 +08:00
新增 html
This commit is contained in:
parent
0909e76bbb
commit
9101892376
BIN
plugin/logo/html.png
Normal file
BIN
plugin/logo/html.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
@ -84,6 +84,7 @@
|
|||||||
<div class="col-auto justify-end flex">
|
<div class="col-auto justify-end flex">
|
||||||
<q-btn-group unelevated>
|
<q-btn-group unelevated>
|
||||||
<q-btn-dropdown
|
<q-btn-dropdown
|
||||||
|
v-show="quickcommandInfo.program !== 'html'"
|
||||||
style="padding: 0 10px"
|
style="padding: 0 10px"
|
||||||
dense
|
dense
|
||||||
flat
|
flat
|
||||||
@ -374,7 +375,10 @@ export default {
|
|||||||
// 运行
|
// 运行
|
||||||
runCurrentCommand() {
|
runCurrentCommand() {
|
||||||
let command = _.cloneDeep(this.quickcommandInfo);
|
let command = _.cloneDeep(this.quickcommandInfo);
|
||||||
command.output = this.$refs.sidebar?.currentCommand.output || "text";
|
command.output =
|
||||||
|
this.$refs.sidebar?.currentCommand.output || command.program === "html"
|
||||||
|
? "html"
|
||||||
|
: "text";
|
||||||
command.cmdType = this.$refs.sidebar?.cmdType.name;
|
command.cmdType = this.$refs.sidebar?.cmdType.name;
|
||||||
this.$refs.result.runCurrentCommand(command);
|
this.$refs.result.runCurrentCommand(command);
|
||||||
},
|
},
|
||||||
|
@ -113,6 +113,8 @@ export default {
|
|||||||
}
|
}
|
||||||
!outPlugin && this.showRunResult(stdout, true, action);
|
!outPlugin && this.showRunResult(stdout, true, action);
|
||||||
});
|
});
|
||||||
|
} else if (currentCommand.program === "html") {
|
||||||
|
this.showRunResult(currentCommand.cmd, true, action);
|
||||||
} else {
|
} else {
|
||||||
let option =
|
let option =
|
||||||
currentCommand.program === "custom"
|
currentCommand.program === "custom"
|
||||||
|
@ -312,9 +312,21 @@ export default {
|
|||||||
return x;
|
return x;
|
||||||
},
|
},
|
||||||
outputTypesOptionsDy() {
|
outputTypesOptionsDy() {
|
||||||
return this.$parent.quickcommandInfo.program === "quickcommand"
|
switch (this.$parent.quickcommandInfo.program) {
|
||||||
? _.without(this.outputTypesOptions, "terminal")
|
case "quickcommand":
|
||||||
: this.outputTypesOptions;
|
return _.without(this.outputTypesOptions, "terminal");
|
||||||
|
case "html":
|
||||||
|
return ["html"];
|
||||||
|
default:
|
||||||
|
return this.outputTypesOptions;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
outputTypesOptionsDy(val) {
|
||||||
|
if (!val.includes(this.currentCommand.output)) {
|
||||||
|
this.currentCommand.output = val[0];
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -12,6 +12,14 @@ const programs = {
|
|||||||
color: "primary",
|
color: "primary",
|
||||||
icon: "logo/quickcommand.png",
|
icon: "logo/quickcommand.png",
|
||||||
},
|
},
|
||||||
|
html: {
|
||||||
|
name: "html",
|
||||||
|
bin: "",
|
||||||
|
argv: "",
|
||||||
|
ext: "",
|
||||||
|
color: "deep-orange",
|
||||||
|
icon: "logo/html.png",
|
||||||
|
},
|
||||||
shell: {
|
shell: {
|
||||||
name: "shell",
|
name: "shell",
|
||||||
bin: "bash",
|
bin: "bash",
|
||||||
@ -118,4 +126,4 @@ const programs = {
|
|||||||
icon: "logo/custom.png",
|
icon: "logo/custom.png",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
export default programs
|
export default programs
|
||||||
|
Loading…
x
Reference in New Issue
Block a user