会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
阿凡达的小驴
博客园
首页
新随笔
联系
订阅
管理
2020年12月4日
Vue 3.0 refs的使用
摘要: https://v3.cn.vuejs.org/api/refs-api.html#ref // 官网地址
阅读全文
posted @ 2020-12-04 14:56 阿凡达的小驴
阅读(981)
评论(0)
推荐(0)
2020年12月3日
$attrs的使用
摘要: 在父组件给孙组件传值时,没有通过props注册的属性,可通过$attrs取到没注册的属性值,简化父组件和孙组件的传值
阅读全文
posted @ 2020-12-03 16:13 阿凡达的小驴
阅读(84)
评论(0)
推荐(0)
2020年10月27日
vue3.0实现数据的双向绑定
摘要: 1.字符串、数字(通过ref实现) <template> <button @click="add">{{ num }}</button> </template> <script lang="ts"> import { defineComponent, ref } from 'vue' export
阅读全文
posted @ 2020-10-27 19:33 阿凡达的小驴
阅读(515)
评论(0)
推荐(0)
vue2.0和vue3.0自定义指令的用法
摘要: html <div v-setcolor="red" ></div> 1.vue2.0写法 Vue.directive('setcolor', { bind(el, binding, vnode) { el.style.color = binding } }) 2.vue3.0写法(beforeMo
阅读全文
posted @ 2020-10-27 19:12 阿凡达的小驴
阅读(846)
评论(0)
推荐(0)
css中user-select和img draggable属性的使用
摘要: 1.user-select属性 user-select: none : 元素和子元素的文本将无法被选中 user-select: text : 文本可以被选中(默认值) user-select: auto : 文本将根据浏览器的默认属性进行选择 user-select: all : 当所有内容作为一
阅读全文
posted @ 2020-10-27 18:03 阿凡达的小驴
阅读(995)
评论(0)
推荐(0)
2020年10月23日
vue自定义字体的使用
摘要: 1.创建fonts文件,将要自定义字体的文件放入文件夹 2.在app中通过@font-face引入自定义字体 @font-face { font-family: '自定义名字' //自定义字体的名字 src: './fonts/文件名','./fonts/文件名1' ..... // 要使用字体的路
阅读全文
posted @ 2020-10-23 11:55 阿凡达的小驴
阅读(392)
评论(0)
推荐(0)
2020年9月3日
display:table-cell的使用
摘要: display:table-cell可实现大小不定的元素垂直居中,margin设置会失效,对padding的使用无影响 div { display: table-cell; vertical-align: middle; } 使用display:table时,table的padding设置会失效;
阅读全文
posted @ 2020-09-03 18:17 阿凡达的小驴
阅读(190)
评论(0)
推荐(0)
2020年8月31日
改变input提示文字样式
摘要: input::-webkit-input-placeholder{ color:red; font-size:20px; }
阅读全文
posted @ 2020-08-31 11:50 阿凡达的小驴
阅读(185)
评论(0)
推荐(0)
2020年8月27日
NodeJS 入门
摘要: 1.创建服务器 var http = require('http'); http.createServer((require,response) => { response.end('hello world') }).listen(8888); console.log('启动服务器成功'); 2.启
阅读全文
posted @ 2020-08-27 19:07 阿凡达的小驴
阅读(140)
评论(0)
推荐(0)
2020年8月26日
require.resolve()的使用
摘要: require.resolve('相对路径') 该方法会将相对路径拼接生成一个绝对路径,并自动检验该路径是否存在
阅读全文
posted @ 2020-08-26 15:08 阿凡达的小驴
阅读(1747)
评论(0)
推荐(0)
下一页
公告