国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

微信小程序 列表多選 下拉分頁 滑動切換分類

這篇具有很好參考價值的文章主要介紹了微信小程序 列表多選 下拉分頁 滑動切換分類。希望對大家有所幫助。如果存在錯誤或未考慮完全的地方,請大家不吝賜教,您也可以點擊"舉報違法"按鈕提交疑問。

1、卡片列表

2、分頁(下拉頁面加載分頁數(shù)據(jù))

3、分類(頁面間互不干擾,數(shù)據(jù)也不干擾)

4、左右滑動可切換分類

5、列表搜索

6、單選模式(默認(rèn)單選模式,即點擊卡片,回寫所選數(shù)據(jù))

7、多選模式(實現(xiàn)微信聊天多選效果)

  • 長按列表或點擊多選,進(jìn)入多選模式;
  • 切換分類或搜索則退出多選模式
  • 點擊確定按鈕,回寫所選數(shù)據(jù)
  • 指定數(shù)據(jù)不可勾選
  • 點擊復(fù)選框和卡片,實現(xiàn)相同效果(冒泡問題坑死人T_T,checkbox的點擊事件優(yōu)先級太高了,只能選后再重置)
  • 復(fù)選框改成圓形樣式

????????

微信小程序?qū)崿F(xiàn)點擊下拉篩選,微信小程序,小程序,javascript微信小程序?qū)崿F(xiàn)點擊下拉篩選,微信小程序,小程序,javascript

?微信小程序?qū)崿F(xiàn)點擊下拉篩選,微信小程序,小程序,javascript微信小程序?qū)崿F(xiàn)點擊下拉篩選,微信小程序,小程序,javascript

JS:

