Commit 46a07fd2 by licheng

feat: 独立窗口弹窗

parent fa79ae06
......@@ -51,6 +51,15 @@ const remainingRouter: AppRouteRecordRaw[] = [
}
},
{
path: '/chart',
component: () => import('@/views/Home/Index2.vue'),
name: 'chart',
meta: {
hidden: true,
title: t('独立窗口'),
}
},
{
path: '/',
component: Layout,
redirect: '/index',
......
<template>
<div>
index
<el-button type="primary">Primary Button</el-button>
<el-button type="primary" @click="openNewWin">Open New Window</el-button>
</div>
</template>
<script setup lang="ts">
const openNewWin = function () {
window.open(
'http://localhost/chart',
'单独窗口',
'height=700,width=1200,top=100,left=200'
)
}
</script>
<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