From d8e6f395fea1419c73f6b6f0a2ddd75eac3eed84 Mon Sep 17 00:00:00 2001
From: whycq <913841844@qq.com>
Date: 星期五, 01 十二月 2023 08:15:17 +0800
Subject: [PATCH] #
---
pages/common/data-list/dataDetail.vue | 79 ++++++++++++++++++++++++++-------------
1 files changed, 53 insertions(+), 26 deletions(-)
diff --git a/pages/common/data-list/dataDetail.vue b/pages/common/data-list/dataDetail.vue
index fd981f1..f30743c 100644
--- a/pages/common/data-list/dataDetail.vue
+++ b/pages/common/data-list/dataDetail.vue
@@ -8,25 +8,30 @@
{{it.value}}
</view>
- <input class="main-right"
+ <input class="main-right input"
v-show="it.type == 'input'"
type="text"
v-model="it.value"
>
- <view class="main-right dis-center" v-show="it.type == 'number-box'" @click="numChange(i)">
+ <view class="main-right dis-center no-border" v-show="it.type == 'number-box'" >
<uni-number-box
- color="#747474"
+ color="#606266"
v-show="it.type == 'number-box'"
- :value="it.value"
- :max="99999999"
+ v-model="it.value"
+ :max="99999999999999"
+ :min="0"
:step='1'
@change="changeValue"
/>
</view>
+ <!-- todo: 鏃ユ湡閫夋嫨 -->
</view>
- <button @click="back">back</button>
+ <view class="footer">
+ <button @click="modify">modify</button>
+ <button @click="del">delete</button>
+ </view>
</view>
</template>
@@ -35,18 +40,19 @@
data() {
return {
dataList: [
- {key: '鍟嗗搧缂栫爜',value: 'fbr3dasdasd242fbr3dasdasd242fbr3dasdasd242fbr3dasdasd242fbr2'},
- {key: '鎵瑰彿',value: '20231006',type: 'input'},
- {key: '鏁伴噺',value: 200,type: 'number-box'},
+ // {key: '鍟嗗搧鐮�',value: 'LSH90152025',valText: 'val-text'},
+ // {key: '鍟嗗搧鍚嶇О',value: '灏奸緳澶达紙鐏扮櫧锛�5.2x25'},
+ // {key: '瑙勬牸',value: '700*699*80'},
+ // {key: '鎵瑰彿',value: '20231007204944',type: 'input'},
+ // {key: '鏁伴噺',value: 951326478,type: 'number-box',valText: 'val-num'},
],
baseIP:'',
basePORT:'',
index: 0,
- val: 0,
}
},
onLoad(option) {
- let that = this
+ let _this = this
// #ifdef APP-NVUE
const eventChannel = this.$scope.eventChannel; // 鍏煎APP-NVUE
// #endif
@@ -55,24 +61,24 @@
// #endif
// 鐩戝惉acceptDataFromOpenerPage浜嬩欢锛岃幏鍙栦笂涓�椤甸潰閫氳繃eventChannel浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
- eventChannel.on('mat', function(data) {
- that.dataList = data.data
+ eventChannel.on('param', function(res) {
+ _this.dataList = res.param
+ _this.index = res.index
})
},
methods: {
- numChange(i) {
- this.dataList[i].value = this.val
- },
changeValue(value) {
this.val = value
},
- back() {
+ modify() {
this.getOpenerEventChannel().emit('dataList', {data: this.dataList});
- uni.navigateBack({
-
- })
+ uni.navigateBack()
+ },
+ del() {
+ this.getOpenerEventChannel().emit('del', {data: this.index});
+ uni.navigateBack()
}
}
}
@@ -81,26 +87,47 @@
<style scoped>
.main {
display: flex;
- border-bottom: 1px solid #333;
- min-height: 70rpx;
+ min-height: 30px;
align-items: center;
margin-left: 8px;
- padding: 8rpx;
+ padding: 8px;
}
.main-left {
- width: 140rpx;
+ width: 65px;
text-align: right;
+ color: #606266;
}
.main-right {
flex: 1;
- background-color: aquamarine;
- margin-left: 8rpx;
+ margin-left: 8px;
display: flex;
flex-wrap: wrap;
/* word-wrap: break-word; */
word-break: break-all;
+ border: 1px solid #dcdfe6;
+ padding: 6px;
+ border-radius: 4px;
+ color: #a8abb2;
+ font-size: 12px;
}
.dis-center {
justify-content: center;
}
+ .no-border {
+ border: none;
+ }
+ .input {
+ color: #606266;
+ }
+ .footer {
+ height: 70px;
+ width: 100%;
+ background-color: #f8f8f8;
+ border-top: 1px solid #dcdfe6;
+ position: fixed;
+ bottom: 0;
+ display: flex;
+ align-items: center;
+ justify-content: space-around;
+ }
</style>
\ No newline at end of file
--
Gitblit v1.9.1