自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

舜岳的博客

啦啦啦

  • 博客(386)
  • 资源 (6)
  • 收藏
  • 关注

原创 vscode 插件 Tailwind CSS IntelliSense 解决 class 提示问题

就是通过 Tailwind CSS IntelliSense 插件配置。正则匹配到了就显示提示。

2024-01-31 21:49:11 812

原创 xcode安装visionOS Simulator模拟器报错解决方法手动安装方法

【代码】xcode安装visionOS Simulator模拟器报错解决方法手动安装方法。

2024-01-28 11:40:28 913 1

原创 淘宝npm镜像域名到期cnpm.org搭建的cnpm私有镜像下载报错解决方案

找到 cnpm.org 私有镜像项目的 conifg/index.js 配置文件,修改 sourceNpmRegistry 源地址即可。淘宝npm镜像域名到期。

2024-01-22 15:57:50 762

原创 前端项目配置 Dockerfile 打包后镜像部署无法访问

localhost:3001: 仅允许本地主机(即 Docker 容器内部)访问。0.0.0.0:3001: 允许任何主机(包括容器外部的主机)通过该地址访问服务。该网页无法正常运作localhost。

2024-01-17 22:02:01 926 1

原创 js解决pdf使用iframe打印报跨域错误问题

把 pdf 转 blob 二进制数据, 通过 createObjectURL 生成本地对象 url, 在创建 iframe 调用打印接口。

2024-01-09 10:13:03 1942

原创 poetry执行报错 Reason: tried: ‘/opt/homebrew/Cellar/[email protected]

看看报错信息可以发现是 /Users/guojianbo/Library/Application Support/pypoetry/venv/bin/python 路径的问题。

2023-11-20 11:18:54 403

原创 谷歌浏览器访问127.0.0.1时报错 Failed to read the ‘sessionStorage‘ property from ‘Window‘

谷歌浏览器访问127.0.0.1时报错Failed to read the'sessionStorage'property from"window"

2023-10-17 14:26:28 1501

原创 permission denied while trying to connect to the Docker daemon socket 错误

【代码】permission denied while trying to connect to the Docker daemon socket 错误。

2023-08-11 16:35:24 1467 1

原创 mac 安装 php 与 hyperf 框架依赖的扩展并启动 gptlink 项目

mac安装php与hyperf框架依赖的扩展并启动gptlink项目

2023-07-26 09:06:15 1698

原创 Error failed to bundle project: error running light.exe报错解决方法

确保安装了红框内的开发工具:https://visualstudio.microsoft.com/zh-hans/visual-cpp-build-tools/修改 tauri.conf.json。

2022-12-02 12:12:04 2257 1

原创 uni-app上传图片并添加水印

【代码】uni-app上传图片并添加水印。

2022-10-08 17:27:08 3324 5

原创 The location of the currently running pnpm differs from the location where pnpm will be installed

【代码】The location of the currently running pnpm differs from the location where pnpm will be installed。

2022-09-06 22:01:40 1796 1

原创 error:chunkgroup.addoptions:no option merge strategy for name

也就是给 entry 名加一个前缀,以防和 webpack 打包内部 chunk 名字冲突。

2022-08-31 00:47:55 407

原创 hbuilderX运行Vue3/Vite版项目报错 error during build 解决方法

m1pro编译vite/vue3cli项目时编译报错。

2022-08-02 15:36:19 5177

原创 fatal: bad object refs/remotes/origin/xxx 解决方法

也可一个一个点进去以文件夹删除。

2022-07-29 08:45:57 8923

原创 pnpm storybook报错 ERR! Error: Cannot find module ‘/node_modules/config/webpack.config‘

info => Removing existing JavaScript and TypeScript rules.ERR!Error:Cannot find module '/node_modules/config/webpack.configERR! Require stack:

2022-06-22 15:37:50 1035

原创 uni-app 报错 Cannot set properties of undefined (setting ‘default‘) 解决方法

uni-app vue-cil 无法使用 async await 异步,导致启动H5时报错代码存在 async await 异步时就报错 Cannot set properties of undefined (setting ‘default’)解决方法:修改 package.json

2022-06-21 11:18:33 3029

原创 扫雷游戏 vite + vue3 + ts

扫雷游戏

2022-04-12 22:12:45 2779

原创 pnpm安装报错npm ERR code EEXIST

pnpm安装报错:C:\Users\admin\working>npm install -g pnpmC:\Program Files\nodejs\pnpm -> C:\Program Files\nodejs\node_modules\pnpm\bin\pnpm.cjsnpm ERR! code EEXISTnpm ERR! path C:\Program Files\nodejs\node_modules\pnpm\bin\pnpx.cjsnpm ERR! dest C:\Pro

2022-02-24 09:37:27 4891

原创 react 是怎么运行的?

react 是怎么运行的?import React from 'react';import ReactDOM from 'react-dom';const App = <div className="title" style={{color:'red'}}>hello world</div>console.log('App', App)ReactDOM.render( App, document.getElementById('root'));react

