Commit 8bb7ebba authored by 李俊赕's avatar 李俊赕

完工配置-数据修改0.0.2

parent 8d05536a
This diff is collapsed.
......@@ -9,52 +9,37 @@
<view class="u-menu-wrap">
<scroll-view scroll-y scroll-with-animation class="u-tab-view menu-scroll-view" :scroll-top="scrollTop"
:scroll-into-view="itemId">
<view v-for="(item,index) in tabbar" :key="index" class="u-tab-item"
<view v-for="(item,index) in groupList" :key="index" class="u-tab-item"
:class="[current == index ? 'u-tab-item-active' : '']" @tap.stop="swichMenu(index)">
<text class="u-line-1">{{item.name}}</text>
<text class="u-line-1">{{item.groupName}}</text>
</view>
</scroll-view>
<scroll-view :scroll-top="scrollRightTop" scroll-y scroll-with-animation class="right-box"
@scroll="rightScroll">
<!-- <form-com :item="tabbar"></form-com> -->
<u-form :model="form" ref="uForm">
<template v-for="(groupItem,index) in tabbar">
<template v-for="(groupItem,index) in groupList">
<view class="class-item" :key="index">
<view class="title">{{groupItem.name}}</view>
<view class="title">{{groupItem.groupName}}</view>
<view class="class-bd">
<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> -->
v-for="(item,itemIndex) in groupItem.item" :key="itemIndex">
<view>{{item.fieldsTitle}}</view>
<template v-if="item.fieldsType">
<xh-input v-if="item.fieldsType==='input'" v-model="form.fieldsName"></xh-input>
</template>
</u-form-item>
</view>
</view>
</template>
</u-form>
<!-- <xh-input></xh-input> -->
<!-- <view class="page-view">
<view class="class-item" :id="'item' + index" v-for="(item , index) in tabbar" :key="index">
<view class="item-title">
<text>{{item.name}}</text>
</view>
<view class="item-container">
<view class="thumb-box" v-for="(item1, index1) in item.foods" :key="index1">
<image class="item-menu-image" :src="item1.icon" mode=""></image>
<view class="item-menu-name">{{item1.name}}</view>
</view>
</view>
</view>
</view> -->
</scroll-view>
</view>
</view>
</template>
<script>
import classifyData from '@/common/classify.data.js';
// import formCom from './components/formCom.vue'
import XhInput from '@/components/createCom/XhInput.vue'
export default {
data() {
......@@ -65,7 +50,7 @@
menuHeight: 0, // 左边菜单的高度
menuItemHeight: 0, // 左边菜单item的高度
itemId: '', // 栏目右边scroll-view用于滚动的id
tabbar: classifyData,
groupList: classifyData,
menuItemPos: [],
arr: [],
scrollRightTop: 0, // 右边栏目scroll-view的滚动条高度
......@@ -75,6 +60,7 @@
},
components: {
'xh-input': XhInput,
// formCom
},
created() {
// console.log(allComponents,'allComponents')
......@@ -83,9 +69,13 @@
},
onReady() {
// 导航栏滚动切换
this.getMenuItemTop()
},
methods: {
// ------------------------- 以下方法为展示滚动切换 -------------------------
// 点击左边的栏目切换
async swichMenu(index) {
if (this.arr.length == 0) {
......
<!-- 实现动态组件的绑定 -->
<template>
<view class="group-list">
书籍及
<u-form :model="form" ref="uForm">
<template v-for="(groupItem,index) in group">
<view class="group-item">
<view class="group-title" :key="index">{{groupItem.name}}</view>
<view class="group-items" :key="index">
<u-form-item :label-width="0" :required="item.required"
v-for="(item,itemIndex) in groupItem.foods" :key="index">
<!-- <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>
</view>
</template>
<script>
// import {
// // XhInput,
// // XhSelect,
// // XhMultipleSelect,
// // XhFiles,
// // XhSwitch,
// // XhTextarea,
// // XhServiceMore,
// // XhDate
// } from '@/components/createCom/index.js'
import XhInput from '@/components/createCom/XhInput.vue'
export default {
components: {
'xh-input': XhInput,
},
props: {
item: {
type: Array,
default () {
return []
}
},
},
watch:{
"item":function(newVal){
this.group = newVal
console.log(this.group,'this.group')
}
},
data() {
return {
list: [{
fieldsId: '产品规格',
fieldsType: 'input',
fieldsName: '产品规格',
fieldsValue: '',
required: true,
fields_options: [{
key: '',
label: ''
}]
},],
// 完工信息的不同项
group: [{
groupName: '接入点信息',
item: [{
fieldsId: '基础信息',
fieldsType: 'input',
fieldsName: '产品规格',
fieldsValue: '',
required: true,
fields_options: [{
key: '',
label: ''
}]
},]
}],
configList: [{
panelName: '',
panelType: '',
group: [{
groupName: '接入点信息',
item: [{
fieldsId: '基础信息',
fieldsType: 'input',
fieldsName: '',
fieldsValue: '',
required: true,
fields_options: [{
key: '',
label: ''
}]
}]
}]
}],
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() {
this.group = this.item
console.log(this.group,'this.group')
console.log(XhInput, 'XhInput')
}
}
</script>
<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