1.0.0 • Published 2 years ago
school-recruit v1.0.0
school-recruit
校招展示组件
安装
yarn
yarn add school-recruit
npm
npm i school-recruit
使用
只展示
/**
* 只渲染
*/
import React, { useCallback } from 'react';
import { render } from 'react-dom';
import SchoolRecruit from 'school-recruit'
//import SchoolRecruit from '../../src/Renderer';
//import SRComponent from 'srcomponent';
const App: React.FC = () => {
let testData1 = {title: 'xxx', content: 'xxxxxxx', buttonText: 'xxxx'}
let testData2 = {title: 'yyy', content: 'yyyyyyyy', buttonText: 'yyyy'}
let testData3 = [{...testData1}, {...testData1}, {...testData1}, {...testData2}, {...testData2}]
return (
<div>
<SchoolRecruit {...testData3}/>
</div>
);
};
render(<App />, document.querySelector('#app'));
API
参数 | 说明 | 类型 |
---|---|---|
title | 卡片的标题 | Str |
content | 卡片的内容 | Str(支持hmtl字符串) |
buttonText | 按钮的内容 | Str |
1.0.0
2 years ago