Skip to content

Commit

Permalink
fix: 博客园 Electron 平台图片上传成功
Browse files Browse the repository at this point in the history
  • Loading branch information
terwer committed Aug 12, 2023
1 parent 47472af commit 0af57ce
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 23 deletions.
11 changes: 11 additions & 0 deletions src/layouts/default/DefaultFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@
{{ t("siyuan.config.setting") }}
</span>

<span class="text" v-if="isDev">.</span>
<span class="text s-dark" @click="handleTest" v-if="isDev"> 组件测试 </span>

<span v-if="isChromeExtension" class="text">.</span>
<span v-if="isChromeExtension" class="text s-dark" @click="newWin()">
{{ t("blog.newwin.open") }}
Expand All @@ -74,6 +77,7 @@ import { useVueI18n } from "~/src/composables/useVueI18n.ts"
import { DateUtil } from "zhi-common"
import { useSiyuanDevice } from "~/src/composables/useSiyuanDevice.ts"
import { useRouter } from "vue-router"
import { isDev } from "~/src/utils/constants.ts"
const logger = createAppLogger("default-footer")
const { t } = useVueI18n()
Expand Down Expand Up @@ -121,6 +125,13 @@ const handleSiyuanSetting = async () => {
query: { showBack: "true" },
})
}
const handleTest = async () => {
await router.push({
path: "/test",
query: { showBack: "true" },
})
}
</script>

<style scoped>
Expand Down
48 changes: 25 additions & 23 deletions src/pages/ApiTest.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,29 +41,31 @@ const changeTab = (tab: TabsPaneContext, event: Event) => {
</script>

<template>
<div class="tab-container">
<h1>ApiTest</h1>
<el-tabs v-model="activeTab" type="border-card" @tab-click="changeTab">
<el-tab-pane label="Siyuan" name="siyuan">
<router-view></router-view>
</el-tab-pane>
<el-tab-pane label="Cnblogs" name="cnblogs">
<router-view></router-view>
</el-tab-pane>
<el-tab-pane label="Wordpress" name="wordpress">
<router-view></router-view>
</el-tab-pane>
<el-tab-pane label="Typecho" name="typecho">
<router-view></router-view>
</el-tab-pane>
<el-tab-pane label="Yuque" name="yuque">
<router-view></router-view>
</el-tab-pane>
<el-tab-pane label="Zhihu" name="zhihu">
<router-view></router-view>
</el-tab-pane>
</el-tabs>
</div>
<back-page title="组件接口测试">
<div class="tab-container">
<h1>ApiTest</h1>
<el-tabs v-model="activeTab" type="border-card" @tab-click="changeTab">
<el-tab-pane label="Siyuan" name="siyuan">
<router-view></router-view>
</el-tab-pane>
<el-tab-pane label="Cnblogs" name="cnblogs">
<router-view></router-view>
</el-tab-pane>
<el-tab-pane label="Wordpress" name="wordpress">
<router-view></router-view>
</el-tab-pane>
<el-tab-pane label="Typecho" name="typecho">
<router-view></router-view>
</el-tab-pane>
<el-tab-pane label="Yuque" name="yuque">
<router-view></router-view>
</el-tab-pane>
<el-tab-pane label="Zhihu" name="zhihu">
<router-view></router-view>
</el-tab-pane>
</el-tabs>
</div>
</back-page>
</template>

<style lang="stylus" scoped>
Expand Down

0 comments on commit 0af57ce

Please sign in to comment.