Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wisdom-components
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ReactWeb5
wisdom-components
Commits
19831b16
Commit
19831b16
authored
Jun 27, 2022
by
周宏民
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: test
parent
3f584f18
Pipeline
#53935
failed with stages
in 4 seconds
Changes
4
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
66 additions
and
3 deletions
+66
-3
package.json
package.json
+2
-1
README.md
packages/base-components/RichText/README.md
+2
-2
index.js
packages/base-components/RichText/index.js
+62
-0
index copy.js
packages/base-components/RichText/src/index copy.js
+0
-0
No files found.
package.json
View file @
19831b16
...
@@ -40,11 +40,11 @@
...
@@ -40,11 +40,11 @@
"
@ant-design/pro-skeleton
"
:
"^1.0.0-beta.2"
,
"
@ant-design/pro-skeleton
"
:
"^1.0.0-beta.2"
,
"
@babel/core
"
:
"^7.8.3"
,
"
@babel/core
"
:
"^7.8.3"
,
"
@babel/plugin-proposal-object-rest-spread
"
:
"^7.8.3"
,
"
@babel/plugin-proposal-object-rest-spread
"
:
"^7.8.3"
,
"
@babel/plugin-transform-runtime
"
:
"^7.17.10"
,
"
@babel/preset-env
"
:
"^7.8.3"
,
"
@babel/preset-env
"
:
"^7.8.3"
,
"
@babel/preset-react
"
:
"^7.8.3"
,
"
@babel/preset-react
"
:
"^7.8.3"
,
"
@babel/preset-typescript
"
:
"^7.8.3"
,
"
@babel/preset-typescript
"
:
"^7.8.3"
,
"
@babel/runtime
"
:
"^7.17.9"
,
"
@babel/runtime
"
:
"^7.17.9"
,
"
@babel/plugin-transform-runtime
"
:
"^7.17.10"
,
"
@octokit/core
"
:
"^3.2.5"
,
"
@octokit/core
"
:
"^3.2.5"
,
"
@size-limit/preset-big-lib
"
:
"^4.5.5"
,
"
@size-limit/preset-big-lib
"
:
"^4.5.5"
,
"
@testing-library/react
"
:
"^10.0.2"
,
"
@testing-library/react
"
:
"^10.0.2"
,
...
@@ -147,6 +147,7 @@
...
@@ -147,6 +147,7 @@
"
@wisdom-components/basictable
"
:
"^1.5.14"
,
"
@wisdom-components/basictable
"
:
"^1.5.14"
,
"
@wisdom-components/empty
"
:
"^1.3.9"
,
"
@wisdom-components/empty
"
:
"^1.3.9"
,
"
@wisdom-components/exportexcel
"
:
"^1.1.2"
,
"
@wisdom-components/exportexcel
"
:
"^1.1.2"
,
"
@wisdom-components/rich
"
:
"file:packages/base-components/rich"
,
"
@wisdom-components/timerangepicker
"
:
"^1.3.4"
,
"
@wisdom-components/timerangepicker
"
:
"^1.3.4"
,
"
@wisdom-utils/utils
"
:
"0.0.46"
,
"
@wisdom-utils/utils
"
:
"0.0.46"
,
"
classnames
"
:
"^2.2.6"
,
"
classnames
"
:
"^2.2.6"
,
...
...
packages/base-components/RichText/README.md
View file @
19831b16
# `@wisdom-components/
RichT
ext`
# `@wisdom-components/
richt
ext`
> TODO: description
> TODO: description
## Usage
## Usage
```
```
const RichText = require('@wisdom-components/
RichT
ext');
const RichText = require('@wisdom-components/
richt
ext');
// TODO: DEMONSTRATE API
// TODO: DEMONSTRATE API
```
```
packages/base-components/RichText/index.js
0 → 100644
View file @
19831b16
/* eslint-disable react-hooks/exhaustive-deps */
import
{
Spin
}
from
'antd'
;
import
PropTypes
from
'prop-types'
;
import
{
useEffect
,
useState
}
from
'react'
;
let
timer
=
null
;
const
LoadBox
=
({
delay
,
indicator
,
size
,
tip
,
wrapperClassName
,
timeout
,
timeoutTip
,
spinning
,
})
=>
{
const
[
loadTip
,
setloadTip
]
=
useState
(
tip
);
useEffect
(()
=>
{
setloadTip
(
tip
);
if
(
timer
)
clearTimeout
(
timer
);
if
(
spinning
)
timer
=
setTimeout
(()
=>
{
setloadTip
(
timeoutTip
);
},
timeout
);
return
()
=>
{
if
(
timer
)
clearTimeout
(
timer
);
};
},
[
spinning
]);
return
(
<
Spin
delay
=
{
delay
}
spinning
=
{
spinning
}
indicator
=
{
indicator
}
size
=
{
size
}
tip
=
{
loadTip
}
wrapperClassName
=
{
wrapperClassName
}
><
/Spin
>
);
};
LoadBox
.
defaultProps
=
{
spinning
:
true
,
delay
:
0
,
indicator
:
''
,
size
:
'default'
,
tip
:
''
,
wrapperClassName
:
''
,
timeout
:
3000
,
timeoutTip
:
'正在加载数据,请耐心等待...'
,
};
LoadBox
.
propTypes
=
{
spinning
:
PropTypes
.
bool
,
// 是否为加载中状态
delay
:
PropTypes
.
number
,
// 延迟显示加载效果的时间(防止闪烁)
indicator
:
PropTypes
.
node
,
// 加载指示符
size
:
PropTypes
.
string
,
// 组件大小,可选值为 small default large
tip
:
PropTypes
.
string
,
// 当作为包裹元素时,可以自定义描述文案
wrapperClassName
:
PropTypes
.
string
,
// 包装器的类属性
timeout
:
PropTypes
.
number
,
// 超时时间
timeoutTip
:
PropTypes
.
string
,
// 超时时间提示
};
export
default
LoadBox
;
packages/base-components/RichText/src/index copy.js
0 → 100644
View file @
19831b16
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment