Home

Awesome

KDesign of React

KDesign of React 是基于金蝶的企业级设计系统KDesign 实现的一套React UI组件库,主要用于企业级系统的构建。

官网:https://react.kingdee.design/

特性

安装

使用 npm 或 yarn 安装

$ npm install @kdcloudjs/kdesign --save
# 或者
$ yarn add @kdcloudjs/kdesign

示例

import React from 'react'
import reactDom from 'react-dom'
import { Button } from '@kdcloudjs/kdesign'
import '@kdcloudjs/kdesign/dist/kdesign.css'

reactDom.render((
  <div>
    <Button>kdesign 按钮</Button>
  </div>
), document.getElementById('root'))

浏览器引入

在浏览器中使用 scriptlink 标签直接引入文件,并使用全局变量 kdesign。 目前尚未将文件上传至 cdn 需要手动将 dist 目录下的 kdesign.min.jskdesign.min.css 文件拷贝至项目。

使用:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>kdesign</title>
  <script src="https://cdn.staticfile.org/react/16.14.0/umd/react.development.js"></script>
  <script src="https://cdn.staticfile.org/react-dom/16.14.0/umd/react-dom.development.js"></script>
  <script src="https://cdn.staticfile.org/babel-standalone/6.26.0/babel.min.js"></script>

  <script src="https://unpkg.com/@kdcloudjs/kdesign@latest/dist/kdesign.min.js"></script>
  <link rel="stylesheet" href="https://unpkg.com/@kdcloudjs/kdesign@latest/dist/kdesign.min.css">
</head>
<body>
<div id="root"></div>
<script type="text/babel">
  ReactDOM.render((
      <div>
        <kdesign.Button>kdesign 按钮</kdesign.Button>
      </div>
    ),
    document.getElementById('root')
  )
</script>
</body>
</html>

相关链接

浏览器兼容性

<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" /><br/>IE / Edge<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" /><br/>Firefox<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" /><br/>Chrome<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" /><br/>Safari<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari-ios/safari-ios_48x48.png" alt="iOS Safari" width="24px" height="24px" /><br/>iOS Safari<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/samsung-internet/samsung-internet_48x48.png" alt="Samsung" width="24px" height="24px" /><br/>Samsung<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/opera/opera_48x48.png" alt="Opera" width="24px" height="24px" /><br/>Opera
IE11, Edgelast 2 versionslast 2 versionslast 2 versionslast 2 versionslast 2 versionslast 2 versions

参与贡献

参与贡献前请先阅读 贡献指南

License

kdesign 使用了 Apache License, Version 2.0. 详细license 请查看 LICENSE