uniapp 修改引入组件样式 使用/deep/、::v-deep、>>>不生效 解决

//放置与data同级
options: {
       styleIsolation: 'shared'
   },
<template>
<view class='container'></view>
</template>
<script>
export default {
props: {},
data: () => ({}),
computed: {},
methods: {},
watch: {},
// 组件加载完成
onLoad(options){
},
// 组件显示
onShow(){
},
options: {
       styleIsolation: 'shared'
},
// 组件周期函数--监听组件挂载完毕
mounted() {},
// 组件周期函数--监听组件数据更新之前
beforeUpdate() {},
// 组件周期函数--监听组件数据更新之后
updated() {},
// 组件周期函数--监听组件激活(显示)
activated() {},
// 组件周期函数--监听组件停用(隐藏)
deactivated() {},
// 组件周期函数--监听组件销毁之前
beforeDestroy() {},
};
</script>
<style lang='scss' scoped>
.container {
width: 100%;
min-height: calc(100vh - var(--window-bottom));
}
</style>

来源:https://blog.csdn.net/weixin_43245095/article/details/126769476

请登录后发表评论

    没有回复内容