diff --git a/packages/components/src/components.ts b/packages/components/src/components.ts index c89e95a1d..08e97c4a5 100644 --- a/packages/components/src/components.ts +++ b/packages/components/src/components.ts @@ -21,3 +21,4 @@ export * from "./components/empty"; export * from "./components/status"; export * from "./components/entity"; export * from "./components/toast"; +export * from "./components/loading"; diff --git a/packages/components/src/components/loading/Loading.vue b/packages/components/src/components/loading/Loading.vue new file mode 100644 index 000000000..16c047277 --- /dev/null +++ b/packages/components/src/components/loading/Loading.vue @@ -0,0 +1,26 @@ + + + diff --git a/packages/components/src/components/loading/index.ts b/packages/components/src/components/loading/index.ts new file mode 100644 index 000000000..105353d1c --- /dev/null +++ b/packages/components/src/components/loading/index.ts @@ -0,0 +1 @@ +export { default as VLoading } from "./Loading.vue"; diff --git a/src/modules/contents/attachments/AttachmentList.vue b/src/modules/contents/attachments/AttachmentList.vue index 9b2ad34d2..05a047a39 100644 --- a/src/modules/contents/attachments/AttachmentList.vue +++ b/src/modules/contents/attachments/AttachmentList.vue @@ -19,6 +19,7 @@ import { VStatusDot, VEntity, VEntityField, + VLoading, } from "@halo-dev/components"; import LazyImage from "@/components/image/LazyImage.vue"; import UserDropdownSelector from "@/components/dropdown-selector/UserDropdownSelector.vue"; @@ -563,30 +564,33 @@ onMounted(() => { /> - - - + + + + + + +
-
+
{
-
- - + - - - - + + + + + + + +
    +
  • + + + +
  • +
+
- - - - + - - + + + + - - - + -
    -
  • - - - - - - -
    -
      -
    • - - - - - -
    • -
    + + + + + + -
    - -
    +
    + +
      +
    • + + + + + +
    • +
    +
    + + +
    + +
    +
    diff --git a/src/modules/interface/menus/Menus.vue b/src/modules/interface/menus/Menus.vue index e65e9a75a..5a6abb0c2 100644 --- a/src/modules/interface/menus/Menus.vue +++ b/src/modules/interface/menus/Menus.vue @@ -8,6 +8,7 @@ import { VEmpty, VPageHeader, VSpace, + VLoading, } from "@halo-dev/components"; import MenuItemEditingModal from "./components/MenuItemEditingModal.vue"; import MenuItemListItem from "./components/MenuItemListItem.vue"; @@ -220,35 +221,38 @@ const handleDelete = async (menuItem: MenuTreeItem) => { - - - - + + + + + + + + + diff --git a/src/modules/interface/menus/components/MenuList.vue b/src/modules/interface/menus/components/MenuList.vue index dacd6e35f..674d76a11 100644 --- a/src/modules/interface/menus/components/MenuList.vue +++ b/src/modules/interface/menus/components/MenuList.vue @@ -9,6 +9,7 @@ import { VEntity, VEntityField, VTag, + VLoading, } from "@halo-dev/components"; import MenuEditingModal from "./MenuEditingModal.vue"; import { onMounted, onUnmounted, ref } from "vue"; @@ -190,75 +191,76 @@ onMounted(handleFetchPrimaryMenuName); @created="handleSelect" /> - - - -
      -
    • - + + + + + + +
        +
      • - - - + + - -
      • -
      + + 设置为主菜单 + + + 修改 + + + 删除 + + +
      +
    • +
    + +
    +
  • +
+ - - - - -
    -
  • - - + + +
  • +
+
diff --git a/src/modules/interface/themes/layouts/ThemeLayout.vue b/src/modules/interface/themes/layouts/ThemeLayout.vue index f33ce73a6..6778cf84f 100644 --- a/src/modules/interface/themes/layouts/ThemeLayout.vue +++ b/src/modules/interface/themes/layouts/ThemeLayout.vue @@ -24,6 +24,7 @@ import { VPageHeader, VSpace, VTabbar, + VLoading, } from "@halo-dev/components"; import ThemeListModal from "../components/ThemeListModal.vue"; import ThemePreviewModal from "../components/preview/ThemePreviewModal.vue"; @@ -224,15 +225,13 @@ onMounted(() => { > -
+
diff --git a/src/modules/system/plugins/PluginDetail.vue b/src/modules/system/plugins/PluginDetail.vue index 6846281f9..c8799c6ff 100644 --- a/src/modules/system/plugins/PluginDetail.vue +++ b/src/modules/system/plugins/PluginDetail.vue @@ -59,166 +59,175 @@ watchEffect(() => { diff --git a/src/modules/system/plugins/PluginList.vue b/src/modules/system/plugins/PluginList.vue index 9ed04ebbf..58844074a 100644 --- a/src/modules/system/plugins/PluginList.vue +++ b/src/modules/system/plugins/PluginList.vue @@ -10,6 +10,7 @@ import { VPageHeader, VPagination, VSpace, + VLoading, } from "@halo-dev/components"; import PluginListItem from "./components/PluginListItem.vue"; import PluginUploadModal from "./components/PluginUploadModal.vue"; @@ -310,37 +311,41 @@ function handleClearFilters() {
- - - + -
    -
  • - -
  • -
+ + + + + + + +
    +
  • + +
  • +
+
-
+
diff --git a/src/modules/system/roles/RoleList.vue b/src/modules/system/roles/RoleList.vue index 1c0c2000b..134c0526d 100644 --- a/src/modules/system/roles/RoleList.vue +++ b/src/modules/system/roles/RoleList.vue @@ -12,12 +12,12 @@ import { VButton, VCard, VPageHeader, - VPagination, VSpace, VTag, VStatusDot, VEntity, VEntityField, + VLoading, } from "@halo-dev/components"; import RoleEditingModal from "./components/RoleEditingModal.vue"; @@ -39,7 +39,7 @@ const { currentUserHasPermission } = usePermission(); const editingModal = ref(false); const selectedRole = ref(); -const { roles, handleFetchRoles } = useFetchRole(); +const { roles, handleFetchRoles, loading } = useFetchRole(); let fuse: Fuse | undefined = undefined; @@ -228,16 +228,21 @@ const handleDelete = async (role: Role) => {
-
    -
  • - - + +
  • +
+
diff --git a/src/modules/system/settings/SystemSetting.vue b/src/modules/system/settings/SystemSetting.vue index 29ef7a68e..5220c3acc 100644 --- a/src/modules/system/settings/SystemSetting.vue +++ b/src/modules/system/settings/SystemSetting.vue @@ -33,31 +33,36 @@ await handleFetchSettings(); await handleFetchConfigMap(); diff --git a/src/modules/system/settings/layouts/SystemSettingsLayout.vue b/src/modules/system/settings/layouts/SystemSettingsLayout.vue index 35f23b373..479cc4102 100644 --- a/src/modules/system/settings/layouts/SystemSettingsLayout.vue +++ b/src/modules/system/settings/layouts/SystemSettingsLayout.vue @@ -14,6 +14,7 @@ import { VPageHeader, VTabbar, IconSettings, + VLoading, } from "@halo-dev/components"; import type { SettingForm } from "@halo-dev/api-client"; @@ -109,15 +110,13 @@ watch([() => route.name, () => route.params], async () => { > -
+
diff --git a/src/modules/system/users/UserList.vue b/src/modules/system/users/UserList.vue index 7dfee77b0..783ad6b99 100644 --- a/src/modules/system/users/UserList.vue +++ b/src/modules/system/users/UserList.vue @@ -15,6 +15,7 @@ import { VEntityField, Dialog, VStatusDot, + VLoading, } from "@halo-dev/components"; import UserEditingModal from "./components/UserEditingModal.vue"; import UserPasswordChangeModal from "./components/UserPasswordChangeModal.vue"; @@ -47,6 +48,7 @@ const users = ref({ hasPrevious: false, totalPages: 0, }); +const loading = ref(false); const selectedUserNames = ref([]); const selectedUser = ref(); @@ -56,6 +58,8 @@ let fuse: Fuse | undefined = undefined; const handleFetchUsers = async () => { try { + loading.value = true; + const { data } = await apiClient.extension.user.listv1alpha1User({ page: users.value.page, size: users.value.size, @@ -70,6 +74,7 @@ const handleFetchUsers = async () => { console.error("Failed to fetch users", e); } finally { selectedUser.value = undefined; + loading.value = false; } }; @@ -385,111 +390,117 @@ onMounted(() => {
-
    -
  • - - - - - + +
  • +
+