会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
嘉琦
博客园
首页
新随笔
联系
订阅
管理
2022年5月6日
通过css 设置单行显示超出隐藏部分
摘要: white-space: nowrap; // 溢出部分隐藏 overflow: hidden; // 文字溢出用...替换 text-overflow: ellipsis;
阅读全文
posted @ 2022-05-06 10:43 嘉琦
阅读(66)
评论(0)
推荐(0)
2022年5月5日
防抖处理
摘要: 利用定时器防抖处理: //首先在 vdata 设置一个timerid的默认值 //在methods 利用定时器处理 input(value){ // 用定时器防抖 清除延迟器 clearTimeout(this.timer) this.timer= setTimeout(()=>{ // this.
阅读全文
posted @ 2022-05-05 17:45 嘉琦
阅读(58)
评论(0)
推荐(0)
2022年4月7日
vue vant的弹出层,需避免的问题
摘要: 当弹出关闭,实例的弹窗还在, 可以在下面语句加个v-if='show' <van-popup v-model="show" v-if='show' position="top" :style="{ height: '30%' }" />
阅读全文
posted @ 2022-04-07 17:02 嘉琦
阅读(391)
评论(0)
推荐(0)
2022年4月2日
vue 利用v-modle 给子组件传值
摘要: 使用环境说明: 父子组件相互传值 父组件: <attention v-model="articlecontent.is_followed" :user_id="articlecontent.aut_id" /> 子组件: props:{ //这个参数接受的是接口内的关注的状态 value:{ typ
阅读全文
posted @ 2022-04-02 18:01 嘉琦
阅读(402)
评论(0)
推荐(0)
2022年3月4日
JSX基本语法
摘要: <script> export default { name:"JSXFile", data() { return { msg: "消息", } }, methods:{ clickHandler(){ console.log("点击了"); this.msg="呵呵哒" } }, render()
阅读全文
posted @ 2022-03-04 14:24 嘉琦
阅读(29)
评论(0)
推荐(0)
vue基础 自定义指令的语法及基本应用
摘要: 自定义全局指令方法一:(写入main.js 根文件中) Vue.directive("focus",{ inserted:function(ele){ ele.focus() } }) 方法二:(自定义一个js文件) 1.1自定义js文件: import Vue from "vue" //必须要有这
阅读全文
posted @ 2022-03-04 11:57 嘉琦
阅读(54)
评论(0)
推荐(0)
2022年3月3日
vue基础 过渡、动画效果
摘要: 准备工作:基础结构 <template> <div> <button @click="show = !show"> Toggle render </button> <!-- <transition name="slide-fade"> <p v-if="show">hello</p> </trans
阅读全文
posted @ 2022-03-03 21:41 嘉琦
阅读(131)
评论(0)
推荐(0)
vue基本使用 访问根、父、子级相互通信的方法
摘要: main.js 根文件: data() { return { rootMsg:"我是根实例" } }, methods:{ getmsg(){ return this.rootMsg } } APP.vue父级文件 data() { return { rootMsg:"我是APP例" } }, me
阅读全文
posted @ 2022-03-03 20:38 嘉琦
阅读(100)
评论(0)
推荐(0)
vue基础 动态组件 实现相互切换并缓存数据
摘要: 动态组件准备工作 组件1:Acomponent内容部分: <template> <div>{{msg}}</div> </template> <script> export default { name:"Dynamic", data() { return { msg:"welcome 组件A!"
阅读全文
posted @ 2022-03-03 16:27 嘉琦
阅读(402)
评论(0)
推荐(0)
vue基础 子、父级相互传值
摘要: 父传子 1.父组件 <template> <div> <HelloWorld :msg="msg" v-model="number"></HelloWorld> </div> </template> <script> import HelloWorld from './components/Hell
阅读全文
posted @ 2022-03-03 11:37 嘉琦
阅读(86)
评论(0)
推荐(0)
下一页
公告