Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
512 views
in Technique[技术] by (71.8m points)

vue 继承 子类 能重写父类的slot吗?

为了最大程度的复用,我写了一个父类A,在父类中引用了一个组件,这个组件有一个具名slot

<template>  
 <baseTable>  
     <template slot="childTable">  
     <!--等待子类填充的部分-->  
     </template>  
 </baseTable></template>

子类B继承了父类A,但不知道怎么才能把具体的控件内容,写到这个slot里面,有高人知道怎么写入吗?或者确定不可能这么用也行,感谢。


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神解答

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...