mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-06-08 06:16:27 +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">
|
||||
<q-btn-group unelevated>
|
||||
<q-btn-dropdown
|
||||
v-show="quickcommandInfo.program !== 'html'"
|
||||
style="padding: 0 10px"
|
||||
dense
|
||||
flat
|
||||
@ -374,7 +375,10 @@ export default {
|
||||
// 运行
|
||||
runCurrentCommand() {
|
||||
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;
|
||||
this.$refs.result.runCurrentCommand(command);
|
||||
},
|
||||
|
@ -113,6 +113,8 @@ export default {
|
||||
}
|
||||
!outPlugin && this.showRunResult(stdout, true, action);
|
||||
});
|
||||
} else if (currentCommand.program === "html") {
|
||||
this.showRunResult(currentCommand.cmd, true, action);
|
||||
} else {
|
||||
let option =
|
||||
currentCommand.program === "custom"
|
||||
|
@ -312,9 +312,21 @@ export default {
|
||||
return x;
|
||||
},
|
||||
outputTypesOptionsDy() {
|
||||
return this.$parent.quickcommandInfo.program === "quickcommand"
|
||||
? _.without(this.outputTypesOptions, "terminal")
|
||||
: this.outputTypesOptions;
|
||||
switch (this.$parent.quickcommandInfo.program) {
|
||||
case "quickcommand":
|
||||
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: {
|
||||
|
@ -12,6 +12,14 @@ const programs = {
|
||||
color: "primary",
|
||||
icon: "logo/quickcommand.png",
|
||||
},
|
||||
html: {
|
||||
name: "html",
|
||||
bin: "",
|
||||
argv: "",
|
||||
ext: "",
|
||||
color: "deep-orange",
|
||||
icon: "logo/html.png",
|
||||
},
|
||||
shell: {
|
||||
name: "shell",
|
||||
bin: "bash",
|
||||
@ -118,4 +126,4 @@ const programs = {
|
||||
icon: "logo/custom.png",
|
||||
},
|
||||
};
|
||||
export default programs
|
||||
export default programs
|
||||
|
Loading…
x
Reference in New Issue
Block a user