🐛 Fix: plugin config-form && default plugin logo

This commit is contained in:
PiEgg
2019-12-20 23:41:38 +08:00
parent bc8e641fda
commit 514fc40f71
3 changed files with 15 additions and 181 deletions

View File

@@ -71,9 +71,9 @@ import { cloneDeep, union } from 'lodash'
name: 'config-form'
})
export default class extends Vue {
@Prop(Array) readonly config: Array<any> = []
@Prop(String) readonly type: string = ''
@Prop(String) readonly id: string = ''
@Prop() private config!: any[]
@Prop() readonly type!: string
@Prop() readonly id!: string
configList = []
ruleForm = {}
@Watch('config', {

View File

@@ -17,7 +17,7 @@
<div class="plugin-item" :class="{ 'darwin': os === 'darwin' }">
<div class="cli-only-badge" v-if="!item.gui" title="CLI only">CLI</div>
<img class="plugin-item__logo" :src="item.logo"
onerror="this.src='static/roundLogo.png'"
:onerror="defaultLogo"
>
<div
class="plugin-item__content"
@@ -127,6 +127,7 @@ export default class extends Vue {
needReload = false
id = ''
os = ''
defaultLogo: string = 'this.src="https://cdn.jsdelivr.net/gh/Molunerfinn/PicGo@dev/public/roundLogo.png"'
get npmSearchText () {
return this.searchText.match('picgo-plugin-')
? this.searchText