摘要:
目标: 实现A向B通信 1. 确定全局事件总线: 将vm对象作为事件总线挂载到vue的原型对象上 new Vue({ beforeCreate () { Vue.prototype.$bus = this } }) 2. A组件: 调用(分发)事件 this.$bus.$emit('xxx', da 阅读全文
摘要:
在vue.config.js中配置如下 module.exports = { lintOnSave: false, // 当保存时不进行eslint的检查 devServer: { open: true, // 自动打开 port: 8081, //修改启动的端口号 // 本身发的请求 http:/ 阅读全文
摘要:
![](https://img2020.cnblogs.com/blog/1341065/202107/1341065-20210708192249635-2091859856.png) 阅读全文
摘要:
<!DOCTYPE html> <html> <head> <meta charset='utf-8'> <title></title> <script src='../js/vue.js'></script> </head> <body> <div id='app'> 姓: <input type 阅读全文
摘要:
![](https://img2020.cnblogs.com/blog/1341065/202107/1341065-20210707202524721-646745308.png) 阅读全文
摘要:
<!DOCTYPE html> <html> <head> <meta charset='utf-8'> <title></title> <script src='../js/vue.js'></script> </head> <body> <div id='app'> 姓: <input type 阅读全文
摘要:
<!DOCTYPE html> <html> <head> <meta charset='utf-8'> <title></title> <script src='../js/vue.js'></script> </head> <body> <div id='app'> 姓: <input type 阅读全文
摘要:
<!DOCTYPE html> <html> <head> <meta charset='utf-8'> <title></title> <script src='../js/vue.js'></script> </head> <body> <div id='app'> 姓: <input type 阅读全文
摘要:
方式一 引入 npm i cors const app = express(); //在express下解决跨域 const cors = require('cors'); app.use(cors()); 方式二 res.setHeader("Access-Control-Allow-Origin 阅读全文
摘要:
1.v-model对应的是数组时,返回的是checkbox的value值, 2.其他所有情况(包括字符串...)均返回checkbox的boolean值 <!DOCTYPE html> <html> <head> <meta charset='utf-8'> <title></title> <scr 阅读全文