{ "slug": "descriptions", "mode": "scenarios", "curated": true, "examples": [ { "id": "descriptions-ex-1", "title": "默认与常用变体", "titleSrc": "demo", "desc": "", "html": "
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
订单号KOLE-20260920状态处理中
负责人林工更新时间今天 09:30
\n
\n
", "preview": { "show": [ [ 0, 2 ] ], "hide": [ [ 1 ], [ 0, 0 ], [ 0, 1 ], [ 0, 3 ], [ 0, 2, 0 ] ], "mode": "scenarios" }, "previewSafe": true, "previewUnsafeReasons": [], "source": "curated", "code": { "html": "
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
订单号KOLE-20260920状态处理中
负责人林工更新时间今天 09:30
\n
", "jsx": "import { KoleDescriptions } from 'kole-ui/react';\n\nconst FIELDS = [\n { label: '订单号', value: 'KOLE-20260920' },\n { label: '状态', value: '处理中' },\n { label: '负责人', value: '林工' },\n { label: '更新时间', value: '今天 09:30' },\n];\n\n", "vue3": "\n\n", "vue2": "\n\n", "tsx": "import { KoleDescriptions } from 'kole-ui/react';\n\ninterface DescriptionField {\n label: string;\n value: string;\n}\n\nconst FIELDS: ReadonlyArray = [\n { label: '订单号', value: 'KOLE-20260920' },\n { label: '状态', value: '处理中' },\n { label: '负责人', value: '林工' },\n { label: '更新时间', value: '今天 09:30' },\n];\n\nconst columns: number = 2;\n\n", "vue3ts": "\n\n", "vue2ts": "\n\n" }, "notes": [ "依据 frameworks/Descriptions.html:5 第一个 demo-block 的 table.kole-descriptions-table(订单号 KOLE-20260920 / 状态 处理中 / 负责人 林工 / 更新时间 今天 09:30,每行两对 → columns=2);prop 取 frameworks/Descriptions.jsx:4 的 fields/columns/bordered", "TS 形态依据 TS-VARIANTS.md:tsx 用 interface DescriptionField + ReadonlyArray(fields 语义见 Descriptions.jsx 形参);vue3ts/vue2ts 用 ", "vue2": "\n\n", "tsx": "import { KoleDescriptions } from 'kole-ui/react';\n\ninterface DescriptionsCopy {\n intro: string;\n a11y: string;\n}\n\nconst copy: DescriptionsCopy = {\n intro: '以只读方式展示订单、客户、员工等对象的结构化详情,支持 1–4 列。',\n a11y: '支持键盘焦点、状态反馈和令牌化样式。',\n};\n\nconst columns: number = 1;\n\n\n {copy.intro}\n {copy.a11y}\n", "vue3ts": "\n\n", "vue2ts": "\n\n" }, "notes": [ "依据 frameworks/Descriptions.html:5 第二个 demo-block(.kole-descriptions-surface 说明文案 + span.kole-descriptions-desc);文案走默认插槽(api.slots=default,Descriptions.vue3.vue 的 ),bordered/columns 取 frameworks/Descriptions.jsx:4" ] } ] }