|
@@ -38,7 +38,7 @@ At each step, set the id of the target element, and the Tour component looks up
|
|
|
></nut-tour>
|
|
></nut-tour>
|
|
|
</template>
|
|
</template>
|
|
|
<script>
|
|
<script>
|
|
|
-import { reactive, ref } from 'vue';
|
|
|
|
|
|
|
+import { reactive, toRefs } from 'vue';
|
|
|
export default {
|
|
export default {
|
|
|
setup() {
|
|
setup() {
|
|
|
const state = reactive({
|
|
const state = reactive({
|
|
@@ -84,7 +84,7 @@ Through 'maskWidth', 'maskHeight', 'bgColor' can be configured hollow mask size,
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
-import { reactive, ref } from 'vue';
|
|
|
|
|
|
|
+import { reactive, toRefs } from 'vue';
|
|
|
export default {
|
|
export default {
|
|
|
setup() {
|
|
setup() {
|
|
|
const state = reactive({
|
|
const state = reactive({
|
|
@@ -110,10 +110,11 @@ export default {
|
|
|
:::demo
|
|
:::demo
|
|
|
```html
|
|
```html
|
|
|
<template>
|
|
<template>
|
|
|
- <nut-cell title="try click" @click="showTour2 = true">
|
|
|
|
|
|
|
+ <nut-cell title="点击试试" @click="showTour2 = true">
|
|
|
<template v-slot:link>
|
|
<template v-slot:link>
|
|
|
- <div class="tour-demo-img">
|
|
|
|
|
|
|
+ <div class="tour-demo-img" v-for='i in [1,2,3]'>
|
|
|
<img
|
|
<img
|
|
|
|
|
+ style="width:20px;margin-right:10px"
|
|
|
id="target6"
|
|
id="target6"
|
|
|
src="https://img14.360buyimg.com/imagetools/jfs/t1/167902/2/8762/791358/603742d7E9b4275e3/e09d8f9a8bf4c0ef.png"
|
|
src="https://img14.360buyimg.com/imagetools/jfs/t1/167902/2/8762/791358/603742d7E9b4275e3/e09d8f9a8bf4c0ef.png"
|
|
|
/>
|
|
/>
|
|
@@ -134,14 +135,14 @@ export default {
|
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
-import { reactive, ref } from 'vue';
|
|
|
|
|
|
|
+import { reactive, toRefs } from 'vue';
|
|
|
export default {
|
|
export default {
|
|
|
setup() {
|
|
setup() {
|
|
|
const state = reactive({
|
|
const state = reactive({
|
|
|
showTour2: false,
|
|
showTour2: false,
|
|
|
steps2: [
|
|
steps2: [
|
|
|
{
|
|
{
|
|
|
- content: '70+ 高质量组件,覆盖移动端主流场景',
|
|
|
|
|
|
|
+ content: '这里换成关注和粉丝啦,听歌时长点击头像可见',
|
|
|
target: 'target6',
|
|
target: 'target6',
|
|
|
popoverOffset: [40, 12],
|
|
popoverOffset: [40, 12],
|
|
|
arrowOffset: -36
|
|
arrowOffset: -36
|
|
@@ -154,6 +155,7 @@ export default {
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
```
|
|
```
|
|
|
:::
|
|
:::
|
|
|
|
|
|
|
@@ -164,7 +166,7 @@ Can customize the bubble layer through the slot slot
|
|
|
:::demo
|
|
:::demo
|
|
|
```html
|
|
```html
|
|
|
<template>
|
|
<template>
|
|
|
- <nut-cell title="try click" @click="showTour4 = true">
|
|
|
|
|
|
|
+ <nut-cell title="点击试试" @click="showTour4 = true">
|
|
|
<template v-slot:link>
|
|
<template v-slot:link>
|
|
|
<nut-switch id="target8" />
|
|
<nut-switch id="target8" />
|
|
|
</template>
|
|
</template>
|
|
@@ -188,7 +190,7 @@ Can customize the bubble layer through the slot slot
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
<script lang="ts">
|
|
|
-import { reactive, ref } from 'vue';
|
|
|
|
|
|
|
+import { reactive, toRefs } from 'vue';
|
|
|
export default {
|
|
export default {
|
|
|
setup() {
|
|
setup() {
|
|
|
const state = reactive({
|
|
const state = reactive({
|
|
@@ -204,6 +206,19 @@ export default {
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
|
|
+<style>
|
|
|
|
|
+.tour-demo-custom-content {
|
|
|
|
|
+ padding: 8px;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ width: max-content;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+
|
|
|
|
|
+ .nut-divider {
|
|
|
|
|
+ border-color: #fff;
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+</style>
|
|
|
|
|
+
|
|
|
```
|
|
```
|
|
|
:::
|
|
:::
|
|
|
|
|
|
|
@@ -213,8 +228,33 @@ export default {
|
|
|
:::demo
|
|
:::demo
|
|
|
```html
|
|
```html
|
|
|
<template>
|
|
<template>
|
|
|
- <nut-cell title="try click" @click="showTour = true"></nut-cell>
|
|
|
|
|
-
|
|
|
|
|
|
|
+ <nut-tabbar :bottom="true">
|
|
|
|
|
+ <nut-tabbar-item
|
|
|
|
|
+ id="target1"
|
|
|
|
|
+ tab-title="首页"
|
|
|
|
|
+ img="https://img13.360buyimg.com/imagetools/jfs/t1/23319/19/18329/3084/62e7c346E957c54ef/6c3e8a49e52b76f2.png"
|
|
|
|
|
+ activeImg="https://img11.360buyimg.com/imagetools/jfs/t1/70423/4/20553/3652/62e74629E23ba550e/aeeed0e3b9f43ae6.png"
|
|
|
|
|
+ ></nut-tabbar-item>
|
|
|
|
|
+ <nut-tabbar-item
|
|
|
|
|
+ id="target2"
|
|
|
|
|
+ tab-title="分类"
|
|
|
|
|
+ img="https://img13.360buyimg.com/imagetools/jfs/t1/202062/32/25149/5246/62e7c353E5a51db17/b82b940e6eb22ec3.png"
|
|
|
|
|
+ activeImg="https://img11.360buyimg.com/imagetools/jfs/t1/162634/35/26732/5502/62e747a8E5330f029/3ea00a0c140beb38.png"
|
|
|
|
|
+ ></nut-tabbar-item>
|
|
|
|
|
+ <nut-tabbar-item
|
|
|
|
|
+ id="target3"
|
|
|
|
|
+ tab-title="购物车"
|
|
|
|
|
+ img="https://img12.360buyimg.com/imagetools/jfs/t1/60552/28/20576/5585/62e7c2ddE2e0b48a7/70eefb366b85f3e4.png"
|
|
|
|
|
+ activeImg="https://img11.360buyimg.com/imagetools/jfs/t1/138362/15/28011/5802/62e747a4E4139ef2f/9a79a1c0f6a273b4.png"
|
|
|
|
|
+ ></nut-tabbar-item>
|
|
|
|
|
+ <nut-tabbar-item
|
|
|
|
|
+ id="target4"
|
|
|
|
|
+ tab-title="我的"
|
|
|
|
|
+ img="https://img14.360buyimg.com/imagetools/jfs/t1/156023/30/29042/4257/62e7c34aE71f32967/690e2db242e2a97f.png"
|
|
|
|
|
+ activeImg="https://img13.360buyimg.com/imagetools/jfs/t1/144283/8/28420/4851/62e74784Eaa8549fe/80535de2961b812e.png"
|
|
|
|
|
+ ></nut-tabbar-item>
|
|
|
|
|
+ </nut-tabbar>
|
|
|
|
|
+ <nut-cell title="点击试试" @click="showTour = true"></nut-cell>
|
|
|
<nut-tour
|
|
<nut-tour
|
|
|
class="nut-custom-tour"
|
|
class="nut-custom-tour"
|
|
|
v-model:visible="showTour"
|
|
v-model:visible="showTour"
|
|
@@ -227,7 +267,7 @@ export default {
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
<script lang="ts">
|
|
|
-import { reactive, ref } from 'vue';
|
|
|
|
|
|
|
+import { reactive, toRefs } from 'vue';
|
|
|
export default {
|
|
export default {
|
|
|
setup() {
|
|
setup() {
|
|
|
const state = reactive({
|
|
const state = reactive({
|