Skip to content

Dynamic Island ​

Vue 已实现 · 还原验收 0/1 · 上游演示 · 固定版本源码

预览 ​

●

用法 ​

vue
<script setup lang="ts">
import { ref } from 'vue'
import { DynamicIsland, DynamicIslandView } from 'beui-vue'
const view = ref<string|null>(null)
</script>
<template><div class="be-block-stack"><DynamicIsland :view="view" compact="●"><DynamicIslandView id="music">♫ &nbsp; Midnight Radio</DynamicIslandView><DynamicIslandView id="timer">◴ &nbsp; Timer · 05:00</DynamicIslandView></DynamicIsland><div class="be-block-row"><button class="be-block-button" @click="view=null">Compact</button><button class="be-block-button" @click="view='music'">Music</button><button class="be-block-button" @click="view='timer'">Timer</button></div></div></template>

API ​

view 为 null 时显示 #compact,否则显示 id 匹配的 DynamicIslandView。容器按内容尺寸过渡。

还原验收 ​

基于 beUI 的独立 Vue 移植,依 MIT 许可证分发。