搜索结果列表页面开发
This commit is contained in:
20
src/components/OptionLink/README.md
Normal file
20
src/components/OptionLink/README.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# OptionLink
|
||||
|
||||
### 说明
|
||||
- 基于Link和d-option的封装
|
||||
- 已全局声明,直接使用(同Link)
|
||||
|
||||
``` html
|
||||
<OptionLink :to="xxxx">
|
||||
xxxxxx
|
||||
</OptionLink>
|
||||
```
|
||||
|
||||
### Props
|
||||
同Link
|
||||
|
||||
### Emits
|
||||
同Link
|
||||
|
||||
### Slots
|
||||
同Link
|
||||
41
src/components/OptionLink/index.vue
Normal file
41
src/components/OptionLink/index.vue
Normal file
@@ -0,0 +1,41 @@
|
||||
<template>
|
||||
<li class="devui-select__item g-option-link">
|
||||
<GLink v-bind="$props">
|
||||
<slot />
|
||||
</GLink>
|
||||
</li>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { GLink as IProp } from '@/components/GLink/type';
|
||||
|
||||
defineProps<IProp>();
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import 'devui-theme/styles-var/devui-var.scss';
|
||||
|
||||
.g-option-link {
|
||||
border-radius: 4px;
|
||||
padding: 0 8px;
|
||||
line-height: 32px;
|
||||
min-height: unset;
|
||||
&.disabled {
|
||||
background-color: unset;
|
||||
}
|
||||
:deep(a.g-link) {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
&:hover {
|
||||
color: unset;
|
||||
}
|
||||
.devui-avatar {
|
||||
line-height: normal; // 修复头像变形
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user