UNPKG

choo-taro-ui-vue3

Version:

Taro UI Rewritten in Vue 3.0

55 lines (47 loc) 1.59 kB
import { defineComponent, computed, renderSlot, resolveComponent, mergeProps, withCtx, openBlock, createBlock } from 'vue'; const AtFlex = defineComponent({ name: "AtFlex", props: { wrap: { type: String }, align: { type: String }, justify: { type: String }, direction: { type: String }, alignContent: { type: String } }, setup(props) { 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 { rootClasses }; } }); // Binding optimization for webpack code-split const _renderSlot = renderSlot, _resolveComponent = resolveComponent, _mergeProps = mergeProps, _withCtx = withCtx, _openBlock = openBlock, _createBlock = createBlock; function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { const _component_taro_view = process.env.TARO_ENV === "h5" ? _resolveComponent("taro-view") : "view"; return (_openBlock(), _createBlock(_component_taro_view, _mergeProps(_ctx.$attrs, { class: _ctx.rootClasses }), { default: _withCtx(() => [ _renderSlot(_ctx.$slots, "default") ]), _: 3 /* FORWARDED */ }, 16 /* FULL_PROPS */, ["class"])) } AtFlex.render = _sfc_render; export default AtFlex;