日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

van 自定义组件_vant 自定义 van-dropdown-item的用法

發布時間:2025/6/17 编程问答 139 豆豆
生活随笔 收集整理的這篇文章主要介紹了 van 自定义组件_vant 自定义 van-dropdown-item的用法 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

我們還是這個item 我們要在里面加東西 這可咋整

請選擇

x

xxxxx

xxxxx

xxxxx

xxxxx

xxxxx

xxxxx

xxxxx

xxxxx

xxxxx

xxxxx

xxxxx

xxxxx

xxxxx

xxxxx

xxxxx

確定

取消

這代碼怎么粘上來這么丑

我們要這個效果 中間可以自由滾動 上下固定

我們直接給最外層的一個彈性盒加換軸方向 中間 給 overflow-x:hidden; flex:1

.choice {

width: 434rpx;

height: 634rpx;

display: flex;

flex-direction: column;

.choice_top {

width: 100%;

height: 50rpx;

text-align: center;

line-height: 50rpx;

color: rgb(83, 83, 83);

position: relative;

.over {

color: rgb(203, 203, 203);

position: absolute;

right: 15rpx;

top: 0;

width: 50rpx;

height: 50rpx;

}

}

.choice_middle {

overflow-x: hidden;

flex: 1;

text-align: center;

}

.choice_bottom {

width: 100%;

height: 100rpx;

.choice_we {

width: 300rpx;

height: 63rpx;

margin-left: 63rpx;

margin-top: 35rpx;

.choice_we_left {

float: left;

height: 63rpx;

width: 50%;

text-align: center;

line-height: 63rpx;

font-size: 30rpx;

color: #fff;

background-color: rgb(156, 156, 156);

border-top-left-radius: 30rpx;

border-bottom-left-radius: 30rpx;

}

.choice_we_right {

float: left;

height: 63rpx;

width: 50%;

text-align: center;

line-height: 63rpx;

font-size: 30rpx;

color: #fff;

background-color: rgb(170, 191, 178);

border-top-right-radius: 30rpx;

border-bottom-right-radius: 30rpx;

}

}

}

}

}

補充知識:記錄-vant實現select下拉框

記錄-vant沒有直接提供傳統的select下拉框,我的意思是,單行單元格然后點擊出現下拉框,樣式和其他input統一。

1.需求 input focus下出現下拉框,選中選項后 值綁定給field

2.html部分 圓圈處是控制底部抽屜是否顯示

3.data和methods部分

以上這篇vant 自定義 van-dropdown-item的用法就是小編分享給大家的全部內容了,希望能給大家一個參考,也希望大家多多支持腳本之家。

總結

以上是生活随笔為你收集整理的van 自定义组件_vant 自定义 van-dropdown-item的用法的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。