vue
邓北北_991
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
vue分页
vue分页接口<!-- 表格 --> <div class=" mt_10 table_w"> <el-table :data="tableData" style="width: 100%"> <el-table-column prop="username" label="Applicant" width="180"></el-table-column> <el原创 2021-08-16 15:33:55 · 172 阅读 · 0 评论 -
vue中api封装
vue中api封装1.封装路径//封装请求地址路径//价格管理 let applicantList = `/api/api/GY_prices/getlist`//价格列表let applicantreview= `/api/api/GY_prices/getdetails`export{applicantList,applicantreview}2.封装方法import axios from "axios"//封装请求 get post put// get(路径,参数)le原创 2021-08-16 14:13:38 · 732 阅读 · 0 评论 -
vue封装,调用公共方法
vue封装,调用公共方法当遇到一个方法需要多次使用,但不可能每次都写一遍,这就需要封装一个方法,使用的时候调用一下就可以了封装公共方法1.在vue项目中创建一个js文件 action.js2.在main.js中实例化action.js文件//引入公共方法import common from './utils/action'Vue.use(common)3.在action.js中写实例方法export default{ install(Vue){ Vue.proto原创 2021-08-13 11:05:02 · 1141 阅读 · 0 评论 -
vue-router
vue-router路由基本配置路由跳转router-link编程式导航动态路由嵌套路由导航守卫路由懒加载基本路由配置1.安装router2.在router下的index.js中配置import Vue from 'vue'import VueRouter from 'vue-router'Vue.use(VueRouter)const routers = [ { path: '/', name: 'Home', r原创 2021-08-12 12:14:48 · 144 阅读 · 0 评论 -
vue中非父子组件传值
vue中非父子组件传值1.事件总线-------原理上建立一个公共的js文件// bus.jsimport Vue from 'vue'export default new Vue//在需要 传递,接收 消息的地方引入import bus from './bus.js'//传递消息bus.$emit('msg',val)//接收消息bus.$on('msg',val=>{ console.log(val)})2.$attrs / $listeners3.vuex原创 2021-08-11 18:05:23 · 128 阅读 · 0 评论 -
vue中父子组件间传值
vue中组件间传值props / $emit$parent / $children$refprops父组件---------在父组件中导入子组件<Add msg1="msg1 当传递的数据为字符串时" :msg2="this.msg2"/>import Add from './aa.vue'components:{ Add }, data(){ return{ msg2:'msg2 child' }},原创 2021-08-11 17:02:03 · 101 阅读 · 0 评论 -
vue接口api封装
vue接口api封装在utils文件夹中创建一个config.js文件在config.js文件中需要调用axiosimport axios from 'axios'// http://192.168.2.115:8003/api/Price/PriceList//公共路径let host = '/api'// 获取主页信息export const getindex = params => { return axios.get(`${host}/api/Price/PriceList原创 2021-08-11 15:36:57 · 320 阅读 · 0 评论 -
VUE中axios的使用
VUE中axios的使用安装npm install axios在main.js中引入import Axios from 'axios'Vue.prototype.$axios=Axios使用1.get请求axios.get('/user?ID=12345') .then(function (response) { console.log(response); }) .catch(function (error) { console.log(error);原创 2021-08-06 14:01:37 · 102 阅读 · 0 评论 -
uniapp实现搜索筛选,分类排序
uniapp实现搜索筛选,分类排序展示图片第一种根据button按钮切换参数实现分类排序整体代码<template> <view class=""> <u-search placeholder="请输入商户名" v-model="keyword"></u-search> <view v-for="(item,index) in filterlist" :key="index" style="margin:20px 30px;">原创 2021-08-05 11:47:45 · 8674 阅读 · 2 评论 -
vue获取地理位置
vue获取地理位置<template> <div class="main" id="container"> <iframe id="mapPage" width="100%" height="100%" frameborder=0 src="https://apis.map.qq.com/tools/locpicker?search=1&type=1&key=TN6BZ-LXSLK-GXAJL-A7FDS-6B2原创 2021-07-30 10:11:37 · 777 阅读 · 0 评论 -
vue实现 图片验证码组件
vue实现 图片验证码组件父组件<template> <div> <div class="form-group" style="display: flex;"> <div> <span>验证码:</span> <input type="text" i原创 2021-07-26 18:35:34 · 355 阅读 · 0 评论 -
proxy代理
proxy代理在src中创建一个vue.config.js文件module.exports = { devServer: { port: 8080, // 端口号,如果端口号被占用,会自动提升1 // host: "localhost", //主机名 // https: false, //协议 open: true, //启动服务时自动打开浏览器访问 proxy: { // 开发环境代理配置原创 2021-07-02 17:29:07 · 169 阅读 · 0 评论 -
实时更新数据折线图
实时更新数据,折线图<!-- ECharts数据统计图Dom --> <div id="main" class="echars" ref="chart"></div> data(){ return{ dataList:[], //data数据 // textRoom:'', //房间名称 timeX:[], //x轴时间 tempY:[], //y轴温度 desY:[], //y轴功率 onceTime:10000, /原创 2021-07-02 17:11:42 · 681 阅读 · 0 评论 -
vue文件嵌入 本地摄像监控
vue文件嵌入 本地摄像监控<video id="video"></video>methods:{ getVideo(){ this.video = document.getElementById('video'); //访问摄像头 if (navigator.mediaDevices.getUserMedia || navigator.getUserMedia || navigator.webkitGetUserMedia || navigato原创 2021-06-29 16:52:13 · 377 阅读 · 0 评论
分享