上一页 1 2 3 4 5 6 ··· 58 下一页
摘要: vue 具名插槽slot 为插槽取名字 app.vue <template> <h1>插槽知识</h1> <SmallSlot> <template #header> <div> <ul> <li>1</li> <li>2</li> <li>3</li> </ul> </div> </templat 阅读全文
posted @ 2024-02-15 09:46 学无边涯 阅读(21) 评论(0) 推荐(0) 编辑
摘要: vue 插槽slot 父组件为子组件传递html结构 app.vue <template> <h1>插槽知识</h1> <SmallSlot> <div> <ul> <li>1</li> <li>2</li> <li>3</li> </ul> </div> </SmallSlot> </templa 阅读全文
posted @ 2024-02-15 09:39 学无边涯 阅读(4) 评论(0) 推荐(0) 编辑
摘要: App.vue <template> <ConpentA @paEvent="clickData"/> {{ mes }} </template> <script> import ConpentA from './components/ConpentA.vue'; export default{ d 阅读全文
posted @ 2024-02-14 22:57 学无边涯 阅读(27) 评论(0) 推荐(0) 编辑
摘要: Props 静态属性 <template> <div> <ConpentA title="我是静态props"/> </div> </template> <script> import ConpentA from './components/ConpentA.vue' export default 阅读全文
posted @ 2024-02-14 21:49 学无边涯 阅读(16) 评论(0) 推荐(0) 编辑
摘要: <template> <div> <div ref="username" >内容</div> <button @click="handleclick">按钮</buttom> </div> </template> <script> export default { methods:{ handlec 阅读全文
posted @ 2024-02-14 19:40 学无边涯 阅读(16) 评论(0) 推荐(0) 编辑
摘要: Axios 是一个基于 promise 的 HTTP 库,可以用在浏览器和 node.js 中 promise 是现代 javascript 中异步编程的基础,是一个由异步函数返回的可以向我们指示当前操作所处的状态的对象 使用 cdn: <script src="https://unpkg.com/ 阅读全文
posted @ 2024-02-14 12:35 学无边涯 阅读(146) 评论(0) 推荐(0) 编辑
摘要: <script> new Promise((resolve,reject)=>{ console.log("11111111111111111"); setTimeout(()=>{ resolve("##################"); }) }).then(res=>{ console.l 阅读全文
posted @ 2024-02-14 11:18 学无边涯 阅读(8) 评论(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 学无边涯 阅读(4) 评论(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 学无边涯 阅读(11) 评论(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 学无边涯 阅读(19) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 58 下一页