init
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,117 @@
|
||||
::: anchor
|
||||
:::
|
||||
|
||||
::: title 基本介绍
|
||||
:::
|
||||
|
||||
::: describe 显示当前页面在系统层级结构中的位置,并能向上返回。
|
||||
:::
|
||||
|
||||
::: title 基础使用
|
||||
:::
|
||||
|
||||
::: demo
|
||||
|
||||
<template>
|
||||
<lay-breadcrumb>
|
||||
<lay-breadcrumb-item title="工作空间"></lay-breadcrumb-item>
|
||||
<lay-breadcrumb-item title="控制台"></lay-breadcrumb-item>
|
||||
<lay-breadcrumb-item title="访问量"></lay-breadcrumb-item>
|
||||
</lay-breadcrumb>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { ref } from 'vue'
|
||||
|
||||
export default {
|
||||
setup() {
|
||||
|
||||
return {
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
:::
|
||||
|
||||
::: title 指定分割
|
||||
:::
|
||||
|
||||
::: demo
|
||||
|
||||
<template>
|
||||
<lay-breadcrumb separator=">">
|
||||
<lay-breadcrumb-item title="热门音乐"></lay-breadcrumb-item>
|
||||
<lay-breadcrumb-item title="王杰"></lay-breadcrumb-item>
|
||||
<lay-breadcrumb-item title="谁明浪子心"></lay-breadcrumb-item>
|
||||
</lay-breadcrumb>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { ref } from 'vue'
|
||||
|
||||
export default {
|
||||
setup() {
|
||||
|
||||
return {
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
:::
|
||||
|
||||
::: title 使用插槽
|
||||
:::
|
||||
|
||||
::: demo
|
||||
|
||||
<template>
|
||||
<lay-breadcrumb separator="-">
|
||||
<lay-breadcrumb-item>今天</lay-breadcrumb-item>
|
||||
<lay-breadcrumb-item>有些</lay-breadcrumb-item>
|
||||
<lay-breadcrumb-item>不开心</lay-breadcrumb-item>
|
||||
</lay-breadcrumb>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { ref } from 'vue'
|
||||
|
||||
export default {
|
||||
setup() {
|
||||
|
||||
return {
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
:::
|
||||
|
||||
::: title Breadcrumb 属性
|
||||
:::
|
||||
|
||||
::: table
|
||||
|
||||
| 属性 | 描述 | 默认值 |
|
||||
| --------- | ------ | ------ |
|
||||
| separator | 分割符 | `/` |
|
||||
|
||||
:::
|
||||
|
||||
::: title Breadcrumb 插槽
|
||||
:::
|
||||
|
||||
::: table
|
||||
|
||||
| 插槽 | 描述 | 默认值 |
|
||||
| ------- | -------- | ------ |
|
||||
| default | 默认插槽 | `--` |
|
||||
|
||||
:::
|
||||
|
||||
::: contributor breadcrumb
|
||||
:::
|
||||
|
||||
::: previousNext breadcrumb
|
||||
:::
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,51 @@
|
||||
import { w as withInstall } from "../badge/index2.js";
|
||||
import { defineComponent, useSlots, computed, unref, openBlock, createElementBlock, normalizeClass, renderSlot, createBlock } from "vue";
|
||||
import { _ as _sfc_main$2E } from "../checkbox/index2.js";
|
||||
var index = /* @__PURE__ */ (() => ".layui-avatar{font-size:14px;font-variant:tabular-nums;border-radius:var(--global-border-radius);box-sizing:border-box;color:#fff;list-style:none;position:relative;display:inline-block;background:#eeeeee;overflow:hidden;white-space:nowrap;text-align:center;width:32px;height:32px;line-height:32px;vertical-align:middle}.layui-avatar.layui-avatar-radius{border-radius:50%}.layui-avatar.layui-avatar-sm{height:30px;width:30px}.layui-avatar.layui-avatar-lg{height:36px;width:36px}.layui-avatar.layui-avatar-xs{height:28px;width:28px}.layui-avatar-list .layui-avatar{margin-left:-10px;display:inline-block}.layui-avatar>img{width:100%;height:100%;display:block;object-fit:cover}\n")();
|
||||
const _hoisted_1 = ["src", "alt"];
|
||||
const __default__ = {
|
||||
name: "LayAvatar"
|
||||
};
|
||||
const _sfc_main = defineComponent({
|
||||
...__default__,
|
||||
props: {
|
||||
src: null,
|
||||
size: { default: "md" },
|
||||
radius: { type: Boolean, default: false },
|
||||
icon: { default: "layui-icon-username" },
|
||||
alt: null
|
||||
},
|
||||
setup(__props) {
|
||||
const props = __props;
|
||||
const slot = useSlots();
|
||||
const classes = computed(() => {
|
||||
return [
|
||||
"layui-avatar",
|
||||
props.radius ? "layui-avatar-radius" : "",
|
||||
props.size ? `layui-avatar-${props.size}` : ""
|
||||
];
|
||||
});
|
||||
return (_ctx, _cache) => {
|
||||
return unref(slot).default ? (openBlock(), createElementBlock("span", {
|
||||
key: 0,
|
||||
class: normalizeClass(unref(classes))
|
||||
}, [
|
||||
renderSlot(_ctx.$slots, "default")
|
||||
], 2)) : (openBlock(), createElementBlock("span", {
|
||||
key: 1,
|
||||
class: normalizeClass(unref(classes))
|
||||
}, [
|
||||
__props.src ? (openBlock(), createElementBlock("img", {
|
||||
key: 0,
|
||||
src: __props.src,
|
||||
alt: __props.alt
|
||||
}, null, 8, _hoisted_1)) : (openBlock(), createBlock(unref(_sfc_main$2E), {
|
||||
key: 1,
|
||||
type: __props.icon
|
||||
}, null, 8, ["type"]))
|
||||
], 2));
|
||||
};
|
||||
}
|
||||
});
|
||||
const component = withInstall(_sfc_main);
|
||||
export { component as default };
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user