【发布时间】:2019-10-04 02:44:32
【问题描述】:
我在根元素上有一个带有 b-modal 的组件。
<template>
<b-modal ref="mymodal" modal-class="my-modal">
在 scss 上我定义了一些边距
<style lang="scss">
.my-modal {
margin-top: 100px;
这按预期工作,但如果我限定我的 scss
<style lang="scss" scoped>
.my-modal {
margin-top: 100px;
它不起作用,子元素应用了所有 css 但根元素没有。
【问题讨论】: