[improvement] Functional: button (#2676)

This commit is contained in:
neverland
2019-02-02 17:04:02 +08:00
committed by GitHub
parent 5926d02d38
commit e3f4cac05d
8 changed files with 91 additions and 75 deletions

View File

@@ -25,14 +25,14 @@ export default sfc(
}
},
render(h, context) {
render(h, context, inherit) {
const { props, listeners } = context;
const { tip, price } = props;
const slots = context.slots();
const hasPrice = typeof price === 'number';
return (
<div class={bem()} {...context.data}>
<div class={bem()} {...inherit}>
{slots.top}
{(slots.tip || tip) && (
<div class={bem('tip')}>