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

Add ColorPicker #404

Draft
wants to merge 11 commits into
base: dev
Choose a base branch
from
Draft

Add ColorPicker #404

wants to merge 11 commits into from

Conversation

Justineo
Copy link
Member

@599316527 用这个 PR 吧。

@Justineo
Copy link
Member Author

Justineo commented Feb 27, 2019

几个问题讨论一下:

_ColorHomer

  • 是否应该是输入组件?是的话应该要加入 input/focusable/activatable 这几个 mixin,对应组件需要实现 focus/activate 方法,可读写状态根据 realReadonly/realDisabled 来决定。同时支持 v-model
  • 不用定义 ui,可以直接 mixin ui
  • variantformat? (variant 听上去是样式相关的)
  • colorvalue? (input)
  • update:colorinput? (update:xxx 是给 .sync 用的)

ColorPicker

  • slot 可以暴露一些方法作为 slot-scope,比如 select,这样外部组件就不用定义 handlePaletteColorSelect 了。
  • slot 是不是拆成 before/after 两个?默认内容上下各一个似乎更灵活一点。
  • 现在不能按下任意位置开始拖动,感觉应该在 mousedown 的时候就先更新值了。

ColorSwatch

  • 我感觉是不是应该这样,有一个 ColorInput, 和 <input type="color"> 类似,默认显示一个 ColorSwatch,点击后在浮层中展示 ColorPicker 取色面板?ColorSwatch 后面那些 inline 的输入框放在 ColorInput 里边,ColorSwatch 就纯展示,这样怎么样?
  • 现在用上下方向键调整 alpha 值可以突破 100%,最大是 101%

@Justineo
Copy link
Member Author

Justineo commented Feb 27, 2019

另外现在 commit message 用英文写,follow 这个规则:https://seesparkbox.com/foundry/semantic_commit_messages

之前的我都改写过了。

--

UPDATE: https://www.conventionalcommits.org/en/v1.0.0-beta.3/ 这个好像更详细一些。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants