Commit 6e0bf5eb authored by 李俊赕's avatar 李俊赕

完工配置-数据对接

parent 14d2a9ad
<template> <template>
<view> <view>
input-shuru <u-input v-model="item.fieldsValue" />
</view> </view>
<!-- <u-form-item label="姓名"><u-input v-model="value" /></u-form-item> -->
</template> </template>
<script> <script>
export default { export default {
name:'xhInput', name: 'xhInput',
props: {
item: {
type: Object,
default () {
return [{}]
}
},
},
data() { data() {
return { return {
value: '', value: '',
type: 'text', type: 'text',
border: true border: true,
} }
} }
} }
......
<template>
<view>
<u-input v-model="item.fieldsValue" />
</view>
</template>
<script>
export default {
name: 'xhInput',
props: {
item: {
type: Object,
default () {
return [{}]
}
},
},
data() {
return {
value: '',
type: 'text',
border: true,
}
}
}
</script>
<style>
</style>
<!-- 实现动态组件的绑定 --> <!-- 实现动态组件的绑定 -->
<template> <template>
<view> <view class="group-list">
书籍及 书籍及
<template v-for="(item,index) in list"> <u-form :model="form" ref="uForm">
<view :key="index"> <template v-for="(groupItem,index) in group">
<view class="group-item">
<!-- <xh-input></xh-input> --> <view class="group-title" :key="index">{{groupItem.groupName}}</view>
<view class="group-items" :key="index">
<u-form-item :label-width="0" :required="item.required"
v-for="(item,itemIndex) in groupItem.item" :key="index">
<!-- <view :key="index"> -->
<view>{{item.fieldsName}}</view>
<xh-input :item="item" v-if="item.fieldsType==='input'"></xh-input>
<!-- <xh-input v-if="item.fieldsType==='input'"></xh-input> -->
<!-- <xh-input v-if="item.fieldsType==='input'"></xh-input> --> <!-- <xh-input v-if="item.fieldsType==='input'"></xh-input> -->
<!-- </view> -->
</u-form-item>
</view>
</view> </view>
<!-- <component :key="contentIndex" :item="contentItem" :orderId="orderId"
:is="contentItem.inputType | typeToComponentName" /> -->
</template> </template>
</u-form>
</view> </view>
</template> </template>
...@@ -29,7 +37,15 @@ ...@@ -29,7 +37,15 @@
import XhInput from '@/components/createCom/XhInput.vue' import XhInput from '@/components/createCom/XhInput.vue'
export default { export default {
components: { components: {
// 'xh-input': XhInput, 'xh-input': XhInput,
},
props: {
item: {
type: Object,
default () {
return [{}]
}
},
}, },
data() { data() {
return { return {
...@@ -44,11 +60,26 @@ ...@@ -44,11 +60,26 @@
label: '' label: ''
}] }]
}], }],
// 完工信息的不同项
group: [{
groupName: '接入点信息',
item: [{
fieldsId: '基础信息',
fieldsType: 'input',
fieldsName: '产品规格',
fieldsValue: '',
required: true,
fields_options: [{
key: '',
label: ''
}]
}]
}],
configList: [{ configList: [{
panelName: '', panelName: '',
panelType: '', panelType: '',
group: [{ group: [{
groupName: '', groupName: '接入点信息',
item: [{ item: [{
fieldsId: '基础信息', fieldsId: '基础信息',
fieldsType: 'input', fieldsType: 'input',
...@@ -62,6 +93,38 @@ ...@@ -62,6 +93,38 @@
}] }]
}] }]
}], }],
form: {
name: '',
intro: '',
sex: ''
},
checkboxList: [{
name: '苹果',
checked: false,
disabled: false
},
{
name: '雪梨',
checked: false,
disabled: false
},
{
name: '柠檬',
checked: false,
disabled: false
}
],
radioList: [{
name: '鲜甜',
disabled: false
},
{
name: '麻辣',
disabled: false
}
],
radio: '',
switchVal: false
} }
}, },
created() { created() {
...@@ -70,5 +133,11 @@ ...@@ -70,5 +133,11 @@
} }
</script> </script>
<style> <style lang="scss" scoped>
.group-list{
.group-item{
}
}
</style> </style>
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