09 2021 档案
css 设置文字颜色渐变
摘要:<div class="text">text word</div> .text{ font-size: 40px; font-weight: 600; background-image: linear-gradient(to right, red, rgb(255, 174, 0), yellow,
阅读全文
vue 使用MQTT服务进行数据传输
摘要:index.html中引入mqtt文件 <script src="./js/mqttws31.min.js" type="text/javascript"></script> vue 文件中使用 data(){ return{ topic:"message-topic", color:"" } }
阅读全文
input type='file' 时,连续选取同一个文件onchange 没反应,需要将前面或取得value值删除
摘要:<input type="file" multiple @change="changeFile" ref="file" name="fileElem" id="fileElem" /> changeFile(e){ this.file = e.target.files[0] document.get
阅读全文
vue 上传较大的文件
摘要:使用插件 vue-simple-uploader npm install vue-simple-uploader --save npm install spark-md5 --save main.js 中添加 import uploader from 'vue-simple-uploader'; V
阅读全文
js 数组根据某一字段排序
摘要:function sorts_fun(arr) { return function(a, b) { var v1 = a[arr]; var v2 = b[arr]; return v1 - v2; }; }; a= a.sort(sorts_fun('orderNum'));
阅读全文
elementui table 中 v-if 有时显示和隐藏不起作用
摘要:在 el-table-column 中加一个key就好了 <el-table-column label="难易度" prop="facilityValueName" key="facilityValueName" width="80" />
阅读全文
h5 input=file 按钮样式修改
摘要:<div class="fileBtn"> <input type="file" /> </div> <style> .fileBtn{ position: relative; display: inline-block; background: #409EFF; border: 1px solid
阅读全文