alexjoverm / alexjoverm/v-runtime-template

Using v-runtime-template within a slot

オープン
#63 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る
主要言語
JavaScript
スター
601
フォーク
71
PR マージ指標
30日以内にマージされた PR はありません

説明

Just documenting this here as it took me awhile to solve this as it was not documented. Solved by code inspection.

If you want to pass some other props into the v-runtime-template's component, you can use

```ts
data: () => ({
template: `

{{parentProp1}} {{prop}}
`,
}),
```

```vue

```

This seems to be required if you

- trying to access v-for variables
- using v-runtime-template within a slot, limiting you to parent component props, not slot scope

Hope this saves people some time in the future.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。