标签:vue.js

Vue三级路由不跳转解决方案以及动态路由

Vue三级路由不跳转解决方案以及动态路由

解决方案 在二级路由的组件添加以上代码 component: {render(c) {return c('router-view')}}, 动态路由 动态菜单json { "code": "200", "msg": "成功", "data": [

涛哥 涛哥 2023-04-08
11W+ 0 0
ElementUi的使用

ElementUi的使用

npm 安装 npm i element-ui -S 在index.html文件中引入样式和组件库 <!-- 引入样式 --> <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk

涛哥 涛哥 2021-11-30
20W+ 2 0
vue 路由守卫和实现在新窗口打开

vue 路由守卫和实现在新窗口打开

Navigation.vue <template> <div class="title"> <span>爱奇艺</span> <span>点击即可查看本区标签的相关内容</span> &lt

涛哥 涛哥 2021-11-30
16W+ 0 0
vue 二级路由和路由传参

vue 二级路由和路由传参

1,param传参方式 nav.vue <template> <div class="title"> <span>热门标签</span> <span>点击即可查看本标签的内容</span>

涛哥 涛哥 2021-11-30
8W+ 0 0
解决vue Error: Node Sass version 6.0.1 is incompatible with ^4.0.0.和ERROR in Cannot find module 'node-sass'

解决vue Error: Node Sass version 6.0.1 is incompatible with ^4.0.0.和ERROR in Cannot find module 'node-sass'

错误信息描述 npm install  ERROR in Cannot find module 'node-sass' Module build failed: Error: Node Sass version 6.0.1 is incompatible with ^4.0.0.Err

涛哥 涛哥 2021-11-29
20W+ 0 0
websocket聊天室

websocket聊天室

前言 WebSocket ,HTML5 开始提供的一种在单个 TCP 连接上进行全双工通讯的协议,其使用简单,应用场景也广泛,不同开发语言都用种类繁多的实现,仅Java体系中,Tomcat,Jetty,Spring等都提供了对WS的API支持。本篇不做理论探究,仅自娱自乐,简单实现网页版的聊天室功

涛哥 涛哥 2021-11-28
18W+ 0 2
VueUI

VueUI

1.1 移动端常用UI组件库 Vant  Vant - Mobile UI Components built on Vue Cube UI  cube-ui Document Mint UI  http://mint-ui.github.io nut UI  NutUI

涛哥 涛哥 2021-11-28
13W+ 0 1
vue.js之vuex

vue.js之vuex

安装 vuex npm install vuex --save 工程目录结构图 代码使用 Number.vue <template> <div> {{$store.state.num}} <br> &lt

涛哥 涛哥 2021-11-28
19W+ 0 0
vue 路由

vue 路由

注意,先下载  axios npm install axios 博客静态页面 <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></titl

涛哥 涛哥 2021-11-28
19W+ 0 0
vue.js插槽的学习(slot)

vue.js插槽的学习(slot)

​ 1,默认插槽 子组件:<slot></slot> 子组件.vue <template> <div class="bili-grid"> <div class="bili-title">

涛哥 涛哥 2021-11-28
17W+ 0 0
axios跨域和一言api调用

axios跨域和一言api调用

 1,在所在项目安装axios npm install axios -s import axios from 'axios'; 2,在config下修改index.js文件在proxyTable里加入后端目标地址 index.js 'use strict' // Template v

涛哥 涛哥 2021-11-28
19W+ 0 0
全局总线,发布和订阅

全局总线,发布和订阅

1,全局总线 a,在main.js里声明一个全局事件总线 beforeCreate(){ Vue.prototype.$bus=this;//声明一个全局事件总线 } b,school.vue <template> <div> <

涛哥 涛哥 2021-11-28
20W+ 0 0
mixin混入混合和局部样式

mixin混入混合和局部样式

​如何使用配置 import{info,userMsg} from '../mixin.js' <template> <div> <h1>子组件</h1> <h1>{{msg}}</h1> &

涛哥 涛哥 2021-11-28
18W+ 0 0
Vue.js 组件间值传递(props)

Vue.js 组件间值传递(props)

1,props的三种接收方法 简单接收 子组件配置 <template> <div class="item"> <h2>{{title}}</h2> <p>{{content}}</p>

涛哥 涛哥 2021-11-28
13W+ 0 0
Vue在浏览器安装Vue Devtools的两种方法

Vue在浏览器安装Vue Devtools的两种方法

在vue中,通常情况下我们使用Google Chrome浏览器,和Firefox两种浏览器开发,因为vue官方只提供了这两种浏览器的调试开发工具。 一、在线安装方式(Vue Devtools) 1.选择Get Started 2.点击Get the Chrome Extension进行安装

涛哥 涛哥 2021-11-28
12W+ 0 0
1 2