[英]Vue js Template tag
我正在查看現有的 Vue 代碼庫,我看到了<template>
標簽,例如:
<template #default>
<template #content>
<template #close>
我知道每個 vue 組件都包含在<template>
標簽中,但我以前從未見過#default
或#content
嵌入模板標簽中。 這樣做的目的是什么? 我懷疑那些#
是可定制的,但你只需要定義它們? 如果是這種情況,我可以在 vue 項目中的哪里找到它? 我假設有一個標准位置可以在 vue 項目中存儲這樣的文件。 謝謝你。
#
在template
標簽中只是v-slot:
簡寫。 參見: https : //v3.vuejs.org/guide/component-slots.html#named-slots-shorthand
#
是 vue v-slot
的簡寫。 可以在這里閱讀一個完美的例子
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.