http-vue-loader icon indicating copy to clipboard operation
http-vue-loader copied to clipboard

does it can use props like this <my-component :xxx="xxx"></my-component>

Open x13872140520 opened this issue 6 years ago • 1 comments

in html image image

in vue components

image image

but! it doesnt work , the result is nothing

x13872140520 avatar Dec 17 '19 12:12 x13872140520

@x13872140520 That doesn't look like to be a problem related to http-vue-loader. In template / html, you should write your props in snake-case.

From Vue Documentation:

HTML attribute names are case-insensitive, so browsers will interpret any uppercase characters as lowercase. That means when you’re using in-DOM templates, camelCased prop names need to use their kebab-cased (hyphen-delimited) equivalents.

Something like this:

<my-component :current-post-url="currentPostUrl" />

lanyizi avatar Dec 17 '19 14:12 lanyizi