- 博客(11)
- 收藏
- 关注
原创 Vue iframe父子通信
vue 组件嵌入iframe<!-- vue template--><div> <iframe src="http://localhost:8081/" ref="iframe" frameborder="0"></iframe></div>mounted() { window.addEventListener("message", (e) => { const data = e.data; co.
2022-03-09 14:15:18
630
原创 axios post 请求参数直接传递字符串或者数值
直接用axios post传递一个字符串给后端接口axios({ method: 'POST', url: '/url', data: 'hello', headers: { 'Content-Type': 'application/json; charset=utf-8' } }).then(({ data }) => { console.log(data) })...
2021-09-22 18:29:32
9566
2
原创 nginx proxy_pass 443
nginx 80端口proxy_pass转发接口请求到443upstream abc.test.com { server 127.0.0.1:443;}server { listen 80; server_name localhost; location ^~/api/ { proxy_pass https://abc.test.com/; proxy_ssl_certificate /etc/nginx/cert/123456
2021-04-26 21:29:29
979
原创 Luckysheet 图表(chartmix)
快速搭建luckysheet第一步这里用文档给的CDN方式引入<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/luckysheet/dist/plugins/css/pluginsCss.css' /><link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/luckysheet/dist/plugins/plugins.css' /><lin
2021-04-26 09:50:55
7370
原创 element 给table设置thead和tbody
用Element的table时需要定义表格的高度和背景效果.el-table .el-table__header-wrapper>table>thead>tr>th{ height: 40px; background: rgba(246, 247, 251, 1);}.el-table .el-table__body-wrapper>table>tbody>tr>td{ height: 40px;}...
2021-03-19 17:54:42
1417
转载 Vue textarea动态显示行数
效果.edit { display: flex; height: 300px; } #leftBox { width: 40px; height:100%; text-align:left; } #edit-content { padding:10px 8px; width:100%; height:100%; font-size: 12px; line-height: 24px;
2021-03-18 09:28:16
4484
2
原创 iframe 中父子窗口方法相互调用
父页面代码index.html<body> <iframe id="frame" name="frame" src="child.html" frameborder="0"></iframe> <button onclick="callChild()">调用子页面方法cadd</button> <script> function fadd() { console.log
2021-03-18 08:56:51
96
原创 Invalid handler for event “click“: got undefined
Vue中报以下错误:Invalid handler for event “click”: got undefinedUncaught (in promise) TypeError: _this4.handleSearch is not a function从Vue warn中可以看出来是click事件未定义,找不到函数this.handleSearch函数。由于我使用mixin将一些基础的属性和方法进行封装,在我修改时将handleSearch方法注释了,所以才会报错误。...
2020-08-27 12:25:29
2346
原创 module.exports 和 exports 之间有什么区别?
Node.js具有内置的模块系统当想导入某些东西时,使用const http = require('http')http.createServer((req, res) => { //do})可以导入存在于内置模块http.js文件中的公开功能。为什么能使用http.createServer()这个方法,因为http.js这个文件对公开了这个方法。默认情况下,文件中定义的任何对象或变量都是私有的,不会公开给外界。这时就使用到Node的module模块提供的module.export
2020-08-26 21:56:05
961
1
原创 Vue Element UI 的表单居中
Vue Element UI 的表单居中<style lang="scss" scoped>/deep/ .el-dialog__body { margin: 0 auto;}</style>/deep/ 深度选择器在vue中,为了避免父组件的样式影响到子组件的样式,会在style中加<style scoped>,这样父组件中如果有跟子组件相同的class名称或者使用选择器的时候,就不会影响到子组件的样式。父组件<style scoped>
2020-08-24 15:21:34
6215
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人