图标移至src

This commit is contained in:
fofolee
2022-04-15 18:54:21 +08:00
parent 4e879e6dc2
commit e4e7d77808
25 changed files with 22 additions and 14 deletions

View File

@@ -2,7 +2,7 @@
<q-card>
<q-card-section class="q-gutter-md flex items-center">
<q-avatar square size="48px">
<img src="logo/quickcommand.png" />
<img :src="require('../assets/logo/quickcommand.png')" />
</q-avatar>
<span class="text-h5"
>{{ pluginInfo.pluginName }} v{{ pluginInfo.version }}</span

View File

@@ -59,13 +59,13 @@
>
<template v-slot:append>
<q-avatar size="lg" square>
<img :src="getLanguageIcon(quickcommandInfo.program)" />
<img :src="$programmings[quickcommandInfo.program].icon" />
</q-avatar>
</template>
<template v-slot:option="scope">
<q-item v-bind="scope.itemProps">
<q-item-section avatar>
<img width="32" :src="getLanguageIcon(scope.opt)" />
<img width="32" :src="$programmings[scope.opt].icon" />
</q-item-section>
<q-item-section>
<q-item-label v-html="scope.opt" />
@@ -243,9 +243,6 @@ export default {
let highlight = this.$programmings[language].highlight;
this.$refs.editor.setEditorLanguage(highlight ? highlight : language);
},
getLanguageIcon(program) {
return `img/logo/${program}.png`;
},
// 打开文档
showHelp() {
utools.createBrowserWindow("./helps/quickcommand.html", {

View File

@@ -324,11 +324,8 @@ export default {
this.setIcon(this.quickcommandInfo.program);
this.platformVerify();
},
// 没有图标,或者使用了语言图标
setIcon(language) {
this.currentCommand.features.icon?.slice(0, 5) === "data:" ||
(this.currentCommand.features.icon =
this.$parent.getLanguageIcon(language));
this.currentCommand.features.icon = this.$programmings[language].icon;
},
getCommandType() {
let data = { type: "key", match: [] };

View File

@@ -59,7 +59,7 @@ export default {
return {
features: {
explain: `进入${this.currentTag}的面板视图`,
icon: "img/logo/quickcommand.png",
icon: require("../assets/logo/quickcommand.png"),
cmds: [this.currentTag],
platform: ["win32", "darwin", "linux"],
code: `panel_${window.hexEncode(this.currentTag)}`,