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

12 lines
242 B
JavaScript
Raw Normal View History

2017-12-07 18:33:33 +08:00
import warning from 'warning'
const warned = {}
export default (valid, message) => {
2017-12-08 09:49:47 +08:00
if (process.env.NODE_ENV !== 'production') {
if (!valid && !warned[message]) {
warning(false, message)
warned[message] = true
}
2017-12-07 18:33:33 +08:00
}
}