摘要:
params 和 query 实际上用法是相似的,parmas 常用于动态路由的传值,而query是通过 ? 把参数拼接到路由上跟 GET 请求同理 params 用法 this.$router.push({ name: "xx", //路由名称 params: { // xxx 参数 } }); 阅读全文
摘要:
watch: { healthData: { deep: true, // 深度监听 immediate: true, // true的话,不管数据是否有变化,进来就会运行 handler: function(newVal, oldVal){ } }, containerPortList: { de 阅读全文
摘要:
computed: { editText () { this.$set(this.formRules.sshPassword[0], "required", !this.isEdit) return this.isEdit ? "编辑" : "新增"; } }, 阅读全文
摘要:
方法通过element form 提供的 validator 方法进行处理 例如 rules: { 'httpPath': [ { required: true, message: '该字段必填' }, { max: 255, message: "长度不得超过255个字符" }, { validat 阅读全文
摘要:
实现原理将文件切割成几份,一份份的上传,上传完毕,再通过接口告知后端将所有片段合并 // 模板 <el-form-item label="请选择文件:" v-if="!processPercentage"> <div class="upload-button-box"> <input type="f 阅读全文
摘要:
// 模板 <el-form-item label="批量录入:"> <div class="upload-button-box"> <input v-if="!fileName" type="file" ref="upload" accept=".xls,.xlsx" @change="readE 阅读全文
摘要:
createCode () { const str = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; let text = ''; for (let i = 0; i < 20; i++) { const numb 阅读全文