Files
cashier_desktop/src/views/webview/index.vue
2024-07-05 18:08:21 +08:00

61 lines
1.2 KiB
Vue

<template>
<div class="device_container">
<div class="header" @click="router.back()">
<el-icon style="position: relative; top: 2px; margin-right: 4px" size="22">
<ArrowLeft />
</el-icon>
<el-text>{{ info.title }}</el-text>
</div>
<div class="d_content">
<iframe class="iframe" seamless :src="info.url"></iframe>
</div>
</div>
</template>
<script setup>
import { onMounted, reactive, ref } from 'vue';
import { useRoute, useRouter } from 'vue-router'
const route = useRoute()
const router = useRouter()
const info = ref({
title: '',
url: ''
})
onMounted(() => {
console.log('iframe===', route);
info.value = route.query
})
</script>
<style scoped lang="scss">
.device_container {
width: 100vw;
height: 100vh;
padding: 15px;
background-color: #f1f1f1;
}
.header {
height: 50px;
background-color: #fff;
border-radius: 10px;
display: flex;
align-items: center;
padding: 0 10px;
}
.d_content {
padding-top: 15px;
display: flex;
height: calc(100vh - 15px * 2 - 50px);
.iframe {
width: 100%;
height: 100%;
border: none;
border-radius: 10px;
}
}
</style>