2.6.10
https://github.com/tbutcaru/v-issue-multiple-dynamic-slot-names
npm install
npm run serve
μ¬λ¬ λμ μ¬λ‘― μ΄λ¦μ΄ μμλλ‘ μλν΄μΌν©λλ€.
λ€μ μ€λ₯κ° λ°μν©λλ€.
Invalid dynamic argument expression: attribute names cannot contain spaces, quotes, <, >, / or =.#[headerslot]>Header slot</template>
Default slot
<template #[footerslot]
λμ μ¬λ‘― μ΄λ¦ μ€ νλκ° μ μ μΌλ‘ λ§λ€μ΄μ§λ©΄ (무μμ΄λ μκ΄ μμ) μμ© νλ‘κ·Έλ¨μ΄ μλνλ κ²μ λλ€.
node_modules/vue-template-compiler/build.js
attrs.forEach(function (attr) {
)μ λ€μ κ²½κ³ λ₯Ό μΆκ°νμ΅λλ€.warn$1('--------------->> ' + attr.name);
#[headerslot]
#[headerslot]>Header slot</template>
Default slot
<template #[footerslot]
λ°λΌμ μ»΄νμΌλ¬λ λμ μ¬λ‘― μ΄λ¦μ΄ μ¬λ¬ κ°μΈ κ²½μ° μμ± λ§ μΆμΆνλ λ°©λ²μ λͺ¨λ₯΄λ κ² κ°μ΅λλ€.
μκΈ°λ μΈμκ° μ 곡λ κ²½μ°μλ§ μ¬μ©ν μ μμ΅λλ€. λ€μμ μ¬μ©νμμμ€.
<template v-slot:[dynamicSlotName]>
...
</template>
μκΈ°λ μΈμκ° μ 곡λ κ²½μ°μλ§ μ¬μ©ν μ μμ΅λλ€. λ€μμ μ¬μ©νμμμ€.
<template v-slot:[dynamicSlotName]> ... </template>
λλ λ¬Έμ λ₯Ό λ§λ€κΈ° μ μ κ·Έκ²μ μλνμΌλ©° κ²°κ³Όλ λμΌν©λλ€ π
μλ νμΈμ μ¬λ¬λΆ!
μ΄κ²μ λν΄ μλ‘μ΄ κ²μ 무μμ λκΉ? 2.6.11μμ μ¬μ ν λ¬Έμ κ° μμ΅λλ€.
μ¬λ¬ λ² μλν λμ λ€μ€ λμ μ¬λ‘―μ΄ μλνλλ‘νλ λ°©λ²μ μ°Ύμμ΅λλ€. λμ μ¬λ‘― ν νλ¦Ώμ λ£¨νΈ μμμ ν€λ₯Ό μΆκ°νλ©΄ μλν©λλ€.
μ΄κ²μ μλνμ§ μμ΅λλ€ : μ¬κΈ°μμ μ¬ν
<template #[slot1]>
<p>slot test</p>
</template>
<template #[slot2]>
<p>slot test2</p>
</template>
// got "Invalid dynamic argument expression: attribute names cannot contain spaces, quotes, <, >, / or ="
μ΄ μν : μ¬κΈ°μμ μ¬ν
<template #[slot1]>
<p key="1">slot test</p>
</template>
<template #[slot2]>
<p key="2">slot test2</p>
</template>
// work fine
μλνλλ‘ ν€λ₯Ό μΆκ°ν΄μΌνλ μ΄μ λ 무μμ λκΉ? λλ λκ°λ₯Ό λμ³€λ€.
@ davis90 μ μ루μ μ΄ μ μκ²
vueμμ μ€λ₯κ° μλͺ»λ μ΄μ λ 무μμ λκΉ? μ루μ μ΄ μλνμ§λ§ κ°μ¬ν©λλ€.
κ°μ₯ μ μ©ν λκΈ
μ¬λ¬ λ² μλν λμ λ€μ€ λμ μ¬λ‘―μ΄ μλνλλ‘νλ λ°©λ²μ μ°Ύμμ΅λλ€. λμ μ¬λ‘― ν νλ¦Ώμ λ£¨νΈ μμμ ν€λ₯Ό μΆκ°νλ©΄ μλν©λλ€.
μ΄κ²μ μλνμ§ μμ΅λλ€ : μ¬κΈ°μμ μ¬ν
μ΄ μν : μ¬κΈ°μμ μ¬ν
μλνλλ‘ ν€λ₯Ό μΆκ°ν΄μΌνλ μ΄μ λ 무μμ λκΉ? λλ λκ°λ₯Ό λμ³€λ€.