调整 service.space

This commit is contained in:
mkppo 2021-12-07 10:08:50 +08:00
parent b664518c62
commit af6dde184e
2 changed files with 8 additions and 8 deletions

View File

@ -81,7 +81,7 @@ export default defineComponent({
// //
function refresh() { function refresh() {
return service.upload.type.list().then((res: any) => { return service.space.type.list().then((res: any) => {
res.unshift({ res.unshift({
name: "全部文件", name: "全部文件",
id: null id: null
@ -124,9 +124,9 @@ export default defineComponent({
let next = null; let next = null;
if (!item.id) { if (!item.id) {
next = service.upload.type.add(data); next = service.space.type.add(data);
} else { } else {
next = service.upload.type.update({ next = service.space.type.update({
...data, ...data,
id: item.id id: item.id
}); });
@ -164,7 +164,7 @@ export default defineComponent({
list: [ list: [
{ {
label: "刷新", label: "刷新",
"suffix-icon": "el-icon-edit", "suffix-icon": "el-icon-refresh",
callback: (_: any, done: Function) => { callback: (_: any, done: Function) => {
refresh(); refresh();
done(); done();
@ -190,7 +190,7 @@ export default defineComponent({
} }
) )
.then(() => { .then(() => {
service.upload.type service.space.type
.delete({ .delete({
ids: [id] ids: [id]
}) })

View File

@ -266,7 +266,7 @@ export default defineComponent({
if (item) { if (item) {
item.url = res.data; item.url = res.data;
service.upload.info service.space.info
.add({ .add({
url: res.data, url: res.data,
type: item.type, type: item.type,
@ -321,7 +321,7 @@ export default defineComponent({
// //
loading.value = true; loading.value = true;
await service.upload.info await service.space.info
.page({ .page({
...pagination, ...pagination,
...params, ...params,
@ -386,7 +386,7 @@ export default defineComponent({
}); });
// //
service.upload.info service.space.info
.delete({ .delete({
ids ids
}) })