mirror of
https://github.com/Kuingsmile/PicList.git
synced 2025-02-10 14:18:14 -05:00
![萌萌哒赫萝](/assets/img/avatar_default.png)
First version of PicList. In album, you can delete remote file now. Add picBed management function.
57 lines
1.1 KiB
Vue
57 lines
1.1 KiB
Vue
<template>
|
|
<div id="app">
|
|
<router-view />
|
|
</div>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import { useStore } from '@/hooks/useStore'
|
|
import { onBeforeMount, onMounted, onUnmounted } from 'vue'
|
|
import { getConfig } from './utils/dataSender'
|
|
import type { IConfig } from 'piclist'
|
|
import bus from './utils/bus'
|
|
import { FORCE_UPDATE } from '~/universal/events/constants'
|
|
|
|
const store = useStore()
|
|
onBeforeMount(async () => {
|
|
const config = await getConfig<IConfig>()
|
|
if (config) {
|
|
store?.setDefaultPicBed(config?.picBed?.uploader || config?.picBed?.current || 'smms')
|
|
}
|
|
})
|
|
|
|
onMounted(() => {
|
|
bus.on(FORCE_UPDATE, () => {
|
|
store?.updateForceUpdateTime()
|
|
})
|
|
})
|
|
|
|
onUnmounted(() => {
|
|
bus.off(FORCE_UPDATE)
|
|
})
|
|
|
|
</script>
|
|
|
|
<script lang="ts">
|
|
export default {
|
|
name: 'PicGoApp'
|
|
}
|
|
</script>
|
|
|
|
<style lang="stylus">
|
|
body,
|
|
html
|
|
padding 0
|
|
margin 0
|
|
height 100%
|
|
font-family "Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif
|
|
#app
|
|
height 100%
|
|
user-select none
|
|
overflow hidden
|
|
.el-button-group
|
|
width 100%
|
|
.el-button
|
|
width 50%
|
|
</style>
|