1.0.4 • Published 4 years ago

jun-rc-antd v1.0.4

Weekly downloads
1
License
ISC
Repository
github
Last release
4 years ago

Ant Design of React

Installation

Install with npm:

npm install jun-rc-antd

Install with yarn:

yarn add jun-rc-antd

Usage

ES6 module:

import { ImgView } from 'jun-rc-antd';

// 图片预览
ReactDOM.render(
  <ImgView src="pic.png">
    <img
      alt="图片"
      src="pic.png"
      style={{ width: 80, height: 80 }}
    />
  </ImgView>,
  mountNode
);

Script:

<!DOCTYPE html>
<html lang="zh-cn">
<head>
  <meta charset="utf-8">
  <title>jun-rc-antd</title>
  <link rel="stylesheet" type="text/css" href="jun-rc-antd.min.css">
</head>
<body>
  <div id="root"></div>
  <script type="text/javascript" charset="utf-8" src="react.js"></script>
  <script type="text/javascript" charset="utf-8" src="react-dom.js"></script>
  <script type="text/javascript" charset="utf-8" src="browser.js"></script>
  <script type="text/javascript" charset="utf-8" src="jun-rc-antd.min.js"></script>
  <script type="text/babel">
    const ImgView = junRcAntd.ImgView;
    // 图片预览
    ReactDOM.render(
      <ImgView src="pic.png">
        <img
          alt="图片"
          src="pic.png"
          style={{ width: 80, height: 80 }}
        />
      </ImgView>,
      document.getElementById('root')
    );
  </script>
</body>
</html>

Note

部分组件需要引入样式

Components

ImgView

图片预览

样式:jun-rc-antd/lib/components/imgView/style.css

PropertyDescriptionTypeDefault
src图片资源string-

SearchForm

搜索表单

PropertyDescriptionTypeDefault
className样式类string-
formRef表单实体object-
onSearch查询回调function(values)-
onReset重置回调function-
list选择项array-
multiple是否为高级搜索booleanfalse
collapsed高级搜索是否收起booleantrue
size简易搜索个数number3
loading是否正在查询boolean-
initialValues初始值object-
onExport导出回调function-
extra搜索栏额外元素【操作按钮】string | ReactNode-
onCollapse展开 | 收起回调function(collapsed)noop
searchText查询按钮文字string查询
resetText重置按钮文字string重置
exportText导出按钮文字string导出
collapseText收起状态按钮文字string展开
uncollapseText展开状态按钮文字string收起
1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago