编辑产品表头等

dev
Jo 3 years ago
parent d29e0878a7
commit adb72bf10d
  1. 4
      src/views/data/Framework.vue
  2. 5
      src/views/data/Introduce.vue

@ -128,9 +128,7 @@
<el-table :data="previewData" class="table" stripe header-align="center" row-key="id" :key="editIndex">
<el-table-column type="index" width="100" label="序号" align="center">
<template slot-scope="scope">
<template v-if="scope.row.custom">
<el-input placeholder="请输入" size="medium" v-model="curComment[0].comment"></el-input>
</template>
<template v-if="scope.row.custom">序号</template>
<template v-else>{{ scope.$index }}</template>
</template>
</el-table-column>

@ -84,7 +84,9 @@ export default {
},
methods: {
getData(){
//
this.$post(this.api.getTableByClassification).then(res => {
// idlabel
function handleId(data){
data.map(n => {
n.id = String(n.id)
@ -98,15 +100,16 @@ export default {
this.typeList = res
// id
this.dataSource = res[0].dataSource
if(res[0].children.length){
let item = res[0].children[0]
this.categoryId = item.id
this.dataSource = res[0].children[0].dataSource
this.defaultActive = [item.id]
this.introduceText = item.introduce
this.introduce = item.introduce
}else{
this.categoryId = res[0].id
this.dataSource = res[0].dataSource
this.defaultActive = [res[0].id]
this.introduceText = res[0].introduce
this.introduce = res[0].introduce

Loading…
Cancel
Save