UNPKG

taro-ui-vue3

Version:

Taro UI Rewritten in Vue 3.0

43 lines (42 loc) 1.09 kB
import {h, defineComponent, computed, mergeProps} from "vue"; import {View} from "@tarojs/components"; const AtFlex = defineComponent({ name: "AtFlex", props: { wrap: { type: String }, align: { type: String }, justify: { type: String }, direction: { type: String }, alignContent: { type: String } }, setup(props, {attrs, slots}) { const rootClasses = computed(() => ({ "at-row": true, [`at-row--${props.wrap}`]: Boolean(props.wrap), [`at-row__align--${props.align}`]: Boolean(props.align), [`at-row__justify--${props.justify}`]: Boolean(props.justify), [`at-row__direction--${props.direction}`]: Boolean(props.direction), [`at-row__align-content--${props.alignContent}`]: Boolean(props.alignContent) })); return () => h(View, mergeProps(attrs, { class: rootClasses.value }), {default: () => { var _a; return (_a = slots.default) == null ? void 0 : _a.call(slots); }}); } }); var flex_default = AtFlex; export { flex_default as default };