Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grid嵌套FormItemGi时collapsed属性不会响应式更新 #1160

Closed
Kigoal opened this issue Sep 12, 2021 · 1 comment · Fixed by #1166
Closed

Grid嵌套FormItemGi时collapsed属性不会响应式更新 #1160

Kigoal opened this issue Sep 12, 2021 · 1 comment · Fixed by #1166
Labels
bug Something isn't working

Comments

@Kigoal
Copy link
Contributor

Kigoal commented Sep 12, 2021

TuSimple/naive-ui version (版本)

2.18.1

Vue version (Vue 版本)

3.2.11

Browser and its version (浏览器及其版本)

Edge 93

System and its version (系统及其版本)

Macos(12)

Node version (Node 版本)

Reappearance link (重现链接)

https://codesandbox.io/s/purple-fire-fukqr

Reappearance steps (重现步骤)

Expected results (期望的结果)

响应式折叠

Actual results (实际的结果)

仅在初始值时生效后,不会触发响应式更新

Remarks (补充说明)

@github-actions github-actions bot added the untriaged need to sort label Sep 12, 2021
@Kigoal
Copy link
Contributor Author

Kigoal commented Sep 12, 2021

复现代吗

<template>
  <NButton @click="handleClick">test</NButton>
  <NGrid :cols="5" :collapsed="collapsed">
    <NFormItemGi v-for="iter in 10" :key="iter">
      {{ iter }}
    </NFormItemGi>
  </NGrid>
  <NGrid :cols="5" :collapsed="collapsed">
    <NGi v-for="iter in 10" :key="iter">
      {{ iter }}
    </NGi>
  </NGrid>
</template>

<script setup lang="ts">
import { ref } from 'vue'
import { NFormItemGi, NGrid, NGi, NButton } from 'naive-ui'

const collapsed = ref(true)
const handleClick = () => {
  collapsed.value = !collapsed.value
}
</script>

@Volankey Volankey added bug Something isn't working and removed untriaged need to sort labels Sep 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants