Comments (4)
这个是设计上的取舍了,我猜想你的场景应该是
弹窗操作完成后,返回数据给父组件,父组件接收到数据后,执行相关数据操作,数据操作完成后才关闭窗口
其实弹窗应当与相关业务场景进行解耦,弹窗/选择器只负责选择数据及反馈,至于后续的内容与弹窗没有关系
以目前的功能,当执行 emit('close') 后,弹窗是一定会关闭的,没有其他可选项,如果一定要完成你的需求,我有两个建议
- 使用 Vuex 处理数据传递,父组件中监听 state,弹窗中 commit 数据,不太优雅,但能实现你的功能
- 考虑把数据操作的相关事务放在弹窗中处理
from v-dialogs.
目前就是这种场景,有时候比如一个注册表单,如果用户名存在,那我就换一个用户名,如果自动关闭了,那信息就得重新输入一遍
from v-dialogs.
用户名在失去焦点的时候就立即做有效性验证
from v-dialogs.
好吧。
from v-dialogs.
Related Issues (20)
- Any other component in v-dialogs is not working well HOT 5
- not support vuex HOT 1
- button localization HOT 1
- this.$route HOT 2
- error on vue-i18n HOT 2
- Component type check error
- Alert Dialog width not proportional on mobile view HOT 2
- async component HOT 2
- 为啥就不能点击外部关闭呢? HOT 1
- shaking属性优化建议 HOT 2
- 在ant design vue中使用v-dialogs存在bug HOT 2
- CDN Browser Global HOT 1
- 100% width and height possible? HOT 1
- resize the dialog and drag the dialog HOT 1
- maximize dialog the height is not maximized HOT 2
- does it work for Vue 3 ? HOT 6
- minimize modal HOT 6
- nested modal
- mixin error HOT 5
- not show some tag
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from v-dialogs.