adong搬砖

导航

2023年11月26日 #

vue3仓库index.js并持久化

摘要: //npm i pinia-plugin-persistedstate import {createPinia} from 'pinia' import piniaPluginPersistedstate from 'pinia-plugin-persistedstate' const pinia= 阅读全文

posted @ 2023-11-26 01:49 adong搬砖 阅读(31) 评论(0) 推荐(0)

vue3仓库模块并持久化

摘要: //store下的index.js import {createPinia} from 'pinia' import piniaPluginPersistedstate from 'pinia-plugin-persistedstate' const pinia=createPinia() pini 阅读全文

posted @ 2023-11-26 01:47 adong搬砖 阅读(59) 评论(0) 推荐(0)

随机数(整数)

摘要: function getintrandom(a,b){ return Math.floor(Math.random()*(Math.abs(b-a)+1)+Math.min(a,b))//包头包尾 } 阅读全文

posted @ 2023-11-26 01:40 adong搬砖 阅读(18) 评论(0) 推荐(0)

终止端口

摘要: 终止端口 windowsnetstat -ano|findstr 5500taskkill/pid 636 -t -f linux sudo lsof -i :8000 sudo kill -9 850 阅读全文

posted @ 2023-11-26 01:33 adong搬砖 阅读(15) 评论(0) 推荐(0)

九九乘法表

摘要: document.write('<table style="border-spacing:12px">') for (var j = 1; j <= 9; j++) { document.write('<tr align="left">') for (var i = 1; i <= j; i++) 阅读全文

posted @ 2023-11-26 01:29 adong搬砖 阅读(15) 评论(0) 推荐(0)

axios二次封装基本用法

摘要: import axios from 'axios' const request = axios.create({ baseURL: 'http://localhost:8080/admin', timeout: 1000, }); // 添加请求拦截器 request.interceptors.re 阅读全文

posted @ 2023-11-26 01:25 adong搬砖 阅读(14) 评论(0) 推荐(0)

防抖节流

摘要: //****************节流********************** //节流代码 function throttle(f) { let timer return function () { if (timer) return timer = setTimeout(() => { f 阅读全文

posted @ 2023-11-26 01:22 adong搬砖 阅读(13) 评论(0) 推荐(0)

mysql基本增删改查

摘要: ## 数据库更改编码utf8方式 ALTER DATABASE 数据库 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;## 表更改编码utf8方式 ALTER TABLE tb_user CONVERT TO CHARACTER SET utf8m 阅读全文

posted @ 2023-11-26 01:03 adong搬砖 阅读(32) 评论(0) 推荐(0)

node连接mysql数据库基本用法

摘要: const mysql = require('mysql') const pool = mysql.createPool({ host: '', port: '', user: '', password: '', database: '', connectionLimit: }) //arr为sql 阅读全文

posted @ 2023-11-26 00:44 adong搬砖 阅读(22) 评论(0) 推荐(0)

vite移动端适配

摘要: //先下包 npm i postcss-px-to-viewportimport pxtovw from 'postcss-px-to-viewport' //配置参数 移动端适配 const usePxtovw = pxtovw({ viewportWidth: 375, viewportUnit 阅读全文

posted @ 2023-11-26 00:22 adong搬砖 阅读(165) 评论(0) 推荐(0)