cxjfun
cxjfun
  • 发布:2023-07-29 17:14
  • 更新:2023-07-29 20:34
  • 阅读:211

vue2 vue cli 项目,设置 styleIsolation 无效

分类:uni-app
<template>  
    <u-tabbar v-model="name" @change="onChange" :fixed="true" :placeholder="true" :safeAreaInsetBottom="true">  
        <u-tabbar-item :text="item.text" :class="{ 'mid-button': item.midButton, active: index === name }" :name="index" v-for="(item, index) in list" :key="index">  
            <view slot="active-icon" :class="[item.selectedIconPath]"></view>  
            <view slot="inactive-icon" :class="[item.iconPath]"></view>  
        </u-tabbar-item>  
    </u-tabbar>  
</template>  

<script>  
export default {  
    options: { styleIsolation: 'shared' },  
    props: {  
        name: {  
            type: [String, Number],  
            default: 0  
        }  
    },  
}  
</script>  
<style lang="scss" scoped>  
.u-tabbar {  
    ::v-deep .u-tabbar__content {  

       }  
}  
</style>
2023-07-29 17:14 负责人:无 分享
已邀请:
昭昭L

昭昭L - 开心就好

scoped无效吗

  • cxjfun (作者)

    对,cli项目无效,hbuild可以

    2023-07-29 20:39

  • cxjfun (作者)

    现在又有支付宝小程序的样式隔离问题

    2023-07-29 20:40

要回复问题请先登录注册