mirror of
https://github.com/youzan/vant.git
synced 2026-01-19 06:04:05 +08:00
chore: merge src and src-next
This commit is contained in:
@@ -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} />
|
||||
);
|
||||
|
||||
@@ -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>;
|
||||
|
||||
Reference in New Issue
Block a user