如何vue3的项目中调用cordova框架中的物理按键返回按钮。UI框架是element plus。

  • Post author:
  • Post category:vue


//在vue3的路由中 监听手机返回按钮事件, 点两次才退出APP
import {
   createRouter,createWebHashHistory} from 'vue-router'
import {
    ElMessage } from 'element-plus'
const routes = [
    {
   
        path: '/',
        redirect: '/home'
    },
    {
   
        name: 'home',
        path: '/home',
        component: () => import('@/view/Home/home.vue'),
        children: [
            {
   
              path: '/HomePage',
              name: 'HomePage',
              component: () => import('@/view/Home/HomePage.vue'),
            },
            {
   
              path: '/List',
              name: 'List',
              component: 



版权声明:本文为u010782109原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。