|
@@ -2,7 +2,7 @@
|
|
<!-- FIXED: 从 vue 3.1.5 升级到 3.2.1 时这里出错了,slot也要有key -->
|
|
<!-- FIXED: 从 vue 3.1.5 升级到 3.2.1 时这里出错了,slot也要有key -->
|
|
<a-button v-bind="newAttrs" :loading="inInterval" @click="insideClick">
|
|
<a-button v-bind="newAttrs" :loading="inInterval" @click="insideClick">
|
|
<template v-for="(_, slot) of $slots" v-slot:[slot]="scope">
|
|
<template v-for="(_, slot) of $slots" v-slot:[slot]="scope">
|
|
- <slot :name="slot" v-bind="scope" :key="slot" />
|
|
|
|
|
|
+ <slot :name="slot" v-bind="asAny(scope)" :key="slot" />
|
|
</template>
|
|
</template>
|
|
<!-- <slot name="default" /> -->
|
|
<!-- <slot name="default" /> -->
|
|
</a-button>
|
|
</a-button>
|
|
@@ -34,7 +34,10 @@ export default {
|
|
};
|
|
};
|
|
// newAttrs.onClick = insideClick;
|
|
// newAttrs.onClick = insideClick;
|
|
|
|
|
|
- return { newAttrs, inInterval, insideClick };
|
|
|
|
|
|
+ function asAny(input: any): any {
|
|
|
|
+ return input as any;
|
|
|
|
+ }
|
|
|
|
+ return { newAttrs, inInterval, insideClick, asAny };
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|