Skip to content

merge master #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 126 commits into from
Dec 23, 2019
Merged
Changes from 3 commits
Commits
Show all changes
126 commits
Select commit Hold shift + click to select a range
25d40c1
Merge pull request #2 from swan-team/master
tntwhl Dec 10, 2019
5547aae
更新导航栏
Dec 13, 2019
733eb6a
更新changlog
Dec 13, 2019
2bf7373
更新
Dec 13, 2019
dda685d
更新
Dec 13, 2019
782db39
Merge branch 'master' of https://github.com/swan-team/swan-docs
Dec 16, 2019
df42363
Merge pull request #5 from swan-team/master
bosspan Dec 16, 2019
063a42d
更新
Dec 17, 2019
45794e4
Update share_swan-shareFile.md
sunbai01 Dec 17, 2019
b1d2155
Update swan-chooseInvoiceTitle.md
sunbai01 Dec 17, 2019
9d62182
Update custom_component.md
sunbai01 Dec 17, 2019
31d8de8
Update payment_swan-requestPolymerPayment.md
sunbai01 Dec 17, 2019
21fcc41
Update tune_up.md
Asadeer Dec 17, 2019
02c5f0f
Merge pull request #669 from Asadeer/patch-18
wenlixiu Dec 17, 2019
f05b296
Merge pull request #668 from sunbai01/patch-42
wenlixiu Dec 17, 2019
ee918db
Merge pull request #665 from sunbai01/patch-38
wenlixiu Dec 17, 2019
015b976
Merge pull request #666 from sunbai01/patch-39
wenlixiu Dec 17, 2019
34722e1
Merge pull request #667 from sunbai01/patch-40
wenlixiu Dec 17, 2019
fd1138a
新增动态库
Dec 17, 2019
19b3ee7
Merge branch 'master' of https://github.com/swan-team/swan-docs
Dec 17, 2019
0d4bfb5
Update view_scroll-view.md
sunbai01 Dec 17, 2019
182a9b8
新增动态库
Dec 17, 2019
9756f88
Merge pull request #670 from sunbai01/patch-43
wenlixiu Dec 17, 2019
fe52ac7
更新
Dec 17, 2019
ba2bc16
Merge branch 'master' of https://github.com/swan-team/swan-docs
Dec 17, 2019
cd89a53
Update menu_info.md
sunbai01 Dec 17, 2019
8e6f204
Update frameworkdevelop.md
wenlixiu Dec 17, 2019
eafd55c
Update frameworkdevelop.md
wenlixiu Dec 17, 2019
baaa92e
Update frameworkdevelop.md
wenlixiu Dec 17, 2019
8f90608
Update formlist_slider.md
wenlixiu Dec 17, 2019
70aa791
Update formlist_picker.md
wenlixiu Dec 17, 2019
30a9cda
Update tabs.md
wenlixiu Dec 17, 2019
ecf811c
Merge pull request #672 from zhangshao-qiang/master
wenlixiu Dec 17, 2019
958a33b
Merge pull request #671 from sunbai01/patch-44
wenlixiu Dec 17, 2019
ce6250a
更新扩展组件
Dec 17, 2019
9a289fb
Merge branch 'master' of https://github.com/swan-team/swan-docs
Dec 17, 2019
0efa2be
Update dev.md
sunbai01 Dec 17, 2019
965f9ec
Update devjs.md
sunbai01 Dec 17, 2019
eb7c415
Update app_service_pagelife.md
sunbai01 Dec 17, 2019
a3fa600
fix: 事件点击重复
Dec 18, 2019
203d519
Merge branch 'master' of github.com:wlfsmile/swan-docs
Dec 18, 2019
3a537e1
Merge pull request #676 from wlfsmile/master
wenlixiu Dec 18, 2019
3d8de4e
Merge pull request #675 from sunbai01/patch-49
wenlixiu Dec 18, 2019
b1819c6
Merge pull request #674 from sunbai01/patch-47
wenlixiu Dec 18, 2019
16da37e
声明云开发只支持百度APP,其它宿主不支持
bluestrings Dec 18, 2019
e3105b7
取消搜索框自动聚焦
Dec 18, 2019
927cee4
更新白皮书截图
Dec 18, 2019
99e5f6f
Merge branch 'master' of https://github.com/swan-team/swan-docs
Dec 18, 2019
cf91f49
Merge pull request #673 from sunbai01/patch-46
wenlixiu Dec 18, 2019
98d84b7
修改数据格式
MaWenChao0417 Dec 18, 2019
803a588
Merge branch 'master' of https://github.com/swan-team/swan-docs
Dec 18, 2019
c2e78f9
Update open_risk_power_detectrisk.md
xzf-rabbit Dec 18, 2019
9ab7bc8
Update getunlimited.md
xzf-rabbit Dec 18, 2019
99b2ba3
Merge pull request #680 from HsuehFrank/patch-2
wenlixiu Dec 18, 2019
187753f
Merge pull request #681 from HsuehFrank/patch-3
wenlixiu Dec 18, 2019
2af9c37
Merge pull request #679 from MaWenChao0417/patch-3
wenlixiu Dec 18, 2019
e718dd9
Merge pull request #678 from wlfsmile/master
wenlixiu Dec 18, 2019
1cce383
Update get.md
xzf-rabbit Dec 18, 2019
99e7228
Merge pull request #677 from bluestrings/patch-4
wenlixiu Dec 18, 2019
695dbe0
Merge pull request #682 from HsuehFrank/patch-4
wenlixiu Dec 18, 2019
7cf90cc
补充code 失效说明
youxinhuang Dec 18, 2019
577d8f6
Merge pull request #683 from youxinhuang/patch-10
wenlixiu Dec 18, 2019
c542f4c
map组件文档内容补充 & 新增同层渲染说明
Dec 18, 2019
7ca4eb6
Create nodejs.yml
MarxJiao Dec 18, 2019
788c019
Update deploy.sh
MarxJiao Dec 18, 2019
ea11281
Update nodejs.yml
MarxJiao Dec 18, 2019
6c7dcce
Merge pull request #8 from MarxJiao/ci-test
MarxJiao Dec 18, 2019
e089486
Merge pull request #9 from swan-team/master
MarxJiao Dec 18, 2019
6ed1ace
Merge pull request #684 from MarxJiao/master
wenlixiu Dec 18, 2019
7cace8a
新增服务端API
Dec 18, 2019
624c095
Update getunlimited.md
xzf-rabbit Dec 18, 2019
af91f0e
Update nodejs.yml
MarxJiao Dec 18, 2019
8a70eb2
Merge pull request #685 from HsuehFrank/patch-5
wenlixiu Dec 18, 2019
1cd7a82
Merge pull request #686 from MarxJiao/master
wenlixiu Dec 18, 2019
293e8ac
新增开源宿主场景值
Dec 18, 2019
7fd61a5
[冲突解决]
Dec 18, 2019
dcc3937
Update processjs.md
sunbai01 Dec 18, 2019
34082c3
Merge pull request #687 from sunbai01/patch-50
wenlixiu Dec 19, 2019
219bb02
更新组件最低支持版本
Dec 19, 2019
8e59c8d
Merge branch 'master' of https://github.com/swan-team/swan-docs
Dec 19, 2019
87b2b60
map组件文档内容补充 & 新增同层渲染说明
Dec 19, 2019
1d26355
更新体验评分文档
Dec 19, 2019
1563f5e
Merge pull request #688 from better-hyr/map_and_native
wenlixiu Dec 19, 2019
93a8318
Merge branch 'master' into master
tntwhl Dec 19, 2019
71c9d91
Merge pull request #689 from tntwhl/master
wenlixiu Dec 19, 2019
5392ffd
Update rank_setimage.md
LYUyang-JK Dec 19, 2019
1a36a5e
新增评分标准
Dec 19, 2019
6fc5b20
图片删除,变更为链接
Dec 19, 2019
af0ee15
Update rank_setimage.md
LYUyang-JK Dec 19, 2019
aa48984
Merge pull request #690 from LYUyang-JK/patch-16
wenlixiu Dec 19, 2019
b78276c
Update formlist_textarea.md
DemonKHH Dec 19, 2019
0eddcec
Update rank_sitemap.md
LYUyang-JK Dec 19, 2019
3202424
Merge pull request #691 from LYUyang-JK/patch-17
wenlixiu Dec 19, 2019
584a526
Merge pull request #692 from LYUyang-JK/patch-18
wenlixiu Dec 19, 2019
7830d09
Merge branch 'master' of https://github.com/swan-team/swan-docs
Dec 19, 2019
f754c9f
Merge pull request #693 from DemonKHH/patch-1
wenlixiu Dec 19, 2019
06b3d6e
Update rank_url.md
LYUyang-JK Dec 19, 2019
3968a2e
Merge pull request #694 from LYUyang-JK/patch-19
wenlixiu Dec 19, 2019
ece5026
更新图片
Dec 19, 2019
8f16d37
链接修改
Dec 19, 2019
70e3c48
更新脚本示例
Dec 19, 2019
c1eb6a3
目录顺序调整
Dec 19, 2019
c025d27
feat($第三方平台): 添加服务端API与第三方平台支付API
Oaks907 Dec 19, 2019
fb4bfe9
Merge pull request #695 from Oaks907/TP_20191219_BRANCH
wenlixiu Dec 20, 2019
e1fcb3a
Merge branch 'master' of https://github.com/swan-team/swan-docs
Dec 20, 2019
0f4c76a
服务端API格式更新
Dec 20, 2019
c1cd348
链接修改
Dec 20, 2019
285e0cb
格式更新
Dec 20, 2019
83bd907
新增tip描述
Dec 20, 2019
1632f7f
更新API格式
Dec 20, 2019
05183ad
docs(devtools): element.innerHTML/outerHTML => elment.swan/outerSwan
Dec 20, 2019
4fbbb3c
Merge pull request #696 from bosspan/master
wenlixiu Dec 20, 2019
f5f416d
markdown规范
Dec 20, 2019
2f6800c
Merge branch 'master' of github.com:wlfsmile/swan-docs
Dec 20, 2019
513a79e
小游戏内容更新
Dec 20, 2019
fa4b9e5
Merge branch 'master' of https://github.com/swan-team/swan-docs
Dec 20, 2019
2db94cc
文档规范
Dec 20, 2019
962469d
Merge branch 'master' of github.com:wlfsmile/swan-docs
Dec 20, 2019
3f328c1
更新版本分布
Dec 23, 2019
5b4eabe
Merge pull request #697 from wlfsmile/master
wenlixiu Dec 23, 2019
1a81ebd
[冲突解决]
Dec 23, 2019
87e2bd9
修改链接
Dec 23, 2019
18c764c
Merge pull request #697 from wlfsmile/master
wenlixiu Dec 23, 2019
be652ab
格式更新
Dec 23, 2019
4236263
Merge pull request #698 from wlfsmile/master
wenlixiu Dec 23, 2019
2e2ed7a
Merge branch 'master' of https://github.com/swan-team/swan-docs
Dec 23, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
122 changes: 122 additions & 0 deletions source/_posts/develop/component/view_scroll-view.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,128 @@ Page({
}
```

### 参考示例 3: 竖向锚点示例

<a href="swanide://fragment/6ee800a0957e3701c72c6c4ccff649d41576571802737" title="在开发者工具中预览效果" target="_self">在开发者工具中预览效果</a>

* 在 swan 文件中

```html
<view class='scroll-box' style='height:{{ht}}px;'>
<scroll-view scroll-y class='menu-tab' scroll-into-view="{{toView}}" scroll-with-animation="true">
<view s-for="{{tabList}}" s-key="">
<view class='item-tab {{item.checked ? "item-act":""}}' id="t{{index}}" data-index="{{index}}" bindtap='intoTab'>{{item.title}}</view>
</view>
</scroll-view>

<scroll-view scroll-y style='height:{{ht}}px;'
scroll-with-animation="true"
bindscrolltoupper="upper"
bindscrolltolower="lower"
bindscroll="scrollRight"
scroll-into-view="{{toViewRt}}">
<view s-for="{{contList}}" s-key="">
<view class='cont-box' id="t{{index}}" style='height:{{ht}}px;'>{{item.cont}}</view>
</view>
</scroll-view>
</view>
```

* 在 js 文件中

```js
var app = getApp();

Page({
data: {
current: 0,
// 左侧菜单
tabList: [
{ title: 'tab1', checked: true },
{ title: 'tab2', checked: false },
{ title: 'tab3', checked: false },
{ title: 'tab4', checked: false },
{ title: 'tab5', checked: false },
{ title: 'tab6', checked: false }
],
// 右侧内容
contList: [
{ cont: 'tab1'},
{ cont: 'tab2'},
{ cont: 'tab3'},
{ cont: 'tab4'},
{ cont: 'tab5'},
{ cont: 'tab6'}
],
},

// 循环切换
forTab(index) {
let lens = this.data.tabList.length;
let _id = 't' + index;
for (let i = 0; i < lens; i++) {
this.data.tabList[i]['checked'] = false;
}
this.data.tabList[index]['checked'] = true;
this.setData({
tabList: this.data.tabList,
toView: _id,
current: index
});
},

// 点击左侧菜单栏
intoTab(e) {
let lens = this.data.tabList.length;
let _index = e.currentTarget.dataset.index;
this.forTab(_index);
let _id = 't' + _index;
this.setData({
toViewRt: _id
});
},

// 滚动右侧菜单
scrollRight(e) {
//console.log(e)
let _top = e.detail.scrollTop;
let progress = parseInt(_top / this.data.ht); // 计算出 当前的下标
if (progress > this.data.current) { // 向上拉动屏幕

this.setData({ current: progress });
this.forTab(this.data.current);
} else if (progress == this.data.current) {
return false;
} else { // 向下拉动屏幕
this.setData({
current: progress == 0 ? 0 : progress--
});
this.forTab(progress);
}
},

onLoad: function (options) {
console.log(this.data.tabList)
// 框架尺寸设置
swan.getSystemInfo({
success: (options) => {
var wd = options.screenWidth; // 页面宽度
var ht = options.windowHeight; // 页面高度
this.setData({ wd: wd, ht: ht })
}
});
},

onShow: function () {
// 初始化状态
this.setData({
toView: 't' + this.data.current,
toViewRt: 't' + this.data.current
})
}
})
```

## 属性说明

|属性名 |类型 |默认值 | 必填 |说明|最低支持版本|
Expand Down