Skip to content

Commit

Permalink
Merge pull request #667 from Morning-UI/issue-666
Browse files Browse the repository at this point in the history
close #666 0.12.29 quick update
  • Loading branch information
EarlyH committed May 6, 2019
2 parents 5586162 + 7705717 commit ec62892
Show file tree
Hide file tree
Showing 4 changed files with 156 additions and 43 deletions.
162 changes: 125 additions & 37 deletions dist/morning-ui.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/morning-ui.min.js

Large diffs are not rendered by default.

30 changes: 27 additions & 3 deletions src/lib/components/pagination/index.vue
Expand Up @@ -24,12 +24,24 @@
<template v-for="index in data.total">

<!-- eslint-disable vue/require-v-for-key -->
<template v-if="(data.hideEnd - 1) === index && data.hideEnd !== 1">
<template v-if="index === 1 && data.hideEnd > 1">
<a href="javascript:;" class="prev" @click="to(data.currentPage - 1)"><i class="mo-icon mo-icon-left"></i></a>
</template>

<template v-if="index === 1 && data.hideEnd >= 1">
<a
href="javascript:;"
@click="to(1)"
>
1
</a>
</template>

<template v-if="data.hideEnd === index && data.hideEnd !== 1">
<a href="javascript:;" class="ignore">...</a>
</template>

<template v-if="index >= data.hideEnd && index <= data.hideStart">
<template v-if="index >= (data.hideEnd + 1) && index <= (data.hideStart - 1)">
<a
v-if="data.currentPage === index"
href="javascript:;"
Expand All @@ -47,8 +59,20 @@
</a>
</template>

<template v-if="(data.hideStart + 1) === index && data.hideStart !== data.total">
<template v-if="data.hideStart === index && data.hideStart !== data.total">
<a href="javascript:;" class="ignore">...</a>
</template>

<template v-if="data.total === index && data.hideStart <= data.total">
<a
href="javascript:;"
@click="to(data.total)"
>
{{data.total}}
</a>
</template>

<template v-if="data.total === index && data.hideStart < data.total">
<a href="javascript:;" class="next" @click="to(data.currentPage + 1)"><i class="mo-icon mo-icon-right"></i></a>
</template>
<!-- eslint-enable vue/require-v-for-key -->
Expand Down
5 changes: 3 additions & 2 deletions src/lib/components/table/normal-table.vue
Expand Up @@ -69,7 +69,8 @@
@mouseenter="$emit('cell-enter', line, data.normalKeys[index])"
@mouseleave="$emit('cell-leave', line, data.normalKeys[index])"
>
<!-- <keep-alive> 不使用后list数据有变化就会引起component变化,存在性能风险。但使用了keep-alive会存在组件事件重复触发的问题 -->
<keep-alive>
<!-- 不使用后list数据有变化就会引起component变化,存在性能风险。但使用了keep-alive会存在组件事件重复触发的问题 -->
<component
:is="{
template : ('<div>' + col + '</div>'),
Expand Down Expand Up @@ -100,7 +101,7 @@
}
}"
></component>
<!-- </keep-alive> -->
</keep-alive>
</td>
</template>
</tr>
Expand Down

0 comments on commit ec62892

Please sign in to comment.