ELEMENT
M18771556987
M18771556987
展开
-
element collapse-transition 无法捕捉动画结束
import { addClass, removeClass } from 'element-ui/src/utils/dom';class Transition { beforeEnter(el) { addClass(el, 'collapse-transition'); if (!el.dataset) el.dataset = {}; el.dataset.oldPaddingTop = el.style.paddingTop; el.dataset.ol.原创 2020-09-24 23:16:19 · 990 阅读 · 0 评论 -
Event Emitter
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Document</title></head><body> <script type="text/javascript"> function EventEmitter() { this.even.原创 2020-07-21 00:46:27 · 338 阅读 · 0 评论 -
使用element Form 自带校验功能,实现上传控件的校验
<template> <div class="upload-imgs flex align-items-center"> <div class="uploadBox" v-if="ossUrl == ''" @click="triggerUpload"> <i class="icon-Popeyes-fonticon-06"></i> </div> <.原创 2020-09-09 23:48:34 · 615 阅读 · 0 评论 -
element dom 事件注册 on off once
/* istanbul ignore next */// 匿名函数自执行,兼容IE-attachEvent,chrome-addEventListenerexport const on = (function() { if (!isServer && document.addEventListener) { return function(element, event, handler) { if (element && event &&.翻译 2020-07-01 11:32:07 · 361 阅读 · 0 评论 -
element ui utils getValueByPath & getPropByPath
/** * * @param {*} object { aaa: { bbb: { ccc: 123 } } } * @param {*} prop "aaa.bbb.ccc" */export const getValueByPath = function(object, prop) { prop = prop || ''; const paths = prop.split...原创 2020-03-31 11:26:23 · 973 阅读 · 0 评论 -
element ui clickoutside 指令源码解读
import Vue from 'vue';import { on } from 'element-ui/src/utils/dom';const nodeList = [];// 一个命名空间const ctx = '@@clickoutsideContext';let startClick;// 全局种子id,自动增长,永不重复let seed = 0;// mouse...原创 2020-03-31 11:12:38 · 509 阅读 · 0 评论 -
element form 右上角错误提示
<template> <div id="app" class="form-xxx" style="padding: 50px; width: 500px;margin: 0 auto;"> <el-form :model="ruleForm" :rules="rules" label-position="top" size="small" ref="ru...原创 2020-03-14 14:41:48 · 1486 阅读 · 0 评论 -
element ui form 行内错误提示
<template> <div id="app"> <el-form :model="ruleForm" :rules="rules" label-position="right" size="small" ref="ruleForm" label-width="100px" class="demo-ruleForm"> <el-...转载 2020-03-13 21:22:05 · 5580 阅读 · 0 评论 -
element ui form 验证例子
<template> <div id="app"> <el-form :model="ruleForm" :rules="rules" label-position="top" ref="ruleForm" label-width="100px" class="demo-ruleForm"> <el-form-item label...原创 2019-06-26 10:45:02 · 597 阅读 · 0 评论 -
Vue provide&inject
通过学习element ui collapase 组件,来学习provide和injectprovide 提供出来inject 注入进来由父级组件提供出来,子级组件注入a.el-collapse 父组件, 提供provide<template> <div class="el-collapse" role="tablist" aria-multisel...原创 2019-05-10 11:39:40 · 312 阅读 · 0 评论