浏览代码

change mask icon source to github (#4063)

杨奕 8 年之前
父节点
当前提交
44bc660b8b
共有 2 个文件被更改,包括 3 次插入8 次删除
  1. 1 1
      examples/index.tpl
  2. 2 7
      packages/dialog/src/component.vue

+ 1 - 1
examples/index.tpl

@@ -4,7 +4,7 @@
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
     <link rel="stylesheet" href="//at.alicdn.com/t/font_1473762766_7074292.css">
-    <link rel='mask-icon' href="//fuss10.elemecdn.com/9/92/3a6e19a64a8ed173a4677ec0e412bsvg.svg" color="#20a0ff">
+    <link rel='mask-icon' href="https://raw.githubusercontent.com/ElemeFE/element/dev/examples/assets/images/element-logo-small.svg" color="#20a0ff">
     <title>Element</title>
   </head>
   <body>

+ 2 - 7
packages/dialog/src/component.vue

@@ -25,7 +25,6 @@
 
 <script>
   import Popup from 'element-ui/src/utils/popup';
-  import throttle from 'throttle-debounce/throttle';
   import emitter from 'element-ui/src/mixins/emitter';
 
   export default {
@@ -98,12 +97,12 @@
         this.$emit('input', val);
         if (val) {
           this.$emit('open');
-          this.$el.addEventListener('scroll', this.throttledUpdatePopper);
+          this.$el.addEventListener('scroll', this.updatePopper);
           this.$nextTick(() => {
             this.$refs.dialog.scrollTop = 0;
           });
         } else {
-          this.$el.removeEventListener('scroll', this.throttledUpdatePopper);
+          this.$el.removeEventListener('scroll', this.updatePopper);
           this.$emit('close');
         }
       }
@@ -130,10 +129,6 @@
       }
     },
 
-    created() {
-      this.throttledUpdatePopper = throttle(100, this.updatePopper);
-    },
-
     mounted() {
       if (this.value) {
         this.rendered = true;