### Basic Usage of Empty Component - React Source: https://github.com/zvip-fe/open-docs/blob/main/docs/mix-ui/Empty 空状态.md Shows the basic usage of the Empty component in React, illustrating configurations for title, content, and a button with an click handler. It includes examples with and without an image. ```tsx import React from 'react' import { Empty } from '@kfe/mix-ui' import { DemoBlock } from 'demos' export default () => { return ( <> alert('OK')} /> ) } ``` -------------------------------- ### Basic Icon Usage Source: https://github.com/zvip-fe/open-docs/blob/main/docs/mix-ui/Icons 图标.md Shows how to render various icons with different sizes (16px and 24px) using React components from '@kfe/mix-ui'. It includes examples for different icon types like arrows, Alipay, currency, and badges. ```tsx import React from 'react' import { ArrowClockwise24, ArrowClockwise16, ArrowDown24, ArrowDown16, ArrowSquarePathFill24, ArrowSquarePathFill16, Alipay24, CurrencyBubbleFill24, BadgeCgFill24 } from '@kfe/mix-ui' import { DemoBlock } from 'demos' export default () => { return (
) } ``` -------------------------------- ### Empty Component: CHIPS Theme Variations Source: https://github.com/zvip-fe/open-docs/blob/main/docs/mix-ui/Empty 空状态.md Demonstrates the Empty component's CHIPS theme variations for different states. It shows examples for 'chipsLoadingError', 'chipsNoNetwork', and 'chipsContentError', each with a title, the specified image, and a 'Refresh Try' button. ```tsx import React from 'react' import { Empty, ConfigProvider } from '@kfe/mix-ui' import { DemoBlock } from 'demos' export default () => { return ( <> ) } ``` -------------------------------- ### Tabs Alignment Source: https://github.com/zvip-fe/open-docs/blob/main/docs/mix-ui/Tabs 标签页.md Demonstrates how to change the alignment of the tab bar using the `align` prop, with examples for 'start' and 'center' alignments. ```tsx import React from 'react' import { Tabs } from '@kfe/mix-ui' export default () => { return (
{[1, 2, 3].map(item => ( 内容 {item} ))} {[1, 2, 3].map(item => ( 内容 {item} ))}
) } ``` -------------------------------- ### 运行 Mix-UI 文档处理器 Source: https://github.com/zvip-fe/open-docs/blob/main/README.md 使用 pnpm 或 node 命令运行 Mix-UI 文档处理器。可以指定调试模式以及自定义源目录和目标目录。 ```Bash # 基本用法 pnpm process-mixui # 或者直接使用 node dist/index.js mixui # 启用调试模式 node dist/index.js mixui --debug # 自定义源目录和目标目录 node dist/index.js mixui --source-dir custom/source --target-dir custom/output ``` -------------------------------- ### DOMPurify Sanitization Examples Source: https://github.com/zvip-fe/open-docs/blob/main/docs/mix-ui/RichText 富文本展示.md Provides several examples of how DOMPurify sanitizes different types of potentially malicious HTML input, demonstrating its effectiveness against various XSS vectors. ```js DOMPurify.sanitize(''); // becomes DOMPurify.sanitize(''); // becomes DOMPurify.sanitize('

abc