-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[vue] 你有二次封装过ElementUI组件吗? #401
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
Labels
vue
vue
Comments
有啊! 类似于分页, 表格, 毕竟每个项目的这些东西, 比如pageSize, size, 这些在每个项目基本都是统一的, |
popover + button 的组件,点击该按钮后还有个二次确认或选择的交互。 |
其实是简单的做了下处理,大概如下
|
嗯~ 这样有点问题,比如我输入 1 输入框的值就变成了 1.00 但是我想输入 10 ,导致我输入1之后,立马变成了 1.00
加一个函数防抖,感觉会好点😄
```javascript
fnChnageValue() {
if (this.timer) {
clearTimeout(this.timer)
}
this.timer = setTimeout(() => {
let value = this.current * 100 || 0
this.current = (value / 100).toFixed(2)
this.$emit('input', value.toFixed(0) * 1)
}, 1000)
}
```
|
封装分页,上传文件 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
[vue] 你有二次封装过ElementUI组件吗?
The text was updated successfully, but these errors were encountered: