|
[开发工具]
发现一个比较复杂的样式不清除的bug
[复制链接]
经过测试, border-radius 中的数值无法清除, 额外在 其他样式中写了 border-radius:0; 这种写法也是无效
同样的代码,在H5,及小程序端能正常使用, ios及安卓都有这个问题
下面是碰到错误的示例图
下面是代码:
- <template>
- <view class="_page">
- <scroll-view scroll-y="true" show-scrollbar="false" bounces="false" class="b-fff">
- <view v-for="(item,index) in list"
- :key="index"
- :class="'height-59 ' +
- (index == select_index ? 'b-fff ':'b-F2F2F7 ') +
- (index == select_index - 1 ? 'right-down-border-radius ':'') +
- (index == select_index + 1 ? 'right-top-border-radius ':'')"
- @click="select(index)">
- <text>{item.title}</text>
- </view>
- </scroll-view>
- </view>
- </template>
- <script>
- export default {
- name: 'directory-list',
- apiready() {//like created
- },
- data() {
- return {
- select_index: 0,
- list: [{
- title: "一级类目",
- id: 0
- }, {
- title: "一级类目",
- id: 1
- }, {
- title: "一级类目",
- id: 2
- }, {
- title: "一级类目",
- id: 3
- }, {
- title: "一级类目",
- id: 4
- }, {
- title: "一级类目",
- id: 5
- }, {
- title: "一级类目",
- id: 6
- }]
- }
- },
- methods: {
- select(index) {
- this.data.select_index = index;
- // this.fire("checked", this.props.list[index]);
- }
- }
- }
- </script>
- <style scoped>
- .b-F2F2F7 {
- background: #f2f2f7;
- }
- .b-fff {
- background: #fff;
- }
- .active-icon {
- width: 3px;
- height: 13px;
- position: absolute;
- left: 0;
- top: 0;
- bottom: 0;
- margin: auto;
- }
- .active-text {
- font-family: PingFangSC-Medium, PingFang SC;
- font-weight: 500;
- }
- .nomarl-text {
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- }
- .clear {
- border-radius: 0;
- }
- .right-down-border-radius {
- border-radius: 0 0 10px 0;
- }
- .right-top-border-radius {
- border-radius: 0 10px 0 0;
- }
- .height-40 {
- height: 40px;
- }
- .height-20 {
- height: 20px;
- }
- .text {
- font-size: 14px;
- line-height: 20px;
- }
- .height-59 {
- height: 59px;
- width: 100%;
- }
- ._page {
- width: 86px;
- height: 100%;
- background: #f2f2f7;
- }
- </style>
复制代码
|
|