const app = getApp();
Page({
  data: {
    pageSize: 10, //每頁查詢大小
    currPage: 1, //當(dāng)前頁碼
    searchParam: '',
    warehouseName: null,


    nav: { //滾動導(dǎo)航
      list: [{
          name: '本部門倉',
          id: 0,
          currPage: 1,
          wareList: [],
          type: 'self'
        },
        {
          name: '總倉/子倉',
          id: 1,
          currPage: 1,
          wareList: [],
          type: 'total'
        },
        {
          name: '其他部門倉',
          id: 2,
          currPage: 1,
          wareList: [],
          type: 'other'
        }
      ],
      active: 0, //當(dāng)前選中的導(dǎo)航下標(biāo)
      left: 0, //滾動值
      width: 130,
      offsetLeft: 0,

      todoTipNum: 0,
    },

    curUsername: '',
    scrollHeight: 0,

    navtop: 97,
    reduceHeight: 80,


    showRadio: false,
    showRadioText: '多選',
    choseNames: [], //選中的名字列表
  },

  onLoad: function (options) {
    var that = this;
    if (options.warehouseName != null && options.warehouseName != undefined && options.warehouseName != '') {
      that.setData({
        warehouseName: options.warehouseName
      });
    }
    if (options.isall != null && options.isall == "1") {
      // 其他入庫
      that.setData({
        [`nav.list`]: [{
          name: '無',
          id: 0,
          currPage: 1,
          wareList: []
        }],
        navtop: 57,
        reduceHeight: 70
      });
    }
    wx.getSystemInfo({
      success: function (res) {
        //console.log('系統(tǒng)信息:', res);
        that.setData({
          windowWidth: res.windowWidth,
          [`nav.width`]: res.windowWidth / 3
        })
      }
    });

    that.getTaskList(1, 1);

    let res = wx.getSystemInfoSync();
    that.setData({
      scrollHeight: res.windowHeight - that.data.reduceHeight
    });
  },

  onShow: function () {},

  //點擊導(dǎo)航 - 選中監(jiān)聽
  select: function (e) {
    this.changetab(e.currentTarget.dataset.idx);
  },

  //滾動頁面,切換導(dǎo)航
  bindchange(e) {
    this.changetab(e.detail.current);
  },

  changetab: function (idx) {
    let _this = this,
      nav = this.data.nav,
      // idx = e.currentTarget.dataset.idx,
      windowWidth = this.data.windowWidth,
      width = windowWidth / 3,
      offsetLeft = this.data.nav.offsetLeft;
    
    _this.cancelRadio();
    if (offsetLeft < windowWidth) {
      // nav.left = width - windowWidth + offsetLeft;
      nav.offsetLeft = width * idx;
    } else {
      nav.offsetLeft = width * idx - windowWidth;
    }
    nav.active = idx;
    _this.setData({
      nav: nav,
    })
  },

  /**
   * 查詢
   */
  onSearch: function () {
    var that = this;
    that.cancelRadio();
    that.getTaskList(1, 1);
  },


  getTaskList: function (isfirst, notshowtip) {
    var that = this;
    if (isfirst == 1) {
      that.data.nav.list.forEach((val, key) => {
        that.setData({
          [`nav.list[${key}].currPage`]: 1
        });
      })
      that.data.nav.list.forEach((val, key) => {
        let notshow = key == 0 ? 1 : -1;
        that.getTaskListByType(isfirst, notshow, key);
      })
    } else {
      that.getTaskListByType(isfirst, notshowtip, that.data.nav.active);
    }
  },

  /**
   * 列表
   */
  getTaskListByType: function (isfirst, notshowtip, querytab) {
    var that = this;
    var preList = that.data.nav.list[querytab].wareList;
    if (isfirst == 1) {
      preList = [];
      that.setData({
        [`nav.list[${querytab}].wareList`]: []
      });
    }
    if (notshowtip !== -1) {
      wx.showLoading({
        title: '查詢中,請稍候',
        mask: true
      })
    }
    let param = {
      page: that.data.nav.list[querytab].currPage + '',
      size: that.data.pageSize + '',
      orgname: app.globalData.comName,
      username: app.globalData.userName,
    }
    if (that.data.searchParam != null && that.data.searchParam.length > 0) {
      param.name = that.data.searchParam;
    }
    if (!app.util.Empty(that.data.nav.list[querytab].type)) {
      param.type = that.data.nav.list[querytab].type;
    }

    app.globalData.$wsdl.ncWsdl('XXXXXXX', 'xxxxx', param).then(res => {
      // console.log('xxxxx 返回', res);

      if (notshowtip !== -1) {
        wx.hideLoading();
      }
      if (res.code == '1' && res.data) {
        if (res.data.length < that.data.pageSize) { // 分頁結(jié)束
          // 停止上拉查詢
          that.setData({
            [`nav.list[${querytab}].stopQuery`]: 1,
          });
          if (res.data.length == 0) {
            // 恢復(fù)頁碼
            let cp = that.data.nav.list[querytab].currPage;
            if (cp > 1) {
              --cp;
              that.setData({
                [`nav.list[${querytab}].currPage`]: cp
              });
            }
            return;
          }
        }

        var tempItems = [];
        res.data.forEach((val, key) => {
          if (val.materialtype == '' || val.materialtype == '暫無' || val.materialtype == '無') {
            val.materialtype = null;
          }
          tempItems.push(val);
        })

        that.setData({
          [`nav.list[${querytab}].wareList`]: preList.concat(app.globalData.$wsdl.oa2wx(tempItems, {
            pk_material: 'wareid',
            materialname: 'warename',
            code: 'warecode',
            materialtype: 'model',
            materialspec: 'specification',
            whname: 'from',
            nonhandnum: 'sum',
            jldw: 'unit',
            racks: 'location'
          })),
        });

        //分頁加載后會刪掉已選,此處重新設(shè)置已選項
        that.data.nav.list.forEach((pval, pkey) => {
          pval.wareList.forEach((val, key) => {
            val.checked=val.realchecked;
            that.setData({
              [`nav.list[${pkey}].wareList[${key}]`]: val,
            });
          })
        });
      } else {
        wx.showToast({
          title: '物料列表接口調(diào)用失?。? + res.msg,
          icon: 'none',
          duration: 3000
        })
      }
    })
  },

  /**
   * 查詢框輸入事件監(jiān)聽
   * @param {*} e 
   */
  onSearchParamInput(e) {
    this.setData({
      searchParam: e.detail.value
    })
  },

  // 點擊鍵盤上的搜索
  bindconfirm: function (e) {
    var that = this;
    that.onSearch();
  },

  /**
   * 查詢框輸入事件監(jiān)聽
   * @param {*} e 
   */
  onSearchParamInput(e) {
    this.setData({
      searchParam: e.detail.value
    })
  },

  selware: function (e) {
    var that = this;
    let item = e.currentTarget.dataset.item;
    let pass = true;
    if (this.data.warehouseName != null && this.data.warehouseName !== item.from) {
      wx.showToast({
        title: '已選定倉庫,不可選其它倉庫物料',
        icon: 'none',
        duration: 1500,
        mask: true
      })
      pass = false;
    } else if (item.sum == 0) {
      wx.showToast({
        title: '當(dāng)前庫存為0',
        icon: 'none',
        duration: 1500,
        mask: true
      })
      pass = false;
    }
    if (!pass) {
      if (!that.data.showRadio) {
        return;
      } else {
        if (e.fromcheck == 1) {
          that.data.nav.list.forEach((pval, pkey) => {
            pval.wareList.forEach((val, key) => {
              if (val.wareid == item.wareid) {
                val.realchecked = false;
                val.checked = false;
                that.setData({
                  [`nav.list[${pkey}].wareList[${key}]`]: val
                });
              }
            })
          });
        }
        return;
      }
    }
    if (that.data.showRadio) { //多選時
      that.triggerCheckboxChange(item);
    } else {
      that.backEmit([item]);
    }
  },

  loadMore: function () {
    var that = this;
    if (that.data.nav.list[that.data.nav.active].stopQuery == 1) {
      return;
    }

    var page = that.data.nav.list[that.data.nav.active].currPage + 1;
    this.setData({
      [`nav.list[${that.data.nav.active}].currPage`]: page,
    });
    this.getTaskList();
  },
  
  //標(biāo)簽長按事件邏輯
  longPress: function (e) { 
    var that = this;
    if (!that.data.showRadio) {
      that.showCheckRadio();
    }
  },

  //取消多選模式
  cancelRadio: function (e) { 
    var that = this;
    if (that.data.showRadio) {
      that.showCheckRadio();
    }
  },
  

  /**
   * 重置
   */
  resetCheckRadio: function () {
    var that = this;
    that.data.nav.list.forEach((pval, pkey) => {
      pval.wareList.forEach((val, key) => {
        // if (pval.realchecked) {
          val.checked = false;
          val.realchecked = false;
          that.setData({
            [`nav.list[${pkey}].wareList[${key}]`]: val,
          });
        // }
      })
    });
    that.setData({
      choseNames:[]
    });
  },

  triggerCheckboxChange: function(item) {
    var that = this;

    that.data.nav.list.forEach((pval, pkey) => {
      pval.wareList.forEach((val, key) => {
        if (val.wareid == item.wareid) {
          val.realchecked=!val.checked;
          val.checked=!val.checked;
          that.setData({
            [`nav.list[${pkey}].wareList[${key}]`]: val
          });
        }
      })
    });

    // 有則刪除,無則添加
    let newChoseNames=that.data.choseNames;
    let index = newChoseNames.indexOf(item.wareid);
    if(index>-1){
      newChoseNames.splice(index, 1);
    } else {
      newChoseNames.push(item.wareid);
    }
    this.setData({
      choseNames: newChoseNames, //單個選中的值
    });
  },

  // 單選
  changeRadio: function (e) {
    var that = this;
    console.log(e.detail.value);
    this.setData({
      choseNames: e.detail.value, //單個選中的值
    });
    var values = e.detail.value;
    that.data.nav.list.forEach((pval, pkey) => {
      pval.wareList.forEach((val, key) => {
        var itemCheck = false;
        for (var i = 0; i < values.length; i++) {
          if (val.wareid == values[i]) {
            itemCheck = true;
            break
          }
        }
        that.setData({
          [`nav.list[${pkey}].wareList[${key}].realchecked`]: itemCheck
        });
      })
    });
  },

  /**
   * 多選按鈕點擊
   * @param {} params 
   */
  showCheckRadio: function (params) {
    var that = this;
    if (that.data.showRadio) {
      that.setData({
        showRadio: false,
        showRadioText: '多選'
      });
      that.resetCheckRadio();
    } else {
      that.setData({
        showRadio: true,
        showRadioText: '取消'
      });
    }
  },


  // 多選確定
  comfirmsel(e) {
    var that = this;
    let selItems = [];
    if (that.data.choseNames.length === 0) {
      return wx.showToast({
        title: '請選擇',
        icon: 'none'
      })
    }

    that.data.nav.list[that.data.nav.active].wareList.forEach((val, key) => {
      for (var i = 0; i < that.data.choseNames.length; i++) {
        if (val.wareid == that.data.choseNames[i]) {
          selItems.push(val);
          break
        }
      }
    })
    that.backEmit(selItems);
  },

  backEmit : function(selItems){
    //返回并回寫上一頁面
    let pages = getCurrentPages();
    let prePage = pages[pages.length - 2];
    prePage.emit(selItems)
    wx.navigateBack({
      delta: 1
    })
  },

  bindcheck : function(e){
    e.fromcheck=1;
    this.selware(e)
  },
})

