Skip to content

Conversation

@cydiacen
Copy link
Contributor

First of all, thank you for your contribution! 😄

New feature please send pull request to feature branch, and rest to master branch. Pull request will be merged after one of collaborators approve. Please makes sure that these form are filled before submitting your pull request, thank you!

[中文版模板 / Chinese template]

This is a ...

  • New feature
  • Bug fix
  • Site / document update
  • Component style update
  • TypeScript definition update
  • Refactoring
  • Code style optimization
  • Branch merge
  • Other (about what?)

What's the background?

  1. Describe the source of requirement.
  2. Resolve what problem.
  3. Related issue link.

API Realization (Optional if not new feature)

  1. Basic thought of solution and other optional proposal.
  2. List final API realization and usage sample.
  3. GIF or snapshot should be provided if includes UI/interactive modification.

What's the effect? (Optional if not new feature)

  1. Does this PR affect user? Which part will be affected?
  2. What will say in changelog?
  3. Does this PR contains potential break change or other risk?

Changelog description (Optional if not new feature)

  1. English description
  2. Chinese description (optional)

Self Check before Merge

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

Additional Plan? (Optional if not new feature)

If this PR related with other PR or following info. You can type here.

model: {
prop: 'value',
event: 'change',
event: 'myChange',//为了支持v-model直接返回颜色字符串 所以用了自定义的事件,与pickr自带change事件进行区分
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

名称改成 change.value 吧

},
methods: {
eventsBinding() {
Object.keys(this.$listeners).forEach(event => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不是所有的事件都绑定到 picker 吧 如果绑定了picker本身不支持的会不会有问题 例如 click dbclick ...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好的 那我维护个事件数组

onClick={this.handleOpenChange.bind(this, !this.myOpen)}
{...props}
onClick={this.handleOpenChange}
{...this.$attrs}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个也没必要加 vue会自动将没有声明的属性,挂载到根结点上 ,除非明确声明了 inheritAttrs: false

save: 'Save',
clear: 'Clear',
cancel: 'Cancel',
save: '保存',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

繁体字 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我查了下,这几个的繁体 也是长这样的

@import '../../style/themes/index';
@import '../../input/style/mixin';

@import '../../../node_modules/@simonwep/pickr/dist/themes/classic.min.css'; // 'classic' theme
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

为啥用相对路径,
这种支持的吧 @import '~@simonwep/pickr/dist/themes/classic.min.css';

prefixCls: PropTypes.string,
defaultValue:PropTypes.string,//默认值
config: PropTypes.object,//pickr配置
value: PropTypes.string,//颜色值
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1、外层value 变化,没有响应
watch: {
value(val) {
picker.setColor
}
}
2、还有 config 的数据变化后如何同步?
3、新增 diable、color-format(参考element) 的属性

pickr: null,
};
},
mounted() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

组件销毁后 picker 实例要同步销毁

'large': `${prefixCls}-lg`,
'small': `${prefixCls}-sm`,
};
if (sizeOpt[this.size]) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这部分的逻辑是不是可以直接写到 classString 的声明中

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

3 participants