vue中的樣式穿透

組件內的結構如下:

<template>
    <div class="box">
        <Input class="input-test" type="text" />
        <Input type="text" />
    </div>
</template>
<script>
export default {
  
}
</script>

sass中:

<style lang="sass" scoped>
    .input-test /deep/ .ivu-input:focus
        border-color: yellow
</style>

css中:

<style scoped>
    .input-test >>> .ivu-input:focus {
        border-color: yellow;
    }
</style>

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章