mirror of
https://github.com/cool-team-official/cool-admin-vue.git
synced 2024-11-01 06:02:38 +08:00
调整 service.space
This commit is contained in:
parent
b664518c62
commit
af6dde184e
@ -81,7 +81,7 @@ export default defineComponent({
|
||||
|
||||
// 刷新分类
|
||||
function refresh() {
|
||||
return service.upload.type.list().then((res: any) => {
|
||||
return service.space.type.list().then((res: any) => {
|
||||
res.unshift({
|
||||
name: "全部文件",
|
||||
id: null
|
||||
@ -124,9 +124,9 @@ export default defineComponent({
|
||||
let next = null;
|
||||
|
||||
if (!item.id) {
|
||||
next = service.upload.type.add(data);
|
||||
next = service.space.type.add(data);
|
||||
} else {
|
||||
next = service.upload.type.update({
|
||||
next = service.space.type.update({
|
||||
...data,
|
||||
id: item.id
|
||||
});
|
||||
@ -164,7 +164,7 @@ export default defineComponent({
|
||||
list: [
|
||||
{
|
||||
label: "刷新",
|
||||
"suffix-icon": "el-icon-edit",
|
||||
"suffix-icon": "el-icon-refresh",
|
||||
callback: (_: any, done: Function) => {
|
||||
refresh();
|
||||
done();
|
||||
@ -190,7 +190,7 @@ export default defineComponent({
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
service.upload.type
|
||||
service.space.type
|
||||
.delete({
|
||||
ids: [id]
|
||||
})
|
||||
|
@ -266,7 +266,7 @@ export default defineComponent({
|
||||
if (item) {
|
||||
item.url = res.data;
|
||||
|
||||
service.upload.info
|
||||
service.space.info
|
||||
.add({
|
||||
url: res.data,
|
||||
type: item.type,
|
||||
@ -321,7 +321,7 @@ export default defineComponent({
|
||||
// 加载中
|
||||
loading.value = true;
|
||||
|
||||
await service.upload.info
|
||||
await service.space.info
|
||||
.page({
|
||||
...pagination,
|
||||
...params,
|
||||
@ -386,7 +386,7 @@ export default defineComponent({
|
||||
});
|
||||
|
||||
// 删除请求
|
||||
service.upload.info
|
||||
service.space.info
|
||||
.delete({
|
||||
ids
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user