Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

Commit

Permalink
chore(fix): fix duplicated tag props
Browse files Browse the repository at this point in the history
  • Loading branch information
k-paxian committed Nov 9, 2023
1 parent d6c624e commit 28fb450
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/generator/render.vue.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const renderTagProps = (methods: ClassMethod[], attributes: Attribute[], events:
const items = [
...(methods.length > 0 ? [' ref="element"'] : []), // to invoke the methods we need a ref to an element
...attributes.map((x) => ` :${x.name ?? x.fieldName}="${propName(x)}"`),
...events.filter((x) => (vueModels && !vueModels.find(({ eventName }) => eventName !== x.name)) || !vueModels).map((x) => ` @${x.name}="$emit('${x.name}', $event)"`),
...events.filter((x) => (vueModels && !vueModels.find(({ eventName }) => eventName === x.name)) || !vueModels).map((x) => ` @${x.name}="$emit('${x.name}', $event)"`),
...(vueModels ? vueModels.flatMap(({ name = 'modelValue', attributeName, eventName, valueMapping }) => [
` :${attributeName}="$props.${name}"`,
` @${eventName}="$emit('update:${name}', ${valueMapping}); $emit('${eventName}', $event)"`
Expand Down
2 changes: 1 addition & 1 deletion src/generator/templates/root.package.json.template
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@
"typescript": "5.2.2",
"vite": "4.5.0",
"vite-plugin-dts": "3.6.1",
"vue-tsc": "1.8.20"
"vue-tsc": "1.8.21"
}
}

0 comments on commit 28fb450

Please sign in to comment.