随笔分类 -  Vue

摘要://把base64转换成图片 getBase64ImageUrl: function(data) { /// 获取到base64Data var base64Data = data; /// 通过微信小程序自带方法将base64转为二进制去除特殊符号,再转回base64 base64Data = w 阅读全文
posted @ 2020-09-08 10:51 Jinsuo 阅读(1360) 评论(0) 推荐(0)
摘要:<template> </template> <script> export default { data() { return{ // 用户Id userId:'', appid:'', // 事件类型 type:'', msg:'', wsUrl:'' } }, methods: { //初始化 阅读全文
posted @ 2020-09-05 09:43 Jinsuo 阅读(1691) 评论(0) 推荐(0)
摘要:<template> <div> <!-- 内容区域 --> <div class="content"> <div> content-0 </div> <div> content-1 </div> <div> content-2 </div> <div> content-3 </div> <div> 阅读全文
posted @ 2020-06-30 10:26 Jinsuo 阅读(926) 评论(1) 推荐(1)
摘要:父组件→子组件 <div class="father"> <child :inputName="name"> </div> <div class="child"> {{inputName}} </div> 通过props接受数据 (1)props: { inputName: String, requ 阅读全文
posted @ 2020-06-24 16:09 Jinsuo 阅读(1165) 评论(0) 推荐(0)
摘要:这篇文章中介绍了三种方法分别为: 1、子组件通过使用this.emit('xxx') (xxx:是你要调用的方法名,只要方法名不要后面的小括号) 3、父组件把方法名传给子组件,在子组件里调用这个方法 代码如下: 1、子组件通过使用this.$parent.xxx 父组件代码: <template> 阅读全文
posted @ 2020-03-19 12:18 Jinsuo 阅读(2093) 评论(0) 推荐(1)
摘要: 阅读全文
posted @ 2020-03-02 22:31 Jinsuo 阅读(210) 评论(0) 推荐(0)
摘要:map 阅读全文
posted @ 2020-02-11 12:20 Jinsuo 阅读(189) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2020-02-11 11:35 Jinsuo 阅读(109) 评论(0) 推荐(0)
摘要:<template> <div id="appp" class="app" > <header> <a href="javascript:void(0);" :class="active == '#home' ? 'active' : ''" @click="toTarget('#home')">首页</a> <a href="javascript:void 阅读全文
posted @ 2019-12-30 15:00 Jinsuo 阅读(1529) 评论(0) 推荐(0)
摘要://html部分 <el-menu background-color="#3f4d67" text-color="#fff" :default-active="$route.path" :unique-opened="true" :router="true" mode="vertical" > <template v-for="item in menu"> <!-- 多级菜单外壳 --> <el- 阅读全文
posted @ 2019-12-30 14:55 Jinsuo 阅读(374) 评论(0) 推荐(0)
摘要:第一种方法是直接在子组件中通过this.$parent.event来调用父组件的方法 父组件 复制代码 <template> <div> <child></child> </div> </template> <script> import child from '~/components/dam/child'; export default { components: { child }, met 阅读全文
posted @ 2019-12-23 14:23 Jinsuo 阅读(230) 评论(0) 推荐(0)
摘要:// The Vue build version to load with the `import` command // (runtime-only or standalone) has been set in webpack.base.conf with an alias. import Vue from 'vue' import App from './App' // import Vue... 阅读全文
posted @ 2019-10-31 07:59 Jinsuo 阅读(1661) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2019-03-10 19:26 Jinsuo 阅读(518) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2019-03-10 19:25 Jinsuo 阅读(129) 评论(0) 推荐(0)
摘要:if判断 1-{{name}} 2-{{addName()}} 3-{{addName()}} 4-{{addName2}} 5-{{addName2}} 6-{{time}} 7-{{num}} 阅读全文
posted @ 2019-03-08 18:35 Jinsuo 阅读(132) 评论(0) 推荐(0)
摘要:实例方法 {{caiData.url}} {{caiData.netName}} {{caiData.skill}} ... 阅读全文
posted @ 2018-02-28 23:43 Jinsuo 阅读(456) 评论(0) 推荐(0)
摘要:body> {{num}} add jian jian off 阅读全文
posted @ 2018-02-28 23:38 Jinsuo 阅读(256) 评论(0) 推荐(0)
摘要:实例方法 销毁 刷新 数据更改 阅读全文
posted @ 2018-02-28 23:24 Jinsuo 阅读(154) 评论(0) 推荐(0)
摘要:extends扩展选项 ${num} add 阅读全文
posted @ 2018-02-28 19:06 Jinsuo 阅读(235) 评论(0) 推荐(0)
摘要:methods方法选项 {{num}} add 作用域外点击 阅读全文
posted @ 2018-02-28 14:02 Jinsuo 阅读(270) 评论(0) 推荐(0)