求动态插槽名的写法,#[变量+ 字符] #9985
Answered
by
edison1105
Niefee
asked this question in
Help/Questions
-
使用动态插槽, 并且插槽名称为 #[变量+字符] , // error
<template v-for="(item, key) in schema" #[item.label+ key] :key="key">
<span class="form-label" @click="selectFormItem(item, key)">{{ item.label }}</span>
</template>
|
Beta Was this translation helpful? Give feedback.
Answered by
edison1105
Jan 4, 2024
Replies: 2 comments 1 reply
-
#[`${item.label}${key}`] or #[item.label+key] (不要带空格) |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Niefee
-
HTML 属性名里不能有空格。 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
#[`${item.label}${key}`] or #[item.label+key] (不要带空格)