ant-design-vue/components/_util/warning.js

10 lines
195 B
JavaScript
Raw Normal View History

2017-12-07 18:33:33 +08:00
import warning from 'warning'
const warned = {}
2017-12-26 19:04:28 +08:00
export default (valid, message, throwError) => {
2018-01-16 19:15:07 +08:00
if (!valid && !warned[message]) {
warning(false, message)
warned[message] = true
2017-12-07 18:33:33 +08:00
}
}