WXML:

<!-- <view> -->
<view class="cu-bar bg-white search " style="height: 100rpx;width: 100%;position: fixed;top: 0;z-index: 998;padding-bottom: 10px;">
  <view class="search-form round">
    <text class="cuIcon-search"></text>
    <input value="{{ searchParam }}" confirm-type="search" bindconfirm="bindconfirm" bindinput="onSearchParamInput" placeholder="搜索添加物料" type="text">
    </input>
    <button class="cu-btn  cu-btn-lamp icon shadow" style='width:15vw;background-color: #4BCCB9;color: white;' bindtap="onSearch">查詢</button>
  </view>
</view>

<view class="top_nav" wx:if="{{nav.list.length==3}}">
  <!-- <view class="numtip" wx:if="{{todoTipNum!=0}}">{{todoTipNum}}</view> -->
  <view class="scroll_item scroll_item{{index}} {{nav.active == index ? 'active' : ''}}" data-idx="{{index}}" wx:for="{{nav.list}}" wx:key="id" bindtap='select' style="width: 100%;text-align: center;">
    {{item.name}}
  </view>
  <view class="sub" style="width:{{nav.width}}px; left:{{nav.offsetLeft}}px;">
    <view style="background-color: #4BCCB9;margin: 0 20px;height: 100%;">
    </view>
  </view>
