|
|
@@ -29,14 +29,14 @@ app.use(Tour);
|
|
|
</template>
|
|
|
</nut-cell>
|
|
|
<nut-tour
|
|
|
- v-model:visible="showTour3"
|
|
|
+ v-model="showTour3"
|
|
|
:steps="steps3"
|
|
|
type="tile"
|
|
|
location="bottom-end"
|
|
|
></nut-tour>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import { reactive, ref } from 'vue';
|
|
|
+import { reactive, toRefs } from 'vue';
|
|
|
export default {
|
|
|
setup() {
|
|
|
const state = reactive({
|
|
|
@@ -69,7 +69,7 @@ export default {
|
|
|
|
|
|
<nut-tour
|
|
|
class="nut-custom-tour nut-customword-tour nut-customstyle-tour"
|
|
|
- v-model:visible="showTour1"
|
|
|
+ v-model="showTour1"
|
|
|
:steps="steps1"
|
|
|
location="bottom-end"
|
|
|
type="tile"
|
|
|
@@ -82,7 +82,7 @@ export default {
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { reactive, ref } from 'vue';
|
|
|
+import { reactive, toRefs } from 'vue';
|
|
|
export default {
|
|
|
setup() {
|
|
|
const state = reactive({
|
|
|
@@ -110,8 +110,9 @@ export default {
|
|
|
<template>
|
|
|
<nut-cell title="点击试试" @click="showTour2 = true">
|
|
|
<template v-slot:link>
|
|
|
- <div class="tour-demo-img">
|
|
|
+ <div class="tour-demo-img" v-for='i in [1,2,3]'>
|
|
|
<img
|
|
|
+ style="width:20px;height:20px;margin-right:10px"
|
|
|
id="target6"
|
|
|
src="https://img14.360buyimg.com/imagetools/jfs/t1/167902/2/8762/791358/603742d7E9b4275e3/e09d8f9a8bf4c0ef.png"
|
|
|
/>
|
|
|
@@ -120,7 +121,7 @@ export default {
|
|
|
</nut-cell>
|
|
|
|
|
|
<nut-tour
|
|
|
- v-model:visible="showTour2"
|
|
|
+ v-model="showTour2"
|
|
|
:steps="steps2"
|
|
|
type="tile"
|
|
|
bgColor="#f00"
|
|
|
@@ -132,7 +133,7 @@ export default {
|
|
|
|
|
|
|
|
|
<script>
|
|
|
-import { reactive, ref } from 'vue';
|
|
|
+import { reactive, toRefs } from 'vue';
|
|
|
export default {
|
|
|
setup() {
|
|
|
const state = reactive({
|
|
|
@@ -169,7 +170,7 @@ export default {
|
|
|
</nut-cell>
|
|
|
|
|
|
<nut-tour
|
|
|
- v-model:visible="showTour4"
|
|
|
+ v-model="showTour4"
|
|
|
:steps="steps4"
|
|
|
type="tile"
|
|
|
theme="dark"
|
|
|
@@ -186,7 +187,7 @@ export default {
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts">
|
|
|
-import { reactive, ref } from 'vue';
|
|
|
+import { reactive, toRefs } from 'vue';
|
|
|
export default {
|
|
|
setup() {
|
|
|
const state = reactive({
|
|
|
@@ -201,6 +202,18 @@ export default {
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
|
+<style lang="scss">
|
|
|
+.tour-demo-custom-content {
|
|
|
+ padding: 8px;
|
|
|
+ display: flex;
|
|
|
+ width: max-content;
|
|
|
+ align-items: center;
|
|
|
+
|
|
|
+ .nut-divider {
|
|
|
+ border-color: #fff;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|
|
|
|
|
|
```
|
|
|
:::
|
|
|
@@ -214,19 +227,27 @@ export default {
|
|
|
<template>
|
|
|
<nut-cell title="点击试试" @click="showTour = true"></nut-cell>
|
|
|
|
|
|
- <nut-tour
|
|
|
- class="nut-custom-tour"
|
|
|
- v-model:visible="showTour"
|
|
|
- :steps="steps"
|
|
|
- location="top-start"
|
|
|
- :offset="[0, 0]"
|
|
|
- maskWidth="50"
|
|
|
- maskHeight="50"
|
|
|
- ></nut-tour>
|
|
|
+ <nut-tabbar>
|
|
|
+ <nut-tabbar-item id="target1" tab-title="首页"></nut-tabbar-item>
|
|
|
+ <nut-tabbar-item id="target2" tab-title="分类"></nut-tabbar-item>
|
|
|
+ <nut-tabbar-item id="target3" tab-title="购物车"></nut-tabbar-item>
|
|
|
+ <nut-tabbar-item id="target4" tab-title="我的"></nut-tabbar-item>
|
|
|
+ </nut-tabbar>
|
|
|
+
|
|
|
+ <nut-tour
|
|
|
+ class="nut-customword-tour"
|
|
|
+ v-model="showTour"
|
|
|
+ :steps="steps"
|
|
|
+ location="top-start"
|
|
|
+ :offset="[0, 0]"
|
|
|
+ maskWidth="50"
|
|
|
+ maskHeight="50"
|
|
|
+ :showTitleBar="false"
|
|
|
+ ></nut-tour>
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts">
|
|
|
-import { reactive, ref } from 'vue';
|
|
|
+import { reactive, toRefs } from 'vue';
|
|
|
export default {
|
|
|
setup() {
|
|
|
const state = reactive({
|
|
|
@@ -256,7 +277,11 @@ export default {
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
|
-
|
|
|
+<style>
|
|
|
+page{
|
|
|
+ padding-top: 200px;
|
|
|
+}
|
|
|
+</style>
|
|
|
```
|
|
|
:::
|
|
|
|
|
|
@@ -266,7 +291,7 @@ export default {
|
|
|
|
|
|
| 参数 | 说明 | 类型 | 默认值 |
|
|
|
|----------------|---------------------------------|---------|------------|
|
|
|
-| visible | 是否展示引导弹出层 | boolean | `false` |
|
|
|
+| v-model | 是否展示引导弹出层 | boolean | `false` |
|
|
|
| type | 引导类型 | string | `step` |
|
|
|
| steps | 引导步骤内容 | StepOptions[] | `[]` |
|
|
|
| offset | 镂空遮罩相对于目标元素的偏移量 | [number, number] | `[8, 10]` |
|