SusCore - 文档
包:
com.sharq-it.sus.coreSUS UI 系统的基础 是 Vue.js 的类比物:响应式(reactivity)、SFC 编译器、指令、插槽、CSS scoped
目录
| # | 文档 | 内容 |
|---|---|---|
| 0 | 从零开始集成 🆕 | 安装、场景、第一个 .sharq、SusApp、sus.config.json、Sharq 生成 |
| 1 | 快速开始 | 最小组件、bootstrap、安装、配置 |
| 2 | .sharq 与指令 | SFC 格式、$using、$MainElement、v-if/v-show/v-for/:text/@click/style |
| 3 | 响应式 | Prop<T>、Computed<T>、Watch<T>、DependencyTracker、P/C 辅助方法 |
| 4 | 插槽 | 具名插槽、默认插槽、SlotPropMap |
| 5 | CSS Scoping | scoped/global、哈希类、Sharq 限制 |
| 6 | 自适应布局 | SusBreakpointService、breakpoint 类、Watch |
| 7 | OverlayHost 与 portal | Portal 容器、OverlayCategory、z-order |
| 8 | 事件 | Emit/On、通过 Prop<T> 通信 |
| 9 | 编译与生成 | Pipeline、增量编译、SharqValidator |
| 10 | 配置 | sus.config.json |
| 11 | API 参考 | SusApp、SusComponent、Bind 辅助方法、SusBootstrap |
| 12 | 运行示例 | 来自 Samples~ 的 SusBootstrap + SusKeepAlive 示例 |
| 13 | 内置审计(Debug / QA) | ClickAudit、BoundsAudit、CallbackAudit、OverlayAudit、StateAudit、LifecycleAudit、… |
| 18 | MCP / AI probe | SusUiProbe JSON 外观(tree/props/health)、MCP 阶段 |
| 17 | 开发控制台 | SusConsoleService、快捷键 ~、OverlayCategory.Console |
| — | 设计令牌 | 字体、颜色、图标、主题 |
| — | 快速入门(中文) | 中文快速入门(网站已翻译;包内副本:本目录下的 GETTING_STARTED.zh-CN.md) |
快速开始
xml
<!-- HelloWorld.sharq -->
<template>
<ui:Label $MainElement :text="Message" class="greeting"
style="font-size: 24px; -unity-text-align: middle-center; color: white;" />
</template>
<script>
public string Message = "Hello SUS!";
</script>csharp
// MonoBehaviour on stage — prefer SusApp.
// Mount the component you defined above (HelloWorld); its .g.cs must be generated first.
public class AppEntry : MonoBehaviour
{
public UIDocument uiDocument;
void Start() => SusApp.Create(uiDocument).UseTheme(SusTheme.Dark).Mount<HelloWorld>();
}该去哪里找什么
- 我想从零开始 → 00-integration.md
- 我想理解
.sharq的语法 → 02-sharq-format.md - 我想理解 Prop<T> 和 Computed<T> → 03-reactivity.md
- 我想做一个 modal/tooltip → 07-overlayhost.md · 下游 UI 包文档
- 我想要完整的 API → 11-api-reference.md
- 我想运行一个示例 → 12-examples.md
- 我想了解内置审计(Debug/QA) → 13-audits.md
- 我想配置编译器 → 10-configuration.md
- 我想要主题 / 令牌 / 图标 → DESIGN_TOKENS.md(字体、颜色、图标、主题)
- 我想要游戏内控制台 → 17-console.md
相关文档
- sus-router — 导航与模态框(MIT,open-core 配套项目)
- 从零开始集成 - 安装与第一个屏幕
- 设计令牌 - 字体、颜色、图标、主题
- OverlayHost 与 portal - overlay:tooltip、popup、modal