perf(layer): 新增 btnAlign 按钮布局

This commit is contained in:
就眠仪式
2021-11-07 20:39:53 +08:00
parent a543780188
commit c66657ba37
3 changed files with 7 additions and 2 deletions

View File

@@ -65,7 +65,7 @@
@click="closeHandle"
></a
></span>
<div v-if="btn && btn.length > 0" class="layui-layer-btn">
<div v-if="btn && btn.length > 0" class="layui-layer-btn" :class="['layui-layer-btn-' + btnAlign]">
<template v-for="(b, index) in btn" :key="index">
<a :class="['layui-layer-btn' + index]" @click="b.callback">{{
b.text
@@ -113,6 +113,7 @@ const props = withDefaults(
shade?: boolean
shadeClose?: boolean
closeBtn?: boolean
btnAlign?: string
}>(),
{
id: 'layer',
@@ -129,6 +130,7 @@ const props = withDefaults(
shade: false,
shadeClose: true,
closeBtn: true,
btnAlign: 'l'
}
)