Carousel 走马灯源码分析整理笔记,这篇写的不详细,后面有空补充 main.vue <template> <!--走马灯的最外层包裹div--> <div class="el-carousel" :class="{ 'el-carousel--card': type === 'card' }" @mouseenter.stop="handleMouseEnter" @mouseleave.stop="…
element-ui button组件 radio组件源码分析整理笔记(一) element-ui switch组件源码分析整理笔记(二) element-ui inputNumber.Card .Breadcrumb组件源码分析整理笔记(三) element-ui Progress.Badge.Alert组件源码分析整理笔记(四) element-ui Tag.Dialog组件源码分析整理笔记(五) element-ui input组件源码分析整理笔记(六) element-ui Pagina…
Button组件 button.vue <template> <button class="el-button" @click="handleClick" :disabled="buttonDisabled || loading" :autofocus="autofocus" :type="nativeType" :class="[ type ? 'el-button--' +…
本文章从如下图所示的最基本的table入手,分析table组件源代码.本人已经对table组件原来的源码进行削减,源码点击这里下载.本文只对重要的代码片段进行讲解,推荐下载代码把项目运行起来,跟着文章的思路阅读. 思路 <div class="el-table"> <!-- 隐藏列: slot里容纳table-column --> <div class="hidden-columns" ref="hiddenColumns&q…
inputNumber组件 <template> <!--@dragstart.prevent禁止input中数字的拖动--> <div @dragstart.prevent :class="[ 'el-input-number', inputNumberSize ? 'el-input-number--' + inputNumberSize : '', { 'is-disabled': inputNumberDisabled }, { 'is-without-co…
input 输入框组件 源码: <template> <div :class="[ type === 'textarea' ? 'el-textarea' : 'el-input', inputSize ? 'el-input--' + inputSize : '', { 'is-disabled': inputDisabled, 'el-input-group': $slots.prepend || $slots.append, 'el-input-group--append…
简单写了部分注释,upload-dragger.vue(拖拽上传时显示此组件).upload-list.vue(已上传文件列表)源码暂未添加多少注释,等有空再补充,先记下来... index.vue <script> import UploadList from './upload-list'; import Upload from './upload'; import ElProgress from 'element-ui/packages/progress'; import Migrati…
MessageBox组件源码,有添加部分注释 main.vue <template> <transition name="msgbox-fade"> <!--包裹弹框的div--> <div class="el-message-box__wrapper" tabindex="-1" v-show="visible" @click.self="handleWrapperClic…
源码如下: <template> <div class="el-switch" :class="{ 'is-disabled': switchDisabled, 'is-checked': checked }" role="switch" :aria-checked="checked" :aria-disabled="switchDisabled" @click="switchV…
element-ui源码的版本是2.4.9 pagination.js import Pager from './pager.vue'; import ElSelect from 'element-ui/packages/select'; import ElOption from 'element-ui/packages/option'; import ElInput from 'element-ui/packages/input'; import Locale from 'element-ui…