|
@@ -1,9 +1,8 @@
|
|
|
import { css, cx } from "@linaria/core";
|
|
|
import { IconDelete } from "@queenjs/icons";
|
|
|
import { Image, View } from "@queenjs/ui";
|
|
|
-import { Checkbox } from "ant-design-vue";
|
|
|
import { defineUI } from "queenjs";
|
|
|
-import { any, bool, string } from "vue-types";
|
|
|
+import { any, string } from "vue-types";
|
|
|
|
|
|
const renderStatus = {
|
|
|
succ: "",
|
|
@@ -13,18 +12,17 @@ const renderStatus = {
|
|
|
|
|
|
export default defineUI({
|
|
|
props: {
|
|
|
- active: bool().def(false),
|
|
|
record: any(),
|
|
|
use: string<"show" | "select" | "task">(),
|
|
|
},
|
|
|
- emits: ["delete", "select", "download", "use", "preview"],
|
|
|
+ emits: ["delete", "download", "use", "preview"],
|
|
|
setup(props, { emit }) {
|
|
|
return () => {
|
|
|
- const { active, record, use } = props;
|
|
|
+ const { record, use } = props;
|
|
|
// console.error("record: ", record);
|
|
|
|
|
|
return (
|
|
|
- <div class={cx(itemStyles, "relative", active && "active")}>
|
|
|
+ <div class={cx(itemStyles, "relative")}>
|
|
|
<View ratio={1.4} class="overflow-hidden">
|
|
|
{record.fileType == "video" ? (
|
|
|
<video src={record.file?.url} class="h-1/1 w-1/1" />
|
|
@@ -36,22 +34,14 @@ export default defineUI({
|
|
|
}
|
|
|
/>
|
|
|
)}
|
|
|
- {active && (
|
|
|
- <Checkbox
|
|
|
- checked
|
|
|
- class="!-mt-0.2em absolute top-0 left-0 text-20px text-red-200 z-3"
|
|
|
- />
|
|
|
- )}
|
|
|
+
|
|
|
{use == "task" && record.status !== "succ" && (
|
|
|
<div class="waiting absolute inset-0 z-2 flex items-center justify-center text-white">
|
|
|
{(renderStatus as any)[record.status || "default"]}
|
|
|
</div>
|
|
|
)}
|
|
|
{use !== "task" && (
|
|
|
- <div
|
|
|
- class="absolute inset-0 flex items-center justify-center z-2 opacity-0 hover:opacity-100 transition-all text-white"
|
|
|
- onClick={() => emit("select")}
|
|
|
- >
|
|
|
+ <div class="absolute inset-0 flex items-center justify-center z-2 opacity-0 hover:opacity-100 transition-all text-white">
|
|
|
{use == "show" && (
|
|
|
<IconDelete
|
|
|
class="icon_del absolute right-5px top-5px p-3px rounded-2px text-14px cursor-pointer"
|
|
@@ -98,10 +88,6 @@ export default defineUI({
|
|
|
});
|
|
|
|
|
|
const itemStyles = css`
|
|
|
- border: 1px solid transparent;
|
|
|
- &.active {
|
|
|
- border-color: @inf-primary-color;
|
|
|
- }
|
|
|
.orange {
|
|
|
background-color: rgba(232, 139, 0, 0.5);
|
|
|
&:hover {
|