mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
* feat(components): [collapse] add expand icon position customization * chore: [collapse] update expand icon position options * feat(docs): update custom icon position example * fix(docs): update default expand icon position to 'right' * fix: CollapseIconPositionType * revert: revert * docs: update * docs: update custom icon position version to 2.9.6 * docs: update v * Update docs/examples/collapse/custom-icon-position.vue Co-authored-by: sea <45450994+warmthsea@users.noreply.github.com> * chore(docs): format * chore: update V * fix: title slot isActive * Update docs/en-US/component/collapse.md Co-authored-by: btea <2356281422@qq.com> * Update packages/components/collapse/src/collapse-item.vue Co-authored-by: btea <2356281422@qq.com> * Update docs/en-US/component/collapse.md Co-authored-by: btea <2356281422@qq.com> --------- Co-authored-by: sea <45450994+warmthsea@users.noreply.github.com> Co-authored-by: btea <2356281422@qq.com>
59 lines
2.0 KiB
Vue
59 lines
2.0 KiB
Vue
<template>
|
|
<div class="demo-collapse-position">
|
|
<div class="flex items-center mb-4">
|
|
<span class="mr-4">expand icon position: </span>
|
|
<el-switch
|
|
v-model="position"
|
|
inactive-value="left"
|
|
active-value="right"
|
|
inactive-text="left"
|
|
active-text="right"
|
|
style="--el-switch-off-color: #88b8fe"
|
|
/>
|
|
</div>
|
|
|
|
<el-collapse :expand-icon-position="position">
|
|
<el-collapse-item title="Consistency" name="1">
|
|
<div>
|
|
Consistent with real life: in line with the process and logic of real
|
|
life, and comply with languages and habits that the users are used to;
|
|
</div>
|
|
<div>
|
|
Consistent within interface: all elements should be consistent, such
|
|
as: design style, icons and texts, position of elements, etc.
|
|
</div>
|
|
</el-collapse-item>
|
|
<el-collapse-item title="Feedback" name="2">
|
|
<div>
|
|
Operation feedback: enable the users to clearly perceive their
|
|
operations by style updates and interactive effects;
|
|
</div>
|
|
<div>
|
|
Visual feedback: reflect current state by updating or rearranging
|
|
elements of the page.
|
|
</div>
|
|
</el-collapse-item>
|
|
<el-collapse-item title="Efficiency" name="3">
|
|
<div>
|
|
Simplify the process: keep operating process simple and intuitive;
|
|
</div>
|
|
<div>
|
|
Definite and clear: enunciate your intentions clearly so that the
|
|
users can quickly understand and make decisions;
|
|
</div>
|
|
<div>
|
|
Easy to identify: the interface should be straightforward, which helps
|
|
the users to identify and frees them from memorizing and recalling.
|
|
</div>
|
|
</el-collapse-item>
|
|
</el-collapse>
|
|
</div>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import { ref } from 'vue'
|
|
import type { CollapseIconPositionType } from 'element-plus'
|
|
|
|
const position = ref<CollapseIconPositionType>('left')
|
|
</script>
|