摘要: vue开发时地址栏上的ip后面会跟着一个#号,如果想去掉这个井号,可以在路由上加上 mode: 'history', 就可以去掉 //设置路由 const router = new VueRouter({ mode: "history", base: __dirname, routes: [ { p 阅读全文
posted @ 2023-02-22 16:50 罗砂 阅读(176) 评论(0) 推荐(0)
摘要: axios请求 <template> <div id="app"> <button @click="getStudents">获取学生信息</button> </div> </template> <script> import axios from 'axios'; export default{ 阅读全文
posted @ 2023-02-22 16:42 罗砂 阅读(48) 评论(0) 推荐(0)
摘要: 父组件: <propss :pos='persons'></propss> //引入子组件 import propss from './props.vue';data() { return{ inHot: true, n:0, x:1, keyWords:"", // 原始数据 persons:[ 阅读全文
posted @ 2023-02-22 13:49 罗砂 阅读(15) 评论(0) 推荐(0)
摘要: v-big 点击按钮X加1乘以10 <!-- 自定义函数 --> <div class=" weather "> <h2>当前n是{{x}}</h2> <h2>放大十倍的n<span v-big="x"></span></h2> <button @click="x++">点我n+1</button> 阅读全文
posted @ 2023-02-22 09:29 罗砂 阅读(12) 评论(0) 推荐(0)
摘要: 略过其节点的解析过程 阅读全文
posted @ 2023-02-22 08:48 罗砂 阅读(15) 评论(0) 推荐(0)