From 9099456b7697e4d864bfdb67ef4eaeca62affca1 Mon Sep 17 00:00:00 2001 From: KazariEX <1364035137@qq.com> Date: Sun, 15 Dec 2024 02:01:59 +0800 Subject: [PATCH] refactor: renaming --- .../language-service/lib/plugins/vue-template.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/language-service/lib/plugins/vue-template.ts b/packages/language-service/lib/plugins/vue-template.ts index f1ff1a74a6..e58be034e7 100644 --- a/packages/language-service/lib/plugins/vue-template.ts +++ b/packages/language-service/lib/plugins/vue-template.ts @@ -714,12 +714,12 @@ export function create( } const [text, ...modifiers] = replacement.text.split('.'); - const isEvent = text.startsWith('v-on:') || text === 'v-on' || text.startsWith('@'); - const isProp = text.startsWith('v-bind:') || text === 'v-bind' || text.startsWith(':'); - const isModel = text.startsWith('v-model:') || text === 'v-model'; + const isVOn = text === 'v-on' || text.startsWith('v-on:') || text.startsWith('@'); + const isVBind = text === 'v-bind' || text.startsWith('v-bind:') || text.startsWith(':'); + const isVModel = text === 'v-model' || text.startsWith('v-model:'); const validModifiers = - isEvent ? eventModifiers - : isProp ? propModifiers + isVOn ? eventModifiers + : isVBind ? propModifiers : undefined; if (validModifiers) { @@ -749,7 +749,7 @@ export function create( completionList.items.push(newItem); } } - else if (isModel) { + else if (isVModel) { for (const modifier of modelData.globalAttributes ?? []) {