lepu-test-platform-web/node_modules/babel-plugin-transform-vue-jsx/lib/must-use-prop.js

10 lines
330 B
JavaScript
Raw Permalink Normal View History

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')
)
}