import { defineComponent, toRefs, ref, PropType, reactive } from 'vue'; import styles from './pen.module.less'; import { ToolType } from '../../index'; import { NButton, NModal, NSpace } from 'naive-ui'; export default defineComponent({ name: 'pen-page', props: { show: { type: Boolean, default: false }, type: { type: String as PropType, default: 'pen' }, close: { type: Function, default: () => ({}) }, callStudents: { type: Array, default: () => [] } }, setup(props) { const { show, type } = toRefs(props); // const modelAttendStatus = ref(false); const modal = reactive({ status: false, title: type.value === 'pen' ? '退出批注' : '退出白板', content: type.value === 'pen' ? '确认是否退出批注?' : '确认是否退出白板?' }); const firstRender = ref(true); const origin = /(localhost|192)/.test(location.host) ? // ? 'https://test.lexiaoya.cn/' 'http://localhost:5002/' : location.origin; let src = `${origin}/classroom-whiteboard?t=${+new Date()}`; if (props.type === 'call') { src = `${origin}/roll-call/index.html?t=${+new Date()}`; } return () => (
{props.type !== 'call' && (
(modal.status = true)}>
)} {/* 布置作业 */}

{modal.content}

{/*
{data.modalAttendMessage}
*/} { modal.status = false; }}> 取消 { // data.modelTrainStatus = true; modal.status = false; props.close(); }}> 确认
); } });