随笔分类 - 前端开发
我是前端开发,平时会收录一些自己工作中碰到的问题,遇到好的我也会搬砖
摘要:<template> <el-form label-width="200px"> <el-button @click="aa">点击我打印结果</el-button> <el-form-item v-for="v1 in list" :key="v1.id" style="border-top: 1
阅读全文
摘要:input的值输入后,写下面的方法 this.tableData.push({}); this.tableData.pop();
阅读全文
摘要:npm i -S zx-verify 新建文件 vabVerify.js import VabVerify from 'zx-verify' import 'zx-verify/dist/zx-verify.css' export default VabVerify 页面模板 <template>
阅读全文
摘要:超好用的moment npm install moment --save main.js里面 // 引入moment 日期时间处理器 import moment from 'moment/moment' // 时间过滤器 Vue.filter('moment', function (value, f
阅读全文
摘要:this.$refs[formName].validateField('mobile', valid => { console.log(valid) if(!valid) { if (!this.timer) { this.count = TIME_COUNT this.show = false t
阅读全文
摘要:<template> <div id="main"> <canvas id="canvas" ref="canvas" style="z-index: 100;position: fixed;top: 0;width: 100%;height: 90%;"> 您的浏览器不支持 HTML5 canva
阅读全文
摘要:npm install vue-grid-layout --save import VueGridLayout from 'vue-grid-layout'; <template> <div> <grid-layout :layout.sync="layout" :col-num="colNum"
阅读全文
摘要:有两种方式可以解决表单验证更新问题 第一种:通过computed属性 以基础表单为例,代码如下: <template> <div> <el-form :model="form" :rules="rules" ref="form"> <el-form-item :label="$t('form.Nam
阅读全文
摘要:https://bhuh12.github.io/vue-router-tab/zh/guide/essentials/#%E8%B7%AF%E7%94%B1%E9%85%8D%E7%BD%AE 当然也可以自己写 我用的Vue Router Tab
阅读全文
摘要:<div class="content"> <transition name="fade-transform" mode="out-in"> <keep-alive :include="tagsList"> <router-view v-if="$route.meta.keepAlive && is
阅读全文
摘要:var arr=[{name:2,id:3},{name:2,id:4},{name:3,id:5},{name:3,id:6},{name:1,id:1},{name:1,id:2}]; // 传入一个数组// 按照特定方式格式化function sortArr(arr, str) { var _
阅读全文
摘要:const path = require('path'); const resolve = (dir) => path.join(__dirname, dir); // 给public路径添加别名 module.exports = { publicPath: '/app/', // base目录,等
阅读全文
摘要:npm加载jsencrypt ,你也可以下载js文件在index引用或者直接引用线上的,不在叙述 npm i jsencrypt -S min.js写入 import JSEncrypt from 'jsencrypt';//引用模块 Vue.prototype.$jsEncrypt = JSEnc
阅读全文
摘要:<!DOCTYPE html> <html> <head> <title>javascript非对称加密(RSA)JSEncrypt Example</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
阅读全文
摘要:<template> <div class="login-container"> <!--<p>首页</p>--> <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-position="left" label-width="
阅读全文
摘要:data () { let idCardValidity = (rule, code, callback) => { var city = { 11: "北京", 12: "天津", 13: "河北", 14: "山西", 15: "内蒙古", 21: "辽宁", 22: "吉林", 23: "黑龙
阅读全文
摘要:不支持ie 支持edge 需要ie请换方法 vue不再赘述安装x-data-spreadsheetnpm install x-data-spreadsheet <template> <div id="x-spreadsheet-demo"></div> </template> <script> im
阅读全文

浙公网安备 33010602011771号