[improvement] Tabbar: jsx (#2663)

This commit is contained in:
neverland
2019-02-01 17:10:31 +08:00
committed by GitHub
parent 5b3992d4c2
commit b8ec2ffc5d
6 changed files with 85 additions and 102 deletions

8
packages/utils/slots.js Normal file
View File

@@ -0,0 +1,8 @@
export function useSlots({ $slots, $scopedSlots }) {
return (name, props) => {
if ($scopedSlots[name]) {
return $scopedSlots[name](props);
}
return $slots[name];
};
}