1234567891011121314151617181920212223242526272829303132333435 |
- import { markRaw, reactive } from "vue";
- import VR from "./vr.vue";
- import { Scene } from "../../platform-resource";
- type Props = {
- title: string;
- width: string;
- visiable: boolean;
- height?: string;
- content: any;
- submit: (info: Scene) => void;
- cancel: () => void;
- };
- export const props = reactive({
- title: "全景VR",
- width: "500px",
- }) as Props;
- export const selectScene = () =>
- new Promise<Scene>((resolve, reject) => {
- props.content = markRaw(VR);
- props.title = "全景VR";
- props.visiable = true;
- props.submit = (info) => {
- resolve(info);
- props.visiable = false;
- };
- props.cancel = () => {
- reject("cancel");
- props.visiable = false;
- };
- });
-
|