Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 90bec31

Browse files
faukwaacwandev
andauthored
refactor: move absolute to transition classes (vue-zone#114)
* feat: another way to achieve page switching animation * refactor: move absolute to transition classes --------- Co-authored-by: CharleeWa <18888351756@163.com>
1 parent 1b7de7b commit 90bec31

File tree

13 files changed

+30
-43
lines changed

13 files changed

+30
-43
lines changed

‎src/components/Container.vue‎

Lines changed: 0 additions & 23 deletions
This file was deleted.

‎src/components/NavBar.vue‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ const title = computed(() => {
2121

2222
<template>
2323
<VanNavBar
24-
v-show="title"
24+
v-if="title"
2525
:title="title"
2626
:fixed="true"
27-
clickable left-arrow
27+
clickable left-arrowplaceholder
2828
@click-left="onBack"
2929
/>
3030
</template>

‎src/components/TabBar.vue‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const display = computed(() => {
1111
</script>
1212

1313
<template>
14-
<van-tabbar v-show="display" v-model="active" route>
14+
<van-tabbar v-if="display" v-model="active" routeplaceholder>
1515
<van-tabbar-item replace to="/">
1616
{{ t('layouts.home') }}
1717
<template #icon>

‎src/pages/[...all].vue‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ function onBack() {
1717
</script>
1818

1919
<template>
20-
<Container>
20+
<divclass="p-16">
2121
<div text="center gray-300 dark:gray-200 18">
2222
<van-icon name="warn-o" size="3em" />
2323
<div> Not found </div>
@@ -28,5 +28,5 @@ function onBack() {
2828
</button>
2929
</div>
3030
</div>
31-
</Container>
31+
</div>
3232
</template>

‎src/pages/charts/index.vue‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ const refScoreOption = ref(scoreOption)
6969
</script>
7070

7171
<template>
72-
<Container>
72+
<divclass="p-16">
7373
<Chart :option="refBarOption" :style="{ height: '330px' }" />
7474
<Chart :option="refLineOption" :style="{ height: '330px' }" />
7575
<Chart :option="refScoreOption" :style="{ height: '330px' }" />
76-
</Container>
76+
</div>
7777
</template>

‎src/pages/counter/index.vue‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function add() {
2020
</script>
2121

2222
<template>
23-
<Container>
23+
<divclass="p-16">
2424
<h1 class="text-6xl color-pink font-semibold">
2525
Hello, Pinia!
2626
</h1>
@@ -37,5 +37,5 @@ function add() {
3737
<button class="btn" @click="add">
3838
Add
3939
</button>
40-
</container>
40+
</div>
4141
</template>

‎src/pages/index.vue‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const menuItems = computed(() => ([
4848
</script>
4949

5050
<template>
51-
<Container:padding-x="0">
51+
<divclass="pt-46">
5252
<VanCellGroup inset>
5353
<VanCell center :title="t('home.darkMode')">
5454
<template #right-icon>
@@ -76,5 +76,5 @@ const menuItems = computed(() => ([
7676
<VanCell :title="item.title" :to="item.route" is-link />
7777
</template>
7878
</VanCellGroup>
79-
</Container>
79+
</div>
8080
</template>

‎src/pages/keepalive/index.vue‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ const value = ref(1)
1717
</script>
1818

1919
<template>
20-
<Container>
20+
<divclass="p-16">
2121
<p>{{ $t('keepAlive.label') }}</p>
2222
<van-stepper v-model="value" />
23-
</Container>
23+
</div>
2424
</template>

‎src/pages/mock/index.vue‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function pull() {
2121
</script>
2222

2323
<template>
24-
<Container>
24+
<divclass="p-16">
2525
<div class="data-label">
2626
{{ $t('mock.fromAsyncData') }}
2727
</div>
@@ -41,7 +41,7 @@ function pull() {
4141
{{ $t('mock.reset') }}
4242
</VanButton>
4343
</van-space>
44-
</Container>
44+
</div>
4545
</template>
4646

4747
<style lang="less" scoped>

‎src/pages/profile/index.vue‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ const { t } = useI18n()
1010
</script>
1111

1212
<template>
13-
<Containerpb-60>
13+
<divclass="p-16 pt-46">
1414
<div mx-auto pt-15 text-center text-16 text-dark dark:text-white>
1515
{{ t('profile.placeholder') }}
1616
</div>
17-
</Container>
17+
</div>
1818
</template>

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /