mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
34 lines
714 B
TypeScript
34 lines
714 B
TypeScript
import { use } from '../../utils';
|
||
import { inherit } from '../../utils/functional';
|
||
|
||
// Types
|
||
import { CreateElement, RenderContext } from 'vue/types';
|
||
import { DefaultSlots } from '../../utils/use/sfc';
|
||
import { SkuTreeItemData } from '../type';
|
||
|
||
export type SkuRowProps = {
|
||
skuRow: SkuTreeItemData;
|
||
};
|
||
|
||
const [sfc, bem] = use('sku-row');
|
||
|
||
function SkuRow(
|
||
h: CreateElement,
|
||
props: SkuRowProps,
|
||
slots: DefaultSlots,
|
||
ctx: RenderContext<SkuRowProps>
|
||
) {
|
||
return (
|
||
<div class={bem()} {...inherit(ctx)}>
|
||
<div class={bem('title')}>{props.skuRow.k}:</div>
|
||
{slots.default && slots.default()}
|
||
</div>
|
||
);
|
||
}
|
||
|
||
SkuRow.props = {
|
||
skuRow: Object
|
||
};
|
||
|
||
export default sfc<SkuRowProps>(SkuRow);
|