Commit c30b5734fa15015ccfd21fb83ee05f96c114b038
1 parent
f2967c1f
Exists in
master
and in
3 other branches
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 | 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 | 46 | const ImageViewer = Vue.extend(ElImageViewer); |
| 47 | 47 | const instance = new ImageViewer({ el: document.createElement('div') }); |
| 48 | 48 | Object.assign(instance, { |
| 49 | - index: src ? list.findIndex(url => url === src) : index, | |
| 49 | + index: src ? list.findIndex(url => url === src) : index || 0, | |
| 50 | 50 | urlList: list, |
| 51 | + ...other, | |
| 51 | 52 | onClose() { |
| 52 | 53 | instance.$el.className = `${instance.$el.className} viewer-fade-leave-active viewer-fade-leave-to`; |
| 53 | 54 | setTimeout(function() { | ... | ... |
packages/scheme/index.vue
| ... | ... | @@ -9,9 +9,8 @@ |
| 9 | 9 | <slot name="header" :filterModel="filterModel" v-bind="_slotScope"></slot> |
| 10 | 10 | </div> |
| 11 | 11 | <!-- 筛选组件 --> |
| 12 | - <div class="zee-scheme__filter"> | |
| 12 | + <div v-if="filter" class="zee-scheme__filter"> | |
| 13 | 13 | <z-filter |
| 14 | - v-if="filter" | |
| 15 | 14 | :value="_filterModel" |
| 16 | 15 | :list="filterList || listMap.filter | noRulesFilter" |
| 17 | 16 | :size="size" | ... | ... |