![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ts
我胖虎不答应!!
工作、学习、记录、进步
展开
-
typescript引入@types/node下的模块时,编辑器报错提示找不到对应模块解决方法
typescript引入@types/node下的模块时,编辑器报错提示找不到对应模块解决方法例如:在引入fs模块时使用import * as fs from 'fs’方式引入时,编辑器报错如下----------博客以引入fs模块为例,ts在引入其他声明文件包下的模块时遇到找不到对应模块时,解决方法大同小异报错原因可能有以下几种情况1、本地没有 @types/node声明文件包解决:没有@types/node包的情况下直接执行下文语句,导入到项目本地即可 npm install @t原创 2022-05-17 17:46:52 · 41033 阅读 · 0 评论 -
element puls的select下拉选择加Tree V2 虚拟化树形控件实现简易下拉选择,替代vue3-treeselect插件的基础功能(代码记录, copy可直接使用)
element puls的select下拉选择加Tree V2 虚拟化树形控件实现简易下拉选择前言在vue3+typescript项目中,需要使用到下拉树形选择功能,npm vue3-treeselect后使用中有很多问题和不兼容ts。原本也只需要简单的选择功能,就照着网上现写了一个简易的下拉选择(element puls select + tree v2)组件的模板<template> <div class="tree_box" :style="width &&原创 2022-01-26 09:35:14 · 12086 阅读 · 5 评论 -
typescript + vue3 实现websocket+心跳机制写入 纯代码记录
代码(可直接使用)/* eslint-disable @typescript-eslint/no-unused-vars */import path from '_api/axios/addressConfig'import { getStore } from '@/tools/session'interface OnMessageIter { (event: MessageEvent):any}interface HeartbeatKey { [key:string]:any}原创 2022-01-15 17:50:09 · 2286 阅读 · 0 评论 -
vue3.0 + vuex + typescript 数据管理模块化及类型支持实现代码记录
vue3.0 + vuex + typescript 数据管理模块化及类型支持实现代码记录目录结构入口文件index.tsimport { createStore, Store, useStore as baseUseStore } from 'vuex'import projectStore from './modules/project-store'import websocketStore from './modules/websocket-store'import { sokcet }原创 2022-01-15 17:42:18 · 770 阅读 · 0 评论