当前位置:网站首页>Combined use of vant popup+ other components and pit avoidance Guide
Combined use of vant popup+ other components and pit avoidance Guide
2022-07-05 16:42:00 【Joy_ nine hundred and seventeen】
Do small program development , I believe you are no stranger to form collection . But we often encounter some slightly more complex options , It's not simply filling in some words , Numbers , Or choose whether it can be done . Interactive judgment may be required , Or it can be well displayed in combination with other custom components , But such components often take up a lot of space , If you put all your thoughts on the list , The page will appear very crowded .
So how to solve this problem ? Common ways are ,popup Pop-up layer 、 Jump to a new page and so on .
Among them, the loading jam and discontinuity of jump pages will affect the user experience , Unless it is a single multiple collection page , There is a lot of information, so let's say .
So in practical application ,popup Pop up layers are the most common , The way to solve the problem that components occupy the screen . First, let's take a look at the demonstration :
This is a typical popup + treeSelect Combination of components , Yes, of course , there treeSelect Can be replaced by timePicker Or other components . When you think that opening a new page is shooting mosquitoes , This way can be used when it is not open and crowded , Smooth and space saving .
It's easy to use , Just nest tags :
<van-popup show="{
{ showTree }}" round position="bottom" custom-style="height: 50%" bind:close="onCloseTreeSelect">
<van-tree-select items="{
{ items }}" main-active-index="{
{ mainActiveIndex }}" active-id="{
{ activeId }}" bind:click-nav="onClickNav" bind:click-item="onClickItem" />
</van-popup>
Be careful : There's a big hole here ,vant Official documents default popup attribute close-on-click-overlay—— Whether to close after clicking the mask layer , The default is true, But if you don't realize bind:close Method words , Clicking on the mask layer will not close the pop-up layer
in addition , For components with cancellation or confirmation , If and popup When combined , Recommended coverage popup Of close Button , Otherwise, it will be messy .
The full code is in github On , Ongoing update , Welcome to support :https://github.com/Joy917/signgo
边栏推荐
- How can programmers improve their situation?
- 《21天精通TypeScript-3》-安装搭建TypeScript开发环境.md
- 有序链表集合求交集 方法 总结
- Flet教程之 11 Row组件在水平数组中显示其子项的控件 基础入门(教程含源码)
- 阿掌的怀念
- Apiccloud cloud debugging solution
- [vulnerability warning] cve-2022-26134 conflict Remote Code Execution Vulnerability POC verification and repair process
- 【 brosser le titre 】 chemise culturelle de l'usine d'oies
- 迁移/home分区
- 搜索 正排索引 和 倒排索引 区别
猜你喜欢
Flet tutorial 12 stack overlapping to build a basic introduction to graphic and text mixing (tutorial includes source code)
[61dctf]fm
How to set the WiFi password of the router on the computer
极坐标扇图使用场景与功能详解
为季前卡牌游戏 MotoGP Ignition Champions 做好准备!
公司自用的国产API管理神器
Clear restore the scene 31 years ago, volcanic engine ultra clear repair beyond classic concert
If you can't afford a real cat, you can use code to suck cats -unity particles to draw cats
Reduce the cost by 40%! Container practice of redis multi tenant cluster
服务器的数据库连不上了2003,10060“Unknown error“【服务已起、防火墙已关、端口已开、netlent 端口不通】
随机推荐
Summary of methods for finding intersection of ordered linked list sets
[61dctf]fm
文件操作--I/O
How to use FRP intranet penetration +teamviewer to quickly connect to the intranet host at home when mobile office
Global Data Center released DC brain system, enabling intelligent operation and management through science and technology
[js] skill simplification if empty judgment
sqlserver 做cdc 要对数据库性能有什么要求么
The new version of effect editor is online! 3D rendering, labeling, and animation, this time an editor is enough
How was the middle table destroyed?
自己要有自己的坚持
[graduation season] as a sophomore majoring in planning, I have something to say
Google Earth Engine(GEE)——Kernel核函数简单介绍以及灰度共生矩阵
tf.sequence_mask函数讲解案例
Apple has abandoned navigationview and used navigationstack and navigationsplitview to implement swiftui navigation
漫画:什么是蓝绿部署?
Flet教程之 12 Stack 重叠组建图文混合 基础入门(教程含源码)
Pspnet | semantic segmentation and scene analysis
【漏洞预警】CVE-2022-26134 Confluence 远程代码执行漏洞POC验证与修复过程
[brush questions] effective Sudoku
Starkware: to build ZK "universe"