adong搬砖

导航

2023年12月6日 #

node内置模块

摘要: //1.path模块 console.log(path.join('a', 'b', 'c'))//相对路径 a\b\c console.log(path.resolve('a', 'b', 'c'))//绝对路径 D:\桌面\express\a\b\c console.log(path.parse 阅读全文

posted @ 2023-12-06 23:01 adong搬砖 阅读(30) 评论(0) 推荐(0)

2023年11月28日 #

脚手架环境变量

摘要: react REACT_APP_BASEURLprocess.env.REACT_APP_BASEURL webpack/@vue/cliVUE_APP_BASEURLprocess.env.VUE_APP_BASEURL viteVITE_BASEURLimport.meta.env.VITE_B 阅读全文

posted @ 2023-11-28 09:17 adong搬砖 阅读(25) 评论(0) 推荐(0)

2023年11月27日 #

vue2跨级组件传值

摘要: //祖先组件 import Son from './Son' export default { components: { Son }, provide () { return { money: 1000000000 } } } 子孙组件 <template> <div> 孙子组件 <p>这个是爷爷 阅读全文

posted @ 2023-11-27 09:11 adong搬砖 阅读(18) 评论(0) 推荐(0)

vue2兄弟组件传值

摘要: // 1 创建一个公共的vue实例(bus) import Vue from 'vue' const bus = new Vue() export default bus <!-- brother1--> <template> <div> 兄弟1组件 <p> <button @click="send 阅读全文

posted @ 2023-11-27 09:07 adong搬砖 阅读(202) 评论(0) 推荐(0)

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搬砖 阅读(37) 评论(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搬砖 阅读(67) 评论(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搬砖 阅读(19) 评论(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搬砖 阅读(22) 评论(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搬砖 阅读(20) 评论(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搬砖 阅读(21) 评论(0) 推荐(0)