|
@@ -3,7 +3,7 @@ import { useUserStore } from '/src/store/modules/users';
|
|
|
import styles from './index.module.less';
|
|
|
import { state } from '/src/state';
|
|
|
import { NButton, NModal, NSpace, NSpin } from 'naive-ui';
|
|
|
-
|
|
|
+import { exitFullscreen } from '/src/utils';
|
|
|
export default defineComponent({
|
|
|
name: 'notation-a',
|
|
|
setup() {
|
|
@@ -47,8 +47,7 @@ export default defineComponent({
|
|
|
const handleOpen = (e: MessageEvent) => {
|
|
|
console.log(e.data, 'data');
|
|
|
if (e.data.api === 'notation_open') {
|
|
|
- if (window.matchMedia('(display-mode: standalone)').matches) {
|
|
|
- state.application = window.matchMedia('(display-mode: standalone)').matches
|
|
|
+ if (state.application) {
|
|
|
show.value = true;
|
|
|
previewModal.value = true;
|
|
|
previewParams.value = {
|
|
@@ -59,6 +58,7 @@ export default defineComponent({
|
|
|
window.open(e.data.url);
|
|
|
}
|
|
|
} else if (e.data.api === 'notation_exit') {
|
|
|
+ exitFullscreen()
|
|
|
removeVisiable.value = true;
|
|
|
}
|
|
|
};
|
|
@@ -108,8 +108,7 @@ export default defineComponent({
|
|
|
},
|
|
|
'*'
|
|
|
);
|
|
|
- if (window.matchMedia('(display-mode: standalone)').matches) {
|
|
|
- state.application = window.matchMedia('(display-mode: standalone)').matches
|
|
|
+ if (state.application) {
|
|
|
fscreen()
|
|
|
}}}>
|
|
|
确定
|