Skip to content

Commit 8645981

Browse files
committed
fix: props not being accepted
1 parent a70e58d commit 8645981

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

pnpm-lock.yaml

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Component.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,17 @@ type BoolAttributes = {
4141

4242
export default defineComponent<HTMLAttributes & { mode: PropType<Mode> } & { [K in Attributes]: any } & BoolAttributes, {}, {}, {}, {}, {}, {}, { 'update:mode': (mode: Mode) => void; 'update:modalValue': (value: unknown) => void; 'input': (value: unknown) => void }>({
4343
name,
44+
props: {
45+
[modelValueProp]: {},
46+
mode: {
47+
type: String as PropType<Mode>,
48+
},
49+
...Object.fromEntries(Array.from(boolAttributes, boolAttr => [boolAttr, {
50+
type: Boolean,
51+
default: undefined,
52+
}])),
53+
} as any,
54+
emits: [updateModelValue, 'update:mode'],
4455
setup(props, { attrs, emit, expose }) {
4556
const currentInstance = getCurrentInstance()?.proxy
4657
const jsonEditor = ref()

0 commit comments

Comments
 (0)