jrs-react 1.2.22 → 1.2.23
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/build/index.es.js +58 -5906
- package/build/index.js +58 -5947
- package/package.json +1 -1
- package/src/components/JRMask/JRMask.jsx +0 -3
- package/index.html +0 -13
- package/public/alert.json +0 -4
- package/public/data.json +0 -29
- package/public/data2.json +0 -19
- package/public/list.json +0 -132
- package/public/vite.svg +0 -1
- package/src/app/App.css +0 -42
- package/src/app/App.jsx +0 -35
- package/src/app/alert/AlertApp.jsx +0 -92
- package/src/app/axios/AxiosApp.jsx +0 -71
- package/src/app/dev/devApp.jsx +0 -146
- package/src/app/dev/tobeimport.js +0 -7
- package/src/app/fields/FieldsApp.jsx +0 -46
- package/src/app/fields/fieldsConfig.jsx +0 -472
- package/src/app/fields/tryHOC.jsx +0 -21
- package/src/app/fields/validator.jsx +0 -217
- package/src/app/index.css +0 -42
- package/src/app/input/InputApp.jsx +0 -43
- package/src/app/table/TableApp.jsx +0 -10
- package/src/app/table/tableConfig.jsx +0 -89
- package/src/app/test/index.jsx +0 -48
- package/src/app/window/WindowApp.jsx +0 -165
- package/vite.config.js +0 -15
|
@@ -1,217 +0,0 @@
|
|
|
1
|
-
import axios from "axios";
|
|
2
|
-
import JRText from "../../components/JRInput/JRText";
|
|
3
|
-
import {po} from '../../components/JRUtils'
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
// axios.interceptors.response.use(
|
|
7
|
-
// (Response) => {
|
|
8
|
-
// po('interceptors++++++++++++++++++++++++++',Response,Response)
|
|
9
|
-
// if(Response?.status!=200){
|
|
10
|
-
// po('fffffffffffffffff')
|
|
11
|
-
// return Promise.reject(Error);
|
|
12
|
-
// }
|
|
13
|
-
// return Promise.resolve(Response);
|
|
14
|
-
// },
|
|
15
|
-
// (Error) => {
|
|
16
|
-
// po('interceptors---------------------------',Error)
|
|
17
|
-
// return Promise.reject(Error);
|
|
18
|
-
// }
|
|
19
|
-
// );
|
|
20
|
-
|
|
21
|
-
export const fields={
|
|
22
|
-
open:true
|
|
23
|
-
,popup:true
|
|
24
|
-
,title:'Firelds'
|
|
25
|
-
,cols:2
|
|
26
|
-
,width:600
|
|
27
|
-
,height:220
|
|
28
|
-
,columns:[
|
|
29
|
-
{name:'a',label:'A',type:JRText}
|
|
30
|
-
,{name:'b',label:'B',type:JRText}
|
|
31
|
-
,{name:'c',label:'C',type:JRText}
|
|
32
|
-
,{name:'d',label:'D',type:JRText}
|
|
33
|
-
,{name:'e',label:'E',type:JRText}
|
|
34
|
-
,{name:'f',label:'F',type:JRText}
|
|
35
|
-
,{name:'g',label:'G',type:JRText}
|
|
36
|
-
,{name:'h',label:'H',type:JRText}
|
|
37
|
-
,{name:'i',label:'I',type:JRText}
|
|
38
|
-
,{name:'j',label:'G',type:JRText}
|
|
39
|
-
,{name:'k',label:'K',type:JRText}
|
|
40
|
-
]
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export const fieldsValidator={
|
|
44
|
-
get:{
|
|
45
|
-
url:'data.json'
|
|
46
|
-
,autoRun:true
|
|
47
|
-
}
|
|
48
|
-
,columns:[
|
|
49
|
-
{name:'name'
|
|
50
|
-
,label:'Name'
|
|
51
|
-
,type:JRText
|
|
52
|
-
,required:true
|
|
53
|
-
,max:5
|
|
54
|
-
,min:3
|
|
55
|
-
,xvalidators:[
|
|
56
|
-
function(value){
|
|
57
|
-
// return Promise.reject('value cannot be 1')
|
|
58
|
-
if(value=='Joren'){
|
|
59
|
-
return Promise.reject('value cannot be Joren')
|
|
60
|
-
}else{
|
|
61
|
-
return Promise.resolve()
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
,function(value){
|
|
65
|
-
if(value=='11'){
|
|
66
|
-
return Promise.reject('value cannot be 11')
|
|
67
|
-
}else{
|
|
68
|
-
return Promise.resolve()
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
]
|
|
72
|
-
}
|
|
73
|
-
// ,{
|
|
74
|
-
// columns:[
|
|
75
|
-
// {name:'housePhone',label:'House phone'
|
|
76
|
-
// ,columns:[
|
|
77
|
-
// {name:'h1',label:'H1',type:JRText}
|
|
78
|
-
// ,{name:'h2',label:'H2',type:JRText
|
|
79
|
-
// ,validators:[
|
|
80
|
-
// function(value){
|
|
81
|
-
// // po('validators b2 1')
|
|
82
|
-
// if(value==2)
|
|
83
|
-
// return Promise.resolve('H2 2 is 2 good')
|
|
84
|
-
// else{
|
|
85
|
-
// return Promise.reject('H2 1 is not 2 bad')
|
|
86
|
-
// }
|
|
87
|
-
// }
|
|
88
|
-
// ,function(){
|
|
89
|
-
// // po('validators b2 2')
|
|
90
|
-
// return Promise.resolve('H2 2 is good')
|
|
91
|
-
// }
|
|
92
|
-
// ]
|
|
93
|
-
// }
|
|
94
|
-
// ]
|
|
95
|
-
|
|
96
|
-
// }
|
|
97
|
-
// ,{name:'handPhone',label:'Hand phone',type:JRText
|
|
98
|
-
|
|
99
|
-
// ,validators:[
|
|
100
|
-
// function(){
|
|
101
|
-
// // po('validators b2 1')
|
|
102
|
-
// return Promise.resolve('b2 1 bad')
|
|
103
|
-
// }
|
|
104
|
-
// ]
|
|
105
|
-
// }
|
|
106
|
-
// ]
|
|
107
|
-
// }
|
|
108
|
-
// ,{name:'account',label:'Account',type:JRText
|
|
109
|
-
// ,validators:[
|
|
110
|
-
// function(){
|
|
111
|
-
// // po('validators c1',this)
|
|
112
|
-
// return Promise.resolve('c1 good')
|
|
113
|
-
// }
|
|
114
|
-
// ,function(){
|
|
115
|
-
// // po('validators c2')
|
|
116
|
-
// return Promise.resolve('c2 good')
|
|
117
|
-
// }
|
|
118
|
-
// ]
|
|
119
|
-
// }
|
|
120
|
-
,{name:'dataUrl',label:'data2',type:JRText
|
|
121
|
-
,validators:[
|
|
122
|
-
function(value){
|
|
123
|
-
return axios.get(value
|
|
124
|
-
, {
|
|
125
|
-
params:{
|
|
126
|
-
name: "2",
|
|
127
|
-
parts: "4"
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
).then((Response)=>{
|
|
131
|
-
po('JRText ++++++++++++++++++++++++++',Response)
|
|
132
|
-
if(Response.data?.dataUrl=='data.json'){
|
|
133
|
-
po('fffffffffffffffff')
|
|
134
|
-
return Promise.resolve(Response);
|
|
135
|
-
}
|
|
136
|
-
return Promise.reject('Url error');
|
|
137
|
-
})
|
|
138
|
-
.catch(()=>{
|
|
139
|
-
po('JRText ffffffffffffff')
|
|
140
|
-
return Promise.reject('url false 2')
|
|
141
|
-
})
|
|
142
|
-
}
|
|
143
|
-
]
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
]
|
|
147
|
-
,typeStyle:{
|
|
148
|
-
// background: 'white'
|
|
149
|
-
border:'5px solid green'
|
|
150
|
-
}
|
|
151
|
-
,debugMode:true
|
|
152
|
-
,top:function({setStyle}){
|
|
153
|
-
setStyle({
|
|
154
|
-
placeSelf: 'end'
|
|
155
|
-
,padding:'10px'
|
|
156
|
-
})
|
|
157
|
-
|
|
158
|
-
return <div>
|
|
159
|
-
<button
|
|
160
|
-
onClick={()=>{
|
|
161
|
-
this.get({value:{a:'111x'}})
|
|
162
|
-
}}
|
|
163
|
-
>Get</button>
|
|
164
|
-
|
|
165
|
-
<button
|
|
166
|
-
onClick={()=>{
|
|
167
|
-
this.setValue(null,true)
|
|
168
|
-
}}
|
|
169
|
-
>Clear</button>
|
|
170
|
-
|
|
171
|
-
<button
|
|
172
|
-
onClick={()=>{
|
|
173
|
-
this.reset()
|
|
174
|
-
}}
|
|
175
|
-
>Reset</button>
|
|
176
|
-
|
|
177
|
-
<button
|
|
178
|
-
onClick={()=>{
|
|
179
|
-
// this.validateFields()
|
|
180
|
-
this.validate()
|
|
181
|
-
.then(()=>{
|
|
182
|
-
po('success',this.state.testValue)
|
|
183
|
-
})
|
|
184
|
-
.catch(()=>{
|
|
185
|
-
po('failed',this.state.testValue)
|
|
186
|
-
})
|
|
187
|
-
}}
|
|
188
|
-
>Validate</button>
|
|
189
|
-
</div>
|
|
190
|
-
}
|
|
191
|
-
,bottom:function({setStyle}){
|
|
192
|
-
setStyle({
|
|
193
|
-
border:'1px solid red'
|
|
194
|
-
,maxHeight:'100px'
|
|
195
|
-
})
|
|
196
|
-
return <div style={{
|
|
197
|
-
display: 'flex'
|
|
198
|
-
,justifyContent: 'space-around'
|
|
199
|
-
}}>
|
|
200
|
-
<pre>Value=
|
|
201
|
-
{JSON.stringify(this.getValue(),4,4)}
|
|
202
|
-
</pre>
|
|
203
|
-
<pre>testValue=
|
|
204
|
-
{JSON.stringify(this.getTestValue(),4,4)}
|
|
205
|
-
</pre>
|
|
206
|
-
</div>
|
|
207
|
-
}
|
|
208
|
-
,left:function({setStyle}){
|
|
209
|
-
setStyle({
|
|
210
|
-
border:'4px solid blue'
|
|
211
|
-
})
|
|
212
|
-
return 'Left'
|
|
213
|
-
}
|
|
214
|
-
,open:true
|
|
215
|
-
,popup:true
|
|
216
|
-
,title:'Firelds'
|
|
217
|
-
}
|
package/src/app/index.css
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
color-scheme: dark;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
a {
|
|
6
|
-
font-weight: 500;
|
|
7
|
-
color: #646cff;
|
|
8
|
-
text-decoration: inherit;
|
|
9
|
-
}
|
|
10
|
-
a:hover {
|
|
11
|
-
color: #535bf2;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
body {
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
h1 {
|
|
18
|
-
line-height: 1.1;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
button {
|
|
22
|
-
}
|
|
23
|
-
button:hover {
|
|
24
|
-
border-color: #646cff;
|
|
25
|
-
}
|
|
26
|
-
button:focus,
|
|
27
|
-
button:focus-visible {
|
|
28
|
-
outline: 4px auto -webkit-focus-ring-color;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
@media (prefers-color-scheme: light) {
|
|
32
|
-
:root {
|
|
33
|
-
color: #213547;
|
|
34
|
-
background-color: #ffffff;
|
|
35
|
-
}
|
|
36
|
-
a:hover {
|
|
37
|
-
color: #747bff;
|
|
38
|
-
}
|
|
39
|
-
button {
|
|
40
|
-
background-color: #f9f9f9;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { useEffect, useState } from "react";
|
|
2
|
-
import JRFields from "../../components/JRFields/JRFields";
|
|
3
|
-
import { required } from "../../components/JRFields/Validators";
|
|
4
|
-
import JRSelect from "../../components/JRInput/JRSelect";
|
|
5
|
-
export default function InputApp() {
|
|
6
|
-
const [selectedValue,setSelectedValue]=useState()
|
|
7
|
-
return <div>
|
|
8
|
-
<JRSelect
|
|
9
|
-
get={{
|
|
10
|
-
url:'list.json'
|
|
11
|
-
,autoRun:true
|
|
12
|
-
}}
|
|
13
|
-
value={selectedValue}
|
|
14
|
-
onChange={(value)=>{
|
|
15
|
-
setSelectedValue(value)
|
|
16
|
-
}}
|
|
17
|
-
size={6}
|
|
18
|
-
multiple={true}
|
|
19
|
-
valueName={'name'}
|
|
20
|
-
/>
|
|
21
|
-
[{selectedValue}]
|
|
22
|
-
<JRFields
|
|
23
|
-
valueName={'phone'}
|
|
24
|
-
columns={[
|
|
25
|
-
{name:'name',label:'Name'
|
|
26
|
-
,type:JRSelect
|
|
27
|
-
,get:{
|
|
28
|
-
url:'list.json'
|
|
29
|
-
,autoRun:true
|
|
30
|
-
}
|
|
31
|
-
,showBlank:true
|
|
32
|
-
,multiple:true
|
|
33
|
-
,valueName:'name'
|
|
34
|
-
// ,size:5
|
|
35
|
-
,required:true
|
|
36
|
-
}
|
|
37
|
-
]}
|
|
38
|
-
bottom={function(){
|
|
39
|
-
return JSON.stringify(this.getValue())
|
|
40
|
-
}}
|
|
41
|
-
/>
|
|
42
|
-
</div>
|
|
43
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import JRFields from "../../components/JRFields/JRFields";
|
|
2
|
-
import JRText from "../../components/JRInput/JRText";
|
|
3
|
-
import JRTable from "../../components/JRTable/JRTable";
|
|
4
|
-
import { tableConfig } from "./tableConfig";
|
|
5
|
-
|
|
6
|
-
export default function TableApp() {
|
|
7
|
-
return <JRTable
|
|
8
|
-
{...tableConfig}
|
|
9
|
-
/>
|
|
10
|
-
}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import JRText from "../../components/JRInput/JRText";
|
|
2
|
-
|
|
3
|
-
export const tableConfig={
|
|
4
|
-
popup:true
|
|
5
|
-
,open:true
|
|
6
|
-
,height:500
|
|
7
|
-
,width:600
|
|
8
|
-
,title:'HOC table'
|
|
9
|
-
,get:{
|
|
10
|
-
url:'list.json'
|
|
11
|
-
,autoRun:true
|
|
12
|
-
,successMessage:'YES'
|
|
13
|
-
,mask:'Loading'
|
|
14
|
-
}
|
|
15
|
-
,columns:[
|
|
16
|
-
{name:'name',label:'Name'}
|
|
17
|
-
,{name:'Test',label:'1'
|
|
18
|
-
,rowSpan:4
|
|
19
|
-
,columns:[
|
|
20
|
-
{name:'Test21',label:'1_1'
|
|
21
|
-
,columns:[
|
|
22
|
-
{name:'Test21',label:'1_1_1',xdescribewidth:'20%'}
|
|
23
|
-
,{name:'Test21',label:'1_1_2',xwidth:'20%'}
|
|
24
|
-
,{name:'Test21',label:'1_1_3',xwidth:'20%'}
|
|
25
|
-
]
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
,{name:'Test22',label:'1_2',xwidth:'30%'}
|
|
29
|
-
,{name:'Test22',label:'1_3',xwidth:'30%'}
|
|
30
|
-
]
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
,{name:'Test2',label:'2'
|
|
34
|
-
,columns:[
|
|
35
|
-
{name:'Test21',label:'2_1'}
|
|
36
|
-
,{name:'Test21',label:'2_2'
|
|
37
|
-
,rowSpan:4
|
|
38
|
-
,columns:[
|
|
39
|
-
{name:'Test21',label:'2_2_1'}
|
|
40
|
-
,{name:'Test21',label:'2_2_2'}
|
|
41
|
-
]
|
|
42
|
-
}
|
|
43
|
-
]
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
,{name:'Test',label:'3'
|
|
47
|
-
,columns:[
|
|
48
|
-
{name:'Test21',label:'3_1'}
|
|
49
|
-
,{name:'Test22',label:'3_2'}
|
|
50
|
-
,{name:'Test22',label:'3_3'
|
|
51
|
-
,columns:[
|
|
52
|
-
{name:'Test21',label:'3_3_1'}
|
|
53
|
-
,{name:'Test21',label:'3_3_2'
|
|
54
|
-
,columns:[
|
|
55
|
-
{name:'Test21',label:'3_3_2_1'}
|
|
56
|
-
,{name:'Test21',label:'3_3_2_2'
|
|
57
|
-
,columns:[
|
|
58
|
-
{name:'Test21',label:'3_3_2_2_1'
|
|
59
|
-
,columns:[
|
|
60
|
-
{name:'Test21',label:'3_3_2_2_1_1'}
|
|
61
|
-
]
|
|
62
|
-
}
|
|
63
|
-
]
|
|
64
|
-
}
|
|
65
|
-
]
|
|
66
|
-
}
|
|
67
|
-
]
|
|
68
|
-
|
|
69
|
-
}
|
|
70
|
-
]
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
,{name:'Test2',label:'4'
|
|
74
|
-
,columns:[
|
|
75
|
-
{name:'Test21',label:'4_1'}
|
|
76
|
-
,{name:'Test21',label:'4_2'
|
|
77
|
-
,columns:[
|
|
78
|
-
{name:'Test21',label:'4_2_1'}
|
|
79
|
-
]
|
|
80
|
-
}
|
|
81
|
-
]
|
|
82
|
-
}
|
|
83
|
-
,{name:'Test2',label:'5'}
|
|
84
|
-
// ,{name:'Test2',label:'6'}
|
|
85
|
-
// ,{name:'Test2',label:'7'}
|
|
86
|
-
// ,{name:'Test2',label:'8'}
|
|
87
|
-
]
|
|
88
|
-
,resizableColumns:true
|
|
89
|
-
}
|
package/src/app/test/index.jsx
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import React, { useEffect, useRef, useState } from "react"
|
|
2
|
-
import { po } from "../../components/JRUtils"
|
|
3
|
-
import JRFields from "../../components/JRFields/JRFields"
|
|
4
|
-
import JRFrame from "../../components/JRFrame/JRFrame"
|
|
5
|
-
import styled from "styled-components"
|
|
6
|
-
|
|
7
|
-
const StyledDialog=styled.dialog`
|
|
8
|
-
`
|
|
9
|
-
class JRDialog extends JRFrame {
|
|
10
|
-
renderer(){
|
|
11
|
-
return <StyledDialog open>
|
|
12
|
-
Dialog
|
|
13
|
-
{super.renderer()}
|
|
14
|
-
</StyledDialog>
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
export default function TestApp(){
|
|
18
|
-
const ref=useRef()
|
|
19
|
-
const [open,setOpen]=useState(false)
|
|
20
|
-
useEffect(()=>{
|
|
21
|
-
if(open){
|
|
22
|
-
po('open',open)
|
|
23
|
-
ref.current.showModal()
|
|
24
|
-
}else{
|
|
25
|
-
po('close',open)
|
|
26
|
-
ref.current.close()
|
|
27
|
-
}
|
|
28
|
-
},[open])
|
|
29
|
-
return <div>
|
|
30
|
-
isOpen={open+''}
|
|
31
|
-
<button onClick={()=>{
|
|
32
|
-
// ref.current.showModal();
|
|
33
|
-
po(true)
|
|
34
|
-
setOpen(true)
|
|
35
|
-
}}>open dialog</button>
|
|
36
|
-
|
|
37
|
-
<StyledDialog id="dialog" ref={ref} >
|
|
38
|
-
<JRFields/>
|
|
39
|
-
<p>I'm a dialog.</p>
|
|
40
|
-
<button
|
|
41
|
-
onClick={()=>{
|
|
42
|
-
// ref.current.close();
|
|
43
|
-
setOpen(false)
|
|
44
|
-
}}
|
|
45
|
-
>Close</button>
|
|
46
|
-
</StyledDialog>
|
|
47
|
-
</div>
|
|
48
|
-
}
|
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
import JRWindow from "../../components/JRWindow/JRWindow";
|
|
2
|
-
import JRTable from "../../components/JRTable/JRTable";
|
|
3
|
-
import JRFields from "../../components/JRFields/JRFields";
|
|
4
|
-
import JRText from "../../components/JRInput/JRText";
|
|
5
|
-
import { po } from "../../components/JRUtils";
|
|
6
|
-
import { useEffect, useState } from "react";
|
|
7
|
-
import { createRoot } from 'react-dom/client'
|
|
8
|
-
import styled from "styled-components";
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const StyledDiv=styled.div`
|
|
12
|
-
border:10px solid gray;
|
|
13
|
-
width:400px;
|
|
14
|
-
height:400px;
|
|
15
|
-
margin:80px;
|
|
16
|
-
padding:20px;
|
|
17
|
-
border-radius: 5px;
|
|
18
|
-
overflow: overlay;
|
|
19
|
-
`
|
|
20
|
-
|
|
21
|
-
const Window=styled(JRWindow)`
|
|
22
|
-
.body{
|
|
23
|
-
padding:10px;
|
|
24
|
-
}
|
|
25
|
-
`
|
|
26
|
-
|
|
27
|
-
export default function WindowApp() {
|
|
28
|
-
const [popup,setPopup]=useState(true)
|
|
29
|
-
const [open,setOpen]=useState(true)
|
|
30
|
-
|
|
31
|
-
// useEffect(()=>{
|
|
32
|
-
// const w1=500
|
|
33
|
-
// const x1=250
|
|
34
|
-
// const w2=200
|
|
35
|
-
// const x2=(w1/x1)
|
|
36
|
-
// po('xp' , ((x1/w1)*100) * (w2/100))
|
|
37
|
-
// },[])
|
|
38
|
-
return <>
|
|
39
|
-
|
|
40
|
-
<div>
|
|
41
|
-
<button
|
|
42
|
-
onClick={()=>{
|
|
43
|
-
const textnode = document.createTextNode("Water");
|
|
44
|
-
document.getElementById('root').appendChild(textnode)
|
|
45
|
-
}}
|
|
46
|
-
>
|
|
47
|
-
Add
|
|
48
|
-
</button>
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
</div>
|
|
52
|
-
|
|
53
|
-
<button
|
|
54
|
-
onClick={()=>{
|
|
55
|
-
setPopup(!popup)
|
|
56
|
-
}}
|
|
57
|
-
>Popup</button>
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
<JRTable id={'info'}
|
|
62
|
-
// title={'Info'}
|
|
63
|
-
// open={true}
|
|
64
|
-
// popup={true}
|
|
65
|
-
columns={[
|
|
66
|
-
{name:'name',label:'Name'}
|
|
67
|
-
]}
|
|
68
|
-
get={{
|
|
69
|
-
url:'list.json'
|
|
70
|
-
,autoRun:true
|
|
71
|
-
}}
|
|
72
|
-
onRowClick={({record},b,c)=>{
|
|
73
|
-
setOpen({
|
|
74
|
-
value:record
|
|
75
|
-
})
|
|
76
|
-
}}
|
|
77
|
-
xstyle={{
|
|
78
|
-
height:'200px'
|
|
79
|
-
,width:'500px'
|
|
80
|
-
}}
|
|
81
|
-
>
|
|
82
|
-
</JRTable>
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
<JRFields
|
|
86
|
-
maskOn={'info'}
|
|
87
|
-
style={{
|
|
88
|
-
background:'black'
|
|
89
|
-
}}
|
|
90
|
-
title={function(){
|
|
91
|
-
return this.getValue()?.name
|
|
92
|
-
}}
|
|
93
|
-
width={200}
|
|
94
|
-
height={200}
|
|
95
|
-
// y={100}
|
|
96
|
-
popup={popup}
|
|
97
|
-
open={open}
|
|
98
|
-
setOpen={setOpen}
|
|
99
|
-
get={{
|
|
100
|
-
url:'data.json'
|
|
101
|
-
// ,autoRun:true
|
|
102
|
-
}}
|
|
103
|
-
onOpen={function(){
|
|
104
|
-
this.get(open)
|
|
105
|
-
}}
|
|
106
|
-
onClose={function(){
|
|
107
|
-
this.setValue(null,true)
|
|
108
|
-
}}
|
|
109
|
-
columns={[
|
|
110
|
-
{name:'name',label:'姓名',type:JRText}
|
|
111
|
-
]}
|
|
112
|
-
bottom={()=>{
|
|
113
|
-
return <button>Get</button>
|
|
114
|
-
}}
|
|
115
|
-
xleft={function(){
|
|
116
|
-
return <>Left fsd gsdf gdf g</>
|
|
117
|
-
}}
|
|
118
|
-
xright={function(){
|
|
119
|
-
return <div>right</div>
|
|
120
|
-
}}
|
|
121
|
-
>
|
|
122
|
-
JRWindow<br/>
|
|
123
|
-
1<br/>
|
|
124
|
-
2<br/>
|
|
125
|
-
3<br/>
|
|
126
|
-
4<br/>
|
|
127
|
-
5<br/>
|
|
128
|
-
6<br/>
|
|
129
|
-
7<br/>
|
|
130
|
-
8<br/>9<br/>10<br/>
|
|
131
|
-
</JRFields>
|
|
132
|
-
|
|
133
|
-
<StyledDiv id='div'>
|
|
134
|
-
something here
|
|
135
|
-
<input/>
|
|
136
|
-
<button
|
|
137
|
-
style={{
|
|
138
|
-
zIndex:100
|
|
139
|
-
}}
|
|
140
|
-
onClick={()=>{
|
|
141
|
-
setOpen(!open)
|
|
142
|
-
}}
|
|
143
|
-
>Open ({open?'opend':'closed'})</button>
|
|
144
|
-
.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>
|
|
145
|
-
<button
|
|
146
|
-
style={{
|
|
147
|
-
zIndex:100
|
|
148
|
-
}}
|
|
149
|
-
onClick={()=>{
|
|
150
|
-
setOpen(!open)
|
|
151
|
-
}}
|
|
152
|
-
>Open ({open?'opend':'closed'})</button>
|
|
153
|
-
|
|
154
|
-
</StyledDiv>
|
|
155
|
-
.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>.<br/>
|
|
156
|
-
<button
|
|
157
|
-
style={{
|
|
158
|
-
zIndex:100
|
|
159
|
-
}}
|
|
160
|
-
onClick={()=>{
|
|
161
|
-
setOpen(!open)
|
|
162
|
-
}}
|
|
163
|
-
>Open ({open?'opend':'closed'})</button>
|
|
164
|
-
</>
|
|
165
|
-
}
|
package/vite.config.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from 'vite'
|
|
2
|
-
import svgr from 'vite-plugin-svgr'
|
|
3
|
-
import react from '@vitejs/plugin-react'
|
|
4
|
-
|
|
5
|
-
export default defineConfig({
|
|
6
|
-
plugins: [
|
|
7
|
-
react()
|
|
8
|
-
,svgr({
|
|
9
|
-
include: '**/*.svg',
|
|
10
|
-
svgrOptions: {
|
|
11
|
-
exportType: 'default',
|
|
12
|
-
}
|
|
13
|
-
})
|
|
14
|
-
]
|
|
15
|
-
})
|