|
@@ -1,11 +1,12 @@
|
|
|
import { Icon3D } from "@/assets/icons";
|
|
|
import { useEditor } from "@/modules/editor";
|
|
|
import { css } from "@linaria/core";
|
|
|
-import { queenApi } from "queenjs";
|
|
|
+import { queenApi, useModal } from "queenjs";
|
|
|
import { defineComponent } from "vue";
|
|
|
import { string } from "vue-types";
|
|
|
import { useCompData } from ".";
|
|
|
import { View } from "../View";
|
|
|
+import { IconClose } from "@queenjs/icons";
|
|
|
|
|
|
export const Component = defineComponent({
|
|
|
props: {
|
|
@@ -22,10 +23,7 @@ export const Component = defineComponent({
|
|
|
}
|
|
|
|
|
|
function openWeb3D() {
|
|
|
- queenApi.dialog(
|
|
|
- <iframe class="w-full h-full border-none" src={value.url} />,
|
|
|
- { fullscreen: true }
|
|
|
- );
|
|
|
+ queenApi.dialog(<Iframe3D url={value.url} />, { fullscreen: true, closable: false });
|
|
|
}
|
|
|
|
|
|
return () => {
|
|
@@ -49,6 +47,21 @@ export const Component = defineComponent({
|
|
|
},
|
|
|
});
|
|
|
|
|
|
+const Iframe3D = defineComponent({
|
|
|
+ props: {
|
|
|
+ url: string().isRequired,
|
|
|
+ },
|
|
|
+ setup(props) {
|
|
|
+ const modal = useModal();
|
|
|
+ return () => (
|
|
|
+ <div class="w-full h-full overflow-hidden relative">
|
|
|
+ <IconClose class={closeCls} onClick={() => modal.cancel()} />
|
|
|
+ <iframe class="w-full h-full border-none" src={props.url} />
|
|
|
+ </div>
|
|
|
+ );
|
|
|
+ },
|
|
|
+});
|
|
|
+
|
|
|
const iconCls = css`
|
|
|
position: absolute;
|
|
|
top: 50%;
|
|
@@ -59,3 +72,15 @@ const iconCls = css`
|
|
|
border-radius: 50%;
|
|
|
background-color: rgba(255, 255, 255, 0.7);
|
|
|
`;
|
|
|
+
|
|
|
+const closeCls = css`
|
|
|
+ position: absolute;
|
|
|
+ top: 0.3rem;
|
|
|
+ left: 0.3rem;
|
|
|
+ font-size: 0.3rem;
|
|
|
+ color: #666;
|
|
|
+ padding: 0.2rem;
|
|
|
+ border-radius: 50%;
|
|
|
+ background-color: #fff;
|
|
|
+ @apply shadow;
|
|
|
+`;
|