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

完工配置-数据对接

parent 14d2a9ad
<template>
<view>
input-shuru
<u-input v-model="item.fieldsValue" />
</view>
<!-- <u-form-item label="姓名"><u-input v-model="value" /></u-form-item> -->
</template>
<script>
export default {
name:'xhInput',
name: 'xhInput',
props: {
item: {
type: Object,
default () {
return [{}]
}
},
},
data() {
return {
value: '',
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>
<view>
<view class="group-list">
书籍及
<template v-for="(item,index) in list">
<view :key="index">
<!-- <xh-input></xh-input> -->
<u-form :model="form" ref="uForm">
<template v-for="(groupItem,index) in group">
<view class="group-item">
<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> -->
<!-- </view> -->
</u-form-item>
</view>
</view>
<!-- <component :key="contentIndex" :item="contentItem" :orderId="orderId"
:is="contentItem.inputType | typeToComponentName" /> -->
</template>
</u-form>
</view>
</template>
......@@ -29,7 +37,15 @@
import XhInput from '@/components/createCom/XhInput.vue'
export default {
components: {
// 'xh-input': XhInput,
'xh-input': XhInput,
},
props: {
item: {
type: Object,
default () {
return [{}]
}
},
},
data() {
return {
......@@ -44,11 +60,26 @@
label: ''
}]
}],
// 完工信息的不同项
group: [{
groupName: '接入点信息',
item: [{
fieldsId: '基础信息',
fieldsType: 'input',
fieldsName: '产品规格',
fieldsValue: '',
required: true,
fields_options: [{
key: '',
label: ''
}]
}]
}],
configList: [{
panelName: '',
panelType: '',
group: [{
groupName: '',
groupName: '接入点信息',
item: [{
fieldsId: '基础信息',
fieldsType: 'input',
......@@ -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() {
......@@ -70,5 +133,11 @@
}
</script>
<style>
<style lang="scss" scoped>
.group-list{
.group-item{
}
}
</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