2025年1月27日
摘要: 子组件代码片段: <template> <div class="button" :class="[type, size]"> a<slot></slot> </div> </template> <script> const options = { props: ["type", "size"] } 阅读全文
posted @ 2025-01-27 11:20 z5337 阅读(13) 评论(0) 推荐(0)
摘要: 转自:kimi.com 在Vue.js中,props 是组件之间通信的一种方式,用于将数据从父组件传递到子组件。props 是子组件接收父组件传递的数据的接口,使得子组件可以接收并使用父组件提供的数据。以下是props的主要作用和使用场景: 1. 数据传递 props 允许父组件将数据传递给子组件, 阅读全文
posted @ 2025-01-27 11:03 z5337 阅读(48) 评论(0) 推荐(0)
摘要: 转自:kimi.com 在Vue.js中,slot 是一个非常强大的功能,用于实现组件的可定制性。它允许父组件向子组件插入自定义内容,从而提高组件的复用性和灵活性。以下是slot的主要作用和使用场景: 1. 内容分发(Content Distribution) slot 允许父组件在子组件的特定位置 阅读全文
posted @ 2025-01-27 10:58 z5337 阅读(85) 评论(0) 推荐(0)
摘要: <template> <div> <h1> User Data</h1> <div class="thead"> <div class="row bold"> <div class="col">编号</div> <div class="col">姓名</div> <div class="col">性 阅读全文
posted @ 2025-01-27 10:49 z5337 阅读(12) 评论(0) 推荐(0)
摘要: 转自:kimi.com 状态码是HTTP协议中的一部分,用于表示服务器对客户端请求的响应状态。以下是一些常用的HTTP状态码及其含义: 1xx(信息性状态码) 100 Continue:服务器已接收到请求的第一部分,正在等待其余部分。 101 Switching Protocols:服务器根据客户端 阅读全文
posted @ 2025-01-27 10:19 z5337 阅读(145) 评论(0) 推荐(0)
摘要: <template> <div> <h1> User Data</h1> <input type="button" value="获取远程数据" @click="sendPost4()"> </div> </template> <script> import axios from 'axios'; 阅读全文
posted @ 2025-01-27 10:01 z5337 阅读(19) 评论(1) 推荐(0)
摘要: 转自:kimi.com npm(Node Package Manager)是Node.js的包管理工具,它提供了丰富的参数来帮助用户更好地管理和使用包。以下是一些常用的npm参数: 安装相关参数 install:安装项目依赖的包。 -S 或 --save:将包添加到dependencies中。 -D 阅读全文
posted @ 2025-01-27 09:23 z5337 阅读(32) 评论(0) 推荐(0)