mirror of
https://github.com/Kuingsmile/PicList.git
synced 2025-01-22 22:28:14 -05:00
Added: display default picbed
This commit is contained in:
parent
eecf98e452
commit
422aa52763
24
src/datastore/pic-bed.js
Normal file
24
src/datastore/pic-bed.js
Normal file
@ -0,0 +1,24 @@
|
||||
const picBed = [
|
||||
{
|
||||
title: '微博图床',
|
||||
value: 'weibo'
|
||||
},
|
||||
{
|
||||
title: '七牛云',
|
||||
value: 'qiniu'
|
||||
},
|
||||
{
|
||||
title: '腾讯COS',
|
||||
value: 'tcyun'
|
||||
},
|
||||
{
|
||||
title: '又拍云',
|
||||
value: 'upyun'
|
||||
},
|
||||
{
|
||||
title: 'GitHub图床',
|
||||
value: 'github'
|
||||
}
|
||||
]
|
||||
|
||||
export default picBed
|
@ -3,7 +3,7 @@
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="20" :offset="2">
|
||||
<div class="view-title">
|
||||
图片上传
|
||||
图片上传 - {{ picBed }}
|
||||
</div>
|
||||
<div
|
||||
id="upload-area"
|
||||
@ -54,6 +54,7 @@
|
||||
</template>
|
||||
<script>
|
||||
import mixin from '../mixin'
|
||||
import picBed from '../../../datastore/pic-bed'
|
||||
export default {
|
||||
name: 'upload',
|
||||
mixins: [mixin],
|
||||
@ -63,7 +64,8 @@ export default {
|
||||
progress: 0,
|
||||
showProgress: false,
|
||||
showError: false,
|
||||
pasteStyle: ''
|
||||
pasteStyle: '',
|
||||
picBed: ''
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
@ -77,6 +79,7 @@ export default {
|
||||
}
|
||||
})
|
||||
this.getPasteStyle()
|
||||
this.getDefaultPicBed()
|
||||
},
|
||||
watch: {
|
||||
progress (val) {
|
||||
@ -126,6 +129,14 @@ export default {
|
||||
},
|
||||
uploadClipboardFiles () {
|
||||
this.$electron.ipcRenderer.send('uploadClipboardFilesFromUploadPage')
|
||||
},
|
||||
getDefaultPicBed () {
|
||||
const current = this.$db.read().get('picBed.current').value()
|
||||
picBed.forEach(item => {
|
||||
if (item.value === current) {
|
||||
this.picBed = item.title
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user