参考:官方文档-uni-popup

image.png

css样式

css,这个地方要注意,如果底部有tabbar,要把底部距离调高才行,不然会被覆盖住

  1. .popup-content {
  2. padding: 10px 10px 80px 10px;
  3. }

使用的uni-popup组件,搭配uni-section

  1. <!-- 普通弹窗 -->
  2. <uni-popup ref="popup" background-color="#fff">
  3. <view class="popup-content">
  4. <uni-section title="店铺名称" type="line">
  5. <uni-data-checkbox multiple v-model="shopname" :localdata="shopNames"></uni-data-checkbox>
  6. </uni-section>
  7. <uni-section title="日期" type="line">
  8. <uni-datetime-picker type="date" @change="dateChange" :clear-icon="false" v-model="date" />
  9. </uni-section>
  10. <uni-section>
  11. <uni-row :gutter="20">
  12. <uni-col :span="12"><button type="default" @click="add">取消</button></uni-col>
  13. <uni-col :span="12"><button type="primary" @click="submit('dynamicForm')">查询</button>
  14. </uni-col>
  15. </uni-row>
  16. </uni-section>
  17. </view>
  18. </uni-popup>