mirror of
https://github.com/cool-team-official/cool-admin-vue.git
synced 2025-12-17 09:12:51 +00:00
调整 service.space
This commit is contained in:
parent
b664518c62
commit
af6dde184e
@ -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]
|
||||||
})
|
})
|
||||||
|
|||||||
@ -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
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user