D3.js基础

安装依赖包npm install d3 基础图形绘制导入: import * as d3 from 'd3'; 1. 矩形const svg = d3.select('.d3-box').append('svg').attr('width', 200).attr('height',...

前端进阶

创建自己的脚手架

前言所谓脚手架,就是提前写好一些固定的文件模板,所以你需要先上传自己的模板到git仓库 配置文件config.js这个里面可以写你所有项目模板 const projectList = { vueRouter: "https://github.com/ConsoleLZ/vue-router-cli.git" }; module.exports...

前端进阶

minisearch模糊搜索

import MiniSearch from 'minisearch' const tokenizer = (str) => { // 分词逻辑,返回完整的单词以及单词的部分片段 const words = str.match(/[\u4e00-\u9fa5]+|[a-zA-Z0-9]+/g) || []; const subStrings ...

前端进阶

在浏览器环境中对github仓库进行增删改查

基本配置const owner = "ConsoleLZ"; // 仓库所有者 const repo = "githubAPI"; // 仓库名称 const accessToken = "???"; // GitHub 个人访问令牌 const branch = 'main' // 仓库分支 获取文件sha值...

前端进阶

使用Tiled编辑器制作phaser地图

安装直接去官网下载Tiled编辑器:Tiled | Flexible level editor (mapeditor.org) 资源准备所有资源仅供学习使用,不可用于其他违法用途,违者与作者无关https://pan.baidu.com/s/12T3GwRrKB9uqLfYRMcSYcw 提取码:xy6s 开始使用Tiled1. 新建一个Map 目前phaser并不支持压缩,所以这里选csv...

前端进阶
12310