10 2023 档案

使用js下载svg图片
摘要://获取svg let dom = document.querySelector('.currentSvg') // 将 SVG 节点转换为 XML 字符串 const svgString = new XMLSerializer().serializeToString(dom) // 下载 SVG 阅读全文

posted @ 2023-10-30 14:17 IT丶Hatcher 阅读(298) 评论(0) 推荐(0) 编辑

js聚焦并将光标定位到输入框和可编辑DIV的最后
摘要:// 聚焦并将光标定位的文本末尾 div // let dom = $('.demonstrate-li-input').eq(i).focus() // let range = document.createRange() //创建一个新的范围对象 // let sel = window.getS 阅读全文

posted @ 2023-10-28 15:24 IT丶Hatcher 阅读(976) 评论(0) 推荐(0) 编辑

本地运行webpack打包的项目
摘要:npm install -g serve (全局安装) serve -s dist (运行打包后的文件) 阅读全文

posted @ 2023-10-09 17:30 IT丶Hatcher 阅读(29) 评论(0) 推荐(0) 编辑

vuex简单使用demo
摘要:// store.js 文件中定义了 store import { createStore } from 'vuex'; const store = createStore({ state() { return { count: 0, }; }, mutations: { increment(sta 阅读全文

posted @ 2023-10-09 17:26 IT丶Hatcher 阅读(26) 评论(0) 推荐(0) 编辑

socket客户端简单Demo
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <script src="https://cdn.bootcss.com/socket.io/2.3.0/socke 阅读全文

posted @ 2023-10-09 15:28 IT丶Hatcher 阅读(29) 评论(0) 推荐(0) 编辑

vue3结合socket实现打字机动画
摘要:<template> <div> <div>ip地址:<input type="text" placeholder="ip地址" v-model="socketIP"></div> <br /> <div>端口号:<input type="text" placeholder="端口号" v-mode 阅读全文

posted @ 2023-10-09 15:25 IT丶Hatcher 阅读(319) 评论(0) 推荐(0) 编辑

客户端简单使用socket.io---vue3全局挂载
摘要:socket.io官网:https://socket.io/ 使用前要先安装socket.io npm i socket.io socketIO.js import io from 'socket.io-client' export default { install: (app) => { if( 阅读全文

posted @ 2023-10-09 14:58 IT丶Hatcher 阅读(1039) 评论(0) 推荐(0) 编辑

css自定义滚动条
摘要:.container { width: 200px; height: 150px; overflow: auto; /* 自动显示滚动条 / -ms-overflow-style: scrollbar; / 在IE上显示自定义滚动条 */ } /* 自定义滚动条的样式 */ .container:: 阅读全文

posted @ 2023-10-09 14:39 IT丶Hatcher 阅读(31) 评论(0) 推荐(0) 编辑

webpack配置删除console
摘要:1.删除所有的console.log vue.config.js: module.exports = defineConfig({ configureWebpack: (config) => { // 删除console config.optimization.minimizer[0].option 阅读全文

posted @ 2023-10-09 14:38 IT丶Hatcher 阅读(548) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示