Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
有来技术
vue3-element-admin
提交
425841ad
V
vue3-element-admin
项目概览
有来技术
/
vue3-element-admin
通知
4
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vue3-element-admin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
425841ad
编写于
5月 04, 2024
作者:
H
hxr
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix:
🐛
修复因接口调整而影响的调用页面的问题
上级
088bc5e4
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
13 addition
and
14 deletion
+13
-14
src/components/Upload/MultiUpload.vue
src/components/Upload/MultiUpload.vue
+3
-3
src/components/Upload/SingleUpload.vue
src/components/Upload/SingleUpload.vue
+2
-2
src/components/WangEditor/index.vue
src/components/WangEditor/index.vue
+3
-4
src/views/demo/curd/index.vue
src/views/demo/curd/index.vue
+2
-2
src/views/demo/signature.vue
src/views/demo/signature.vue
+2
-2
src/views/system/dept/index.vue
src/views/system/dept/index.vue
+1
-1
未找到文件。
src/components/Upload/MultiUpload.vue
浏览文件 @
425841ad
...
...
@@ -78,7 +78,7 @@ watch(
*/
async
function
handleUpload
(
options
:
UploadRequestOptions
):
Promise
<
any
>
{
// 上传API调用
const
{
data
:
fileInfo
}
=
await
FileAPI
.
upload
(
options
.
file
);
const
data
=
await
FileAPI
.
upload
(
options
.
file
);
// 上传成功需手动替换文件路径为远程URL,否则图片地址为预览地址 blob:http://
const
fileIndex
=
fileList
.
value
.
findIndex
(
...
...
@@ -86,8 +86,8 @@ async function handleUpload(options: UploadRequestOptions): Promise<any> {
);
fileList
.
value
.
splice
(
fileIndex
,
1
,
{
name
:
fileInfo
.
name
,
url
:
fileInfo
.
url
,
name
:
data
.
name
,
url
:
data
.
url
,
}
as
UploadUserFile
);
emit
(
...
...
src/components/Upload/SingleUpload.vue
浏览文件 @
425841ad
...
...
@@ -33,8 +33,8 @@ const imgUrl = useVModel(props, "modelValue", emit);
* @param options
*/
async
function
uploadFile
(
options
:
UploadRequestOptions
):
Promise
<
any
>
{
const
{
data
:
fileInfo
}
=
await
FileAPI
.
update
(
options
.
file
);
imgUrl
.
value
=
fileInfo
.
url
;
const
data
=
await
FileAPI
.
upload
(
options
.
file
);
imgUrl
.
value
=
data
.
url
;
}
/**
...
...
src/components/WangEditor/index.vue
浏览文件 @
425841ad
...
...
@@ -23,7 +23,7 @@
import
{
Editor
,
Toolbar
}
from
"
@wangeditor/editor-for-vue
"
;
// API 引用
import
{
uploadFileApi
}
from
"
@/api/file
"
;
import
FileAPI
from
"
@/api/file
"
;
const
props
=
defineProps
({
modelValue
:
{
...
...
@@ -46,9 +46,8 @@ const editorConfig = ref({
uploadImage
:
{
// 自定义图片上传
async
customUpload
(
file
:
any
,
insertFn
:
any
)
{
uploadFileApi
(
file
).
then
((
response
)
=>
{
const
url
=
response
.
data
.
url
;
insertFn
(
url
);
FileAPI
.
upload
(
file
).
then
((
data
)
=>
{
insertFn
(
data
.
url
);
});
},
},
...
...
src/views/demo/curd/index.vue
浏览文件 @
425841ad
...
...
@@ -65,8 +65,8 @@ const {
// 编辑
async
function
handleEditClick
(
row
:
IObject
)
{
// 根据id获取数据进行填充
const
response
=
await
UserAPI
.
getFormData
(
row
.
id
);
editModalRef
.
value
?.
setModalVisible
(
response
.
data
);
const
data
=
await
UserAPI
.
getFormData
(
row
.
id
);
editModalRef
.
value
?.
setModalVisible
(
data
);
}
// 其他工具栏
function
handleToolbarClick
(
name
:
string
)
{
...
...
src/views/demo/signature.vue
浏览文件 @
425841ad
<
script
setup
lang=
"ts"
>
import
{
uploadFileApi
}
from
"
@/api/file
"
;
import
FileAPI
from
"
@/api/file
"
;
const
imgUrl
=
ref
(
""
);
const
canvas
=
ref
();
...
...
@@ -68,7 +68,7 @@ const handleToFile = async () => {
const
file
=
dataURLtoFile
(
canvas
.
value
.
toDataURL
(),
"
签名.png
"
);
if
(
!
file
)
return
;
const
{
data
}
=
await
uploadFileApi
(
file
);
const
data
=
await
FileAPI
.
upload
(
file
);
handleClearSign
();
imgUrl
.
value
=
data
.
url
;
};
...
...
src/views/system/dept/index.vue
浏览文件 @
425841ad
...
...
@@ -254,7 +254,7 @@ function handleSubmit() {
})
.
finally
(()
=>
(
loading
.
value
=
false
));
}
else
{
DeptAPI
.
update
(
formData
)
DeptAPI
.
add
(
formData
)
.
then
(()
=>
{
ElMessage
.
success
(
"
新增成功
"
);
closeDialog
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录