项目
在 GitHub 查看
LinusBorg/portal-vue
LinusBorg/portal-vue has 3,875 GitHub stars and 181 forks. GitHot measured -1 stars in 24 hours, -2 in 7 days, and -1 in 15 days. Last checked 2026-11-24 22:39 UTC. Last push 2023-11-25.
实测星标增长
- 24小时
- -1
- 7天
- -2
- 15天
- -1
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
关于
功能丰富的 Vue 3 Portal 插件,可将 DOM 渲染到组件之外的应用任意位置,或整个文档中。(Vue 2 版本:v2.portal-vue.linusb.org)
创作与媒体README.md
原文PortalVue
A Portal Component for Vue 3, to render DOM outside of a component, anywhere in the document.
For more detailed documentation and additional Information, please visit the docs.
Looking for the version for Vue 2.*? Docs for PortalVue 2.*, compatible with Vue 2, are here
Installation
npm i portal-vue
# or
yarn add portal-vue
import PortalVue from 'portal-vue'
Vue.use(PortalVue)
Usage
<portal to="destination">
<p>This slot content will be rendered wherever the <portal-target> with name 'destination'
is located.</p>
</portal>
<portal-target name="destination">
<!--
This component can be located anywhere in your App.
The slot content of the above portal component will be rendered here.
-->
</portal-target>
Nuxt module
v3 does not yet have a nuxt module integration. PRs welcome.
探索相关项目
加载中…