Files
aurora-admin/site/examples/container.json

114 lines
7.5 KiB
JSON
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"slug": "container",
"mode": "scenarios",
"curated": true,
"examples": [
{
"id": "container-ex-1",
"title": "默认与常用变体",
"titleSrc": "demo",
"desc": "",
"html": "<div class=\"demo-block\">\n <div class=\"row kole-container\">\n <div class=\"kole-container kole-container-surface\" style=\"max-width:720px\">\n <div class=\"kole-container-header\">Header</div>\n <div class=\"kole-container-main\">Main content</div>\n <div class=\"kole-container-footer\">Footer</div>\n </div>\n </div>\n</div>",
"preview": {
"show": [
[
0,
2
]
],
"hide": [
[
1
],
[
0,
0
],
[
0,
1
],
[
0,
3
],
[
0,
2,
0
]
],
"mode": "scenarios"
},
"previewSafe": true,
"previewUnsafeReasons": [],
"source": "curated",
"code": {
"html": "<div class=\"kole-container\">\n <div class=\"kole-container kole-container-surface\" style=\"max-width:720px\">\n <div class=\"kole-container-header\">Header</div>\n <div class=\"kole-container-main\">Main content</div>\n <div class=\"kole-container-footer\">Footer</div>\n </div>\n</div>",
"jsx": "import { KoleContainer } from 'kole-ui/react';\n\n<KoleContainer direction=\"column\" width=\"720px\" gap=\"16px\">\n Main content\n</KoleContainer>",
"vue3": "<template>\n <KoleContainer direction=\"column\" width=\"720px\" gap=\"16px\">Main content</KoleContainer>\n</template>\n\n<script setup>\nimport { KoleContainer } from 'kole-ui/vue3';\n</script>",
"vue2": "<template>\n <KoleContainer direction=\"column\" width=\"720px\" gap=\"16px\">Main content</KoleContainer>\n</template>\n\n<script>\nimport { KoleContainer } from 'kole-ui/vue2';\n\nexport default {\n components: { KoleContainer },\n};\n</script>",
"tsx": "import { KoleContainer } from 'kole-ui/react';\n\nexport default function KoleContainerDemo(): JSX.Element {\n return (\n <KoleContainer direction=\"column\" width=\"720px\" gap=\"16px\">\n Main content\n </KoleContainer>\n );\n}",
"vue3ts": "<template>\n\n <KoleContainer direction=\"column\" width=\"720px\" gap=\"16px\">Main content</KoleContainer>\n</template>\n\n<script setup lang=\"ts\">\nimport { KoleContainer } from 'kole-ui/vue3';\n\nconst demoTitle = ref<string>('默认与常用变体');\n\n</script>",
"vue2ts": "<template>\n\n <KoleContainer direction=\"column\" width=\"720px\" gap=\"16px\">Main content</KoleContainer>\n</template>\n\n<script lang=\"ts\">\nimport Vue from 'vue';\nimport { KoleContainer } from 'kole-ui/vue2';\n\nexport default {\n components: { KoleContainer },\n data(): Record<string, never> {\n return {};\n }\n};\n</script>"
},
"notes": [
"依据 frameworks/Container.html:5 第一个 demo-block 的 .kole-container-surface(Header / Main content / Footer,style 里 max-width:720px);prop 取 frameworks/Container.jsx:4 的 direction/width/gap,children 渲染在 Main 区(Container.jsx:8)"
]
},
{
"id": "container-ex-2",
"title": "状态与使用场景",
"titleSrc": "demo",
"desc": "",
"html": "<div class=\"demo-block\">\n <div class=\"row kole-container\">\n <div class=\"kole-container-surface\" style=\"padding:12px\">组合页面级 Header、Sider、Main 与 Footer,统一内容宽度和间距。</div>\n <span class=\"kole-container-desc\">支持键盘焦点、状态反馈和令牌化样式。</span>\n </div>\n <p class=\"demo-note\">零运行时依赖;数据请求、权限和国际化由宿主接入方决定。</p>\n</div>",
"preview": {
"show": [
[
0,
3
]
],
"hide": [
[
1
],
[
0,
0
],
[
0,
1
],
[
0,
2
],
[
0,
3,
0
]
],
"mode": "scenarios"
},
"previewSafe": true,
"previewUnsafeReasons": [],
"source": "curated",
"code": {
"html": "<div class=\"kole-container\">\n <div class=\"kole-container-surface\" style=\"padding:12px\">组合页面级 Header、Sider、Main 与 Footer,统一内容宽度和间距。</div>\n <span class=\"kole-container-desc\">支持键盘焦点、状态反馈和令牌化样式。</span>\n</div>\n<p>零运行时依赖;数据请求、权限和国际化由宿主接入方决定。</p>",
"jsx": "import { KoleContainer } from 'kole-ui/react';\n\n<KoleContainer direction=\"row\" width=\"100%\" gap=\"12px\">\n <span className=\"kole-container-desc\">组合页面级 Header、Sider、Main 与 Footer,统一内容宽度和间距。</span>\n <span className=\"kole-container-desc\">支持键盘焦点、状态反馈和令牌化样式。</span>\n</KoleContainer>",
"vue3": "<template>\n <KoleContainer direction=\"row\" width=\"100%\" gap=\"12px\">\n <span class=\"kole-container-desc\">组合页面级 Header、Sider、Main 与 Footer,统一内容宽度和间距。</span>\n <span class=\"kole-container-desc\">支持键盘焦点、状态反馈和令牌化样式。</span>\n </KoleContainer>\n</template>\n\n<script setup>\nimport { KoleContainer } from 'kole-ui/vue3';\n</script>",
"vue2": "<template>\n <KoleContainer direction=\"row\" width=\"100%\" gap=\"12px\">\n <span class=\"kole-container-desc\">组合页面级 Header、Sider、Main 与 Footer,统一内容宽度和间距。</span>\n <span class=\"kole-container-desc\">支持键盘焦点、状态反馈和令牌化样式。</span>\n </KoleContainer>\n</template>\n\n<script>\nimport { KoleContainer } from 'kole-ui/vue2';\n\nexport default {\n components: { KoleContainer },\n};\n</script>",
"tsx": "import { KoleContainer } from 'kole-ui/react';\n\nexport default function KoleContainerDemo(): JSX.Element {\n return (\n <KoleContainer direction=\"row\" width=\"100%\" gap=\"12px\">\n <span className=\"kole-container-desc\">组合页面级 Header、Sider、Main 与 Footer,统一内容宽度和间距。</span>\n <span className=\"kole-container-desc\">支持键盘焦点、状态反馈和令牌化样式。</span>\n </KoleContainer>\n );\n}",
"vue3ts": "<template>\n\n <KoleContainer direction=\"row\" width=\"100%\" gap=\"12px\">\n <span class=\"kole-container-desc\">组合页面级 Header、Sider、Main 与 Footer,统一内容宽度和间距。</span>\n <span class=\"kole-container-desc\">支持键盘焦点、状态反馈和令牌化样式。</span>\n </KoleContainer>\n</template>\n\n<script setup lang=\"ts\">\nimport { KoleContainer } from 'kole-ui/vue3';\n\nconst demoTitle = ref<string>('状态与使用场景');\n\n</script>",
"vue2ts": "<template>\n\n <KoleContainer direction=\"row\" width=\"100%\" gap=\"12px\">\n <span class=\"kole-container-desc\">组合页面级 Header、Sider、Main 与 Footer,统一内容宽度和间距。</span>\n <span class=\"kole-container-desc\">支持键盘焦点、状态反馈和令牌化样式。</span>\n </KoleContainer>\n</template>\n\n<script lang=\"ts\">\nimport Vue from 'vue';\nimport { KoleContainer } from 'kole-ui/vue2';\n\nexport default {\n components: { KoleContainer },\n data(): Record<string, never> {\n return {};\n }\n};\n</script>"
},
"notes": [
"依据 frameworks/Container.html:5 第二个 demo-block(.kole-container-surface 说明文案 + span.kole-container-desc);文案以 children 承载(Container.jsx:8 的 {children || 'Main content'}),width/gap 取 Container.jsx:4,span 用的 .kole-container-desc 见 frameworks/Container.css"
]
}
]
}