项目原始demo,不改动
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 
 

10 lines
330 B

  1. const acceptValue = ['input','textarea','option','select']
  2. module.exports = (tag, type, attr) => {
  3. return (
  4. (attr === 'value' && acceptValue.includes(tag)) && type !== 'button' ||
  5. (attr === 'selected' && tag === 'option') ||
  6. (attr === 'checked' && tag === 'input') ||
  7. (attr === 'muted' && tag === 'video')
  8. )
  9. }