</view>

<view class="content" style="height:100%;font-family: '微軟雅黑';top:{{navtop}}px">
  <swiper current="{{nav.active}}" style='height:100%' bindchange="bindchange">
    <swiper-item wx:for="{{nav.list}}" item-id="{{item.id}}" wx:key="id">
      <scroll-view scroll-y="true" style="height:{{scrollHeight}}px;" bindscrolltolower="loadMore">
        <!-- <view catchtap="donothing"> -->
        <checkbox-group data-itemid="{{item.wareid}}" style="{{showRadio?'display: block;':''}}">
          <view wx:for-items='{{item.wareList}}' bindlongpress="longPress" wx:for-index="index" wx:key="index" data-item="{{item}}" data-id='{{item.wareid}}' data-index="{{index}}" bindtap="selware" class="cu-card dynamic" style="padding: 10rpx 20rpx 8rpx 20rpx;display: flex;">
            <view wx:if="{{showRadio}}" style="height: 180rpx;display: flex;align-items: center;padding-right: 10rpx;">
              <checkbox value="{{item.wareid}}" checked="{{item.checked}}" data-item="{{item}}" catchtap="bindcheck"></checkbox>
            </view>
            <view data-item="{{item}}" style="width: 100%;border-radius: 20rpx;padding: 24rpx;padding-bottom: 14rpx;display: flex;{{(warehouseName !==null&&warehouseName !== item.from)||item.sum==0?'background-color: #ddd;color: #999':'background-color: white;color: black'}}">
              <view style="width: 100%;">
                <view style="font-size: 16px;font-weight: bold;margin-bottom: 10rpx;">
                  <!-- {{item.name!==null&&item.name!=='undefined'?item.name+' ':''}} -->
                  編號:{{item.warecode}}
                </view>
                <view style="font-size: 15px;margin-bottom: 10rpx;">
                  物品:{{item.warename}} {{item.model!=null?item.model:''}} {{item.specification!=null?item.specification:''}}
                </view>
                <view style="font-size: 15px;margin-bottom: 10rpx;">
                  庫存:{{item.from}}({{item.location}}) {{item.sum}}{{item.unit}}
                </view>
              </view>
            </view>
          </view>

        </checkbox-group>
        <!-- </view> -->
      </scroll-view>
    </swiper-item>
  </swiper>
