Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 2 additions & 21 deletions examples/sites/playground/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import { staticDemoPath, getWebdocPath } from '@/views/components/cmpConfig'
import { fetchDemosFile } from '@/tools/utils'
import logoUrl from './assets/opentiny-logo.svg?url'
import GitHub from './icons/Github.vue'
import Sun from './icons/Sun.vue'
import Moon from './icons/Moon.vue'
import Share from './icons/Share.vue'

const versions = ['3.11', '3.10', '3.9', '3.8']
Expand Down Expand Up @@ -67,13 +65,6 @@ const store = new useStore({
}
})

// 切换主题
const dark = ref(false)

const toggleTheme = (theme) => {
dark.value = theme
}

const state = reactive({
// repl 属性
layout: 'horizon',
Expand Down Expand Up @@ -194,20 +185,13 @@ function share() {
<tiny-button-group :data="state.layoutOptions" v-model="state.layout"></tiny-button-group>
</span>
<span class="ml20">
版本:
OpenTiny Vue 版本:
<tiny-select v-model="state.selectVersion" @change="versionChange" style="width: 150px">
<tiny-option
v-for="item in state.versions"
:key="item.value"
:label="'opentiny/vue@' + item.value"
:value="item.value"
>
<tiny-option v-for="item in state.versions" :key="item.value" :label="item.value" :value="item.value">
</tiny-option>
</tiny-select>
</span>
<Share @click="share" title="分享" class="share" />
<Sun v-if="!dark" @click="toggleTheme(true)" class="light" />
<Moon v-else @click="toggleTheme(false)" class="dark" />
<a style="display: flex" href="https://github.com/opentiny/tiny-vue" target="_blank">
<GitHub class="github" />
</a>
Expand All @@ -216,7 +200,6 @@ function share() {
<Repl
:editor="Editor"
:store="store"
:theme="dark ? 'dark' : 'light'"
:preview-options="state.previewOptions"
:clear-console="false"
:layout="state.layout"
Expand Down Expand Up @@ -265,8 +248,6 @@ function share() {
height: calc(100vh - 36px - 16px) !important;
}

.light,
.dark,
.github,
.share {
width: 20px;
Expand Down