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

10 lines
195 B
JavaScript
Raw Normal View History

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