</view>

<button wx:if="{{showRadio}}" class="round shadow cu-btn" bindtap='comfirmsel' style="background-color: #4BCCB9;color: white;width: 100px;position: fixed;bottom: 15px;right: {{showRadio?'30vw':'6vw'}};z-index: 999;font-weight: 500;font-size: 16px;">確定{{choseNames.length>0?('('+choseNames.length+')'):''}}</button>
<button class=" round shadow cu-btn" bindtap='showCheckRadio' style="background-color: {{showRadio?'#aaa':'#4BCCB9'}};color: {{showRadio?'#fff':'#fff'}};width: 90px;position: fixed;bottom: 15px;right: 5vw;z-index: 999;font-weight: 500;font-size: 16px;"><text decode="true">&nbsp;{{showRadioText}}</text> </button>

WXSS:

.top_nav {
  width: 100%;
  height: 82rpx;
  line-height: 80rpx;
  border-bottom: 1px olid #ddd;
  background-color: #FFF;
  position: fixed;
  top: 50px;
  left: 0;
  z-index: 999;
  display: flex;
  justify-content: space-around;
}

.top_nav .scroll_list {
  height: 82rpx;
  white-space: nowrap;
}

.top_nav .scroll_item {
  display: inline-block;
  padding: 0 10px;
  font-size: 14px;
  vertical-align: top;
}

.top_nav .scroll_item.active {
  color: #4BCCB9;
}

.top_nav .sub {
  /* width: 56rpx; */
  height: 4rpx;
  position: absolute;
  top: 78rpx;
  transition: left .5s;
}

/* .content{margin-top: 84rpx; line-height: 80rpx; font-size: 28rpx;width: 100%;} */
.content {
  position: fixed;
  top: 183rpx;
  font-size: 28rpx;
  width: 100%;
}

/* .swiper_box{ border: 1px solid red;height: 90%;margin: 0 20rpx;} */

.map_container {
  height: 40vh;
  width: 100vw;
}

.map {
  height: 100%;
  width: 100%;
}

.weui-cell__hd {
  font-size: 0
}

.weui-cell__hd image {
  margin-right: 16px;
  vertical-align: middle;
  width: 20px;
  height: 20px
}

.minicell {
  padding: 30rpx 16rpx;
}

.text_too_long {
  width: 500rpx;
  word-break: break-all;
}

.text_too_long480 {
  width: 480rpx;
  word-break: break-all;
  font-size: 15px;
}

