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

提供一个过渡动画的组件 #829

Closed
pengxiaotian opened this issue Aug 10, 2021 · 5 comments
Closed

提供一个过渡动画的组件 #829

pengxiaotian opened this issue Aug 10, 2021 · 5 comments
Assignees
Labels
feature request New feature or request

Comments

@pengxiaotian
Copy link
Contributor

This function solves the problem (这个功能解决的问题)

有些地方不想用 collapse组件,但是又需要 collapse 这种动画效果

Expected API (期望的 API)

类似于 https://element-plus.gitee.io/#/zh-CN/component/transition

@github-actions github-actions bot added the feature request New feature or request label Aug 10, 2021
@07akioni
Copy link
Collaborator

建议用第三方的,这些动画对于 wrapper dom 的样式是有特定要求的,我并不计划把这种组件暴露出来,用的人可能会以为组件出了 bug。

@pengxiaotian
Copy link
Contributor Author

额 那真的是太遗憾了😞

@07akioni
Copy link
Collaborator

额 那真的是太遗憾了😞

说说你的场景

@07akioni 07akioni reopened this Aug 10, 2021
@07akioni
Copy link
Collaborator

可以讨论一下

@pengxiaotian
Copy link
Contributor Author

pengxiaotian commented Aug 11, 2021

我的场景很简单,我有一个需要 展开/收起的场景,如果使用 collapse 组件也能做到,只不过会麻烦些,

<!-- 需要嵌套使用,n-collapse-item 无法单独使用,  --->
<!-- 我可能需要重写大量的代码才能满足我的需求  --->
<n-collapse>
    <n-collapse-item title="青铜" name="1">
      <div>可以</div>
    </n-collapse-item>
  </n-collapse>

安利自己项目,这里用到了 el-collapse-transition :
https://github.com/pengxiaotian/datav-vue/blob/main/src/views/screen-editor/data-filter/filter-collapse-panel.vue

最后说一下原因:
我这个项目使用的是 element-plus,但是它是 beta 版,而且最近在重构 css,如果我升级的话,很困难。
然后遇到了 naive-ui,很棒。经过调研:还差一个 el-collapse-transition 组件 就可以迁移的稍微丝滑一些😁 。
还有一个选择它的原因就是它的 主题设计,解决了我后面很多问题 😁 。

@07akioni 07akioni self-assigned this Aug 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants