From 67271e43ba60ea115e0e92d9639ecb5a50e59e2c Mon Sep 17 00:00:00 2001
From: whycq <913841844@qq.com>
Date: 星期一, 16 十月 2023 21:33:30 +0800
Subject: [PATCH] #

---
 pages/component/demo.vue |   75 +++++++++++++++++++++++++++++++------
 1 files changed, 62 insertions(+), 13 deletions(-)

diff --git a/pages/component/demo.vue b/pages/component/demo.vue
index 650200f..f4e6e87 100644
--- a/pages/component/demo.vue
+++ b/pages/component/demo.vue
@@ -2,7 +2,7 @@
 	<view>
 		<z-input v-for="it in zInputList" 
 			:desc="it.desc" :btn="it.btn" :btn-name="it.btnName" v-model="it.val" 
-			:lenCheck="it.lenCheck" :focus="it.focus" @clickBtn='entry(it.name)'>
+			:lenCheck="it.lenCheck" :focus="it.focus" @clickBtn='entry(it.name)' @input='input'>
 		</z-input>
 		<view>杈撳叆妗�1</view>
 		<view>{{zInputList[0].val}}</view>
@@ -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>
 		
@@ -37,7 +37,7 @@
 </template>
 
 <script>
-	import addMat, { isEmpty } from '../api/addMat.js'
+	import addMat from '../api/addMat.js'
 	export default {
 		data() {
 			return {
@@ -49,11 +49,52 @@
 				zDataList: [
 					{
 						detl: [
-							{key: '鍟嗗搧鐮�',value: 'ccc'},
-							{key: '鍟嗗搧鍚嶇О',value: 'ccc'},
-							{key: '瑙勬牸',value: 'ccc'},
-							{key: '鎵瑰彿',value: '16',type: 'input'},
-							{key: '鏁伴噺',value: 0,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'},
+							{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},
 						]
 					}
 				],
@@ -61,6 +102,9 @@
 		},
 		methods: {
 			entry(e) {
+			},
+			input(val) {
+				console.log(val);
 			},
 			ccc() {
 			},
@@ -86,13 +130,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
 						})
 					},
 					// 鎺�
@@ -100,6 +146,9 @@
 						dataList: function(data) {
 							console.log(data);
 						},
+						del: function(data) {
+							_this.zDataList.splice(data.data,1)
+						}
 					},
 				})
 			}

--
Gitblit v1.9.1