Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivManage
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
CivManage
Commits
aa8f5119
Commit
aa8f5119
authored
Nov 09, 2020
by
张烨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: update
parent
4a8560b9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
10 deletions
+11
-10
package.json
package.json
+2
-1
index.tsx
src/components/Upload/index.tsx
+9
-9
No files found.
package.json
View file @
aa8f5119
...
...
@@ -22,7 +22,8 @@
"build"
:
"cross-env NODE_ENV=production webpack --config internals/webpack/webpack.prod.babel.js --color -p --progress --hide-modules --display-optimization-bailout"
,
"build:inspect"
:
"cross-env NODE_ENV=production node --inspect-brk ./node_modules/webpack/bin/webpack.js --config internals/webpack/webpack.prod.babel.js --color -p --progress --hide-modules --display-optimization-bailout"
,
"build:clean"
:
"rimraf ./build"
,
"start"
:
"cross-env NODE_ENV=development node --inspect=9229 server"
,
"start"
:
"cross-env NODE_ENV=development server"
,
"start:inspect"
:
"cross-env NODE_ENV=development node --inspect=9229 server"
,
"start:tunnel"
:
"cross-env NODE_ENV=development ENABLE_TUNNEL=true node server"
,
"start:production"
:
"npm run test && npm run build && npm run start:prod"
,
"start:prod"
:
"cross-env NODE_ENV=production node server"
,
...
...
src/components/Upload/index.tsx
View file @
aa8f5119
...
...
@@ -5,16 +5,16 @@ import ImgCrop from 'antd-img-crop';
import
classnames
from
'classnames'
;
import
{
UploadFile
,
UploadChangeParam
,
RcFile
}
from
'antd/lib/upload/interface'
;
import
{
isDev
,
unParams
,
uuid
}
from
'@/utils/tools'
;
import
req
from
'@/utils/req
'
;
import
{
get
}
from
'@/services
'
;
import
styles
from
'./index.less'
;
const
{
TabPane
}
=
Tabs
;
// 维护图片分类映射
const
wallCateName
:
any
=
{
photo
:
'照片
'
,
icon
:
'图标
'
,
bg
:
'背景'
,
chahua
:
'插画
'
,
uploaded
:
'上传
'
,
};
function
getBase64
(
file
:
File
|
Blob
)
{
...
...
@@ -44,9 +44,9 @@ class PicturesWall extends React.Component<PicturesWallType> {
wallModalVisible
:
false
,
previewTitle
:
''
,
imgBed
:
{
photo
:
[],
icon
:
[],
bg
:
[],
chahua
:
[],
uploaded
:
[],
},
curSelectedImg
:
''
,
fileList
:
this
.
props
.
fileList
||
[],
...
...
@@ -128,7 +128,7 @@ class PicturesWall extends React.Component<PicturesWallType> {
};
componentDidMount
()
{
req
.
get
(
`/visible/bed/get?tid=
${
unParams
(
location
.
search
)
!
.
tid
}
`
).
then
(
res
=>
{
get
(
`/visible/bed/get?tid=
${
unParams
(
location
.
search
)
!
.
tid
}
`
).
then
(
res
=>
{
res
&&
this
.
setState
({
imgBed
:
res
,
...
...
@@ -172,7 +172,7 @@ class PicturesWall extends React.Component<PicturesWallType> {
modalOk=
"确定"
modalCancel=
"取消"
rotate=
{
true
}
aspect=
{
cropRate
}
aspect=
{
cropRate
as
number
}
>
<
Upload
fileList=
{
fileList
}
...
...
@@ -249,7 +249,7 @@ class PicturesWall extends React.Component<PicturesWallType> {
key=
{
i
}
onClick=
{
()
=>
this
.
handleImgSelected
(
item
)
}
>
<
img
src=
{
item
}
alt=
"
趣谈前端-h5-dooring
"
/>
<
img
src=
{
item
}
alt=
"
熊猫运维中台系统
"
/>
<
span
className=
{
styles
.
iconBtn
}
>
<
CheckCircleFilled
/>
</
span
>
...
...
@@ -261,7 +261,7 @@ class PicturesWall extends React.Component<PicturesWallType> {
);
})
}
<
TabPane
tab=
"更多"
key=
"more"
>
<
Result
status=
"500"
title=
"
Dooring
温馨提示"
subTitle=
"更多素材, 正在筹备中..."
/>
<
Result
status=
"500"
title=
"温馨提示"
subTitle=
"更多素材, 正在筹备中..."
/>
</
TabPane
>
</
Tabs
>
</
Modal
>
...
...
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