Commit 798b0f8e authored by 李俊赕's avatar 李俊赕

edit-base-完工自定义配置

parent 2229ab7f
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
item: { item: {
type: Object, type: Object,
default () { default () {
return [{}] return null
} }
}, },
}, },
......
...@@ -15,9 +15,26 @@ ...@@ -15,9 +15,26 @@
</view> </view>
</scroll-view> </scroll-view>
<scroll-view :scroll-top="scrollRightTop" scroll-y scroll-with-animation class="right-box" @scroll="rightScroll"> <scroll-view :scroll-top="scrollRightTop" scroll-y scroll-with-animation class="right-box" @scroll="rightScroll">
<form-com></form-com> <!-- <form-com :item="tabbar"></form-com> -->
<u-form :model="form" ref="uForm">
<template v-for="(groupItem,index) in tabbar">
<view class="class-item">
<view class="group-title" :key="index">{{groupItem.name}}</view>
<view class="group-items" :key="index">
<u-form-item :label-width="0" :required="groupItem.required"
v-for="(item,itemIndex) in groupItem.foods" :key="itemIndex">
<!-- <view :key="index"> -->
<view>{{item.name}}</view>
<xh-input></xh-input>
<!-- <xh-input :item="item" v-if="item.fieldsType==='input'"></xh-input> -->
<!-- </view> -->
</u-form-item>
</view>
</view>
</template>
</u-form>
<!-- <xh-input></xh-input> --> <!-- <xh-input></xh-input> -->
<view class="page-view"> <!-- <view class="page-view">
<view class="class-item" :id="'item' + index" v-for="(item , index) in tabbar" :key="index"> <view class="class-item" :id="'item' + index" v-for="(item , index) in tabbar" :key="index">
<view class="item-title"> <view class="item-title">
<text>{{item.name}}</text> <text>{{item.name}}</text>
...@@ -29,7 +46,7 @@ ...@@ -29,7 +46,7 @@
</view> </view>
</view> </view>
</view> </view>
</view> </view> -->
</scroll-view> </scroll-view>
</view> </view>
</view> </view>
...@@ -38,7 +55,8 @@ ...@@ -38,7 +55,8 @@
import classifyData from '@/common/classify.data.js'; import classifyData from '@/common/classify.data.js';
// import allComponents from '@/components/createCom/index.js' // import allComponents from '@/components/createCom/index.js'
// import XhInput from '@/components/createCom/XhInput.vue' // import XhInput from '@/components/createCom/XhInput.vue'
import formCom from './components/formCom.vue' // import formCom from './components/formCom.vue'
import XhInput from '@/components/createCom/XhInput.vue'
export default { export default {
data() { data() {
return { return {
...@@ -56,9 +74,8 @@ ...@@ -56,9 +74,8 @@
} }
}, },
components:{ components: {
// 'xh-input': allComponentsXhInput, 'xh-input': XhInput,
formCom,
}, },
created(){ created(){
// console.log(allComponents,'allComponents') // console.log(allComponents,'allComponents')
...@@ -149,6 +166,7 @@ ...@@ -149,6 +166,7 @@
}).exec() }).exec()
}) })
}, },
// 右边菜单滚动 // 右边菜单滚动
async rightScroll(e) { async rightScroll(e) {
this.oldScrollTop = e.detail.scrollTop; this.oldScrollTop = e.detail.scrollTop;
......
...@@ -5,15 +5,14 @@ ...@@ -5,15 +5,14 @@
<u-form :model="form" ref="uForm"> <u-form :model="form" ref="uForm">
<template v-for="(groupItem,index) in group"> <template v-for="(groupItem,index) in group">
<view class="group-item"> <view class="group-item">
<view class="group-title" :key="index">{{groupItem.groupName}}</view> <view class="group-title" :key="index">{{groupItem.name}}</view>
<view class="group-items" :key="index"> <view class="group-items" :key="index">
<u-form-item :label-width="0" :required="item.required" <u-form-item :label-width="0" :required="item.required"
v-for="(item,itemIndex) in groupItem.item" :key="index"> v-for="(item,itemIndex) in groupItem.foods" :key="index">
<!-- <view :key="index"> --> <!-- <view :key="index"> -->
<view>{{item.fieldsName}}</view> <view>{{item.name}}</view>
<xh-input :item="item" v-if="item.fieldsType==='input'"></xh-input> <xh-input></xh-input>
<!-- <xh-input v-if="item.fieldsType==='input'"></xh-input> --> <!-- <xh-input :item="item" v-if="item.fieldsType==='input'"></xh-input> -->
<!-- <xh-input v-if="item.fieldsType==='input'"></xh-input> -->
<!-- </view> --> <!-- </view> -->
</u-form-item> </u-form-item>
</view> </view>
...@@ -41,12 +40,18 @@ ...@@ -41,12 +40,18 @@
}, },
props: { props: {
item: { item: {
type: Object, type: Array,
default () { default () {
return [{}] return []
} }
}, },
}, },
watch:{
"item":function(newVal){
this.group = newVal
console.log(this.group,'this.group')
}
},
data() { data() {
return { return {
list: [{ list: [{
...@@ -59,7 +64,7 @@ ...@@ -59,7 +64,7 @@
key: '', key: '',
label: '' label: ''
}] }]
}], },],
// 完工信息的不同项 // 完工信息的不同项
group: [{ group: [{
groupName: '接入点信息', groupName: '接入点信息',
...@@ -73,7 +78,7 @@ ...@@ -73,7 +78,7 @@
key: '', key: '',
label: '' label: ''
}] }]
}] },]
}], }],
configList: [{ configList: [{
panelName: '', panelName: '',
...@@ -128,6 +133,8 @@ ...@@ -128,6 +133,8 @@
} }
}, },
created() { created() {
this.group = this.item
console.log(this.group,'this.group')
console.log(XhInput, 'XhInput') console.log(XhInput, 'XhInput')
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment