修改输出结果相关函数及界面

This commit is contained in:
fofolee 2024-12-28 19:44:28 +08:00
parent 920301c794
commit 99cadf3130
3 changed files with 15 additions and 15 deletions

View File

@ -13,11 +13,11 @@
<div>
<q-avatar :size="`${headerHeight}`">
<q-icon :class="runResultStatus ? 'text-green' : 'text-red'"
:name="runResultStatus ? 'task_alt' : 'error'"></q-icon>
:name="runResultStatus ? 'task_alt' : 'error'" size="sm"></q-icon>
</q-avatar>
<span class="text-weight-bold text-h6">运行结果</span>
<span class="text-weight-bold text-h7">运行结果</span>
</div>
<ResultMenu class="no-shadow" :stretch="true" :content="runResult.join('')" :closebtn="!fromUtools"
<ResultMenu class="no-shadow q-pa-sm" :stretch="true" :content="runResult.join('')" :closebtn="!fromUtools"
:textbtn="!enableHtml" :imagebtn="!enableHtml && isDataUrl" @showImg="showBase64Img" :style="{
height: headerHeight + 'px',
}" />

View File

@ -1,16 +1,17 @@
<template>
<q-btn-group :stretch="stretch" class="text-primary">
<q-btn icon="image" @click="dataUrlToImg" v-show="imagebtn" :dense="dense"
<q-btn icon="image" @click="dataUrlToImg" v-show="imagebtn" dense size="sm"
><q-tooltip v-if="!dense"> DataUrl 转为图片</q-tooltip></q-btn
>
<q-btn
icon="content_paste"
@click="copyResult"
v-show="textbtn"
:dense="dense"
dense
size="sm"
><q-tooltip v-if="!dense">复制到剪贴板</q-tooltip></q-btn
>
<q-btn icon="send" @click="sendResult" v-show="textbtn" :dense="dense"
<q-btn icon="send" size="sm" @click="sendResult" v-show="textbtn" dense
><q-tooltip v-if="!dense">发送到活动窗口</q-tooltip></q-btn
>
<q-btn
@ -18,7 +19,8 @@
class="text-negative"
v-close-popup
v-show="closebtn"
:dense="dense"
dense
size="sm"
/>
</q-btn-group>
</template>
@ -35,13 +37,11 @@ export default {
},
methods: {
copyResult() {
utools.copyText(this.content);
window.utools.copyText(this.content);
quickcommand.showMessageBox("已复制到剪贴板");
},
sendResult() {
utools.copyText(this.content);
utools.hideMainWindow();
quickcommand.simulatePaste();
window.utools.hideMainWindowTypeString(this.content);
},
dataUrlToImg() {
let imgs = this.content

View File

@ -41,22 +41,22 @@ const outputTypes = {
label: "复制到剪贴板",
icon: "content_paste",
outPlugin: true,
action: result => window.copyTo(result)
action: result => window.utools.copyText(result)
},
send: {
name: "send",
label: "发送到活动窗口",
icon: "web_asset",
outPlugin: true,
action: result => window.send(result)
action: result => window.utools.hideMainWindowTypeString(result)
},
notice: {
name: "notice",
label: "发送系统通知",
icon: "sms",
outPlugin: true,
action: result => window.message(result)
action: result => window.utools.showNotification(result)
},
};
export default outputTypes
export default outputTypes