element [Bug Report] el-slide标签设置min和max属性报错

pbwdgjma  于 3个月前  发布在  其他
关注(0)|答案(2)|浏览(38)

Element UI version

2.15.13

OS/Browsers version

win10/Google Chrome 107.0.5304.63

Vue version

2.7.14

https://codepen.io/wangtaoGitAcc/pen/PodQEGw

Steps to reproduce

在el-slider标签上添加min="-5" max="10"

What is Expected?

不会报错,
可以滑动

What is actually happening?

渲染报错
Vue warn]: Invalid prop: type check failed for prop "min". Expected Number with value -5, got String with value "-5".

found in

---> at packages/slider/src/main.vue

warn$2 @ vue.js:5108
assertProp @ vue.js:5662
validateProp @ vue.js:5601
_loop_1 @ vue.js:4361
initProps$1 @ vue.js:4386
initState @ vue.js:4330
Vue._init @ vue.js:4714
VueComponent @ vue.js:5838
createComponentInstanceForVnode @ vue.js:5047
init @ vue.js:4909
createComponent @ vue.js:6580
createElm @ vue.js:6534
createChildren @ vue.js:6653
createElm @ vue.js:6557
createChildren @ vue.js:6653
createElm @ vue.js:6557
patch @ vue.js:7120
Vue._update @ vue.js:2838
updateComponent @ vue.js:2948
Watcher.get @ vue.js:4178
Watcher @ vue.js:4168
mountComponent @ vue.js:2965
Vue.$mount @ vue.js:9311
Vue.$mount @ vue.js:11870
(anonymous) @ pen.js:23
vue.js:5108 [Vue warn]: Invalid prop: type check failed for prop "max". Expected Number with value 10, got String with value "10".

found in

---> at packages/slider/src/main.vue

warn$2 @ vue.js:5108
assertProp @ vue.js:5662
validateProp @ vue.js:5601
_loop_1 @ vue.js:4361
initProps$1 @ vue.js:4386
initState @ vue.js:4330
Vue._init @ vue.js:4714
VueComponent @ vue.js:5838
createComponentInstanceForVnode @ vue.js:5047
init @ vue.js:4909
createComponent @ vue.js:6580
createElm @ vue.js:6534
createChildren @ vue.js:6653
createElm @ vue.js:6557
createChildren @ vue.js:6653
createElm @ vue.js:6557
patch @ vue.js:7120
Vue._update @ vue.js:2838
updateComponent @ vue.js:2948
Watcher.get @ vue.js:4178
Watcher @ vue.js:4168
mountComponent @ vue.js:2965
Vue.$mount @ vue.js:9311
Vue.$mount @ vue.js:11870
(anonymous) @ pen.js:23
滑动时报错
29index.js:1 Uncaught TypeError: i.toFixed is not a function
at VueComponent.setPosition (index.js:1:495396)
at VueComponent.onDragging (index.js:1:494725)
setPosition @ index.js:1
onDragging @ index.js:1
index.js:1 Uncaught TypeError: i.toFixed is not a function
at VueComponent.setPosition (index.js:1:495396)
at index.js:1:494871

相关问题