bkui-vue3 icon indicating copy to clipboard operation
bkui-vue3 copied to clipboard

bugfix(sidesslider): 侧栏弹窗异常

Open zhoulujun opened this issue 2 years ago • 1 comments

Version / Branch / tag

出了什么问题?(What Happened?) image

image

如何复现?(How to reproduce?)

<template>
  <div style="position: relative;margin: 100px;">
    <bk-button @click="handleOpenSlider">
      默认配置
    </bk-button>
    <div v-if="isShow">
      <bk-sideslider
        v-model:isShow="isShow"
        title="我是标题"
        quick-close
      />
    </div>
  </div>
</template>

<script>
  import { defineComponent, nextTick, ref } from 'vue';
  export default defineComponent({
    name: 'SiteSideslider',
    setup() {
      const isShow = ref(false);
      const isShow2 = ref(false);
      const handleOpenSlider = () => {
        isShow.value = !isShow.value;
        nextTick(() => {
          isShow2.value = isShow.value;
        });
      };
      return {
        handleOpenSlider,
        isShow,
        isShow2,
      };
    },
  });
</script>

预期结果(What you expect?) 正常

<template>
  <div style="position: relative;margin: 100px;">
    <bk-button @click="handleOpenSlider">
      默认配置
    </bk-button>
    <div v-if="isShow">
      <bk-sideslider
        v-model:isShow="isShow2"
        title="我是标题"
        quick-close
      />
    </div>
  </div>
</template>

<script>
  import { defineComponent, nextTick, ref } from 'vue';
  export default defineComponent({
    name: 'SiteSideslider',
    setup() {
      const isShow = ref(false);
      const isShow2 = ref(false);
      const handleOpenSlider = () => {
        isShow.value = !isShow.value;
        nextTick(() => {
          isShow2.value = isShow.value;
        });
      };
      return {
        handleOpenSlider,
        isShow,
        isShow2,
      };
    },
  });
</script>

zhoulujun avatar Oct 27 '22 12:10 zhoulujun

是否可以这样改? image

zhoulujun avatar Oct 27 '22 12:10 zhoulujun