cyl-hooks-tools
首页
  • useApi
  • useCo
  • useCollector
  • useWebsocket
  • useIndexedDB
  • NinePatch
  • parseJsonGraceful
  • sleep
  • logger
  • makeFriendly
  • formatSeconds
  • Uint8ArrayToString
  • dataSourceSliceOfECharts
  • ninePath
更新日志
首页
  • useApi
  • useCo
  • useCollector
  • useWebsocket
  • useIndexedDB
  • NinePatch
  • parseJsonGraceful
  • sleep
  • logger
  • makeFriendly
  • formatSeconds
  • Uint8ArrayToString
  • dataSourceSliceOfECharts
  • ninePath
更新日志
  • NinePatch
  • components
cyl
2023-03-25

NinePatch

图片背景组件处理


import {NinePatch} from "cyl-hooks-tools/components"

export default function Component(){
    return <div>
        <NinePatch
            {/* 四角边框宽度,source 图片地址 */}
            ninePatch={{
                left:120,
                top: 120,
                right: 120,
                bottom: 120,
                source:""
            }}
            {/* 内容大小 */}
            content={{
                left:120,
                top: 120,
                right: 120,
                bottom: 120
            }}
        >
            <div>我是测试</div>
        </NinePatch>
    </div>
}

上次更新: 2023/05/08, 19:10:56
Theme by Vdoing | Copyright © 2023-2025 cyl-hooks-tools
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式