分类为 VueComponentLibrary 的文章:
介绍 validatable: 是否使用组件内置的校验 autoCorrect: min > max 时自动换位、autoCorrect:true + allowHalf:false 时可能会将 null 变为 0 allowHalf: 是否允许「一个数字、一个 null」、autoCorrect:true + allowHalf:false 时将 null 变为 0 用法 <NumberRange v-model:value="form.valueRange" /> <NumberRange v-model:value="form.valueRange" :allowHalf="false"...
2025/04/10 浏览数(29) 分类(VueComponentLibrary)
自定义组件内部在 blur 和 change 后增加: import emitter from 'element-ui/src/mixins/emitter'; let { methods: { dispatch }, } = emitter; methods: { onChange () { dispatch.call(this, 'ElFormItem', 'el.form.change', this.value); }, onBlur () { dispatch.call(this, 'ElFormItem', 'el.form.blur', this.value); } } 也可...
2023/07/15 浏览数(668) 分类(VueComponentLibrary)
当服务器宕机时,同一个页面的所有接口都会报错,导致页面出现一堆消息,本文方法可以让相同内容的消息只显示最后一个。 不支持 .error() 式的用法。 操作步骤 编辑 main.js,添加以下代码: import { Message } from 'element-ui'; var MessageStack = []; Vue.prototype.msg = function(config = {}) { MessageStack.forEach(function(item = {}) { if (item.message == config.message &&...
2020/11/10 浏览数(923) 分类(VueComponentLibrary)
用法 <template> <VideoUploader v-model="video" :width="400" :height="300" @cover="saveVideoCover" /> <img :src="cover" v-if="cover" /> </template> <script> export default { data() { return { video: null, // 视频地址 cover: null, // 封面地址 };...
2020/01/1 浏览数(1,570) 分类(VueComponentLibrary)
点击返回顶部
  1. 留言
  2. 联系方式