didi / cube-ui

:large_orange_diamond: A fantastic mobile ui lib implement by Vue
https://didi.github.io/cube-ui/
Apache License 2.0
9.14k stars 1.47k forks source link

【急】cube-ui 搭配 webpack 5 普通编译 时,无法添加自定义校验(addRule失效,addMessage可以生效) #822

Open shendiid opened 1 year ago

shendiid commented 1 year ago

Version

undefined

Reproduction link

https://codesandbox.io/s/vue

Steps to reproduce

1.增加自定义校验 Validator.addRule('ipv4', (val) => { return false; }); Validator.addMessage('ipv4', () => { return 'wrongIpAddress'; });

What is expected?

正常生效

What is actually happening?

不生效

Dependencies Version

vue: better-scroll: