<
>

Vue+Vux实现登录功能

2022-08-26 12:11:46 来源:易采站长站 作者:

一、准备工作请参照Vue前端框架搭建使用模板创建框架。二、创建登录页1.main.js中引入全局ToastPlugin、LoadingPlugin插件import{ToastPlugi...

一、准备工作

请参照 vue前端框架搭建 使用模板创建框架。

二、创建登录rLYwpW

1.main.js 中引入全局 ToastPlugin、LoadingPlugin 插件

import  { ToastPlugin, LoadingPlugin } from 'vux'
Vue.use(ToastPlugin)
Vue.use(LoadingPlugin)

2www.cppcns.com.views 下创建 login\login.vue

impphport Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import Test from '@/views/test'
Vue.use(Router)
export default new Router({
  routes: [
    {
      path: '/',
      name: 'HelloWorld',
      component: HelloWorld
    },
    {
      path: '/test',
      name: 'test',
      component: Test
    }
  ]
})

3.运行

浏览器输入 http://localhost:8080/#/login:

在这里插入图片描述

点击【登录】:

在这里插入图片描述

到此这篇关于Vue+Vux实现登录的文章就介绍到这了,更多相关Vue登录内容请搜索我们以前的文章或继续浏览下面的相关文章希望大家以后多多支持我们!

暂时禁止评论

微信扫一扫

易采站长站微信账号