浏览代码

fresh data

qinyan 1 年之前
父节点
当前提交
833a20e122
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      src/modules/editor/components/Viewport/Slider/SliderLeft/Sources/List.tsx

+ 3 - 3
src/modules/editor/components/Viewport/Slider/SliderLeft/Sources/List.tsx

@@ -77,7 +77,7 @@ export const Sources = defineComponent({
                 type="primary"
                 onClick={async () => {
                   await resource.actions.createMaterial();
-                  control.fresh();
+                  control.loadPage(1);
                 }}
               >
                 上传素材
@@ -115,13 +115,13 @@ export const Sources = defineComponent({
                       console.log(name);
                       if (name == "delete") {
                         await resource.actions.deleteMaterial(item);
-                        control.fresh();
+                        control.loadPage(1);
                         queenApi.messageSuccess("删除成功!");
                         return;
                       }
                       if (name == "edit") {
                         await resource.actions.editSource(item, sourceType);
-                        control.fresh();
+                        control.loadPage(1);
                         return;
                       }
                       if (name == "publish" || name == "unpublish") {