主题
UI 示例
提醒:当前不支持 HUD。
1. 简易面板
xml
<template>
<Panel class="panel" ref="root">
<Label text="任务面板" />
<Button @click="onClose">关闭</Button>
</Panel>
</template>
<script>
function onClose() {
closeUI()
}
</script>
<style>
.panel { width: 220; height: 120; background: bss-sdf(6, #2b2b2b, #3a3a3a, 1); }
</style>2. 表单提交
xml
<template>
<Form ref="form">
<Field name="playerName">
<TextField b-model="playerName" />
</Field>
<Button @click="submit">提交</Button>
</Form>
</template>
<script>
function submit() {
const form = ref("form")
form.submit()
}
</script>3. 物品展示
xml
<template>
<DisplaySlot ref="slot" />
</template>
<script>
onMounted(() => {
// 仅展示:通过服务端/脚本注入 ItemStack
})
</script>