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

[divider] 水平布局时组件根节点宽度不能占满父元素 #3389

Open
prprprPro opened this issue Dec 23, 2024 · 3 comments
Open

[divider] 水平布局时组件根节点宽度不能占满父元素 #3389

prprprPro opened this issue Dec 23, 2024 · 3 comments
Labels
question This is a question, not a bug

Comments

@prprprPro
Copy link

tdesign-miniprogram 版本

1.8.3

重现链接

No response

重现步骤

divider.wxml line 3
<view class="{{layout==='vertical'? classPrefix + '--vertical-center' : ''}}">
这会导致水平布局时,根节点元素没有任何样式,但实际此时根节点元素应当具有width:100%;的样式,否则只有文字能显示出来,分割线不会显示。
image

期望结果

给根节点元素一个默认的(或layout==='horizontal'时的)width:100%;的样式

实际结果

No response

基础库版本

No response

补充说明

No response

Copy link
Contributor

👋 @prprprPro,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

@anlyyao anlyyao added the question This is a question, not a bug label Dec 23, 2024
@anlyyao
Copy link
Collaborator

anlyyao commented Dec 23, 2024

block 元素默认情况下宽度可以自动填满父元素宽度。贴你完整的代码看看吧~

@prprprPro
Copy link
Author

噢我知道了,父元素是flex布局。
不过能不能兼容一下,给根元素套一个width:100%,反正是要占满宽度的哈哈

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question This is a question, not a bug
Projects
None yet
Development

No branches or pull requests

2 participants