-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: 更新 GuideTour * feat: 更新 guide-tour 的 axml * feat: 更新 guide tour 的测试 * fix: 更新 axml * chore: 更新 guidetour 的 axml * fix: 修复 guide tour 的 axml * fix: 更新 guidetour 的 axml * fix: 更新 axml * fix: 更新 axml * fix: update axml * fix: 更新 axml * fix: 删除 disable-touch --------- Co-authored-by: DiamondYuan <fandi.yfd@antgroup.com>
- Loading branch information
1 parent
e18023a
commit e9e9190
Showing
23 changed files
with
507 additions
and
405 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,49 @@ | ||
Page({ | ||
data: { | ||
baseVisible: false, | ||
moreVisible: false, | ||
swiperVisible: false, | ||
slotVisible: false, | ||
controlledVisible: false, | ||
current: 0, | ||
list: [ | ||
{ | ||
left: 20, | ||
top: 80, | ||
imageUrl: | ||
'https://gw.alipayobjects.com/zos/antfincdn/IV3MGP1qL/bianzu%25252013.png', | ||
imageMode: 'widthFix', | ||
}, | ||
{ | ||
left: 20, | ||
top: 160, | ||
imageUrl: | ||
'https://gw.alipayobjects.com/zos/antfincdn/%26B6d3lBJn/bianzu%25252020.png', | ||
}, | ||
{ | ||
left: 20, | ||
top: 220, | ||
imageUrl: | ||
'https://gw.alipayobjects.com/zos/antfincdn/lwVOkCcwb/bianzu%25252021.png', | ||
}, | ||
], | ||
}, | ||
onChange(index) { | ||
console.log('index', index); | ||
}, | ||
onChangeControlled(index) { | ||
this.setData({ current: index }); | ||
}, | ||
openTour(e) { | ||
this.setData({ | ||
[e.target.dataset.field]: true, | ||
current: 0, | ||
}); | ||
}, | ||
closeTour() { | ||
this.setData({ | ||
baseVisible: false, | ||
moreVisible: false, | ||
swiperVisible: false, | ||
slotVisible: false, | ||
controlledVisible: false, | ||
}); | ||
}, | ||
data: { | ||
baseVisible: false, | ||
moreVisible: false, | ||
swiperVisible: false, | ||
slotVisible: false, | ||
controlledVisible: false, | ||
current: 0, | ||
list: [ | ||
{ | ||
left: 20, | ||
top: 80, | ||
imageUrl: 'https://gw.alipayobjects.com/zos/antfincdn/IV3MGP1qL/bianzu%25252013.png', | ||
imageMode: 'widthFix', | ||
}, | ||
{ | ||
left: 20, | ||
top: 160, | ||
imageUrl: 'https://gw.alipayobjects.com/zos/antfincdn/%26B6d3lBJn/bianzu%25252020.png', | ||
}, | ||
{ | ||
left: 20, | ||
top: 220, | ||
imageUrl: 'https://gw.alipayobjects.com/zos/antfincdn/lwVOkCcwb/bianzu%25252021.png', | ||
}, | ||
], | ||
}, | ||
onChange(index) { | ||
console.log('index', index); | ||
}, | ||
onChangeControlled(index) { | ||
this.setData({ current: index }); | ||
}, | ||
openTour(e) { | ||
this.setData({ | ||
[e.target.dataset.field]: true, | ||
current: 0, | ||
}); | ||
}, | ||
closeTour() { | ||
this.setData({ | ||
baseVisible: false, | ||
moreVisible: false, | ||
swiperVisible: false, | ||
slotVisible: false, | ||
controlledVisible: false, | ||
}); | ||
}, | ||
}); |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,98 +1,110 @@ | ||
<import-sjs | ||
from="./index.sjs" | ||
name="utils" /> | ||
|
||
<view | ||
class="ant-guide-tour {{className?className:''}}" | ||
style="{{style || ''}}" | ||
a:if="{{visible}}"> | ||
a:if="{{ visible }}" | ||
class="ant-guide-tour {{ className || '' }}" | ||
style="{{ style || '' }}"> | ||
<mask | ||
show | ||
className="{{maskClassName}}" | ||
style="z-index:9999;{{maskStyle || ''}}" /> | ||
<am-icon | ||
className="{{ maskClassName }}" | ||
style="z-index:9999;{{ maskStyle || '' }}" /> | ||
<ant-icon | ||
type="CloseOutline" | ||
class="ant-guide-tour-clear" | ||
className="ant-guide-tour-clear" | ||
onTap="onCancel" /> | ||
<view class="ant-guide-tour-button"> | ||
<button | ||
<ant-button | ||
a:if="{{ utils.checkShowJump(mixin.value, items) }}" | ||
inline | ||
size="small" | ||
a:if="{{utils.checkShowJump(mixin.value,items)}}" | ||
onTap="onCancel"> | ||
跳过 | ||
</button> | ||
<button | ||
</ant-button> | ||
<ant-button | ||
a:if="{{ utils.checkShowPrev(mixin.value, items) }}" | ||
inline | ||
size="small" | ||
onTap="onPrev" | ||
a:if="{{utils.checkShowPrev(mixin.value,items)}}" | ||
data-currentValue="{{mixin.value}}"> | ||
data-currentValue="{{ mixin.value }}"> | ||
上一步 | ||
</button> | ||
<button | ||
</ant-button> | ||
<ant-button | ||
a:if="{{ utils.checkShowNext(mixin.value, items) }}" | ||
inline | ||
size="small" | ||
onTap="onNext" | ||
a:if="{{utils.checkShowNext(mixin.value,items)}}" | ||
data-currentValue="{{mixin.value}}"> | ||
data-currentValue="{{ mixin.value }}"> | ||
下一步 | ||
</button> | ||
<button | ||
</ant-button> | ||
<ant-button | ||
a:if="{{ utils.checkShowKnow(mixin.value, items) }}" | ||
inline | ||
size="small" | ||
a:if="{{utils.checkShowKnow(mixin.value,items)}}" | ||
onTap="onCancel"> | ||
知道了 | ||
</button> | ||
</ant-button> | ||
</view> | ||
<block a:if="{{swiperable}}"> | ||
<block a:if="{{ swiperable }}"> | ||
<view class="ant-guide-tour-indicator"> | ||
<view | ||
a:for="{{items}}" | ||
class="ant-guide-tour-indicator-dot {{index === mixin.value ? 'ant-guide-tour-indicator-dot-active':''}}" /> | ||
<block | ||
a:for="{{ items }}" | ||
a:for-index="index" | ||
a:for-item="item"> | ||
<view | ||
class="ant-guide-tour-indicator-dot {{ index === mixin.value ? 'ant-guide-tour-indicator-dot-active' : '' }}" /> | ||
</block> | ||
</view> | ||
<swiper | ||
class="ant-guide-tour-swiper" | ||
current="{{mixin.value}}" | ||
current="{{ mixin.value }}" | ||
adjust-height="none" | ||
style="height: 100vh" | ||
disable-touch="{{ture}}" | ||
onChange="onSwiperChange"> | ||
<swiper-item a:for="{{items}}"> | ||
<view | ||
class="ant-guide-tour-item {{item.className ? item.className : ''}}" | ||
style="top:{{item.top}}px; left:{{item.left}}px"> | ||
<slot | ||
name="step" | ||
index="{{current}}"> | ||
<image | ||
a:if="{{item.imageUrl}}" | ||
class="ant-guide-tour-item-img" | ||
src="{{item.imageUrl}}" | ||
style="{{item.imageStyle}}" | ||
mode="{{item.imageMode}}" /> | ||
</slot> | ||
</view> | ||
</swiper-item> | ||
<block | ||
a:for="{{ items }}" | ||
a:for-index="index" | ||
a:for-item="item"> | ||
<swiper-item> | ||
<view | ||
class="ant-guide-tour-item {{ item.className || '' }}" | ||
style="top:{{ item.top }}px; left:{{ item.left }}px"> | ||
<slot | ||
name="step" | ||
index="{{ current }}"> | ||
<image | ||
a:if="{{ item.imageUrl }}" | ||
class="ant-guide-tour-item-img" | ||
src="{{ item.imageUrl }}" | ||
style="{{ item.imageStyle }}" | ||
mode="{{ item.imageMode }}" /> | ||
</slot> | ||
</view> | ||
</swiper-item> | ||
</block> | ||
</swiper> | ||
</block> | ||
<block | ||
a:else | ||
a:for="{{items}}"> | ||
<view | ||
class="ant-guide-tour-item {{item.className ? item.className : ''}}" | ||
style="top:{{item.top}}px; left:{{item.left}}px" | ||
a:if="{{mixin.value === index}}"> | ||
<slot | ||
name="step" | ||
index="{{index}}"> | ||
<image | ||
a:if="{{item.imageUrl}}" | ||
class="ant-guide-tour-item-img" | ||
src="{{item.imageUrl}}" | ||
style="{{item.imageStyle}}" | ||
mode="{{item.imageMode}}" /> | ||
</slot> | ||
</view> | ||
<block a:else> | ||
<block | ||
a:for="{{ items }}" | ||
a:for-index="index" | ||
a:for-item="item"> | ||
<view | ||
a:if="{{ mixin.value === index }}" | ||
class="ant-guide-tour-item {{ item.className || '' }}" | ||
style="top:{{ item.top }}px; left:{{ item.left }}px"> | ||
<slot | ||
name="step" | ||
index="{{ index }}"> | ||
<image | ||
a:if="{{ item.imageUrl }}" | ||
class="ant-guide-tour-item-img" | ||
src="{{ item.imageUrl }}" | ||
style="{{ item.imageStyle }}" | ||
mode="{{ item.imageMode }}" /> | ||
</slot> | ||
</view> | ||
</block> | ||
</block> | ||
</view> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.