Vant ui


輕量、可靠的移動端 Vue 組件庫

https://youzan.github.io/vant/#/zh-CN/intro

 

 

postcss-pxtorem

vue:將px轉化為rem,適配移動端vant-UI等框架

 

DatetimePicker時間選擇器

https://www.jianshu.com/p/9daed4a96f63

 

vant ui 開始時間-結束時間 選擇器

https://segmentfault.com/a/1190000021052209?utm_source=tag-newest

 

dialog彈出框的理解

組件化調用

HTML

<van-button type=“info” size=“small” @click=“onClick”>dialog按鈕
<van-dialog
  v-model="show"
  title="彈出框"
  show-cancel-button
  :beforeClose="chargeBtn"
>
  <van-stepper v-model="number" min="0" integer/>
</van-dialog>

JS

data() {
  return {
    show: false,
    number: 1, 
  };
},
methods: {
  onClick() {
    this.show = true;
  },
  chargeBtn(action, done) {//確認or取消

    if (this.number < 0) {
      this.$notify("請輸入數量!");
      done(false);
      return;
    }
    if (action === 'cancel') {//取消按鈕
      done();
    } else if (action === 'confirm') {//確定按鈕
        //向后端傳值並關閉dialog彈出框
          this.show = false;
        });
      done();
    }
  }
}

 

https://blog.csdn.net/qq_40906004/article/details/92975157

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM