2021-12-30 00:44:43 +08:00
|
|
|
::: anchor
|
|
|
|
:::
|
|
|
|
|
2021-10-26 01:13:23 +08:00
|
|
|
::: title 基础使用
|
2021-10-19 22:28:44 +08:00
|
|
|
:::
|
|
|
|
|
2021-10-01 20:22:49 +08:00
|
|
|
::: demo
|
|
|
|
|
|
|
|
<template>
|
2021-10-13 02:32:29 +08:00
|
|
|
<lay-avatar :src="src"></lay-avatar>
|
2021-10-01 20:22:49 +08:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import { ref } from 'vue'
|
|
|
|
|
|
|
|
export default {
|
|
|
|
setup() {
|
|
|
|
|
2021-11-22 11:41:34 +08:00
|
|
|
const src = ref("https://portrait.gitee.com/uploads/avatars/user/2813/8441097_shaynas_1610801433.png")
|
2021-10-01 20:22:49 +08:00
|
|
|
|
|
|
|
return {
|
2021-10-13 02:32:29 +08:00
|
|
|
src
|
2021-10-01 20:22:49 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
:::
|
|
|
|
|
2021-10-26 01:13:23 +08:00
|
|
|
::: title 圆角头像
|
2021-10-19 22:28:44 +08:00
|
|
|
:::
|
|
|
|
|
2021-10-01 20:22:49 +08:00
|
|
|
::: demo
|
|
|
|
|
|
|
|
<template>
|
2021-10-13 02:32:29 +08:00
|
|
|
<lay-avatar :src="src" radius></lay-avatar>
|
2021-10-01 20:22:49 +08:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import { ref } from 'vue'
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
|
|
|
setup() {
|
|
|
|
|
2021-11-22 11:41:34 +08:00
|
|
|
const src = "https://portrait.gitee.com/uploads/avatars/user/2813/8441097_shaynas_1610801433.png"
|
2021-10-01 20:22:49 +08:00
|
|
|
|
|
|
|
return {
|
2021-10-13 02:32:29 +08:00
|
|
|
src
|
2021-10-01 20:22:49 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
:::
|
|
|
|
|
2021-10-26 01:13:23 +08:00
|
|
|
::: title 尺寸大小
|
2021-10-19 22:28:44 +08:00
|
|
|
:::
|
|
|
|
|
2021-10-01 20:22:49 +08:00
|
|
|
::: demo
|
|
|
|
|
|
|
|
<template>
|
2021-10-13 02:32:29 +08:00
|
|
|
<lay-avatar :src="src" size="xs"></lay-avatar>
|
|
|
|
<lay-avatar :src="src" size="sm"></lay-avatar>
|
|
|
|
<lay-avatar :src="src"></lay-avatar>
|
|
|
|
<lay-avatar :src="src" size="lg"></lay-avatar>
|
2021-10-01 20:22:49 +08:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import { ref } from 'vue'
|
|
|
|
|
|
|
|
export default {
|
|
|
|
setup() {
|
|
|
|
|
2021-11-22 11:41:34 +08:00
|
|
|
const src = "https://portrait.gitee.com/uploads/avatars/user/2813/8441097_shaynas_1610801433.png"
|
2021-10-01 20:22:49 +08:00
|
|
|
|
|
|
|
return {
|
2021-11-07 15:55:08 +08:00
|
|
|
src
|
2021-10-01 20:22:49 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
2021-10-12 11:30:07 +08:00
|
|
|
|
2021-10-01 20:22:49 +08:00
|
|
|
:::
|
|
|
|
|
2021-10-26 01:13:23 +08:00
|
|
|
::: title 头像属性
|
2021-10-13 02:32:29 +08:00
|
|
|
:::
|
2021-10-12 18:00:09 +08:00
|
|
|
|
2021-11-07 15:55:08 +08:00
|
|
|
::: table
|
|
|
|
|
2021-11-01 01:02:21 +08:00
|
|
|
| 属性 | 描述 | 可选值 |
|
2021-10-12 11:30:07 +08:00
|
|
|
| ------ | ---- | -------------- |
|
|
|
|
| src | 图源 | -- |
|
|
|
|
| size | 尺寸 | `xs` `sm` `lg` |
|
|
|
|
| radius | 圆形 | `true` `false` |
|
2021-11-07 15:55:08 +08:00
|
|
|
|
2021-11-07 15:56:24 +08:00
|
|
|
:::
|
2021-12-16 17:57:59 +08:00
|
|
|
|
|
|
|
::: comment
|
2022-01-12 14:19:06 +08:00
|
|
|
:::
|
|
|
|
|
|
|
|
::: previousNext avatar
|
2021-12-16 17:57:59 +08:00
|
|
|
:::
|