Giter Site home page Giter Site logo

Comments (4)

nooooooom avatar nooooooom commented on June 16, 2024

能否提供复现视频,或者将复现代码上传至 GitHub 上,这样方便我们帮你排查问题

from naive-ui.

in-vane avatar in-vane commented on June 16, 2024

@nooooooom 谢谢关注~
我贴一下代码:

<script setup>
import { ref } from 'vue';
import { NSelect } from 'naive-ui';

const options = [
  { label: 'item_1', value: 1 },
  { label: 'item_2', value: 2 },
];

const value = ref('');
</script>

<template>
  <n-select v-model:value="value" :options="options" />
</template>

这个简单的例子就会复现,所以我觉得是环境问题,以下是我的dependence:


  "dependencies": {
    "@lylajs/web": "^1.7.0",
    "pinia": "^2.1.7",
    "vue": "^3.4.15",
    "vue-picture-cropper": "^0.7.0",
    "vue-router": "^4.2.5"
  },
  "devDependencies": {
    "@vicons/ionicons5": "^0.12.0",
    "@vitejs/plugin-vue": "^5.0.3",
    "electron": "^28.2.2",
    "electron-builder": "^24.9.1",
    "naive-ui": "^2.38.1",
    "tree-kill": "^1.2.2",
    "vfonts": "^0.0.3",
    "vite": "^5.0.11",
    "vite-plugin-electron": "^0.28.1"
  }

附上操作视频~

demo.mp4

from naive-ui.

nooooooom avatar nooooooom commented on June 16, 2024

我使用你提供的依赖试了以下,发现交互上没有什么问题,但是从元素属性的变化上来看应该是 vShow 的处理有问题。菜单正常触发了 Transition 的动画,但是 vShow 控制的 display 却没有变化。
image

然后在 Vue 的 Issues 上面搜了以下果然发现了问题所在 ,解决方式就是升级 Vue 的版本到 3.4.17 以上

- "vue": "^3.4.15"
+ "vue": "^3.4.17"

你下次还可以提供更详细的 pnpm-lock.yaml 或者 yarn.lock 来协助我们排查依赖版本上的问题,因为 dependencies 上面的数字版本跟实际下载的版本可能不一致。

from naive-ui.

in-vane avatar in-vane commented on June 16, 2024

哇!感谢!受教啦!

from naive-ui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.