vuejs/vue

Warn if colon shorthand is used on v-if/v-html/etc.

Open

#10,191 创建于 2019年6月25日

在 GitHub 查看
 (15 评论) (23 反应) (0 负责人)TypeScript (33,833 fork)batch import
contribution welcomefeature requestgood first issuehas PRwarnings

仓库指标

Star
 (209,764 star)
PR 合并指标
 (30 天内没有已合并 PR)

描述

What problem does this feature solve?

I just spent way too long debugging something really weird until I realized I accidentally wrote :v-if instead of v-if.

A warning when wrongly using shorthands like : on "native" vue attributes could prevent this bad experience easily.

What does the proposed API look like?

:v-if="foo"

--> console.warn("You specified v-bind:/ v-on: or a corresponding shorthand on a Vue attribute like v-if or similar. Usually this does not make sense.)

贡献者指南