+
+
-
+
{{ title }}
@@ -42,13 +36,35 @@ const emit = defineEmits<{
-
+
{{ description }}
+
+
diff --git a/packages/components/src/components/entity/__tests__/Entity.spec.ts b/packages/components/src/components/entity/__tests__/Entity.spec.ts
new file mode 100644
index 00000000..c277fab1
--- /dev/null
+++ b/packages/components/src/components/entity/__tests__/Entity.spec.ts
@@ -0,0 +1,9 @@
+import { mount } from "@vue/test-utils";
+import { describe, expect, it } from "vitest";
+import { VEntity } from "..";
+
+describe("Entity", () => {
+ it("should render", () => {
+ expect(mount(VEntity)).toBeDefined();
+ });
+});
diff --git a/packages/components/src/components/entity/__tests__/EntityField.spec.ts b/packages/components/src/components/entity/__tests__/EntityField.spec.ts
new file mode 100644
index 00000000..05a4be67
--- /dev/null
+++ b/packages/components/src/components/entity/__tests__/EntityField.spec.ts
@@ -0,0 +1,9 @@
+import { mount } from "@vue/test-utils";
+import { describe, expect, it } from "vitest";
+import { VEntityField } from "..";
+
+describe("EntityField", () => {
+ it("should render", () => {
+ expect(mount(VEntityField)).toBeDefined();
+ });
+});
diff --git a/packages/components/src/components/entity/index.ts b/packages/components/src/components/entity/index.ts
new file mode 100644
index 00000000..945f6ca0
--- /dev/null
+++ b/packages/components/src/components/entity/index.ts
@@ -0,0 +1,2 @@
+export { default as VEntity } from "./Entity.vue";
+export { default as VEntityField } from "./EntityField.vue";
diff --git a/src/components/entity/Entity.vue b/src/components/entity/Entity.vue
deleted file mode 100644
index 483d54f6..00000000
--- a/src/components/entity/Entity.vue
+++ /dev/null
@@ -1,55 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/modules/contents/attachments/AttachmentList.vue b/src/modules/contents/attachments/AttachmentList.vue
index cc24d754..27b84acf 100644
--- a/src/modules/contents/attachments/AttachmentList.vue
+++ b/src/modules/contents/attachments/AttachmentList.vue
@@ -17,6 +17,8 @@ import {
IconCloseCircle,
IconFolder,
VStatusDot,
+ VEntity,
+ VEntityField,
} from "@halo-dev/components";
import LazyImage from "@/components/image/LazyImage.vue";
import UserDropdownSelector from "@/components/dropdown-selector/UserDropdownSelector.vue";
@@ -36,8 +38,6 @@ import cloneDeep from "lodash.clonedeep";
import { isImage } from "@/utils/image";
import { useRouteQuery } from "@vueuse/router";
import { useFetchAttachmentGroup } from "./composables/use-attachment-group";
-import Entity from "@/components/entity/Entity.vue";
-import EntityField from "@/components/entity/EntityField.vue";
const policyVisible = ref(false);
const uploadVisible = ref(false);
@@ -557,7 +557,7 @@ onMounted(() => {
role="list"
>
-
+
{
/>
-
+
{
/>
-
-
+
@@ -595,15 +595,15 @@ onMounted(() => {
-
+
-
-
+
+
+
{
animate
/>
-
-
+
-
+
删除
-
+
diff --git a/src/modules/contents/pages/FunctionalPageList.vue b/src/modules/contents/pages/FunctionalPageList.vue
index 7fe9bfc4..75edd1d0 100644
--- a/src/modules/contents/pages/FunctionalPageList.vue
+++ b/src/modules/contents/pages/FunctionalPageList.vue
@@ -1,10 +1,15 @@
-
+
-
+
-
-
+
+
-
-
+
+
-
-
-
+
+
-
+
-
+
-
+
卸载
-
+
diff --git a/src/modules/system/roles/RoleList.vue b/src/modules/system/roles/RoleList.vue
index a42b5a7b..a03e1545 100644
--- a/src/modules/system/roles/RoleList.vue
+++ b/src/modules/system/roles/RoleList.vue
@@ -16,10 +16,10 @@ import {
VSpace,
VTag,
VStatusDot,
+ VEntity,
+ VEntityField,
} from "@halo-dev/components";
import RoleEditingModal from "./components/RoleEditingModal.vue";
-import Entity from "@/components/entity/Entity.vue";
-import EntityField from "@/components/entity/EntityField.vue";
// constants
import { rbacAnnotations } from "@/constants/annotations";
@@ -201,9 +201,9 @@ const handleDelete = async (role: Role) => {
-
-
+
-
+ >
-
+
-
-
-
+
+
+
系统保留
-
-
+
-
+
{
基于此角色创建
-
+
diff --git a/src/modules/system/users/UserList.vue b/src/modules/system/users/UserList.vue
index 69a849e5..5069700d 100644
--- a/src/modules/system/users/UserList.vue
+++ b/src/modules/system/users/UserList.vue
@@ -11,6 +11,8 @@ import {
VSpace,
VTag,
VAvatar,
+ VEntity,
+ VEntityField,
} from "@halo-dev/components";
import UserEditingModal from "./components/UserEditingModal.vue";
import UserPasswordChangeModal from "./components/UserPasswordChangeModal.vue";
@@ -20,8 +22,6 @@ import type { User, UserList } from "@halo-dev/api-client";
import { rbacAnnotations } from "@/constants/annotations";
import { formatDatetime } from "@/utils/date";
import { useRouteQuery } from "@vueuse/router";
-import Entity from "@/components/entity/Entity.vue";
-import EntityField from "@/components/entity/EntityField.vue";
const checkAll = ref(false);
const editingModal = ref
(false);
@@ -276,7 +276,7 @@ onMounted(() => {