chore: merge src and src-next

This commit is contained in:
chenjiahan
2020-07-15 20:02:00 +08:00
parent 6672b34618
commit 0304fcb6fa
382 changed files with 464 additions and 24746 deletions

View File

@@ -1,6 +1,6 @@
export default {
render() {
const genStop = (color: string, offset: number, opacity?: number) => (
const genStop = (color, offset, opacity) => (
<stop stop-color={color} offset={`${offset}%`} stop-opacity={opacity} />
);

View File

@@ -16,7 +16,7 @@ export default createComponent({
methods: {
genImageContent() {
const slots = this.slots('image');
const slots = this.$slots.image?.();
if (slots) {
return slots;
@@ -40,7 +40,9 @@ export default createComponent({
},
genDescription() {
const description = this.slots('description') || this.description;
const description = this.$slots.description
? this.slot.description()
: this.description;
if (description) {
return <p class={bem('description')}>{description}</p>;
@@ -48,7 +50,7 @@ export default createComponent({
},
genBottom() {
const slot = this.slots();
const slot = this.$slots.default?.();
if (slot) {
return <div class={bem('bottom')}>{slot}</div>;