jrs-react 1.1.13 → 1.1.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jrs-react",
3
- "version": "1.1.13",
3
+ "version": "1.1.15",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "module": "build/index.es.js",
@@ -2,21 +2,22 @@ import React from "react";
2
2
  import JRSubmit from "../JRSubmit";
3
3
  import { StyledJRFrame } from "./StyledJRFrame";
4
4
 
5
- const FreeType=({tag:Tag,config,me,className})=>{
6
- if(typeof config==='function'){
7
- let style
8
- const setStyle=function(_style){
9
- style=_style
10
- }
11
- const content=config.bind(me)({setStyle})
12
- return <Tag className={className} style={style}>{content}</Tag>
13
- }
14
- }
5
+ // const FreeType=({tag:Tag,config,me,className})=>{
6
+ // if(typeof config==='function'){
7
+ // let style
8
+ // const setStyle=function(_style){
9
+ // style=_style
10
+ // }
11
+ // const content=config.bind(me)({setStyle})
12
+ // return <Tag className={className} style={style}>{content}</Tag>
13
+ // }
14
+ // }
15
15
 
16
16
  export default class JRFrame extends JRSubmit {
17
17
  renderer(){
18
18
  return <StyledJRFrame style={this.props.style} className={`${this.props.className} jr-frame`} >
19
- <FreeType tag='div' config={this.props.start} me={this} className={'start'}/>
19
+ {this.renderMe()}
20
+ {/* <FreeType tag='div' config={this.props.start} me={this} className={'start'}/>
20
21
  <main>
21
22
  <FreeType tag='header' config={this.props.top} me={this}/>
22
23
  <main>
@@ -26,7 +27,7 @@ export default class JRFrame extends JRSubmit {
26
27
  </main>
27
28
  <FreeType tag='footer' config={this.props.bottom} me={this}/>
28
29
  </main>
29
- <FreeType tag='div' config={this.props.end} me={this} className={'end'}/>
30
+ <FreeType tag='div' config={this.props.end} me={this} className={'end'}/> */}
30
31
  </StyledJRFrame>
31
32
  }
32
33
 
@@ -1,9 +1,10 @@
1
- import React from "react";
1
+ import { po } from "../JRUtils";
2
2
  import { TFoot, THead } from "./THead";
3
3
  import { TBodies } from "./TBodies";
4
4
  import { StyledJRTable } from "./StyledJRTable";
5
- import JRSubmit from "../JRSubmit";
6
- // import JRFrame from "../JRFrame/JRFrame";
5
+ import JRFrame from "../JRFrame/JRFrame";
6
+ import { Button, Checkbox } from "antd";
7
+ import React from "react";
7
8
 
8
9
 
9
10
  const getMapObject=(map,names)=>{
@@ -26,7 +27,7 @@ const setMapObject=(map,names,value)=>{
26
27
  }
27
28
  }
28
29
 
29
- export default class JRTable extends JRSubmit {
30
+ export default class JRTable extends JRFrame {
30
31
  constructor(props) {
31
32
  super(props)
32
33
  this.colGroupRef = React.createRef()
@@ -43,7 +44,7 @@ export default class JRTable extends JRSubmit {
43
44
  checkableColumn(props){
44
45
  return {//方法1
45
46
  render({value,onChange}){
46
- return <checkbox checked={value} onChange={(e)=>{onChange(e.target.checked)}}/>
47
+ return <Checkbox checked={value} onChange={(e)=>{onChange(e.target.checked)}}/>
47
48
  }
48
49
  ,align:'center'
49
50
  ,name:'checked'
@@ -68,12 +69,12 @@ export default class JRTable extends JRSubmit {
68
69
  deletableColumn({name='deletable',sendValue,sendName,valueName,...props}){
69
70
  return {
70
71
  render({value,onChange}){
71
- return <checkbox checked={value} onChange={(e)=>{onChange(e.target.checked)}}/>
72
+ return <Checkbox checked={value} onChange={(e)=>{onChange(e.target.checked)}}/>
72
73
  }
73
74
  ,align:'center'
74
75
  ,name
75
76
  ,label(){
76
- return <button
77
+ return <Button
77
78
  onClick={()=>{
78
79
  const value=this.props.delete.value
79
80
  ?? this.getDataSource()?.filter(record=>record[name]).map(record=>sendValue?record[sendValue]:record)
@@ -87,7 +88,7 @@ export default class JRTable extends JRSubmit {
87
88
  ,...props
88
89
  })
89
90
  }}
90
- >刪除</button>
91
+ >刪除</Button>
91
92
  }
92
93
  ,...props
93
94
  }
package/src/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import JRSubmit from './components/JRSubmit'
2
2
  import JRFrame from './components/JRFrame/JRFrame'
3
- import JRTable from './components/JRTable/JRTable'
3
+ // import JRTable from './components/JRTable/JRTable'
4
4
  import JRTest,{JRTestReact} from './components/JRTest'
5
5
  export {
6
6
  JRTest,JRTestReact
7
- ,JRSubmit,JRFrame,JRTable
7
+ ,JRSubmit,JRFrame//,JRTable
8
8
  }