上一页 1 2 3 4 5 6 7 8 9 ··· 61 下一页
摘要: <template> <div> <div ref="username" >内容</div> <button @click="handleclick">按钮</buttom> </div> </template> <script> export default { methods:{ handlec 阅读全文
posted @ 2024-02-14 19:40 学无边涯 阅读(53) 评论(0) 推荐(0)
摘要: Axios 是一个基于 promise 的 HTTP 库,可以用在浏览器和 node.js 中 promise 是现代 javascript 中异步编程的基础,是一个由异步函数返回的可以向我们指示当前操作所处的状态的对象 使用 cdn: <script src="https://unpkg.com/ 阅读全文
posted @ 2024-02-14 12:35 学无边涯 阅读(312) 评论(0) 推荐(0)
摘要: <script> new Promise((resolve,reject)=>{ console.log("11111111111111111"); setTimeout(()=>{ resolve("##################"); }) }).then(res=>{ console.l 阅读全文
posted @ 2024-02-14 11:18 学无边涯 阅读(47) 评论(0) 推荐(0)
摘要: ES6 promise解决异步回调地狱问题 $.get('index/api',function(data){ $.get('index/api1'+data.id,function(data){ ........ }) }) setTimeout(()=>{ console.log('第一层'); 阅读全文
posted @ 2024-02-14 10:57 学无边涯 阅读(36) 评论(0) 推荐(0)
摘要: index.js import { createStore } from "vuex"; const store=createStore({ state:{ count:100 }, getters:{ compower(state){ return (id)=>state.count*id } } 阅读全文
posted @ 2024-02-13 22:28 学无边涯 阅读(55) 评论(0) 推荐(0)
摘要: index.js写法 import { createStore } from "vuex"; const store=createStore({ state:{ count:100 }, getters:{ compower(state){ return (id)=>state.count*id } 阅读全文
posted @ 2024-02-13 21:47 学无边涯 阅读(68) 评论(0) 推荐(0)
摘要: index.js 写法 import { createStore } from "vuex"; const store=createStore({ state:{ count:100 }, getters:{ compower(state){ return (id)=>state.count*id 阅读全文
posted @ 2024-02-13 21:13 学无边涯 阅读(167) 评论(0) 推荐(0)
摘要: 1,createWebHistory 这种h5用法 localhost:// 2,createWebHashHistory 这种hash用法 路径会带# localhost:/#/ 阅读全文
posted @ 2024-02-13 16:29 学无边涯 阅读(1535) 评论(0) 推荐(0)
摘要: 1,beforEach router.beforeach(to,from,next)=>{ console.log('1111') } 2,afterEach router.aftereach(to,from,next)=>{ console.log('222') } 阅读全文
posted @ 2024-02-13 10:39 学无边涯 阅读(433) 评论(0) 推荐(0)
摘要: 在Vue3中,let、var和const都是用于声明变量的关键字区别: var:在JavaScript中,var是声明变量的最常用的关键字。var声明的变量的作用域是函数级的,如果在函数内部声明的变量,其作用域将限制在函数体内部。如果在函数外部声明的变量,则其作用域将是全局的。 let:let也用于 阅读全文
posted @ 2024-02-11 17:03 学无边涯 阅读(1944) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 ··· 61 下一页