Skip to content

Commit b9d6989

Browse files
committed
feat: strip ="" for boolean props completion edits
1 parent 7c64219 commit b9d6989

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packages/language-service/lib/plugins/vue-template.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -734,9 +734,16 @@ export function create(
734734
});
735735
}
736736
if (!hint || hint === 'v') {
737+
const isBoolean = typeof propMeta2?.schema === 'object'
738+
&& propMeta2.schema.kind === 'enum'
739+
&& (
740+
propMeta2.schema.schema?.includes('true')
741+
|| propMeta2.schema.schema?.includes('false')
742+
);
737743
attributes.push({
738744
name: labelName,
739745
description: propMeta2 && createDescription(propMeta2),
746+
valueSet: isBoolean ? 'v' : undefined,
740747
});
741748
}
742749
}

0 commit comments

Comments
 (0)