This commit is contained in:
2024-09-24 17:04:44 +08:00
parent 6cd84e0021
commit 30528311c1
77 changed files with 2251 additions and 1361 deletions

View File

@@ -25,10 +25,12 @@ const _sfc_main = defineComponent({
}
},
setup(props, { slots }) {
const computAlign = computed(() => {
var _a;
return (_a = props.align) != null ? _a : props.direction === "horizontal" ? "center" : "";
});
const computAlign = computed(
() => {
var _a;
return (_a = props.align) != null ? _a : props.direction === "horizontal" ? "center" : "";
}
);
const spaceClass = computed(() => [
"layui-space",
{
@@ -88,17 +90,25 @@ const _sfc_main = defineComponent({
};
return () => {
const children = extractChildren();
return h("div", {
class: spaceClass.value,
style: spaceStyle.value
}, children.map((child, index2) => {
var _a;
return h("div", {
key: (_a = child.key) != null ? _a : `item-${index2}`,
class: "layui-space-item",
style: itemStyle.value
}, h(child));
}));
return h(
"div",
{
class: spaceClass.value,
style: spaceStyle.value
},
children.map((child, index2) => {
var _a;
return h(
"div",
{
key: (_a = child.key) != null ? _a : `item-${index2}`,
class: "layui-space-item",
style: itemStyle.value
},
h(child)
);
})
);
};
}
});