Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
admin-ci-test
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
test-ci
admin-ci-test
Commits
b2314956
提交
b2314956
authored
7月 04, 2023
作者:
龚洪江
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修复:富文本,商品自定义编辑
上级
6572b83c
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
14 行增加
和
13 行删除
+14
-13
request.ts
src/api/request.ts
+0
-1
index.tsx
...ponents/goods/commonAddOrEdit/addOrEditSkuModal/index.tsx
+1
-1
index.tsx
src/components/richText/index.tsx
+4
-9
index.tsx
...nage/industryNews/components/addOrEditNewsModal/index.tsx
+3
-0
index.scss
...anage/industryNews/components/previewNewsModal/index.scss
+4
-0
index.tsx
...Manage/industryNews/components/previewNewsModal/index.tsx
+1
-1
index.tsx
src/pages/resourceManage/tagManage/index.tsx
+1
-1
没有找到文件。
src/api/request.ts
浏览文件 @
b2314956
...
@@ -10,7 +10,6 @@ const { VITE_REQUEST_BASE_URL } = import.meta.env;
...
@@ -10,7 +10,6 @@ const { VITE_REQUEST_BASE_URL } = import.meta.env;
export
const
uploadImgURL
=
`
${
VITE_REQUEST_BASE_URL
}
/pms/upload/imgOsses`
;
export
const
uploadImgURL
=
`
${
VITE_REQUEST_BASE_URL
}
/pms/upload/imgOsses`
;
export
const
uploadVideoURL
=
`
${
VITE_REQUEST_BASE_URL
}
/ossservlet/upload/videoOss`
;
export
const
uploadVideoURL
=
`
${
VITE_REQUEST_BASE_URL
}
/ossservlet/upload/videoOss`
;
export
const
uploadFileURL
=
`
${
VITE_REQUEST_BASE_URL
}
/ossservlet/upload/oss`
;
export
const
uploadFileURL
=
`
${
VITE_REQUEST_BASE_URL
}
/ossservlet/upload/oss`
;
console
.
log
(
'数据-->'
,
VITE_REQUEST_BASE_URL
);
// 创建服务
// 创建服务
const
service
=
axios
.
create
({
const
service
=
axios
.
create
({
baseURL
:
VITE_REQUEST_BASE_URL
,
baseURL
:
VITE_REQUEST_BASE_URL
,
...
...
src/components/goods/commonAddOrEdit/addOrEditSkuModal/index.tsx
浏览文件 @
b2314956
...
@@ -380,7 +380,7 @@ const AddOrEditSkuModal: React.FC<ModalProps & selfProps> = ({
...
@@ -380,7 +380,7 @@ const AddOrEditSkuModal: React.FC<ModalProps & selfProps> = ({
specImage
:
i
.
specImage
,
specImage
:
i
.
specImage
,
productSpecCPQVO
:
i
.
productSpecCPQVO
,
productSpecCPQVO
:
i
.
productSpecCPQVO
,
fileList
:
i
.
fileList
,
fileList
:
i
.
fileList
,
id
:
i
.
id
,
id
:
i
.
productSpec
||
i
.
id
,
productSkuId
:
curtRowData
&&
curtRowData
.
skuId
,
productSkuId
:
curtRowData
&&
curtRowData
.
skuId
,
};
};
});
});
...
...
src/components/richText/index.tsx
浏览文件 @
b2314956
import
'@wangeditor/editor/dist/css/style.css'
;
// 引入 css
import
'@wangeditor/editor/dist/css/style.css'
;
// 引入 css
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Editor
,
Toolbar
}
from
'@wangeditor/editor-for-react'
;
import
{
Editor
,
Toolbar
}
from
'@wangeditor/editor-for-react'
;
import
{
IDomEditor
,
IEditorConfig
,
IToolbarConfig
,
InsertFnType
}
from
'@wangeditor/editor'
;
import
{
IDomEditor
,
IEditorConfig
,
IToolbarConfig
}
from
'@wangeditor/editor'
;
import
{
message
}
from
'antd'
;
import
{
message
}
from
'antd'
;
import
{
CommonAPI
}
from
'~/api'
;
import
{
CommonAPI
}
from
'~/api'
;
...
@@ -25,9 +25,6 @@ const RichText: React.FC<PropsType> = ({
...
@@ -25,9 +25,6 @@ const RichText: React.FC<PropsType> = ({
// editor 实例
// editor 实例
const
[
editor
,
setEditor
]
=
useState
<
IDomEditor
|
null
>
(
null
);
const
[
editor
,
setEditor
]
=
useState
<
IDomEditor
|
null
>
(
null
);
// 编辑器内容
const
[
html
,
setHtml
]
=
useState
<
string
>
(
''
);
// 工具栏配置
// 工具栏配置
const
toolbarConfig
:
Partial
<
IToolbarConfig
>
=
{};
const
toolbarConfig
:
Partial
<
IToolbarConfig
>
=
{};
...
@@ -38,7 +35,7 @@ const RichText: React.FC<PropsType> = ({
...
@@ -38,7 +35,7 @@ const RichText: React.FC<PropsType> = ({
MENU_CONF
:
{
MENU_CONF
:
{
uploadImage
:
{
uploadImage
:
{
// 自定义上传
// 自定义上传
async
customUpload
(
file
:
File
,
insertFn
:
InsertFnType
)
{
async
customUpload
(
file
:
File
,
insertFn
:
any
)
{
if
(
file
.
size
/
1024
/
1024
>
(
imgSize
||
5
))
{
if
(
file
.
size
/
1024
/
1024
>
(
imgSize
||
5
))
{
return
message
.
warning
(
`上传文件大小最大
${
imgSize
||
5
}
M`
);
return
message
.
warning
(
`上传文件大小最大
${
imgSize
||
5
}
M`
);
}
}
...
@@ -54,7 +51,7 @@ const RichText: React.FC<PropsType> = ({
...
@@ -54,7 +51,7 @@ const RichText: React.FC<PropsType> = ({
},
},
uploadVideo
:
{
uploadVideo
:
{
// 自定义上传
// 自定义上传
async
customUpload
(
file
:
File
,
insertFn
:
InsertFnType
)
{
async
customUpload
(
file
:
File
,
insertFn
:
any
)
{
if
(
file
.
size
/
1024
/
1024
>
(
videoSize
||
5
))
{
if
(
file
.
size
/
1024
/
1024
>
(
videoSize
||
5
))
{
return
message
.
warning
(
`上传文件大小最大
${
videoSize
||
5
}
M`
);
return
message
.
warning
(
`上传文件大小最大
${
videoSize
||
5
}
M`
);
}
}
...
@@ -72,7 +69,6 @@ const RichText: React.FC<PropsType> = ({
...
@@ -72,7 +69,6 @@ const RichText: React.FC<PropsType> = ({
};
};
//富文本修改
//富文本修改
const
richTextChange
=
(
editor
:
IDomEditor
)
=>
{
const
richTextChange
=
(
editor
:
IDomEditor
)
=>
{
setHtml
(
editor
.
getHtml
());
if
(
onChange
)
{
if
(
onChange
)
{
onChange
(
editor
.
getHtml
()
||
''
);
onChange
(
editor
.
getHtml
()
||
''
);
}
}
...
@@ -87,7 +83,7 @@ const RichText: React.FC<PropsType> = ({
...
@@ -87,7 +83,7 @@ const RichText: React.FC<PropsType> = ({
},
[
editor
]);
},
[
editor
]);
useEffect
(()
=>
{
useEffect
(()
=>
{
setHtml
(
value
||
''
);
editor
?.
setHtml
(
value
||
''
);
},
[
value
]);
},
[
value
]);
useEffect
(()
=>
{
useEffect
(()
=>
{
...
@@ -107,7 +103,6 @@ const RichText: React.FC<PropsType> = ({
...
@@ -107,7 +103,6 @@ const RichText: React.FC<PropsType> = ({
/>
/>
<
Editor
<
Editor
defaultConfig=
{
editorConfig
}
defaultConfig=
{
editorConfig
}
value=
{
html
}
onCreated=
{
setEditor
}
onCreated=
{
setEditor
}
onChange=
{
richTextChange
}
onChange=
{
richTextChange
}
mode=
'default'
mode=
'default'
...
...
src/pages/resourceManage/industryNews/components/addOrEditNewsModal/index.tsx
浏览文件 @
b2314956
...
@@ -58,6 +58,9 @@ const AddOrEditNewsModal: FC<ModalProps & selfProps> = ({
...
@@ -58,6 +58,9 @@ const AddOrEditNewsModal: FC<ModalProps & selfProps> = ({
}).
then
(({
code
})
=>
{
}).
then
(({
code
})
=>
{
if
(
code
===
'200'
)
{
if
(
code
===
'200'
)
{
message
.
success
(
currentIndustryNews
?
'编辑成功'
:
'新增成功'
);
message
.
success
(
currentIndustryNews
?
'编辑成功'
:
'新增成功'
);
form
.
resetFields
();
setSurfaceImgList
([]);
setRichTextValue
(
''
);
handleOk
();
handleOk
();
}
}
});
});
...
...
src/pages/resourceManage/industryNews/components/previewNewsModal/index.scss
浏览文件 @
b2314956
...
@@ -13,5 +13,9 @@
...
@@ -13,5 +13,9 @@
}
}
&
-content
{
&
-content
{
margin-top
:
10px
;
margin-top
:
10px
;
img
,
video
{
max-width
:
100%
;
height
:
auto
;
}
}
}
}
}
src/pages/resourceManage/industryNews/components/previewNewsModal/index.tsx
浏览文件 @
b2314956
...
@@ -25,7 +25,7 @@ const PreviewNewsModal: FC<ModalProps & selfProps> = ({ open, onCancel, currentI
...
@@ -25,7 +25,7 @@ const PreviewNewsModal: FC<ModalProps & selfProps> = ({ open, onCancel, currentI
});
});
};
};
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
currentIndustryNews
)
{
if
(
currentIndustryNews
&&
open
)
{
getIndustryNewsDetail
(
currentIndustryNews
.
id
);
getIndustryNewsDetail
(
currentIndustryNews
.
id
);
}
}
},
[
currentIndustryNews
]);
},
[
currentIndustryNews
]);
...
...
src/pages/resourceManage/tagManage/index.tsx
浏览文件 @
b2314956
...
@@ -42,7 +42,7 @@ const TagManage = () => {
...
@@ -42,7 +42,7 @@ const TagManage = () => {
),
),
},
},
];
];
const
[
tableData
,
setTableData
]
=
useState
<
any
>
([{
id
:
1
}]);
const
[
tableData
]
=
useState
<
any
>
([{
id
:
1
}]);
const
[
addOrEditTagModalShow
,
setAddOrEditTagModalShow
]
=
useState
<
boolean
>
(
false
);
const
[
addOrEditTagModalShow
,
setAddOrEditTagModalShow
]
=
useState
<
boolean
>
(
false
);
const
addOrEditTagClick
=
()
=>
{
const
addOrEditTagClick
=
()
=>
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论