2021-12-21 09:01:02 3243

原创 webpack 不打包外部模块

比如:xx.js 引入如下:let $ = require('jquery')console.log($)但是我的 jquery 是通过 cdn 直接加载到 html 内部的所以我不需要重复打包 jquery 增加包的体积我们可以通过 webpack 配置不让其打包:// webpack.config.jsmodule.exports = { externals: { // key 不需要打包的模块名 value: 导出的全局变量名 'jquery': 'jQuery',

2021-11-30 14:10:49 1438

原创 webpack 自动引入常用模块

webpack 自动引入常用模块描述:比如 lodash 这种库,要用时每个 js 文件都需要如下引入import _ from 'lodash'console.log(_.join(['1', '2'], '/'))怎么才能不引入 lodash 也能直接 _.join 等方法来使用 lodash 呢?方法一: (模块局部引入)const webpack = require('webpack ')module.exports = { ... plugins: [ ...

2021-11-30 14:00:48 902

原创 webpack 把 source-map 放本地调试生产代码,source-map 不上传到生产环境

webpack 把 source-map 放本地调试生产代码,source-map 不上传到生产环境方法一:webpack.config.jsconst webpack = require('webpack ')const FilemanagerPlugin = require('filemanager-webpack-plugin')module.exports = { devtool: false, // 不在此生成, 使用插件生成 source-map plugins: [

2021-11-30 12:27:41 1565

原创 18. TypeScript 扩展全局变量类型

TypeScript 扩展全局变量类型1. 扩展局部变量// 可以直接使用接口对已有类型进行扩展interface String { double():string}String.prototype.double = function () { return this as string + this;}let str = '123';interface Window { mynane:string}console.log(Window.mynane)2. 模块内全局扩

2021-11-22 08:55:04 2099

原创 17. TypeScript 类型声明

TypeScript 类型声明1. 声明全局变量// 普通类型声明declare let age: number;declare function sum(a: string, b: string): void;declare class Animal { };declare const enum Seaons{ Spring, Summer, Autumn, Winter}declare interface Person { name:string,

2021-11-22 08:54:54 960

原创 16. TypeScript 模块和命名空间

模块和命名空间1. 模块// 文件模块: 如果在你的 TypeScript 文件的根级别位置含有 import 或者 export,那么它会在这个文件中创建一个本地的作用域 。// xxx.js 导出export default '456'index.ts导入import name from './xxx'2. 命名空间命名空间可以用于组织代码,避免文件内命名冲突// 命名空间的使用export namespace zoo { export class Dog { eat() {

2021-11-22 08:54:43 500

原创 Mac m1 pro 使用 zsh 后 command not found:npm

m1 pro 安装 zsh 后 nvm npm node 都没有了咋办?command not found:nvmcommand not found:npmcommand not found:node解决:vim ~/.zshrc// 在最后一行添加source ~/.zshrc.pre-oh-my-zsh// wq 保存退出重新打开终端即可为什么是 .zshrc.pre-oh-my-zsh 因为 cat 这个文件你会发现➜ ~ cat .zshrc.pre-oh-my-zshe

2021-11-19 18:30:20 2879 1

原创 14. TypeScript 自定义类型

TypeScript 自定义类型1. Diff实现// 求两个对象不同的部分let person1 = { name: '123', age: 11, address: '456'}let person2 = { address: '123',}type Diff<T extends object,K extends Object> = Omit<T,keyof K> // Omit忽略属性type DiffPerson = Diff<typeo

2021-11-08 08:51:36 439

原创 15. TypeScript unknown

unknown1. unknown类型// unknown类型,任何类型都可以赋值为unknown类型。 它是 any 类型对应的安全类型let unknown:unknown;unknown = '123';unknown = 11;// 不能访问unknown类型上的属性,不能作为函数、类来使用// 联合类型中的unknowntype UnionUnknown = unknown | null | string | number // type UnionUnknown = unkn

2021-11-08 08:51:15 291

原创 13. TypeScript 装包和拆包

TypeScript 装包和拆包1. 装包type Proxy<T> = { get():T, set(value:T):void}type Proxify<T> = { [P in keyof T]: Proxy<T[P]>} function Proxify<T>(obj: T):Proxify<T> { let result = {} as Proxify<T>; for (const key in

2021-11-08 08:51:01 624

原创 12. TypeScript 内置类型

TypeScript 内置类型1. Partial转化可选属性interface Company { num: number}interface Person { name: string, age: string, company: Company}type PartialPerson = Partial<Person>; // type PartialPerson = { name?: string | undefined; age?: string | unde

2021-11-08 08:50:40 312

原创 11. TypeScript 条件类型

TypeScript 条件类型1. 条件类型基本使用// 可以使用extends关键字和三元表达式,实现条件判断interface Fish { name1: string}interface Water { name2: string}interface Bird { name3: string}interface Sky { name4: string}type Condition<T> = T extends Fish ? Water : Sky;/

2021-11-08 08:50:23 308

原创 10. TypeScript 交叉类型

TypeScript 交叉类型1. 交叉类型(Intersection Types)是将多个类型合并为一个类型interface Person1 { handsome: string,}interface Person2 { high: string,}type P1P2 = Person1 & Person2;let p: P1P2 = { handsome: '帅', high: '高' }2. 交叉泛型function mixin<T, K>(a: T,

2021-11-08 08:50:11 734

原创 9. TypeScript 类型推断

TypeScript 类型推断1. 赋值推断// 赋值时推断,类型从右像左流动,会根据赋值推断出变量类型let str = '123'; // let str: stringlet age = 1; // let age: numberlet bool = true; // let bool: boolean2. 返回值推断// 自动推断函数返回值类型function sum(a: string, b: string) { // function sum(a: s

2021-11-08 08:49:56 276

原创 8. TypeScript 类型保护

TypeScript 类型保护通过判断识别所执行的代码块,自动识别变量属性和方法1. typeof 类型保护function double(val: number | string) { if (typeof val === 'number') {} else {} // val 类型是 number}2. instanceof 类型保护class Cat {}class Dog {}const getInstance = (clazz: { new(): Cat | Dog}) =

2021-11-04 09:20:14 201

原创 7. TypeScript 兼容性

TypeScript 兼容性TS中的兼容性,主要看结构是否兼容。(核心是考虑安全性)1. 基本数据类型的兼容性let temp:string | number;let num!:number;temp = num // 包含就可以赋值let num2:{ toString():string}// console.log(num2) // error: Variable 'num2' is used before being assigned. 没赋值之前不能使用let str:str

2021-11-03 20:07:34 216

原创 6. TypeScript 泛型

TypeScript 泛型泛型(Generics)是指在定义函数、接口或类的时候,不预先指定具体的类型,而在使用的时候再指定类型的一种特性。1. 指定函数参数类型// 单个泛型const getArray = <T>(times:number, val:T): T[] => { let result:T[] = [] for (let i = 0; i < times; i++) { result.push(val) } return result}

2021-11-03 20:07:14 117

原创 5. TypeScript 接口

TypeScript 接口接口可以在面向对象编程中表示行为的抽象,也可以描述对象的形状。 接口的作用就是为这些类型命名和为你的代码或第三方代码定义契约。 (接口中不能含有具体的实现逻辑)1. 函数接口参数// 没有接口的写法const fullName = ({firstName,lastName}: {firstName:string,lastName:string}): string => { return firstName + lastName}// 接口写法:使用接口约束函

2021-11-03 20:06:56 142

原创 4. TypeScript 类

TypeScript 类1. TS中定义类class Pointer{ x!:number; // 实例上的属性必须先声明 y!:number; constructor(x:number,y?:number,...args:number[]){ this.x = x; this.y = y as number; }}let p = new Pointer(100,200);// 实例上的属性需要先声明在使用,构造函数中的参数可以使用可选参数和剩余参数con

2021-11-01 17:10:55 104

原创 3. TypeScript 基础类型

TypeScript 基础类型1. 函数的两种声明方式// 通过function关键字来进行声明function sum1(a: string, b: string):string { // 返回 string return a+b;}sum1('a','b')// 通过表达式方式声明type Sum = (a1: string, b1: string) => string;let sum2: Sum = (a: string, b: string) => { re

2021-11-01 16:20:07 106

grayscale.js.zip

grayscale.js全网站变灰IE的js代码

2020-04-04

electron.zip

下载后解压到 node_modules / electron npm install electron安装后报错无法运行的小伙伴,说明electron没下载成功 下载后解压到node_modules目录即可,npm install electron安装后无法运行的小伙伴,下载这个electron压缩包,解压到node_modules

2020-03-24

Cocos Creator 打包成微信小游戏源代码

Cocos Creator 打包成微信小游戏源代码,Cocos Creator 打包成微信小游戏源代码,Cocos Creator 打包成微信小游戏源代码,Cocos Creator 打包成微信小游戏源代码,Cocos Creator 打包成微信小游戏源代码,Cocos Creator 打包成微信小游戏源代码

2020-02-25

录屏软件 可录制屏幕 mb小

录屏软件 可录制屏幕 mb小非常方便。本资源C币全免,喜欢就关注我哟!

2020-02-17

LICEcap录屏软件GIF

Make Animated Screenshots GIFs are a popular media format, no matter how you pronounce it. It has been used worldwide for various purposes, from fine arts to memes. And as it turns out, it cannot also be helpful for your work. LICEcap is a free desktop utility designed to capture a selection of your screen and export them to high-quality GIF animations. The program is very much suited for users who want to record their desktop activity for use in demonstrations and tutorials. It is easy to use, and as far as hardware perquisites are concerned, an average system will suffice.

2020-02-16

three.js 下载

three.js一个JavaScript的3D开源库,可以在微信小程序内引入开发3D项目,three.js是JavaScript编写的WebGL第三方库。提供了非常多的3D显示功能。

2020-02-16

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除