Skip to content

Commit

Permalink
revert: "fix: don't report property does not exist error for data-*
Browse files Browse the repository at this point in the history
… and `aria-*`"

This reverts commit ba2835f.
close #1413
  • Loading branch information
johnsoncodehk committed Jun 7, 2022
1 parent 6f5316a commit efde57c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/vue-code-gen/src/generators/template.ts
Expand Up @@ -835,9 +835,7 @@ export function generate(
propName_1 = propName_1.substring(1);
}

const propName_2 = !isStatic ? propName_1
: hyphenate(propName_1) === propName_1 && !propName_1.startsWith('data-') && !propName_1.startsWith('aria-') ? camelize(propName_1)
: propName_1;
const propName_2 = !isStatic ? propName_1 : hyphenate(propName_1) === propName_1 ? camelize(propName_1) : propName_1;

if (forRemainStyleOrClass && propName_2 !== 'style' && propName_2 !== 'class')
continue;
Expand Down Expand Up @@ -976,7 +974,7 @@ export function generate(
prop.type === CompilerDOM.NodeTypes.ATTRIBUTE
) {

const propName = hyphenate(prop.name) === prop.name && !prop.name.startsWith('data-') && !prop.name.startsWith('aria-') ? camelize(prop.name) : prop.name;
const propName = hyphenate(prop.name) === prop.name ? camelize(prop.name) : prop.name;
const propName2 = prop.name;

if (forRemainStyleOrClass && propName !== 'style' && propName !== 'class')
Expand Down

0 comments on commit efde57c

Please sign in to comment.