Skip to content

Commit

Permalink
fix: 🐛 修复小程序端演示案例错乱的问题。不能将id直接绑定在自定义组件上面啊!!!
Browse files Browse the repository at this point in the history
  • Loading branch information
Wangxq0614 committed Sep 16, 2024
1 parent da67bf9 commit 0c95609
Showing 1 changed file with 8 additions and 28 deletions.
36 changes: 8 additions & 28 deletions src/pages/tour/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,19 @@
<page-wraper>
<view>
<demo-block title="基本用法">
<wd-cell title="步骤一" id="pop1001">
<wd-button @click="show1 = true">点击试试</wd-button>
<wd-cell title="步骤一">
<view id="pop1001">
<wd-button @click="show1 = true">点击试试</wd-button>
</view>
</wd-cell>
</demo-block>
<wd-tour v-model="show1" :steps="steps1" type="card" />

<demo-block title="自定义样式">
<wd-cell title="步骤一" id="pop2001">
<wd-button @click="show2 = true">点击试试</wd-button>
<wd-cell title="步骤一">
<view id="pop2001">
<wd-button @click="show2 = true">点击试试</wd-button>
</view>
</wd-cell>
</demo-block>
<wd-tour v-model="show2" :steps="steps2" type="card" bgColor="#f00">
Expand All @@ -32,15 +36,6 @@
</view>
</demo-block>
<wd-tour v-model="show3" :steps="steps3" type="step" />

<view @click="show4 = true">
<wd-tabbar fixed bordered safeAreaInsetBottom placeholder>
<wd-tabbar-item id="pop4001" title="首页" icon="home"></wd-tabbar-item>
<wd-tabbar-item id="pop4002" title="分类" icon="cart"></wd-tabbar-item>
<wd-tabbar-item id="pop4003" title="我的" icon="user"></wd-tabbar-item>
</wd-tabbar>
</view>
<wd-tour v-model="show4" :steps="steps4" type="step" />
</view>
</page-wraper>
</template>
Expand All @@ -50,7 +45,6 @@ import { ref } from 'vue'
const show1 = ref<boolean>(false)
const show2 = ref<boolean>(false)
const show3 = ref<boolean>(false)
const show4 = ref<boolean>(false)
const steps1 = [
{
Expand Down Expand Up @@ -83,20 +77,6 @@ const steps3 = [
target: 'pop3002'
}
]
const steps4 = [
{
content: '首页',
target: 'pop4001'
},
{
content: '分类',
target: 'pop4002'
},
{
content: '我的',
target: 'pop4003'
}
]
</script>

<style lang="scss" scoped></style>

0 comments on commit 0c95609

Please sign in to comment.