摘要: 线上json转ts得网站https://chpshy.github.io/json2ts/index.html 我的主要用途是json转ts,pc是window10 第一种方法 1.新建一个json文件 2.ctrl+p,输入>Open quicktypr for json 3.就好生成一个ts类型 阅读全文
posted @ 2022-06-03 10:42 zeal666 阅读(886) 评论(0) 推荐(0)
摘要: <template> <div class="hello"> <p>所有车位:{{total}}</p> <p>虚拟车位:{{this.form.virtual}}</p> <p>固定车位:{{this.form.fixedparking}}</p> <button @click="form.vir 阅读全文
posted @ 2022-05-27 11:24 zeal666 阅读(34) 评论(0) 推荐(0)
摘要: npm install clipboard 先安装clipboard <template> <div> <div v-for="item in list" :key="item.id"> //data-clipboard-text作为当前点击需要复制的内容 <div class="btn" @cli 阅读全文
posted @ 2022-05-24 10:55 zeal666 阅读(121) 评论(0) 推荐(0)
摘要: What is Vue? 什么是Vue Vue(pronounced/vju:/,like view) is a javascript framework for building user interfaces.It builds on top of standard HTML,CSS and J 阅读全文
posted @ 2022-05-21 12:48 zeal666 阅读(262) 评论(0) 推荐(0)
摘要: function Person(name){ this.name = name } let person = new Person('xiaoming') person.__proto__ Person.prototype 对象的__proto__ 构造函数的prototype Person.__p 阅读全文
posted @ 2022-05-17 15:53 zeal666 阅读(25) 评论(0) 推荐(0)
摘要: npm config get registry 查看当前的npm源 npm config set registry https://registry.npmmirror.com/ 设置最新的淘宝镜像 阅读全文
posted @ 2022-03-13 13:16 zeal666 阅读(66) 评论(0) 推荐(0)
摘要: 最近在写项目的时候需要开发一个自定义的audio组件,因为原生的audio组件不符合产品的要求。 简单的play()和pause()是没有问题的,但是需要点击进度条播放时就遇到了一些问题,现在记录一下。 提前说明一下,火狐的audio组件和chrome的audio存在不同的,这篇文章并没有解决任何问 阅读全文
posted @ 2022-02-21 16:38 zeal666 阅读(609) 评论(0) 推荐(0)
摘要: Fragment: 一个组件返回多个元素,Fragement允许你将子列表分组 import {Fragment} from 'react'; return ( <Fragment> <div>1</div> <div>2</div> </Fragment> ) Tsx/Jsx与Ts/Js的用处 一 阅读全文
posted @ 2021-12-14 10:35 zeal666 阅读(22) 评论(0) 推荐(0)
摘要: 1.vue.js data(){ return { isactive:true; errorClass:'error-text'; activeClass:'active-class' } } computed:{ cactive(){ return { active:this.isactive c 阅读全文
posted @ 2021-07-23 16:47 zeal666 阅读(439) 评论(0) 推荐(0)
摘要: 1.在原生的vue.js中emit里面的事件参数不能修改 2.在ts装饰器@Emit()中,如果@Emit()中没有定义事件参数的时候,@Emit会将回调函数的小驼峰写法转换成kebab-case写法来充当事件参数的名称, 3.在jsx中子组件的this.$emit()中事件参数名称必须使用小驼峰的 阅读全文
posted @ 2021-07-22 15:24 zeal666 阅读(1366) 评论(1) 推荐(0)