W72crm_web-master/node_modules/babel-plugin-transform-vue-jsx/lib/must-use-prop.js

10 lines
330 B
JavaScript
Raw Normal View History

2025-05-27 11:25:53 +08:00
const acceptValue = ['input','textarea','option','select']
module.exports = (tag, type, attr) => {
return (
(attr === 'value' && acceptValue.includes(tag)) && type !== 'button' ||
(attr === 'selected' && tag === 'option') ||
(attr === 'checked' && tag === 'input') ||
(attr === 'muted' && tag === 'video')
)
}