.numtip {

  background-color: red;
  position: absolute;
  top: 0p;
  left: 160rpx;
  width: fit-content;
  height: 36rpx;
  border-radius: 2em;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-size: 12px;

  padding: 0 12rpx;
}

.btnview {
  position: fixed;
  bottom: 0;
  height: 100rpx;
  line-height: 100rpx;
  background-color: white;
  width: 100%;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.newbtn {
  width: 90%;
  border-radius: 50px;
  height: 70rpx;
  line-height: 70rpx;
  background-color: #4BCCB9;
  color: white;
}



checkbox .wx-checkbox-input {
  width: 46rpx;
  height: 46rpx;
  border-radius: 50%;
}

/*checkbox選中后樣式  */
checkbox .wx-checkbox-input.wx-checkbox-input-checked {
  background: #fed6e3;
}

/*checkbox選中后圖標(biāo)樣式  */
checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
  width: 40rpx;
  height: 40rpx;
  line-height: 28rpx;
  text-align: center;
  font-size: 18rpx;
  color: #fff;
  background: transparent;
  transform: translate(-50%, -50%) scale(1);
  -webkit-transform: translate(-50%, -50%) scale(1);
}

樣式引用:

?????????GitHub - weilanwl/coloruicss: 鮮亮的高飽和色彩,專注視覺的小程序組件庫

如果我的文章幫助到了你,點贊,評論,關(guān)注下吧

謝謝,歡迎多多交流!

——tanly文章來源地址http://www.zghlxwxcb.cn/news/detail-774892.html

到了這里,關(guān)于微信小程序 列表多選 下拉分頁 滑動切換分類的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實不符,請點擊違法舉報進(jìn)行投訴反饋,一經(jīng)查實,立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費用

