Skip to content
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

关于l-tabs组件 想添加 设置内容区域(swiper)的高度。 #703

Closed
liangjuncheng1995 opened this issue Feb 26, 2020 · 2 comments · Fixed by #802
Closed

关于l-tabs组件 想添加 设置内容区域(swiper)的高度。 #703

liangjuncheng1995 opened this issue Feb 26, 2020 · 2 comments · Fixed by #802
Assignees
Labels
Feature Issue 提出了一个新功能 Tabs 标签页组件 已解决:+1: Issue 已解决

Comments

@liangjuncheng1995
Copy link

希望 l-tabs组件 可以通过传入属性值 设置内容区域(swiper ) 的高度
image
我这里的需求是tab 栏下面的区域全是显示的 内容
只能获取小程序整块的显示高度(wx.getSystemInfoSync().windowHeight) - tab栏的高度
这里使用lin-ui的工具类的 px2rpx 转 rpx 的方法计算出 高度 (wHeight)

然后传入 l-tabs 组件里面

image

然后在 l-tabs 组件的properties 接收高度
image

接着在 组件的生命周期函数attached 里面 setData
image

最后在组件的里面的swiper 组件加上内联样式的高度
image

@uniquenaer
Copy link

感谢建议,我们会尽快加一下~

@uniquenaer uniquenaer added the Tabs 标签页组件 label Mar 1, 2020
@juzi214032 juzi214032 self-assigned this May 11, 2020
@juzi214032 juzi214032 added Feature Issue 提出了一个新功能 待反馈:mag: Issue 等待反馈中…… 处理中:construction: Issue 已确认,正在写代码…… and removed 待反馈:mag: Issue 等待反馈中…… labels May 11, 2020
juzi214032 added a commit that referenced this issue May 11, 2020
content-height 属性用于 js 动态控制内容区高度的场景

close #703
@juzi214032 juzi214032 added 已解决:+1: Issue 已解决 and removed 处理中:construction: Issue 已确认,正在写代码…… labels May 11, 2020
@juzi214032 juzi214032 linked a pull request May 11, 2020 that will close this issue
@juzi214032
Copy link
Member

已添加 content-height 属性,将在下个版本上线

juzi214032 added a commit that referenced this issue May 12, 2020
content-height 属性用于 js 动态控制内容区高度的场景

close #703
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Issue 提出了一个新功能 Tabs 标签页组件 已解决:+1: Issue 已解决
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants