We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
JSBox 版本: 2.13.0 (1165) TestFlight 下载
我理解 HomeWidget 的布局 'spacer' 对应的是 SwiftUI 里面的 Spacer 吧?但是似乎 JSBox 里面的 'spacer' 最小宽度很大的样子,在有足够的空间的情况下,能把 text 挤压到不能显示全。 比如,如下图, 对应的代码是:
$widget.setTimeline({ policy: { never: true, }, render: ctx => { console.info(`size: {${ctx.displaySize.width}, ${ctx.displaySize.height}} `) return { type: 'zstack', views: [ { type: 'hstack', props: { alignment: 'center', }, views: [ { type: 'vstack', props: { alignment: 'leading', }, views: [ { type: 'text', props: { text: 'PlaceHolder12345', lineLimit: 1, } }, ] }, { type: 'spacer', }, { type: 'vstack', props: { alignment: 'leading' }, views: [ { type: 'text', props: { lineLimit: 1, text: 'PlaceHolder', } } ] }, ] } ] } } });
我尝试在 Xcode 下 Widget 类似的代码是不是有问题,Xcode 那边 Spacer 显示的挺正常的,如下图: 对应的代码如下:
Originally posted by @MichaelPei in https://github.com/cyanzhong/jsbox-issues/issues/90
The text was updated successfully, but these errors were encountered:
No branches or pull requests
JSBox 版本: 2.13.0 (1165) TestFlight 下载
我理解 HomeWidget 的布局 'spacer' 对应的是 SwiftUI 里面的 Spacer 吧?但是似乎 JSBox 里面的 'spacer' 最小宽度很大的样子,在有足够的空间的情况下,能把 text 挤压到不能显示全。
![IMG_0549](https://user-images.githubusercontent.com/1621220/97872080-62604e80-1d50-11eb-9327-c40cfc1da649.PNG)
比如,如下图,
对应的代码是:
我尝试在 Xcode 下 Widget 类似的代码是不是有问题,Xcode 那边 Spacer 显示的挺正常的,如下图:
![Widget_Preview](https://user-images.githubusercontent.com/1621220/97872296-c7b43f80-1d50-11eb-9853-9ea68c30e056.png)
![Widget](https://user-images.githubusercontent.com/1621220/97872941-d3543600-1d51-11eb-966c-682a972c437a.png)
对应的代码如下:
Originally posted by @MichaelPei in https://github.com/cyanzhong/jsbox-issues/issues/90
The text was updated successfully, but these errors were encountered: