From 9dc1df97b7cc9422d18a58d04523f7f1bc1e3c36 Mon Sep 17 00:00:00 2001
From: skyouc <958836976@qq.com>
Date: 星期六, 28 二月 2026 16:35:46 +0800
Subject: [PATCH] no message
---
pages/pakin/EmptyPakin.vue | 551 +++++++++++++++++++
uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue | 9
uni_modules/uni-data-select/components/uni-data-select/uni-data-select.vue | 837 +++++++++++++++++++++++++++++
uni_modules/uni-data-select/changelog.md | 51 +
uni_modules/uni-data-select/readme.md | 8
uni_modules/uni-load-more/package.json | 99 ++-
uni_modules/uni-data-select/package.json | 106 +++
uni_modules/uni-load-more/changelog.md | 4
8 files changed, 1,623 insertions(+), 42 deletions(-)
diff --git a/pages/pakin/EmptyPakin.vue b/pages/pakin/EmptyPakin.vue
new file mode 100644
index 0000000..4f8195d
--- /dev/null
+++ b/pages/pakin/EmptyPakin.vue
@@ -0,0 +1,551 @@
+<template>
+ <view>
+ <view class="code">
+ <view class="item">
+ <view class="code-decs">鎵樼洏鐮�:</view>
+ <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="barcode" :focus="barcodeFocus"
+ @input="barcodeInput()">
+ </view>
+ </view>
+ <view class="mat-list-title">
+ 鍟嗗搧鍒楄〃
+ </view>
+ <scroll-view>
+ <view class="list" v-for="(item,i) in dataList" :key="i">
+ <view class="list-left">
+ <view class="list-left-item">
+ <view class="desc">No锛�</view>
+ <view class="left-item">{{i + 1}}</view>
+ </view>
+ <view class="list-left-item">
+ <view class="desc">璁㈠崟鍙凤細</view>
+ <view class="left-item">
+ <uni-tag :text="item.orderNo" type="primary"></uni-tag>
+ </view>
+ </view>
+ <view class="list-left-item">
+ <view class="desc">鏍煎眰缂栫爜锛�</view>
+ <view class="left-item">
+ <uni-tag :text="item.boxType1" type="primary"></uni-tag>
+ </view>
+ </view>
+ <view class="list-left-item">
+ <view class="desc">BS Code锛�</view>
+ <view class="left-item">
+ <uni-tag :text="item.threeCode" type="primary"></uni-tag>
+ </view>
+ </view>
+ <view class="list-left-item">
+ <view class="desc">鏂欏彿锛�</view>
+ <view class="left-item">
+ <uni-tag :text="item.matnr" type="primary"></uni-tag>
+ </view>
+ </view>
+ <view class="list-left-item">
+ <view class="desc">鍝佸悕锛�</view>
+ <view class="left-item">{{item.maktx}}</view>
+ </view>
+ <view class="list-left-item">
+ <view class="desc">渚涘簲鍟嗭細</view>
+ <view class="left-item">
+ <uni-tag :text="item.suppCode" type="warning"></uni-tag>
+ </view>
+ </view>
+ <view class="list-left-item">
+ <view class="desc">鏁伴噺锛�</view>
+ <view class="left-item">{{item.anfme}}</view>
+ </view>
+ </view>
+ <view class="list-right">
+ <uni-icons type="compose" color="#9add8b" size="24" @click="revise(item,i)"></uni-icons>
+ <uni-icons type="trash" color="#f58a8a" size="24" @click="remove(item,i,'warn')"></uni-icons>
+ </view>
+ </view>
+ </scroll-view>
+ <!-- 搴曢儴鎿嶄綔鎸夐挳 -->
+ <view class="buttom">
+ <button size="mini" @click="reset('warn')">閲嶇疆</button>
+ <button size="mini" type="primary" @click="combConfirm('warn')">缁勬墭</button>
+ </view>
+ <!-- 寮圭獥 -->
+ <!-- 淇敼鏁伴噺 -->
+ <view>
+ <uni-popup ref="revise" type="dialog">
+ <view class="popup">
+ <!-- 鏍囬 -->
+ <view class="title">淇敼</view>
+ <view class="popup-item">
+ <view class="popup-item-left">鏂欏彿:</view>
+ <view class="popup-item-right">
+ <input type="text" v-model="matnr" disabled="true"
+ style="background-color: #f7f7f7;padding: 0;color: #d5d5d5;">
+ </view>
+ </view>
+ <view class="popup-item">
+ <view class="popup-item-left">渚涘簲鍟�:</view>
+ <view class="popup-item-right">
+ <input type="text" v-model="suppCode" disabled="true"
+ style="background-color: #f7f7f7;padding: 0;color: #d5d5d5;">
+ </view>
+ </view>
+ <view class="popup-item">
+ <view class="popup-item-left">鏍煎眰缂栫爜:</view>
+ <view class="popup-item-right">
+ <input type="text" v-model="tempBoxType"
+ style="background-color: #f7f7f7;padding: 0;color: #d5d5d5;">
+ </view>
+ </view>
+ <view class="popup-item">
+ <view class="popup-item-left">鏁伴噺:</view>
+ <view class="popup-item-right" style="border: none;justify-content: center;">
+ <uni-number-box :value="count" :step='1' :max="9999999" color="#747474"
+ @change="changeValue" />
+ </view>
+ </view>
+ <view class="btn">
+ <view class="btn-left" @click="reviseClose">鍙栨秷</view>
+ <view class="btn-right" @click="reviseConfirm()">淇敼</view>
+ </view>
+ </view>
+ </uni-popup>
+ </view>
+ <!-- 绉婚櫎纭 -->
+ <view>
+ <!-- 鎻愮ず绐楃ず渚� -->
+ <uni-popup ref="alertDialog" type="dialog">
+ <uni-popup-dialog :type="msgType" confirmText="绉婚櫎" :title="title" :content="content"
+ @confirm="removeConfirm()" @close="removeClose"></uni-popup-dialog>
+ </uni-popup>
+ </view>
+ <view>
+ <!-- 鎻愮ず淇℃伅寮圭獥 -->
+ <uni-popup ref="message" type="message">
+ <uni-popup-message :type="msgType1" :message="messageText" :duration="2000"></uni-popup-message>
+ </uni-popup>
+ </view>
+ <!-- 纭缁勬墭 -->
+ <view>
+ <uni-popup ref="combConfirm" type="dialog">
+ <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
+ @confirm="comb" @close="combClose"></uni-popup-dialog>
+ </uni-popup>
+ </view>
+ <!-- 纭閲嶇疆 -->
+ <view>
+ <uni-popup ref="resetConfirm" type="dialog">
+ <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
+ @confirm="resetConfirm" @close="resetClose"></uni-popup-dialog>
+ </uni-popup>
+ </view>
+ </view>
+</template>
+
+<script>
+ export default {
+ data() {
+ return {
+ baseUrl: '',
+ token: '',
+ barcode: '',
+ orderNo: null,
+ dataList: [],
+ count: 0,
+ threeCode: '',
+ rowNum: '',
+ matnr: '',
+ suppCode: '',
+ boxType1: '',
+ weight: '',
+ msgType1: 'success',
+ msgType: 'success',
+ messageText: '',
+ title: '',
+ content: '',
+ tempBoxType: '',
+ boxType1Focus: true,
+ barcodeFocus: false,
+ matFocus: false,
+ orderNoFocus: false,
+ matData: '',
+ removeNum: 0,
+ }
+ },
+ onLoad() {
+
+ },
+ onShow() {
+ this.baseUrl = uni.getStorageSync('baseUrl');
+ this.token = uni.getStorageSync('token');
+ },
+ methods: {
+ messageToggle(type) {
+ this.msgType1 = type
+ this.$refs.message.open()
+ },
+ // barcode input 浜嬩欢
+ orderNoInput() {
+ // 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏�
+ setTimeout(() => {
+ var len = this.orderNo.length
+ // this.barcodeFocuss()
+ }, 200)
+ },
+ barcodeInput() {
+ // 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏�
+ // setTimeout(() => {
+ // var len = this.barcode.length
+ // if (len != 8) {
+ // uni.showToast({
+ // title: '鎵樼洏鐮佹湁璇閲嶈瘯',
+ // icon: "none",
+ // position: 'top'
+ // });
+ // this.barcodeFocuss()
+ // return;
+ // }
+ // this.focuss()
+ // }, 200)
+ },
+ boxType1Input() {
+ let bcode = this.boxType1.split("-")[0];
+ if (this.barcode != null && this.barcode != undefined && this.barcode != '') {
+ if (this.barcode != bcode && this.dataList.length > 0) {
+ this.messageText = "澶氭缁勬墭鍙拌溅涓嶄竴鑷达紝璇锋鏌ュ悗鍐嶆搷浣滐紒锛�"
+ this.messageToggle('error')
+ return;
+ }
+ }
+ this.barcode = bcode;
+ },
+
+ // 鎵樼洏鐮佹湁璇噸缃�
+ barcodeFocuss() {
+ let that = this;
+ that.barcodeFocus = false;
+ setTimeout(() => {
+ that.barcode = '';
+ that.barcodeFocus = true;
+ }, 100);
+ },
+ // 鍟嗗搧鍏夋爣娓呯┖閲嶇疆
+ focuss() {
+ this.focus = false;
+ setTimeout(() => {
+ this.matnr = '';
+ this.matFocus = true;
+ }, 100);
+ },
+ // 鎼滅储鐗╂枡
+ findMat() {
+
+ if (this.boxType1 == null || this.boxType1 == '') {
+ this.messageText = "鏍煎眰缂栫爜涓嶈兘涓虹┖锛侊紒"
+ this.messageToggle('error')
+ return
+ }
+
+ let that = this
+ uni.request({
+ url: that.baseUrl + '/mobile/scan/order/mats',
+ method: 'POST',
+ data: {
+ orderNo: that.orderNo,
+ threeCode: that.matnr
+ // matnr: that.matnr
+ },
+ header: {
+ 'token': uni.getStorageSync('token')
+ },
+ success(result) {
+ result = result.data
+ if (result.code === 200 && result.data) {
+ that.matData = result.data
+ that.matnr = ''
+ that.matData['suppCode'] = ''
+ uni.navigateTo({
+ url: "../mat/matSelected",
+ // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�
+ success: function(res) {
+ res.eventChannel.emit('mat', {
+ data: result.data
+ })
+ },
+ // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
+ events: {
+ matList: function(data) {
+ that.checkMat(data.data)
+ that.focuss()
+ },
+ },
+ });
+ } else if (result.code == 403) {
+ uni.showToast({
+ title: result.msg,
+ icon: "none",
+ position: 'top'
+ })
+ setTimeout(() => {
+ uni.reLaunch({
+ url: '../login/login'
+ });
+ }, 1000);
+ } else {
+ uni.showToast({
+ title: result.msg,
+ icon: "none",
+ position: 'top'
+ })
+ }
+ }
+ });
+ },
+ selectMat() {
+ let that = this
+ if (that.orderNo == null || that.orderNo == undefined) {
+ that.messageText = '璇峰~鍐欒鍗曠紪鍙凤紒锛�'
+ that.messageToggle('error')
+ return;
+ }
+
+ uni.navigateTo({
+ url: "../mat/matQuery",
+ success: function(res) {
+ // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� 鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑
+ res.eventChannel.emit('orderNo', {
+ orderNo: that.orderNo
+ })
+ },
+ events: {
+ // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� 鍙﹀涓�涓〉闈紶杩囨潵鐨�
+ acceptDataFromOpenedPage: function(data) {
+ that.matnr = data.data
+
+ that.findMat(that.matnr)
+ },
+ },
+ });
+ that.matnr = ''
+ },
+ checkMat(mat) {
+ var len = this.dataList.length
+ var add = true,
+ sameItem = false
+ for (var i = 0; i < len; i++) {
+ if (mat.matnr == this.dataList[i].matnr) {
+ for (var j = 0; j < len; j++) {
+ if (mat.suppCode == this.dataList[j].suppCode && mat.orderNo == this.dataList[j].orderNo && this.boxType1 == this.dataList[j].boxType1) {
+ sameItem = true
+ }
+ }
+ // 鐩稿悓鐗╂枡 涓嶅悓鎵瑰彿 鏂板姞鍒楄〃
+ if (mat.suppCode != this.dataList[i].suppCode || mat.orderNo != this.dataList[i].orderNo || this.boxType1 != this.dataList[i].boxType1) {
+ this.$forceUpdate() // 寮哄埗鍒锋柊
+ if (sameItem) {
+ add = false
+ } else {
+ add = true
+ }
+
+ } else {
+ // 鐩稿悓鐗╂枡鐩稿悓鎵瑰彿 鏁伴噺绱姞
+ this.dataList[i].anfme += mat.anfme
+ this.$forceUpdate() // 寮哄埗鍒锋柊
+ add = false
+ }
+ }
+ if (this.dataList[i].boxType1 != null && this.dataList[i].boxType1 == "1") {
+ this.dataList[i].boxType1 = this.boxType1;
+ }
+ }
+
+ if (add) {
+ mat.boxType1 = this.boxType1;
+ this.dataList.unshift(mat)
+ }
+ this.tempBoxType = this.boxType1;
+
+ this.boxType1 = null;
+ },
+ // 淇敼鎵瑰彿
+ revise(item, i) {
+ this.matnr = this.dataList[i].matnr
+ this.count = this.dataList[i].anfme
+ this.suppCode = this.dataList[i].suppCode
+ this.weight = this.dataList[i].weight
+ this.rowNum = i
+ this.eject()
+ },
+ eject(type) {
+ this.type = type
+ this.$refs.revise.open(type)
+ },
+ // 鍒楄〃绉婚櫎鎸夐挳
+ remove(item, i, type) {
+ this.removeNum = i
+ this.msgType = type
+ this.title = '璀﹀憡'
+ this.content = '鏄惁绉婚櫎褰撳墠鍟嗗搧!'
+ this.$refs.alertDialog.open(i)
+ },
+ // 纭绉婚櫎
+ removeConfirm() {
+ this.messageText = "绉婚櫎鎴愬姛"
+ this.messageToggle('success')
+ this.dataList.splice(this.removeNum, 1)
+ },
+ // 鍙栨秷绉婚櫎
+ removeClose() {
+ this.$refs.alertDialog.close()
+ },
+ reviseConfirm() {
+ this.dataList[this.rowNum].anfme = this.count
+ this.dataList[this.rowNum].suppCode = this.suppCode
+ this.dataList[this.rowNum].weight = this.weight
+ this.dataList[this.rowNum].boxType1 = this.tempBoxType
+ this.matnr = ''
+ this.messageText = "淇敼鎴愬姛"
+ this.messageToggle('success')
+ this.$refs.revise.close()
+ },
+ reviseClose() {
+ this.$refs.revise.close()
+ },
+ changeValue(value) {
+ this.count = value
+ },
+ combConfirm(type) {
+ this.msgType = type
+ this.title = '璀﹀憡'
+ this.content = '鏄惁鐜板湪缁勬墭!'
+ this.$refs.combConfirm.open()
+ },
+ combClose() {
+ this.$refs.combConfirm.close()
+ },
+ comb() {
+ uni.vibrateShort();
+ let that = this;
+ if (that.barcode === '') {
+ this.messageText = "璇锋壂鎻忔墭鐩樻潯鐮�"
+ this.messageToggle('error')
+ return;
+ }
+
+ uni.request({
+ url: that.baseUrl + '/mobile/comb/auth',
+ data: JSON.stringify({
+ barcode: that.barcode,
+ pakinType: '3'
+ }),
+ method: 'POST',
+ header: {
+ 'token': uni.getStorageSync('token')
+ },
+ success(result) {
+ var res = result.data
+ if (res.code === 200) {
+ that.resst();
+ that.messageText = "缁勬墭鎴愬姛"
+ that.messageToggle('success')
+ const innerAudioContext = uni.createInnerAudioContext();
+ innerAudioContext.src = '/static/music/pakinOk.mp3';
+ innerAudioContext.play()
+ } else if (res.code == 403) {
+ that.messageText = res.msg
+ that.messageToggle('error')
+ setTimeout(() => {
+ uni.reLaunch({
+ url: '../login/login'
+ });
+ }, 1000);
+ } else {
+ that.messageText = res.msg
+ that.messageToggle('error')
+ }
+ }
+ });
+ },
+ reset(type) {
+ this.msgType = type
+ this.title = '璀﹀憡'
+ this.content = '鏄惁閲嶇疆!'
+ this.$refs.resetConfirm.open()
+ },
+ // 纭閲嶇疆
+ resetConfirm() {
+ this.dataList = []
+ this.barcode = ''
+ this.messageText = "閲嶇疆瀹屾垚"
+ this.messageToggle('success')
+ },
+ // 鍙栨秷閲嶇疆
+ resetClose() {
+
+ },
+ // 娓呯┖
+ resst() {
+ this.dataList = []
+ this.barcode = ''
+ this.barcodeFocuss()
+ },
+ }
+ }
+</script>
+
+<style>
+ @import url('../../static/css/wms.css/wms.css');
+
+ .list:first-child {
+ margin-top: 460rpx;
+ }
+
+ .code {
+ width: 100%;
+ position: fixed;
+ min-height: 200rpx;
+ background-color: #FFF;
+ z-index: 10;
+ }
+
+ .item {
+ display: flex;
+ align-items: center;
+ height: 100rpx;
+ margin-left: 20rpx;
+ border-bottom: 1px solid #DCDFE6;
+ }
+
+ .item input {
+ height: 50rpx;
+ line-height: 50rpx;
+ /* font-family: PingFang SC; uniapp 榛樿瀛椾綋涓嶅眳涓� */
+ font-size: 36upx;
+ font-family: PingFang SC;
+ width: 55vw;
+
+ }
+
+ .code-decs {
+ width: 20vw;
+ font-size: 18px;
+ color: #303133;
+ }
+
+ .item-right {
+ margin-left: auto;
+ margin-right: 20rpx;
+ }
+
+ .mat-list-title {
+ height: 80rpx;
+ line-height: 80rpx;
+ width: 100%;
+ background-color: white;
+ position: fixed;
+ margin-top: 210rpx;
+ z-index: 9;
+ /* border-top: 1px solid #DCDFE6; */
+ text-align: center;
+ box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.5);
+ }
+</style>
\ No newline at end of file
diff --git a/uni_modules/uni-data-select/changelog.md b/uni_modules/uni-data-select/changelog.md
new file mode 100644
index 0000000..1681eae
--- /dev/null
+++ b/uni_modules/uni-data-select/changelog.md
@@ -0,0 +1,51 @@
+## 1.1.0锛�2025-08-19锛�
+- 鏂板 鎻掓Ы selected empty option
+- 鏂板 mutiple 灞炴��,鏀寔澶氶�夊姛鑳�
+- 鏂板 wrap 灞炴��,鏀寔閫変腑鐨勬枃瀛楄秴杩囦竴琛屾樉绀�
+- 鏂板 align 灞炴��,鏀寔淇敼閫変腑鐨勬枃瀛楁樉绀虹殑浣嶇疆
+- 鏂板 hideRight 灞炴��,鏀寔闅愯棌鍙充晶鎵�鏈夋寜閽�
+- 鏂板 mode 灞炴��,鏀寔淇敼杈规鏍峰紡
+- 鏂板 浜嬩欢 open close clear
+## 1.0.10锛�2025-04-14锛�
+- 淇 娓呴櫎鎸夐挳涓嶅睍绀洪棶棰�
+## 1.0.9锛�2025-03-26锛�
+- 浼樺寲 榛樿鑳屾櫙涓虹櫧鑹蹭笌鏁翠綋缁勪欢淇濇寔椋庢牸缁熶竴
+## 1.0.8锛�2024-03-28锛�
+- 淇 鍦╲ue2涓�:style鍔ㄦ�佺粦瀹氬鑷寸紪璇戝け璐ョ殑bug
+## 1.0.7锛�2024-01-20锛�
+- 淇 闀挎枃鏈洖鏄捐秴杩囧鍣ㄧ殑bug锛岃秴杩囧鍣ㄩ儴鍒嗘樉绀虹渷鐣ュ彿
+## 1.0.6锛�2023-04-12锛�
+- 淇 寰俊灏忕▼搴忕偣鍑绘椂浼氭敼鍙樿儗鏅鑹茬殑 bug
+## 1.0.5锛�2023-02-03锛�
+- 淇 绂佺敤鏃朵細鏄剧ず娓呯┖鎸夐挳
+## 1.0.4锛�2023-02-02锛�
+- 浼樺寲 鏌ヨ鏉′欢鐭湡鍐呭娆″彉鏇村彧鏌ヨ鏈�鍚庝竴娆″彉鏇村悗鐨勭粨鏋�
+- 璋冩暣 鍐呴儴缂撳瓨閿悕璋冩暣涓� uni-data-select-lastSelectedValue
+## 1.0.3锛�2023-01-16锛�
+- 淇 涓嶅叧鑱旀湇鍔$┖闂存姤閿欑殑闂
+## 1.0.2锛�2023-01-14锛�
+- 鏂板 灞炴�� `format` 鍙敤浜庢牸寮忓寲鏄剧ず閫夐」鍐呭
+## 1.0.1锛�2022-12-06锛�
+- 淇 褰搘here鍙樺寲鏃讹紝鏁版嵁涓嶄細鑷姩鏇存柊鐨勯棶棰�
+## 0.1.9锛�2022-09-05锛�
+- 淇 寰俊灏忕▼搴忎笅鎷夋鍑虹幇鍚庨�夋嫨浼氱偣鍑诲埌钂欐澘鍚庨潰鐨勮緭鍏ユ
+## 0.1.8锛�2022-08-29锛�
+- 淇 鐐瑰嚮鐨勪綅缃笉鍑嗙‘
+## 0.1.7锛�2022-08-12锛�
+- 鏂板 鏀寔 disabled 灞炴��
+## 0.1.6锛�2022-07-06锛�
+- 淇 pc绔搴﹀紓甯哥殑bug
+## 0.1.5
+- 淇 pc绔搴﹀紓甯哥殑bug
+## 0.1.4锛�2022-07-05锛�
+- 浼樺寲 鏄剧ず鏍峰紡
+## 0.1.3锛�2022-06-02锛�
+- 淇 localdata 璧嬪�间笉鐢熸晥鐨� bug
+- 鏂板 鏀寔 uni.scss 淇敼棰滆壊
+- 鏂板 鏀寔閫夐」绂佺敤锛堟暟鎹�夐」璁剧疆 disabled: true 鍗崇鐢級
+## 0.1.2锛�2022-05-08锛�
+- 淇 褰� value 涓� 0 鏃堕�夋嫨涓嶇敓鏁堢殑 bug
+## 0.1.1锛�2022-05-07锛�
+- 鏂板 璁颁綇涓婃鐨勯�夐」锛堜粎 collection 瀛樺湪鏃舵湁鏁堬級
+## 0.1.0锛�2022-04-22锛�
+- 鍒濆鍖�
diff --git a/uni_modules/uni-data-select/components/uni-data-select/uni-data-select.vue b/uni_modules/uni-data-select/components/uni-data-select/uni-data-select.vue
new file mode 100644
index 0000000..85b2d7b
--- /dev/null
+++ b/uni_modules/uni-data-select/components/uni-data-select/uni-data-select.vue
@@ -0,0 +1,837 @@
+<template>
+ <view class="uni-stat__select">
+ <span v-if="label" class="uni-label-text hide-on-phone">{{label + '锛�'}}</span>
+ <view class="uni-stat-box" :class="{'uni-stat__actived': current}">
+ <view class="uni-select" :class="{'uni-select--disabled':disabled, 'uni-select--wrap': shouldWrap , 'border-default': mode == 'default','border-bottom': mode == 'underline'}">
+ <view class="uni-select__input-box" @click="toggleSelector" :class="{'uni-select__input-box--wrap': shouldWrap}">
+ <view v-if="slotSelected" class="slot-content padding-top-bottom" :class="{'uni-select__input-text--wrap': shouldWrap}">
+ <slot name="selected" :selectedItems="getSelectedItems()"></slot>
+ </view>
+ <template v-else>
+ <view v-if="textShow" class="uni-select__input-text" :class="{'uni-select__input-text--wrap': shouldWrap}">
+ <view class="padding-top-bottom" :class="'align-'+align">{{textShow}}</view>
+ </view>
+ <view v-else class="uni-select__input-text uni-select__input-placeholder" :class="'align-'+align">{{typePlaceholder}}</view>
+ </template>
+ <view key="clear-button" v-if="!hideRight && shouldShowClear && clear && !disabled" @click.stop="clearVal">
+ <uni-icons type="clear" color="#c0c4cc" size="24" />
+ </view>
+ <view key="arrow-button" v-else-if="!hideRight">
+ <uni-icons :type="showSelector? 'top' : 'bottom'" size="14" color="#999" />
+ </view>
+ </view>
+ <view class="uni-select--mask" v-if="showSelector" @click="toggleSelector" />
+ <view class="uni-select__selector" :style="getOffsetByPlacement" v-if="showSelector">
+ <view :class="placement=='bottom'?'uni-popper__arrow_bottom':'uni-popper__arrow_top'"></view>
+ <scroll-view scroll-y="true" class="uni-select__selector-scroll">
+ <template v-if="slotEmpty && mixinDatacomResData.length === 0">
+ <view class="uni-select__selector-empty">
+ <slot name="empty" :empty="emptyTips"></slot>
+ </view>
+ </template>
+ <template v-else>
+ <view v-if="mixinDatacomResData.length === 0" class="uni-select__selector-empty">
+ <text>{{emptyTips}}</text>
+ </view>
+ </template>
+ <template v-if="slotOption">
+ <view v-for="(itemData,index) in mixinDatacomResData" :key="index" @click="change(itemData)">
+ <slot name="option" :item="itemData" :itemSelected="multiple? getCurrentValues().includes(itemData.value):getCurrentValues() == itemData.value"></slot>
+ </view>
+ </template>
+ <template v-else>
+ <view v-if="!multiple && mixinDatacomResData.length > 0" class="uni-select__selector-item" v-for="(item,index) in mixinDatacomResData" :key="index"
+ @click="change(item)">
+ <text :class="{'uni-select__selector__disabled': item.disable}">{{formatItemName(item)}}</text>
+ </view>
+ <view v-if="multiple && mixinDatacomResData.length > 0" >
+ <checkbox-group @change="checkBoxChange">
+ <label class="uni-select__selector-item" v-for="(item,index) in mixinDatacomResData" :key="index" >
+ <checkbox :value="index+''" :checked="getCurrentValues().includes(item.value)" :disabled="item.disable"></checkbox>
+ <view :class="{'uni-select__selector__disabled': item.disable}">{{formatItemName(item)}}</view>
+ </label>
+ </checkbox-group>
+ </view>
+ </template>
+ </scroll-view>
+ </view>
+ </view>
+ </view>
+ </view>
+</template>
+
+<script>
+ /**
+ * DataChecklist 鏁版嵁閫夋嫨鍣�
+ * @description 閫氳繃鏁版嵁娓叉煋鐨勪笅鎷夋缁勪欢
+ * @tutorial https://uniapp.dcloud.io/component/uniui/uni-data-select
+ * @property {String|Array} value 榛樿鍊硷紝澶氶�夋椂涓烘暟缁�
+ * @property {Array} localdata 鏈湴鏁版嵁 锛屾牸寮� [{text:'',value:''}]
+ * @property {Boolean} clear 鏄惁鍙互娓呯┖宸查�夐」
+ * @property {Boolean} emptyText 娌℃湁鏁版嵁鏃舵樉绀虹殑鏂囧瓧 锛屾湰鍦版暟鎹棤鏁�
+ * @property {String} label 宸︿晶鏍囬
+ * @property {String} placeholder 杈撳叆妗嗙殑鎻愮ず鏂囧瓧
+ * @property {Boolean} disabled 鏄惁绂佺敤
+ * @property {Boolean} multiple 鏄惁澶氶�夋ā寮�
+ * @property {Boolean} wrap 鏄惁鍏佽閫変腑鏂囨湰鎹㈣鏄剧ず
+ * @property {String} placement 寮瑰嚭浣嶇疆
+ * @value top 椤堕儴寮瑰嚭
+ * @value bottom 搴曢儴寮瑰嚭锛坉efault)
+ * @property {String} align 閫夋嫨鏂囧瓧鐨勪綅缃�
+ * @value left 鏄剧ず宸︿晶
+ * @value center 鏄剧ず涓棿
+ * @value right 鏄剧ず 鍙充晶
+ * @property {Boolean} hideRight 鏄惁闅愯棌鍙充晶鎸夐挳
+ * @property {String} mode 杈规鏍峰紡
+ * @value default 鍥涘懆杈规
+ * @value underline 涓嬭竟妗�
+ * @value none 鏃犺竟妗�
+ * @event {Function} change 閫変腑鍙戠敓鍙樺寲瑙﹀彂
+ * @event {Function} open 閫夋嫨妗嗗紑鍚椂瑙﹀彂
+ * @event {Function} close 閫夋嫨妗嗗叧闂椂瑙﹀彂
+ * @event {Function} clear 鐐瑰嚮娓呴櫎鎸夐挳涔嬪悗瑙﹀彂
+ */
+
+ export default {
+ name: "uni-data-select",
+ mixins: [uniCloud.mixinDatacom || {}],
+ emits: [
+ 'open',
+ 'close',
+ 'update:modelValue',
+ 'input',
+ 'clear',
+ 'change'
+ ],
+ model: {
+ prop: 'modelValue',
+ event: 'update:modelValue'
+ },
+ options: {
+ // #ifdef MP-TOUTIAO
+ virtualHost: false,
+ // #endif
+ // #ifndef MP-TOUTIAO
+ virtualHost: true
+ // #endif
+ },
+ props: {
+ localdata: {
+ type: Array,
+ default () {
+ return []
+ }
+ },
+ value: {
+ type: [String, Number, Array],
+ default: ''
+ },
+ modelValue: {
+ type: [String, Number, Array],
+ default: ''
+ },
+ label: {
+ type: String,
+ default: ''
+ },
+ placeholder: {
+ type: String,
+ default: '璇烽�夋嫨'
+ },
+ emptyTips: {
+ type: String,
+ default: '鏃犻�夐」'
+ },
+ clear: {
+ type: Boolean,
+ default: true
+ },
+ defItem: {
+ type: Number,
+ default: 0
+ },
+ disabled: {
+ type: Boolean,
+ default: false
+ },
+ // 鏍煎紡鍖栬緭鍑� 鐢ㄦ硶 field="_id as value, version as text, uni_platform as label" format="{label} - {text}"
+ format: {
+ type: String,
+ default: ''
+ },
+ placement: {
+ type: String,
+ default: 'bottom'
+ },
+ multiple: {
+ type: Boolean,
+ default: false
+ },
+ wrap: {
+ type: Boolean,
+ default: false
+ },
+ align:{
+ type: String,
+ default: "left"
+ },
+ hideRight: {
+ type: Boolean,
+ default: false
+ },
+ mode:{
+ type: String,
+ default: 'default'
+ }
+ },
+ data() {
+ return {
+ showSelector: false,
+ current: '',
+ mixinDatacomResData: [],
+ apps: [],
+ channels: [],
+ cacheKey: "uni-data-select-lastSelectedValue",
+ };
+ },
+ created() {
+ this.debounceGet = this.debounce(() => {
+ this.query();
+ }, 300);
+ if (this.collection && !this.localdata.length) {
+ this.debounceGet();
+ }
+ },
+ computed: {
+ typePlaceholder() {
+ const text = {
+ 'opendb-stat-app-versions': '鐗堟湰',
+ 'opendb-app-channels': '娓犻亾',
+ 'opendb-app-list': '搴旂敤'
+ }
+ const common = this.placeholder
+ const placeholder = text[this.collection]
+ return placeholder ?
+ common + placeholder :
+ common
+ },
+ valueCom() {
+ if (this.value === '') return this.modelValue
+ if (this.modelValue === '') return this.value
+ return this.value
+ },
+ textShow() {
+ // 闀挎枃鏈樉绀�
+ if (this.multiple) {
+ const currentValues = this.getCurrentValues();
+ if (Array.isArray(currentValues) && currentValues.length > 0) {
+ const selectedItems = this.mixinDatacomResData.filter(item => currentValues.includes(item.value));
+ return selectedItems.map(item => this.formatItemName(item)).join(', ');
+ } else {
+ return ''; // 绌烘暟缁勬椂杩斿洖绌哄瓧绗︿覆锛屾樉绀哄崰浣嶇
+ }
+ } else {
+ return this.current;
+ }
+ },
+ shouldShowClear() {
+ if (this.multiple) {
+ const currentValues = this.getCurrentValues();
+ return Array.isArray(currentValues) && currentValues.length > 0;
+ } else {
+ return !!this.current;
+ }
+ },
+ shouldWrap() {
+ // 鍙湁鍦ㄥ閫夋ā寮忋�佸紑鍚崲琛屻�佷笖鏈夊唴瀹规椂鎵嶅簲鐢ㄦ崲琛屾牱寮�
+ return this.multiple && this.wrap && !!this.textShow;
+ },
+ getOffsetByPlacement() {
+ switch (this.placement) {
+ case 'top':
+ return "bottom:calc(100% + 12px);";
+ case 'bottom':
+ return "top:calc(100% + 12px);";
+ }
+ },
+ slotSelected(){
+ // #ifdef VUE2
+ return this.$scopedSlots ? this.$scopedSlots.selected : false
+ // #endif
+ // #ifdef VUE3
+ return this.$slots ? this.$slots.selected : false
+ // #endif
+ },
+ slotEmpty(){
+ // #ifdef VUE2
+ return this.$scopedSlots ? this.$scopedSlots.empty : false
+ // #endif
+ // #ifdef VUE3
+ return this.$slots ? this.$slots.empty : false
+ // #endif
+ },
+ slotOption(){
+ // #ifdef VUE2
+ return this.$scopedSlots ? this.$scopedSlots.option : false
+ // #endif
+ // #ifdef VUE3
+ return this.$slots ? this.$slots.option : false
+ // #endif
+ }
+ },
+ watch: {
+ showSelector:{
+ handler(val,old){
+ val ? this.$emit('open') : this.$emit('close')
+ }
+ },
+ localdata: {
+ immediate: true,
+ handler(val, old) {
+ if (Array.isArray(val) && old !== val) {
+ this.mixinDatacomResData = val
+ }
+ }
+ },
+ valueCom(val, old) {
+ this.initDefVal()
+ },
+ mixinDatacomResData: {
+ immediate: true,
+ handler(val) {
+ if (val.length) {
+ this.initDefVal()
+ }
+ }
+ },
+ },
+ methods: {
+ getSelectedItems() {
+ const currentValues = this.getCurrentValues();
+ let _minxData = this.mixinDatacomResData
+ // #ifdef MP-WEIXIN || MP-TOUTIAO
+ _minxData = JSON.parse(JSON.stringify(this.mixinDatacomResData))
+ // #endif
+ if (this.multiple) {
+ return _minxData.filter(item => currentValues.includes(item.value)) || [];
+ } else {
+ return _minxData.filter(item => item.value === currentValues) || [];
+ }
+ },
+ debounce(fn, time = 100) {
+ let timer = null
+ return function(...args) {
+ if (timer) clearTimeout(timer)
+ timer = setTimeout(() => {
+ fn.apply(this, args)
+ }, time)
+ }
+ },
+ // 妫�鏌ラ」鐩槸鍚﹀凡閫変腑
+ isSelected(item) {
+ if (this.multiple) {
+ const currentValues = this.getCurrentValues();
+ return Array.isArray(currentValues) && currentValues.includes(item.value);
+ } else {
+ return this.getCurrentValues() === item.value;
+ }
+ },
+ // 鑾峰彇褰撳墠閫変腑鐨勫��
+ getCurrentValues() {
+ if (this.multiple) {
+ return Array.isArray(this.valueCom) ? this.valueCom : (this.valueCom ? [this.valueCom] : []);
+ } else {
+ return this.valueCom;
+ }
+ },
+ // 鎵ц鏁版嵁搴撴煡璇�
+ query() {
+ this.mixinDatacomEasyGet();
+ },
+ // 鐩戝惉鏌ヨ鏉′欢鍙樻洿浜嬩欢
+ onMixinDatacomPropsChange() {
+ if (this.collection) {
+ this.debounceGet();
+ }
+ },
+ initDefVal() {
+ let defValue = this.multiple ? [] : ''
+ if ((this.valueCom || this.valueCom === 0) && !this.isDisabled(this.valueCom)) {
+ defValue = this.valueCom
+ } else {
+ let strogeValue
+ if (this.collection) {
+ strogeValue = this.getCache()
+ }
+ if (strogeValue || strogeValue === 0) {
+ defValue = strogeValue
+ } else {
+ let defItem = this.multiple ? [] : ''
+ if (this.defItem > 0 && this.defItem <= this.mixinDatacomResData.length) {
+ defItem = this.multiple ? [this.mixinDatacomResData[this.defItem - 1].value] : this.mixinDatacomResData[this.defItem - 1].value
+ }
+ defValue = defItem
+ }
+ if (defValue || defValue === 0 || (this.multiple && Array.isArray(defValue) && defValue.length > 0)) {
+ this.emit(defValue)
+ }
+ }
+
+ if (this.multiple) {
+ const selectedValues = Array.isArray(defValue) ? defValue : (defValue ? [defValue] : []);
+ const selectedItems = this.mixinDatacomResData.filter(item => selectedValues.includes(item.value));
+ this.current = selectedItems.map(item => this.formatItemName(item));
+ } else {
+ const def = this.mixinDatacomResData.find(item => item.value === defValue)
+ this.current = def ? this.formatItemName(def) : ''
+ }
+ },
+
+ /**
+ * @param {[String, Number, Array]} value
+ * 鍒ゆ柇鐢ㄦ埛缁欑殑 value 鏄惁鍚屾椂涓虹鐢ㄧ姸鎬�
+ */
+ isDisabled(value) {
+ if (Array.isArray(value)) {
+ // 瀵逛簬鏁扮粍锛屽鏋滀换鎰忎竴涓�艰绂佺敤锛屽垯璁や负鏁翠綋琚鐢�
+ return value.some(val => {
+ return this.mixinDatacomResData.some(item => item.value === val && item.disable);
+ });
+ } else {
+ let isDisabled = false;
+ this.mixinDatacomResData.forEach(item => {
+ if (item.value === value) {
+ isDisabled = item.disable
+ }
+ })
+ return isDisabled;
+ }
+ },
+ clearVal() {
+ const emptyValue = this.multiple ? [] : '';
+ this.emit(emptyValue)
+ this.current = this.multiple ? [] : ''
+ if (this.collection) {
+ this.removeCache()
+ }
+ this.$emit('clear')
+ },
+ checkBoxChange(res){
+ let range = res.detail.value
+
+ let currentValues = range && range.length > 0? range.map((item)=>{
+ const index = parseInt(item, 10);
+
+ if (isNaN(index)) {
+ console.error(`鏃犳晥绱㈠紩: ${item}`);
+ }
+
+ if (index < 0 || index >= this.mixinDatacomResData.length) {
+ console.error(`绱㈠紩瓒婄晫: ${index}`);
+ }
+
+ return this.mixinDatacomResData[index].value;
+ }) : []
+ const selectedItems = this.mixinDatacomResData.filter(dataItem => currentValues.includes(dataItem.value));
+ this.current = selectedItems.map(dataItem => this.formatItemName(dataItem));
+
+ this.emit(currentValues);
+ },
+ change(item) {
+ if (!item.disable) {
+ if (this.multiple) {
+ // 澶氶�夋ā寮�
+ let currentValues = this.getCurrentValues();
+ if (!Array.isArray(currentValues)) {
+ currentValues = currentValues ? [currentValues] : [];
+ }
+
+ const itemValue = item.value;
+ const index = currentValues.indexOf(itemValue);
+
+ if (index > -1) {
+ currentValues.splice(index, 1);
+ } else {
+ currentValues.push(itemValue);
+ }
+
+ const selectedItems = this.mixinDatacomResData.filter(dataItem => currentValues.includes(dataItem.value));
+ this.current = selectedItems.map(dataItem => this.formatItemName(dataItem));
+
+ this.emit(currentValues);
+ } else {
+ // 鍗曢�夋ā寮�
+ this.showSelector = false
+ this.current = this.formatItemName(item)
+ this.emit(item.value)
+ }
+ }
+ },
+ emit(val) {
+ this.$emit('input', val)
+ this.$emit('update:modelValue', val)
+ this.$emit('change', val)
+ if (this.collection) {
+ this.setCache(val);
+ }
+ },
+ toggleSelector() {
+ if (this.disabled) {
+ return
+ }
+
+ this.showSelector = !this.showSelector
+ },
+ formatItemName(item) {
+ let {
+ text,
+ value,
+ channel_code
+ } = item
+ channel_code = channel_code ? `(${channel_code})` : ''
+
+ if (this.format) {
+ // 鏍煎紡鍖栬緭鍑�
+ let str = "";
+ str = this.format;
+ for (let key in item) {
+ str = str.replace(new RegExp(`{${key}}`, "g"), item[key]);
+ }
+ return str;
+ } else {
+ return this.collection.indexOf('app-list') > 0 ?
+ `${text}(${value})` :
+ (
+ text ?
+ text :
+ `鏈懡鍚�${channel_code}`
+ )
+ }
+ },
+ // 鑾峰彇褰撳墠鍔犺浇鐨勬暟鎹�
+ getLoadData() {
+ return this.mixinDatacomResData;
+ },
+ // 鑾峰彇褰撳墠缂撳瓨key
+ getCurrentCacheKey() {
+ return this.collection;
+ },
+ // 鑾峰彇缂撳瓨
+ getCache(name = this.getCurrentCacheKey()) {
+ let cacheData = uni.getStorageSync(this.cacheKey) || {};
+ return cacheData[name];
+ },
+ // 璁剧疆缂撳瓨
+ setCache(value, name = this.getCurrentCacheKey()) {
+ let cacheData = uni.getStorageSync(this.cacheKey) || {};
+ cacheData[name] = value;
+ uni.setStorageSync(this.cacheKey, cacheData);
+ },
+ // 鍒犻櫎缂撳瓨
+ removeCache(name = this.getCurrentCacheKey()) {
+ let cacheData = uni.getStorageSync(this.cacheKey) || {};
+ delete cacheData[name];
+ uni.setStorageSync(this.cacheKey, cacheData);
+ },
+ }
+ }
+</script>
+
+<style lang="scss">
+ $uni-base-color: #6a6a6a !default;
+ $uni-main-color: #333 !default;
+ $uni-secondary-color: #909399 !default;
+ $uni-border-3: #e5e5e5;
+ $uni-primary: #2979ff !default;
+ $uni-success: #4cd964 !default;
+ $uni-warning: #f0ad4e !default;
+ $uni-error: #dd524d !default;
+ $uni-info: #909399 !default;
+
+ /* #ifndef APP-NVUE */
+ @media screen and (max-width: 500px) {
+ .hide-on-phone {
+ display: none;
+ }
+ }
+
+ /* #endif */
+ .uni-stat__select {
+ display: flex;
+ align-items: center;
+ // padding: 15px;
+ /* #ifdef H5 */
+ cursor: pointer;
+ /* #endif */
+ width: 100%;
+ flex: 1;
+ box-sizing: border-box;
+ }
+
+ .uni-stat-box {
+ background-color: #fff;
+ width: 100%;
+ flex: 1;
+ }
+
+ .uni-stat__actived {
+ width: 100%;
+ flex: 1;
+ // outline: 1px solid #2979ff;
+ }
+
+ .uni-label-text {
+ font-size: 14px;
+ font-weight: bold;
+ color: $uni-base-color;
+ margin: auto 0;
+ margin-right: 5px;
+ }
+
+ .border-bottom {
+ border-bottom: solid 1px $uni-border-3;
+ }
+
+ .border-default {
+ border: 1px solid $uni-border-3;
+ }
+
+ .uni-select {
+ font-size: 14px;
+ box-sizing: border-box;
+ border-radius: 4px;
+ padding: 0 5px;
+ padding-left: 10px;
+ position: relative;
+ /* #ifndef APP-NVUE */
+ display: flex;
+ user-select: none;
+ /* #endif */
+ flex-direction: row;
+ align-items: center;
+ width: 100%;
+ flex: 1;
+ min-height: 35px;
+
+ &--disabled {
+ background-color: #f5f7fa;
+ cursor: not-allowed;
+ }
+
+ &--wrap {
+ height: auto;
+ min-height: 35px;
+ // align-items: flex-start;
+ }
+ }
+
+ .uni-select__label {
+ font-size: 16px;
+ // line-height: 22px;
+ height: 35px;
+ padding-right: 10px;
+ color: $uni-secondary-color;
+ }
+
+ .uni-select__input-box {
+ // height: 35px;
+ width: 0px;
+ position: relative;
+ /* #ifndef APP-NVUE */
+ display: flex;
+ /* #endif */
+ flex: 1;
+ flex-direction: row;
+ align-items: center;
+
+ &--wrap {
+ .uni-select__input-text {
+ margin-right: 8px;
+ }
+ }
+
+ .padding-top-bottom {
+ padding-top: 5px;
+ padding-bottom: 5px;
+ }
+
+ .slot-content {
+ width: 100%;
+ display: flex;
+ flex-direction: row;
+ flex-wrap: wrap;
+ }
+ }
+
+ .uni-select__input {
+ flex: 1;
+ font-size: 14px;
+ height: 22px;
+ line-height: 22px;
+ }
+
+ .uni-select__input-plac {
+ font-size: 14px;
+ color: $uni-secondary-color;
+ }
+
+ .uni-select__selector {
+ /* #ifndef APP-NVUE */
+ box-sizing: border-box;
+ /* #endif */
+ position: absolute;
+ left: 0;
+ width: 100%;
+ background-color: #FFFFFF;
+ border: 1px solid #EBEEF5;
+ border-radius: 6px;
+ box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+ z-index: 3;
+ padding: 4px 0;
+ }
+
+ .uni-select__selector-scroll {
+ /* #ifndef APP-NVUE */
+ max-height: 200px;
+ box-sizing: border-box;
+ /* #endif */
+ }
+
+ /* #ifdef H5 */
+ @media (min-width: 768px) {
+ .uni-select__selector-scroll {
+ max-height: 600px;
+ }
+ }
+
+ /* #endif */
+
+ .uni-select__selector-empty,
+ .uni-select__selector-item {
+ /* #ifndef APP-NVUE */
+ display: flex;
+ cursor: pointer;
+ /* #endif */
+ flex-direction: row;
+ align-items: center;
+ line-height: 35px;
+ font-size: 14px;
+ /* border-bottom: solid 1px $uni-border-3; */
+ padding: 0px 10px;
+ }
+
+
+
+ .uni-select__selector-item-check {
+ margin-left: auto;
+ }
+
+ .uni-select__selector-empty:last-child,
+ .uni-select__selector-item:last-child {
+ /* #ifndef APP-NVUE */
+ border-bottom: none;
+ /* #endif */
+ }
+
+ .uni-select__selector__disabled {
+ opacity: 0.4;
+ cursor: default;
+ }
+
+ /* picker 寮瑰嚭灞傞�氱敤鐨勬寚绀哄皬涓夎 */
+ .uni-popper__arrow_bottom,
+ .uni-popper__arrow_bottom::after,
+ .uni-popper__arrow_top,
+ .uni-popper__arrow_top::after {
+ position: absolute;
+ display: block;
+ width: 0;
+ height: 0;
+ border-color: transparent;
+ border-style: solid;
+ border-width: 6px;
+ }
+
+ .uni-popper__arrow_bottom {
+ filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.03));
+ top: -6px;
+ left: 10%;
+ margin-right: 3px;
+ border-top-width: 0;
+ border-bottom-color: #EBEEF5;
+ }
+
+ .uni-popper__arrow_bottom::after {
+ content: " ";
+ top: 1px;
+ margin-left: -6px;
+ border-top-width: 0;
+ border-bottom-color: #fff;
+ }
+
+ .uni-popper__arrow_top {
+ filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.03));
+ bottom: -6px;
+ left: 10%;
+ margin-right: 3px;
+ border-bottom-width: 0;
+ border-top-color: #EBEEF5;
+ }
+
+ .uni-popper__arrow_top::after {
+ content: " ";
+ bottom: 1px;
+ margin-left: -6px;
+ border-bottom-width: 0;
+ border-top-color: #fff;
+ }
+
+
+ .uni-select__input-text {
+ // width: 280px;
+ width: 100%;
+ color: $uni-main-color;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ -o-text-overflow: ellipsis;
+ overflow: hidden;
+
+ &--wrap {
+ white-space: normal;
+ text-overflow: initial;
+ -o-text-overflow: initial;
+ overflow: visible;
+ word-wrap: break-word;
+ word-break: break-all;
+ // line-height: 1.5;
+ }
+ }
+
+ .uni-select__input-placeholder {
+ color: $uni-base-color;
+ font-size: 12px;
+ margin: 1px 0;
+ }
+
+ .uni-select--mask {
+ position: fixed;
+ top: 0;
+ bottom: 0;
+ right: 0;
+ left: 0;
+ z-index: 2;
+ }
+
+ .align-left {
+ text-align: left;
+ }
+
+ .align-center {
+ text-align: center;
+ }
+
+ .align-right {
+ text-align: right;
+ }
+
+</style>
diff --git a/uni_modules/uni-data-select/package.json b/uni_modules/uni-data-select/package.json
new file mode 100644
index 0000000..4033502
--- /dev/null
+++ b/uni_modules/uni-data-select/package.json
@@ -0,0 +1,106 @@
+{
+ "id": "uni-data-select",
+ "displayName": "uni-data-select 涓嬫媺妗嗛�夋嫨鍣�",
+ "version": "1.1.0",
+ "description": "閫氳繃鏁版嵁椹卞姩鐨勪笅鎷夋閫夋嫨鍣�",
+ "keywords": [
+ "uni-ui",
+ "select",
+ "uni-data-select",
+ "涓嬫媺妗�",
+ "涓嬫媺閫�"
+],
+ "repository": "https://github.com/dcloudio/uni-ui",
+ "engines": {
+ "HBuilderX": "^3.1.1",
+ "uni-app": "^4.45",
+ "uni-app-x": ""
+ },
+ "directories": {
+ "example": "../../temps/example_temps"
+ },
+ "dcloudext": {
+ "sale": {
+ "regular": {
+ "price": "0.00"
+ },
+ "sourcecode": {
+ "price": "0.00"
+ }
+ },
+ "contact": {
+ "qq": ""
+ },
+ "declaration": {
+ "ads": "鏃�",
+ "data": "鏃�",
+ "permissions": "鏃�"
+ },
+ "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
+ "type": "component-vue",
+ "darkmode": "x",
+ "i18n": "x",
+ "widescreen": "x"
+ },
+ "uni_modules": {
+ "dependencies": [
+ "uni-load-more"
+ ],
+ "encrypt": [],
+ "platforms": {
+ "cloud": {
+ "tcb": "鈭�",
+ "aliyun": "鈭�",
+ "alipay": "鈭�"
+ },
+ "client": {
+ "uni-app": {
+ "vue": {
+ "vue2": "鈭�",
+ "vue3": "鈭�"
+ },
+ "web": {
+ "safari": "鈭�",
+ "chrome": "鈭�"
+ },
+ "app": {
+ "vue": "鈭�",
+ "nvue": "-",
+ "android": "鈭�",
+ "ios": "鈭�",
+ "harmony": "鈭�"
+ },
+ "mp": {
+ "weixin": "鈭�",
+ "alipay": "鈭�",
+ "toutiao": "鈭�",
+ "baidu": "-",
+ "kuaishou": "-",
+ "jd": "-",
+ "harmony": "-",
+ "qq": "-",
+ "lark": "-"
+ },
+ "quickapp": {
+ "huawei": "-",
+ "union": "-"
+ }
+ },
+ "uni-app-x": {
+ "web": {
+ "safari": "-",
+ "chrome": "-"
+ },
+ "app": {
+ "android": "-",
+ "ios": "-",
+ "harmony": "-"
+ },
+ "mp": {
+ "weixin": "-"
+ }
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/uni_modules/uni-data-select/readme.md b/uni_modules/uni-data-select/readme.md
new file mode 100644
index 0000000..eb58de3
--- /dev/null
+++ b/uni_modules/uni-data-select/readme.md
@@ -0,0 +1,8 @@
+## DataSelect 涓嬫媺妗嗛�夋嫨鍣�
+> **缁勪欢鍚嶏細uni-data-select**
+> 浠g爜鍧楋細 `uDataSelect`
+
+褰撻�夐」杩囧鏃讹紝浣跨敤涓嬫媺鑿滃崟灞曠ず骞堕�夋嫨鍐呭
+
+### [鏌ョ湅鏂囨。](https://uniapp.dcloud.io/component/uniui/uni-data-select)
+#### 濡備娇鐢ㄨ繃绋嬩腑鏈変换浣曢棶棰橈紝鎴栬�呮偍瀵箄ni-ui鏈変竴浜涘ソ鐨勫缓璁紝娆㈣繋鍔犲叆 uni-ui 浜ゆ祦缇わ細871950839
diff --git a/uni_modules/uni-load-more/changelog.md b/uni_modules/uni-load-more/changelog.md
index 8f03f1d..c5750ac 100644
--- a/uni_modules/uni-load-more/changelog.md
+++ b/uni_modules/uni-load-more/changelog.md
@@ -1,3 +1,7 @@
+## 1.3.7锛�2025-08-20锛�
+- 淇 寰俊灏忕▼搴廲ss璀﹀憡闂
+## 1.3.6锛�2024-10-15锛�
+- 淇 寰俊灏忕▼搴忎腑鐨刧etSystemInfo璀﹀憡
## 1.3.3锛�2022-01-20锛�
- 鏂板 showText灞炴�� 锛屾槸鍚︽樉绀烘枃鏈�
## 1.3.2锛�2022-01-19锛�
diff --git a/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue b/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue
index e5eff4d..0fa17e8 100644
--- a/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue
+++ b/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue
@@ -26,7 +26,7 @@
<!-- #ifndef APP-NVUE -->
<view v-else-if="!webviewHide && status === 'loading' && showIcon"
:style="{width:iconSize+'px',height:iconSize+'px'}" class="uni-load-more__img uni-load-more__img--ios-H5">
- <image :src="imgBase64" mode="widthFix"></image>
+ <image class="image" :src="imgBase64" mode="widthFix"></image>
</view>
<!-- #endif -->
<text v-if="showText" class="uni-load-more__text"
@@ -37,7 +37,12 @@
<script>
let platform
setTimeout(() => {
+ // #ifdef MP-WEIXIN
+ platform = uni.getDeviceInfo().platform
+ // #endif
+ // #ifndef MP-WEIXIN
platform = uni.getSystemInfoSync().platform
+ // #endif
}, 16)
import {
@@ -205,7 +210,7 @@
animation: loading-ios-H5 1s 0s step-end infinite;
}
- .uni-load-more__img--ios-H5 image {
+ .uni-load-more__img--ios-H5 .image {
position: absolute;
width: 100%;
height: 100%;
diff --git a/uni_modules/uni-load-more/package.json b/uni_modules/uni-load-more/package.json
index 2fa6f04..3397e8a 100644
--- a/uni_modules/uni-load-more/package.json
+++ b/uni_modules/uni-load-more/package.json
@@ -1,7 +1,7 @@
{
"id": "uni-load-more",
"displayName": "uni-load-more 鍔犺浇鏇村",
- "version": "1.3.3",
+ "version": "1.3.7",
"description": "LoadMore 缁勪欢锛屽父鐢ㄥ湪鍒楄〃閲岄潰锛屽仛婊氬姩鍔犺浇浣跨敤銆�",
"keywords": [
"uni-ui",
@@ -11,16 +11,14 @@
],
"repository": "https://github.com/dcloudio/uni-ui",
"engines": {
- "HBuilderX": ""
+ "HBuilderX": "",
+ "uni-app": "^4.07",
+ "uni-app-x": ""
},
"directories": {
"example": "../../temps/example_temps"
},
"dcloudext": {
- "category": [
- "鍓嶇缁勪欢",
- "閫氱敤缁勪欢"
- ],
"sale": {
"regular": {
"price": "0.00"
@@ -37,48 +35,69 @@
"data": "鏃�",
"permissions": "鏃�"
},
- "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
+ "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
+ "type": "component-vue",
+ "darkmode": "x",
+ "i18n": "x",
+ "widescreen": "x"
},
"uni_modules": {
- "dependencies": ["uni-scss"],
+ "dependencies": [
+ "uni-scss"
+ ],
"encrypt": [],
"platforms": {
"cloud": {
- "tcb": "y",
- "aliyun": "y"
+ "tcb": "x",
+ "aliyun": "x",
+ "alipay": "x"
},
"client": {
- "App": {
- "app-vue": "y",
- "app-nvue": "y"
+ "uni-app": {
+ "vue": {
+ "vue2": "鈭�",
+ "vue3": "鈭�"
+ },
+ "web": {
+ "safari": "鈭�",
+ "chrome": "鈭�"
+ },
+ "app": {
+ "vue": "鈭�",
+ "nvue": "-",
+ "android": "鈭�",
+ "ios": "鈭�",
+ "harmony": "鈭�"
+ },
+ "mp": {
+ "weixin": "鈭�",
+ "alipay": "鈭�",
+ "toutiao": "鈭�",
+ "baidu": "鈭�",
+ "kuaishou": "-",
+ "jd": "-",
+ "harmony": "-",
+ "qq": "鈭�",
+ "lark": "-"
+ },
+ "quickapp": {
+ "huawei": "鈭�",
+ "union": "鈭�"
+ }
},
- "H5-mobile": {
- "Safari": "y",
- "Android Browser": "y",
- "寰俊娴忚鍣�(Android)": "y",
- "QQ娴忚鍣�(Android)": "y"
- },
- "H5-pc": {
- "Chrome": "y",
- "IE": "y",
- "Edge": "y",
- "Firefox": "y",
- "Safari": "y"
- },
- "灏忕▼搴�": {
- "寰俊": "y",
- "闃块噷": "y",
- "鐧惧害": "y",
- "瀛楄妭璺冲姩": "y",
- "QQ": "y"
- },
- "蹇簲鐢�": {
- "鍗庝负": "u",
- "鑱旂洘": "u"
- },
- "Vue": {
- "vue2": "y",
- "vue3": "y"
+ "uni-app-x": {
+ "web": {
+ "safari": "-",
+ "chrome": "-"
+ },
+ "app": {
+ "android": "-",
+ "ios": "-",
+ "harmony": "-"
+ },
+ "mp": {
+ "weixin": "-"
+ }
}
}
}
--
Gitblit v1.9.1