problem description
1.
the environmental background of the problems and what methods you have tried
**:
**
related codes
/ / Please paste the code text below (do not replace the code with pictures)
subcomponent code
< template >
<transition name="slider">
<div class="about" ref="subtips">
<m-header :canreturn=true :titleText="titleText" :type=8 :backType=2 @back="hide"></m-header>
<div class="infobox">
<slot>
</slot>
</div>
</div>
</transition>
< / template >
< style scoped lang= "stylus" rel= "stylesheet/stylus" >
.about {
position: fixed;
width: 100%;
top: 0;
bottom: 0;
background: -sharpffffff;
z-index: 5;
.infobox {
padding: 0 15px;
.title {
color: red;
}
}
}
< / style >
parent component code
< tips >
<div class="title"></div>
< / tips >
what result do you expect? What is the error message actually seen?
inserts a title class= "title" in the slot;
also defines the css style of title in the subcomponent, but the style does not take effect