From 2f4ecca95c56d3d30402e480e9d97368a5254cbf Mon Sep 17 00:00:00 2001 From: whycq <913841844@qq.com> Date: 星期六, 07 十月 2023 23:53:17 +0800 Subject: [PATCH] # --- pages/component/demo.vue | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++------- 1 files changed, 52 insertions(+), 7 deletions(-) diff --git a/pages/component/demo.vue b/pages/component/demo.vue index 8bfbb8b..5b072c8 100644 --- a/pages/component/demo.vue +++ b/pages/component/demo.vue @@ -20,9 +20,9 @@ <z-data-list class="data-list" v-for="(it,i) in zDataList" :key="i" - :list="it" + :list="it.detl" :index="i+1" - @goDetail='goDetail(it.detl)' + @goDetail='goDetail(it.detl,i)' ></z-data-list> @@ -54,7 +54,47 @@ {key: '瑙勬牸',value: '700*699*80'}, {key: '鎵瑰彿',value: '20231007204944',type: 'input'}, {key: '鏁伴噺',value: 951326478,type: 'number-box',valText: 'val-num'}, - + {key: '搴忓彿',value: 1}, + ] + }, + { + detl: [ + {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'}, + {key: '搴忓彿',value: 2}, + ] + }, + { + detl: [ + {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'}, + {key: '搴忓彿',value: 3}, + ] + }, + { + detl: [ + {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'}, + {key: '搴忓彿',value: 4}, + ] + }, + { + detl: [ + {key: '鍟嗗搧鐮�',value: 'LSH90152025',valText: 'val-text'}, + {key: '鍟嗗搧鍚嶇О',value: '灏奸緳澶达紙鐏扮櫧锛�'}, + {key: '瑙勬牸',value: '700*699*80'}, + {key: '鎵瑰彿',value: '20231007204944',type: 'input'}, + {key: '鏁伴噺',value: 951326478,type: 'number-box',valText: 'val-num'}, + {key: '搴忓彿',value: 5}, ] } ], @@ -87,13 +127,15 @@ } }, - goDetail(param) { + goDetail(param,index) { + let _this = this uni.navigateTo({ url: '/pages/common/data-list/dataDetail', // 浼� - success: function(res) { - res.eventChannel.emit('mat', { - data: param + success: function(data) { + data.eventChannel.emit('param', { + param: param, + index: index }) }, // 鎺� @@ -101,6 +143,9 @@ dataList: function(data) { console.log(data); }, + del: function(data) { + _this.zDataList.splice(data.data,1) + } }, }) } -- Gitblit v1.9.1