Commit 46a07fd2 by licheng

feat: 独立窗口弹窗

parent fa79ae06
...@@ -51,6 +51,15 @@ const remainingRouter: AppRouteRecordRaw[] = [ ...@@ -51,6 +51,15 @@ const remainingRouter: AppRouteRecordRaw[] = [
} }
}, },
{ {
path: '/chart',
component: () => import('@/views/Home/Index2.vue'),
name: 'chart',
meta: {
hidden: true,
title: t('独立窗口'),
}
},
{
path: '/', path: '/',
component: Layout, component: Layout,
redirect: '/index', redirect: '/index',
......
<template> <template>
<div> <div>
index <el-button type="primary" @click="openNewWin">Open New Window</el-button>
<el-button type="primary">Primary Button</el-button>
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
const openNewWin = function () {
window.open(
'http://localhost/chart',
'单独窗口',
'height=700,width=1200,top=100,left=200'
)
}
</script> </script>
<style lang="scss" scoped></style> <style lang="scss" scoped></style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment