import { css, cx } from "@linaria/core"; import { Image, View } from "@queenjs/ui"; import { Checkbox, Radio, RadioChangeEvent, Tag } from "ant-design-vue"; import { defineUI, queenApi } from "queenjs"; import { reactive } from "vue"; import { any, bool, string } from "vue-types"; import PreviewMaterialModal from "../../components/PreviewMaterialModal"; const options = [ { label: "1倍", value: 1 }, { label: "2倍", value: 2 }, ]; export default defineUI({ props: { type: string<"image" | "video">().def("image"), active: bool(), record: any(), }, emits: ["select", "change"], setup(props, { emit }) { const state = reactive({ qos: 1, }); const change = (e: RadioChangeEvent) => { state.qos = e.target.value; emit("change", state.qos); }; const showModal = () => { const { record, type } = props; const isVideo = type == "video"; queenApi.dialog( , { title: "预览渲染模板", width: "1000px", } ); }; return () => { const { active, record, type } = props; const isVideo = type == "video"; return (
emit("select")} class={cx( itemStyles, "relative overflow-hidden group", active && "active" )} > {isVideo && ( 视频 )} {active && ( )} {!isVideo ? ( ) : (
尺寸:{record.width} * {record.height}
渲染分辨率:
); }; }, }); const itemStyles = css` border: 1px solid transparent; &.active { border-color: @inf-primary-color; } `;