- 博客(5)
- 收藏
- 关注
原创 手写发布订阅者模式
!DOCTYPE html><html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Document</title> </head> <body> <scr
2022-05-02 17:37:00 81
原创 手写侦听器
export class Observer { // 侦听器 constructor(value) { this.value = value; if(Array.isArray(value)){//数组的操作 console.log(value.toString()); }else {//对象的操作 this.walk(value); } } walk(obj) {
2022-05-02 17:20:51 124
原创 手写promise及测试
<script> class MyPromise { static PENDING = "pending"; static FULFILLED = "fulfilled"; static REJECTED = "rejected"; constructor(executor) { //状态 this.state = MyPromise.PENDING ; //成功时的返回值 this.value = null; //失败信息 this.rea
2022-04-29 18:08:40 188
原创 Element实现上传下载
<el-upload name="file" action="接口地址" :accept=".xls,.xlsx,.zip,.pdf,.word" :before-upload="doUpload"> <el-button size="small" type="primary">点击上传</el-button></el-upload>//上传doUpload(file){ const isLt5M = file.size / 10
2022-03-01 15:57:07 412
原创 vis-timeline时间线
项目里需要时间线展示发现vis的timeline满足需求便下载了vis但是在项目里使用的时候数据没有渲染出来,也没有报错刚开始写的代码<template> <div> <div id="visualization"></div> </div></template><script> import vis from"vis"; export default { methods:{ init(){
2021-06-29 17:15:23 1606
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人