Skip to content
New issue

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

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

Already on GitHub? # to your account

Feature: 基于 label 对数组类的展示优化 #42

Open
NWYLZW opened this issue Mar 18, 2023 · 11 comments
Open

Feature: 基于 label 对数组类的展示优化 #42

NWYLZW opened this issue Mar 18, 2023 · 11 comments

Comments

@NWYLZW
Copy link

NWYLZW commented Mar 18, 2023

Schemastery.tuple([
  Schemastery.number().label('胸围'), // 原为 xxx[0]
  Schemastery.number().label('腰围'), // 原为 xxx[1]
  Schemastery.number().label('臀围')  // 原为 xxx[2]
]).label('三围')
@Lipraty
Copy link

Lipraty commented Mar 18, 2023

这 example 太怪了(


Generated by koishi-plugin-github.

@NWYLZW
Copy link
Author

NWYLZW commented Mar 18, 2023

主要还是因为我有场景需要
image

@Lipraty
Copy link

Lipraty commented Mar 18, 2023

太草了(


Generated by koishi-plugin-github.

@shigma
Copy link
Owner

shigma commented Mar 18, 2023

PS 原本输入框里应该显示默认值的。

这里应该不叫 label 叫 placeholder 比较好。毕竟 input 可以同时有 label 和 placeholder。

@shigma
Copy link
Owner

shigma commented Mar 18, 2023

主要还是因为我有场景需要

你这场景更怪了啊喂

@NWYLZW
Copy link
Author

NWYLZW commented Mar 18, 2023

PS 原本输入框里应该显示默认值的。

这里应该不叫 label 叫 placeholder 比较好。毕竟 input 可以同时有 label 和 placeholder。

placeholder 我也想了,那是另外一种情况,暂时不讨论吧

这个地方主要是 label 位置的 xxxx[0] 这个还是相对来说会有点奇怪,我想自定义他

(上面的图是我自己写的 form,没用 schemastery)

@shigma
Copy link
Owner

shigma commented Mar 18, 2023

你理解有误,预期行为是显示在一行里,没有 label 位置。


Generated by koishi-plugin-github.

@NWYLZW
Copy link
Author

NWYLZW commented Mar 18, 2023

你理解有误,预期行为是显示在一行里,没有 label 位置。

Generated by koishi-plugin-github.

我指的是这个
image

@shigma
Copy link
Owner

shigma commented Mar 18, 2023

这是 array 而不是 tuple。如果是 array 你上一个 pr 本应该覆盖这种情况。如果是 tuple 那么你的写法与渲染示意图无关。

@NWYLZW
Copy link
Author

NWYLZW commented Mar 18, 2023

这是 array 而不是 tuple。如果是 array 你上一个 pr 本应该覆盖这种情况。如果是 tuple 那么你的写法与渲染示意图无关。

你的 tuple 挂了,就上次和你说的,我还没看是啥原因,我以为是类似的效果

@shigma
Copy link
Owner

shigma commented Mar 18, 2023

不是的,tuple 预期行为是显示在一行,如果跟 array 一样我就不会设计 tuple 了。

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants