随笔分类 -  前端

上一页 1 ··· 3 4 5 6 7 8 9 下一页
摘要:计算属性的基本使用 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <body> <div id="app"> <!--使用计算属性,不需要加小括号--> <h2> 阅读全文
posted @ 2021-08-15 16:28 iTao0128 阅读(372) 评论(0) 推荐(0)
摘要:【对象语法】 <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title></head><body><!--对象语法--><div id="app"><!-- <h2 :style="{key(属性 阅读全文
posted @ 2021-08-08 10:13 iTao0128 阅读(75) 评论(0) 推荐(0)
摘要:【对象语法】 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <style> .active{ color: red; } </style> </head> <body> <div 阅读全文
posted @ 2021-08-07 18:02 iTao0128 阅读(38) 评论(0) 推荐(0)
摘要:动态绑定属性 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <body> <div id="app"> <img v-bind:src="imgURL"> <a 阅读全文
posted @ 2021-08-07 09:44 iTao0128 阅读(86) 评论(0) 推荐(0)
摘要:【v-once】 该指令表示元素和组件只渲染一次,不会随着数据的改变而改变。 <div id="app"> <h2 v-once>{{message}}</h2> </div> <script src="../js/vue.js"></script> <script> const app = new 阅读全文
posted @ 2021-08-01 21:05 iTao0128 阅读(132) 评论(0) 推荐(0)
摘要:【mustache语法】 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <body> <div id="app"> <h2>{{message}}</h2> <h 阅读全文
posted @ 2021-08-01 19:44 iTao0128 阅读(44) 评论(0) 推荐(0)
摘要:【第一个vue程序】 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <body> <div id="app">{{message}}</div> <script 阅读全文
posted @ 2021-07-28 22:17 iTao0128 阅读(51) 评论(0) 推荐(0)
摘要:https://www.jb51.net/softs/751925.html#downintro2 激活码 http://lookdiv.com/ 钥匙 lookdiv.com 阅读全文
posted @ 2021-07-27 21:50 iTao0128 阅读(2066) 评论(0) 推荐(0)
摘要:1. 将data恢复到初始状态 Object.assign(this.$data, this.$options.data()) // 初始化data 2. 重新渲染组件 方法一:v-if(可以重置生命周期) 虽然能实现重新渲染,但不推荐首选 方法二:给组件加key值【推荐】 通过修改key的值,就会 阅读全文
posted @ 2021-07-22 22:19 iTao0128 阅读(1290) 评论(1) 推荐(1)
摘要:数组转字符串 var authority= ['1','2']; let permission = authority.join(","); console.log(permission )//1,2 字符串转数组 var a='1,2' a.split(',') console.log(a)// 阅读全文
posted @ 2021-06-30 22:30 iTao0128 阅读(7532) 评论(1) 推荐(0)
摘要:<el-dropdown trigger="click" @command="handleCommand" @visible-change="test"></el-dropdown> 其中test(val){console.log(val);} 方法中直接打印值,得到的是true或者false. 但 阅读全文
posted @ 2021-06-30 22:26 iTao0128 阅读(387) 评论(0) 推荐(0)
摘要:var arr=[1,2,3,4]; alert(arr.indexOf(2)); 阅读全文
posted @ 2021-06-29 21:48 iTao0128 阅读(343) 评论(0) 推荐(0)
摘要:注意不要使用 @click 点击事件会不生效,使用 @click.native 获取option的ID值 1.html部分 <select class="bw1 bss bc4 h40px w100 dib br4 fl" v-model="ProductActive" @change="chang 阅读全文
posted @ 2021-06-26 10:05 iTao0128 阅读(11193) 评论(1) 推荐(0)
摘要:在vue中,很多时候需要实时了解数据的变化执行相应的操作,通过watch监听能实现相应需求。 <div> <p>inputOne: <input type="text" v-model="value1"></p> <p>inputTwo: <input type="text" v-model="va 阅读全文
posted @ 2021-06-24 21:42 iTao0128 阅读(3136) 评论(0) 推荐(0)
摘要:当你看完backtop的组件源码后,你是否会有所领悟呢?他的组件参数都有默认值,这意思就是,我们可以什么都不传,调用这个组件即可使用。 <el-backtop></el-backtop> 是的,你没看错,把上面那段代码Copy到你的代码中,即可使用。记得把代码放在最外层的div里的第一个,不要放在尾 阅读全文
posted @ 2021-06-24 21:38 iTao0128 阅读(719) 评论(0) 推荐(0)
摘要:HTML部分 <el-form ref="form" :model="form" label-width="82px"> <el-form-item label="选择媒体:"> <el-select v-model="value" placeholder="请选择媒体"> <el-option v 阅读全文
posted @ 2021-06-24 21:34 iTao0128 阅读(6305) 评论(0) 推荐(0)
摘要:options就是要定义的数组对象,先进行for循环,然后对对象参数进行赋值personQueryList(this.paramType).then(res => { for (let i = 0; i < res.records.length; i++) { this.options[i] = { 阅读全文
posted @ 2021-06-24 21:30 iTao0128 阅读(7404) 评论(0) 推荐(0)
摘要:将以下代码直接放到 app.vue里 或者 html里即可 .el-table th.gutter{ display: table-cell!important; } 阅读全文
posted @ 2021-06-11 21:48 iTao0128 阅读(640) 评论(0) 推荐(0)
摘要:HTML <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>demo</title> <link rel="stylesheet" href="css/element-ui-index.css"> <scrip 阅读全文
posted @ 2021-05-22 15:02 iTao0128 阅读(2801) 评论(0) 推荐(0)

上一页 1 ··· 3 4 5 6 7 8 9 下一页