- 博客(16)
- 收藏
- 关注
原创 防止按钮重复点击,请求之后再可点击按钮
Vue.mixin({ methods:{ async onSubmit(e,fn){ const a=e.currentTarget a.disabled=true await fn(e) a.disabled=false }}})<el-button type='primary' @click='onSubmit($event,getData)'></el-button>getData(){ return new Promise((res,rej)
2021-07-14 09:43:18 293
原创 vue-router 三级菜单页面跳转时路由改变页面不变的解决
原因:共用了同一个解决方法:在二级路由处加一个router-viewcomponent: {render(c) { return c('router-view') }},
2021-05-08 10:34:34 1455 1
原创 element UI 分页器current-page强制改变不触发current-change解决
问题描述:点击查询按钮正常显示,切换到第二页,再点击查询按钮,数据正常显示,但页码高亮显示仍在第二页。网上查了很多,也尝试了,都没解决 。。。。。可用解决方案:查询数据的方法增加一个参数,点查询按钮的时候传参数,点分页器的时候,调用该方法不传参数,根据是否有参数,更改current-pape,再手动调用current-change方法。按钮<el-button type='primary' size='small' @click="findList(1)">查询</el-b
2021-04-15 09:18:36 1292
原创 Vue+express做导出excel功能,文件损坏打不开
前段控制台打印response.data乱码注释掉main.js中引入的mock.js,就正常了
2021-04-13 17:05:45 283
原创 Vue导入excel功能封装
1.组件封装<!-- 导入Excel组件 --><template><div> <el-button size="small" type="primary" @click="importOpen"> 导入 </el-button> <!-- 导入弹框 --> <el-dialog title="文件上传" :visible.sync="dialogImport"> &
2021-04-13 17:02:23 145
原创 vue+express+mysql(3)增删改查,导入导出excel
一.Vue前端项目1.vue.config.js配置代理跨域module.exports={ devServer: { proxy: { //配置跨域 '/api': { target: 'http://127.0.0.1:3000/', ws: true, changOrigin: true, pathRewrite: {
2021-04-13 16:59:09 463
原创 Vue+express+MySQL(2) express项目构建
1.安装express ,express生成器npm i -g express express-generator2.进入该工作区,创建项目express project-end3.安装项目依赖npm install4.启动项目npm start5.热更新npm i -g nodemon安装完成后在package.json中添加如下脚本 "scripts": { "start": "nodemon ./bin/www" },6.安装MySQLnpm inst
2021-04-13 16:45:16 348
原创 Vue+express+mysql(1)Vue项目构建
1.利用vue-cli脚手架创建一个vue项目a.全局安装Vuenpm install @vue/cli -gb.创建Vue项目vue create project-frontheader.js封装请求头import $md5 from 'js-md5'export function getHeader(url,code){ //时间戳 let timestamp=Date.now() let token=sessionStorage.getItem('user-
2021-04-13 16:21:39 120
转载 Eclipse手动搭建SpringBoot
1.准备1.jdk82.Eclipse3.集成好maven开始File===》New===》Other输入关键词:maven,选择Maven Project,点击Next。勾选:Create a simple project(skip archetype selection),点击Next红框中的内容根据自己想要的项目组织自定义填写,绿框中的内容请参照我的内容复制上去,最后FinshGroupId : org.springframework.bootArtifact Id : sp
2021-03-16 09:51:38 256
原创 Echarts组件封装
<template><div :class="className"b:style={width:width,height:height}></div></template><script>import echarts from "echarts"require('echarts/theme/macarons')export default{props:{ className:{ type:String, default:'cha
2021-01-12 16:21:25 272
转载 Echarts 坐标轴文本内容太长的解决方案
echarts x轴标签文字过多导致显示不全办法 1. xAxis.axisLabel 属性 axisLabel: { interval:0, //坐标轴刻度标签的显示间隔(在类目轴中有效) 0:显示所有 1:隔一个显示一个 :3:隔三个显示一个... rotate:-20 //标签倾斜的角度,显示不全时可以通过旋转防止标签重叠(-90到90) }![在这里插入图片描述](https://img-blog.csdnimg.cn/20210112111555
2021-01-12 11:18:53 1224
原创 singleSpa记录
安装single-spa新建文件config,创建single-spa-vue.config.jsimport singleSpaVue from "single-spa-vue"import App from "../App" (相对路径)export default (Vue,router,store,i18n)=>{ let lifecycles=null const bootstrap=(props)=>{ if(!lifecycles){ lifecycles.
2020-12-15 16:51:17 135
原创 pagination封装
component 文件下的pagination.vue<!-- 分页组件封装 --><template> <div :class="{'hidden':hidden}" class="pagination-container"> <el-pagination :background="background" :current-page.sync="currentPage" :page-size.sync="pag
2020-11-19 19:50:01 452
原创 分页序号递增问题
elementui el-table根据分页显示表格序号每页显示的序号都是一样的:<el-table :data=“tableData” highlight-current-row @current-change=“handleCurrentChange”>根据分页显示序号:当前点击的页码: currentPage每页显示的数量: pageSize{{scope....
2020-01-19 16:56:26 816
转载 vue.config配置
1.在根目录中创建 vue.config.jsmodule.exports = {// 选项// 基本路径publicPath: "./",// 构建时的输出目录outputDir: "dist",// 放置静态资源的目录assetsDir: "static",// html 的输出路径indexPath: "index.html",//文件名哈希...
2020-01-04 21:34:05 436
原创 webpack配置
一.创建webpack.config.js ( loader webpack中一个核心,将ES6转为Es5 将scss,jsx ,vue文件转成js文件等等 )const path=require(“path”)module exports={entry:“./src/main.js”,入口文件output:{path:“path.resolve(__dirname,“dis...
2020-01-04 16:16:10 200
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人