Commit c30b5734fa15015ccfd21fb83ee05f96c114b038

Authored by 刘汉宸
1 parent f2967c1f

fix: 修复Scheme的filter配置及ImageViewer默认值

Showing 2 changed files with 4 additions and 4 deletions   Show diff stats
packages/index.js
@@ -42,12 +42,13 @@ const install = function(Vue, opts = {}) { @@ -42,12 +42,13 @@ const install = function(Vue, opts = {}) {
42 Vue.component(ElImageViewer.name, ElImageViewer); 42 Vue.component(ElImageViewer.name, ElImageViewer);
43 }; 43 };
44 44
45 -const _ImageViewer = function({ index, src, list }) { 45 +const _ImageViewer = function({ index, src, list, ...other }) {
46 const ImageViewer = Vue.extend(ElImageViewer); 46 const ImageViewer = Vue.extend(ElImageViewer);
47 const instance = new ImageViewer({ el: document.createElement('div') }); 47 const instance = new ImageViewer({ el: document.createElement('div') });
48 Object.assign(instance, { 48 Object.assign(instance, {
49 - index: src ? list.findIndex(url => url === src) : index, 49 + index: src ? list.findIndex(url => url === src) : index || 0,
50 urlList: list, 50 urlList: list,
  51 + ...other,
51 onClose() { 52 onClose() {
52 instance.$el.className = `${instance.$el.className} viewer-fade-leave-active viewer-fade-leave-to`; 53 instance.$el.className = `${instance.$el.className} viewer-fade-leave-active viewer-fade-leave-to`;
53 setTimeout(function() { 54 setTimeout(function() {
packages/scheme/index.vue
@@ -9,9 +9,8 @@ @@ -9,9 +9,8 @@
9 <slot name="header" :filterModel="filterModel" v-bind="_slotScope"></slot> 9 <slot name="header" :filterModel="filterModel" v-bind="_slotScope"></slot>
10 </div> 10 </div>
11 <!-- 筛选组件 --> 11 <!-- 筛选组件 -->
12 - <div class="zee-scheme__filter"> 12 + <div v-if="filter" class="zee-scheme__filter">
13 <z-filter 13 <z-filter
14 - v-if="filter"  
15 :value="_filterModel" 14 :value="_filterModel"
16 :list="filterList || listMap.filter | noRulesFilter" 15 :list="filterList || listMap.filter | noRulesFilter"
17 :size="size" 16 :size="size"