mirror of
https://github.com/youzan/vant.git
synced 2025-10-21 11:17:41 +00:00
[improvement] Tabbar: jsx (#2663)
This commit is contained in:
8
packages/utils/slots.js
Normal file
8
packages/utils/slots.js
Normal file
@@ -0,0 +1,8 @@
|
||||
export function useSlots({ $slots, $scopedSlots }) {
|
||||
return (name, props) => {
|
||||
if ($scopedSlots[name]) {
|
||||
return $scopedSlots[name](props);
|
||||
}
|
||||
return $slots[name];
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user