logo
publist
写文章

简介

该用户还未填写简介

擅长的技术栈

可提供的服务

暂无可提供的服务

antd4中Form组件initialValues设置初始值无效,使用setFieldsValue动态赋值,getFieldsValus动态获取值

首先说明initialValues这个属性,这个属性antd官方给的是设置Form组件初始值,但是有个问题如果值从后端请求那么initialValues可能会设置不上,如果说用匿名组件的话,修改From组件会导致一系列问题,接下来就是用到了setFieldsValue和getFieldsValus属性在antd官网中说明form组件不能使用this.setState修改值,只能通过setField

#reactjs
vue使用element ui 上传图片并展示

<el-uploadclass="avatar-uploader"action="https://jsonplaceholder.typicode.com/posts/":show-file-list="false":on-success="handleAvatarSuccess":before-upload="beforeAvatarUpload"&gt...

H5APP中使用vue拨打用户电话

简单粗暴调用函数直接调用这个函数就可以了,//拨打电话GetPhone(){if (window.plus) {plus.device.dial(‘要拨打的电话号’, true);}},这个弹窗是基于vux,要用弹窗的话可以下载vux,不要的话不用往下看了,手机号我也不知道谁的,看见了...

vuex中使用多个仓库,modules模块化

下载什么不多说了。创建好你的文件夹再main.js中注册之后要多少个仓库就在store文件下继续创建js文件,js文件中写:之后再index.js中引入例如我这个plc就是我的一个仓库引入进来需要获取vuex里面的值:this.$store.state.plc.xxx不同的仓库不同的名字调用vux方法:this.$store.commit('plc/xxx')...

vue中websocket的简单使用

**简单使用:**主要代码initWebSocket() {const wsuri = `ws:url`;this.websock = new WebSocket(wsuri);//这里面的this都指向vuethis.websock.onopen = this.websocketopen;this...

扫描微信二维码进入到指定网页,在VUE中使用QRCode.js

一、VUE里安装QRCode.js包npm i qrcodejs2二、引入qrcodejs2包import QRCode from 'qrcodejs2'具体实现代码片段<template><div id="qrcode" ref="qrcode"></div></template><script>im...

vue使用element ui 上传图片并展示

<el-uploadclass="avatar-uploader"action="https://jsonplaceholder.typicode.com/posts/":show-file-list="false":on-success="handleAvatarSuccess":before-upload="beforeAvatarUpload"&gt...

JS,Vue读取TXT文本,分段展示,匹配换行

<input type="file" @change="loadTextFromFile">loadTextFromFile(e){const file = e.target.files[0];const reader = new FileReader();reader.onload = e => th...

JS,Vue读取xml文件,并展示到界面中

<input type="file" ref="upload" accept=".xml" @change="executorListchange" id="file_executor" class="outputlist_upload">executorListchange(){this.readXML();},readXML() {...

JS,Vue读取xml文件,并展示到界面中

<input type="file" ref="upload" accept=".xml" @change="executorListchange" id="file_executor" class="outputlist_upload">executorListchange(){this.readXML();},readXML() {...

    共 11 条
  • 1
  • 2
  • 请选择