相關(guān)文章

  • 微信小程序?qū)崿F(xiàn)滑動/點擊切換Tab

    微信小程序?qū)崿F(xiàn)滑動/點擊切換Tab

    ?? swiper+scroll-view實現(xiàn)滑動/點擊切換Tab,以及scroll-left的使用~ ??文末分享源代碼。記得點贊+關(guān)注+收藏! 2.1 scroll-view實現(xiàn)tab列表 scroll-view: 可滾動視圖區(qū)域。使用豎向滾動時,需要給scroll-view一個固定高度,通過 WXSS 設(shè)置 height。組件屬性的長度單位默認(rèn)為px。 scroll-x(bool

    2024年01月19日
    瀏覽(95)
  • 微信小程序———同一頁面內(nèi)左右滑動切換內(nèi)容顯示

    微信小程序———同一頁面內(nèi)左右滑動切換內(nèi)容顯示

    一、微信小程序事件 ?由于首先介紹一下微信小程序中的事件,可選擇快速略過或者直接進(jìn)去之后的重點內(nèi)容 一、什么是事件 事件是視圖層到邏輯層的通訊方式。 事件可以將用戶的行為反饋到邏輯層進(jìn)行處理。 事件可以綁定在組件上,當(dāng)達(dá)到觸發(fā)事件,就會執(zhí)行邏輯層中對

    2024年02月03日
    瀏覽(86)
  • 快速掌握微信小程序 tab 切換的實現(xiàn)技巧(可滑動切換)

    快速掌握微信小程序 tab 切換的實現(xiàn)技巧(可滑動切換)

    微信小程序中的 tab 切換功能可以說是用戶所需的一個基礎(chǔ)功能。本文將介紹如何通過微信小程序?qū)崿F(xiàn) tab 切換功能,為用戶帶來更為便捷和高效的小程序體驗。 其實這個小功能的實現(xiàn)非常簡單,只需要通過一個標(biāo)識控制選項的樣式及顯示的內(nèi)容,當(dāng)我們觸發(fā)點擊或者滑動事

    2024年02月11日
    瀏覽(365)
  • 微信小程序?qū)崿F(xiàn)左右滑動進(jìn)行切換數(shù)據(jù)頁面(touchmove)

    微信小程序?qū)崿F(xiàn)左右滑動進(jìn)行切換數(shù)據(jù)頁面(touchmove)

    手指觸摸左右滑動進(jìn)行切換數(shù)據(jù) 需要實現(xiàn)的是有一個tab欄,點選某一個tab的時候切換頁面,手勢滑動,左滑右滑效果和點擊tab一樣切換頁面數(shù)據(jù)。 這里我們要先了解幾個微信的事件屬性 touchstart : 手指觸摸動作開始 touchmove:手指觸摸后移動 touchcancel:手指觸摸動作被打斷,

    2024年02月11日
    瀏覽(87)
  • 微信小程序中 使用swiper 滑動切換一級、二級導(dǎo)航

    微信小程序中 使用swiper 滑動切換一級、二級導(dǎo)航

    其中遇到一個大問題使我放棄了swiper的使用,swiper有一個固定高度不太好處理,最終使用了touch事件去處理觸摸移動,之后會再寫一篇文章記錄,處理不復(fù)雜的話還是可以用swiper的 效果根據(jù)手指滑動切換二級導(dǎo)航、二級切換完成切換一級導(dǎo)航 ? 其中遇到一個大問題使我放棄了

    2024年02月17日
    瀏覽(23)
  • uniapp 微信小程序 Picker下拉列表數(shù)據(jù)回顯問題

    uniapp 微信小程序 Picker下拉列表數(shù)據(jù)回顯問題

    效果圖: 1、template 2、data 3、methods

    2024年02月16日
    瀏覽(23)
  • uniapp 微信小程序?qū)崿F(xiàn)監(jiān)聽屏幕左右滑動實現(xiàn)tab標(biāo)簽切換效果

    ? ? ? ? 實際的項目開發(fā)之中,有很多所謂的奇葩需求,當(dāng)工程量相對較大的時候去更換組件會顯得特別麻煩和費時。我這次的需求因為某些特殊原因,更換組件后也無法實現(xiàn)需要達(dá)到的效果,所以最后只能監(jiān)聽滑動事件,相信你看了我的代碼也能輕松搞定! ?????????

    2024年02月14日
    瀏覽(97)
  • 微信小程序?qū)崿F(xiàn)tab切換和數(shù)據(jù)列表

    微信小程序?qū)崿F(xiàn)tab切換和數(shù)據(jù)列表

    上篇文章介紹了微信小程序?qū)崿F(xiàn)tab切換的一種方案(參考 https://blog.51cto.com/baorant24/6188157 ),感覺代碼不是很精簡,本文再用一個demo介紹微信小程序如何實現(xiàn)tab切換和數(shù)據(jù)列表。 微信小程序?qū)?yīng)頁面文件結(jié)構(gòu)如下: 話不多說,直接上代碼: (1)index.js文件,代碼如下: (2)index.

    2024年02月05日
    瀏覽(93)
  • Uni-app實現(xiàn)左右滑動頁面內(nèi)容切換(兼容微信小程序)

    提示:文章寫完后,目錄可以自動生成,如何生成可參考右邊的幫助文檔 ? ? ? ? 前言 ? ? ? ? 整體思路 ? ? ? ??一、HTML部分 ????????二、Script部分 ????????三、Style部分 ? ? ? ? ? (先聲明哦我可不是偷懶,只是想學(xué)術(shù)借鑒一下)因為最近有在做左右滑動功能,

    2024年02月07日
    瀏覽(112)
  • uniapp 微信小程序 自定義彈框+picker下拉選擇列表+輸入表單:拒絕-選擇理由彈窗

    uniapp 微信小程序 自定義彈框+picker下拉選擇列表+輸入表單:拒絕-選擇理由彈窗

    效果: 1、template 2、data: 3、methods: 4、style

    2024年01月20日
    瀏覽(96)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包