mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-06-28 03:42:51 +08:00
完善第一次运行编排时的提示
This commit is contained in:
parent
97ce5fa965
commit
2259a61fa1
@ -6,6 +6,37 @@
|
||||
:disabled-control-buttons="disabledControlButtons"
|
||||
class="fixed-full"
|
||||
/>
|
||||
<q-dialog v-model="showHelpDialog">
|
||||
<q-card style="width: 450px">
|
||||
<div class="q-pa-md">
|
||||
<div class="text-h6 q-mb-md">👏🏻 欢迎使用可视化编排</div>
|
||||
<div class="q-mb-sm">由于编排功能众多,推荐先查看教程再使用</div>
|
||||
<div class="q-mb-sm">
|
||||
<q-btn dense color="primary" flat @click="showHelp('#TMtYg')">
|
||||
完整教程
|
||||
</q-btn>
|
||||
</div>
|
||||
<div class="q-mb-sm">
|
||||
<q-btn dense color="primary" flat @click="showHelp('#JqM2f')">
|
||||
快速入门:浏览器控制典型案例
|
||||
</q-btn>
|
||||
</div>
|
||||
<div class="row items-center">
|
||||
<div>你随时可以点击右上角的</div>
|
||||
<q-icon name="help" class="q-ml-xs" size="13px" />
|
||||
<div>帮助按钮,再次查看教程</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex justify-end q-pa-sm">
|
||||
<q-btn
|
||||
flat
|
||||
dense
|
||||
label="我知道了"
|
||||
@click="showHelpDialog = false"
|
||||
/>
|
||||
</div>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
<!-- 运行结果 -->
|
||||
<CommandRunResult ref="result"></CommandRunResult>
|
||||
</template>
|
||||
@ -15,22 +46,15 @@ import CommandComposer from "components/composer/CommandComposer.vue";
|
||||
import CommandRunResult from "components/CommandRunResult";
|
||||
import { useCommandManager } from "js/commandManager.js";
|
||||
import { dbManager } from "js/utools";
|
||||
import { ref } from "vue";
|
||||
|
||||
export default {
|
||||
components: { CommandComposer, CommandRunResult },
|
||||
setup() {
|
||||
const hasRunComposer = dbManager.getStorage("st_hasRunComposer");
|
||||
|
||||
const showHelpDialog = ref(false);
|
||||
if (!hasRunComposer) {
|
||||
quickcommand.showConfirmBox(
|
||||
`<div>👏🏻 欢迎使用可视化编排,由于编排功能众多,推荐先查看教程再使用</div>
|
||||
<div>查看教程<a href="javascript:void(0)" onclick="utools.ubrowser.goto('https://www.yuque.com/fofolee/qcdocs3/bg31vl#TMtYg').run({width: 1280, height: 720})">戳我</a></div>
|
||||
<div>或者看一个<a href="javascript:void(0)" onclick="utools.ubrowser.goto('https://www.yuque.com/fofolee/qcdocs3/bg31vl#JqM2f').run({width: 1280, height: 720})">浏览器控制典型案例</a>快速入门</div>
|
||||
<div>你随时可以点击右上角的<span style="font-weight: bolder;">帮助</span>按钮(图标为问号),再次查看教程</div>`,
|
||||
"帮助",
|
||||
true,
|
||||
600
|
||||
);
|
||||
showHelpDialog.value = true;
|
||||
dbManager.setStorage("st_hasRunComposer", true);
|
||||
}
|
||||
|
||||
@ -47,6 +71,7 @@ export default {
|
||||
|
||||
return {
|
||||
commandManager,
|
||||
showHelpDialog,
|
||||
};
|
||||
},
|
||||
emits: ["editorEvent"],
|
||||
@ -76,6 +101,9 @@ export default {
|
||||
runCurrentCommand(command) {
|
||||
this.$refs.result.runCurrentCommand(command);
|
||||
},
|
||||
showHelp(id) {
|
||||
window.showUb.help(id);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
Loading…
x
Reference in New Issue
Block a user