update
This commit is contained in:
		@@ -32,21 +32,27 @@
 | 
				
			|||||||
          </el-table-column>
 | 
					          </el-table-column>
 | 
				
			||||||
        </template>
 | 
					        </template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        <!-- <template slot="name" slot-scope="{scope}">
 | 
					        <template slot="timeline" slot-scope="{scope}">
 | 
				
			||||||
          <span :style="{'padding-left':+scope.row.__level*50 + 'px'} ">
 | 
					
 | 
				
			||||||
            <a
 | 
					          <el-tooltip :content="scope.row.timeLine+'ms'" effect="dark" placement="left">
 | 
				
			||||||
              v-if="scope.row.type === 'view'"
 | 
					            <div class="processContainer">
 | 
				
			||||||
              :href="scope.row.url"
 | 
					              <div
 | 
				
			||||||
              class="link-type"
 | 
					                :style="{ width:(scope.row.timeLine||0) * 3+'px',
 | 
				
			||||||
            >{{ scope.row.name }}</a>
 | 
					                          background:scope.row.timeLine>50?'rgba(233,0,0,.5)':'rgba(0,0,233,0.5)',
 | 
				
			||||||
            <span v-else>{{ scope.row.name }}</span>
 | 
					                          marginLeft:scope.row._level * 50+'px' }"
 | 
				
			||||||
          </span>
 | 
					                class="process">
 | 
				
			||||||
        </template> -->
 | 
					                <span style="display:inline-block"/>
 | 
				
			||||||
 | 
					              </div>
 | 
				
			||||||
 | 
					            </div>
 | 
				
			||||||
 | 
					          </el-tooltip>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        </template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        <template slot="append" slot-scope="{scope}">
 | 
					        <template slot="append" slot-scope="{scope}">
 | 
				
			||||||
          <el-button
 | 
					          <el-button
 | 
				
			||||||
            size="mini"
 | 
					            size="mini"
 | 
				
			||||||
            type="primary"
 | 
					            type="primary"
 | 
				
			||||||
            @click="addMenuItem(scope.row,'brother',scope)"
 | 
					            @click="addMenuItem(scope.row,'brother')"
 | 
				
			||||||
          >Append Brother
 | 
					          >Append Brother
 | 
				
			||||||
          </el-button>
 | 
					          </el-button>
 | 
				
			||||||
          <el-button
 | 
					          <el-button
 | 
				
			||||||
@@ -97,25 +103,18 @@ export default {
 | 
				
			|||||||
          expand: true
 | 
					          expand: true
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          label: 'type',
 | 
					          label: 'Timeline',
 | 
				
			||||||
          key: 'type'
 | 
					          key: 'timeline'
 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          label: 'appid',
 | 
					 | 
				
			||||||
          key: 'appid'
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          label: 'key',
 | 
					 | 
				
			||||||
          key: 'key'
 | 
					 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          label: 'Append',
 | 
					          label: 'Append',
 | 
				
			||||||
          key: 'append'
 | 
					          key: 'append',
 | 
				
			||||||
 | 
					          width: 300
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          label: 'Operation',
 | 
					          label: 'Operation',
 | 
				
			||||||
          key: 'operation',
 | 
					          key: 'operation',
 | 
				
			||||||
          width: '160px'
 | 
					          width: 160
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      ]
 | 
					      ]
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@@ -146,7 +145,7 @@ export default {
 | 
				
			|||||||
      data.splice(index, 1, Object.assign({}, this.tempItem))
 | 
					      data.splice(index, 1, Object.assign({}, this.tempItem))
 | 
				
			||||||
      this.dialogFormVisible = false
 | 
					      this.dialogFormVisible = false
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    addMenuItem(row, type, a) {
 | 
					    addMenuItem(row, type) {
 | 
				
			||||||
      if (type === 'children') {
 | 
					      if (type === 'children') {
 | 
				
			||||||
        this.$refs.TreeTable.addChild(row, { name: 'child' })
 | 
					        this.$refs.TreeTable.addChild(row, { name: 'child' })
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,31 +1,49 @@
 | 
				
			|||||||
export const data = [
 | 
					export const data = [
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    name: '1',
 | 
					    name: '1',
 | 
				
			||||||
 | 
					    timeLine: 100,
 | 
				
			||||||
    children: [
 | 
					    children: [
 | 
				
			||||||
      {
 | 
					      {
 | 
				
			||||||
        name: '1-1'
 | 
					        name: '1-1',
 | 
				
			||||||
 | 
					        timeLine: 20
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      {
 | 
					      {
 | 
				
			||||||
        name: '1-2'
 | 
					        name: '1-2',
 | 
				
			||||||
 | 
					        timeLine: 60,
 | 
				
			||||||
 | 
					        children: [
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            name: '1-2-1',
 | 
				
			||||||
 | 
					            timeLine: 35
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            name: '1-2-2',
 | 
				
			||||||
 | 
					            timeLine: 25
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        ]
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    ]
 | 
					    ]
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    name: '2',
 | 
					    name: '2',
 | 
				
			||||||
 | 
					    timeLine: 80,
 | 
				
			||||||
    children: [
 | 
					    children: [
 | 
				
			||||||
      {
 | 
					      {
 | 
				
			||||||
        name: '2-1'
 | 
					        name: '2-1',
 | 
				
			||||||
 | 
					        timeLine: 30
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      {
 | 
					      {
 | 
				
			||||||
        name: '2-2'
 | 
					        name: '2-2',
 | 
				
			||||||
 | 
					        timeLine: 50
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      {
 | 
					      {
 | 
				
			||||||
        name: '2-3'
 | 
					        name: '2-3',
 | 
				
			||||||
 | 
					        timeLine: 60
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    ]
 | 
					    ]
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    name: '3'
 | 
					    name: '3',
 | 
				
			||||||
 | 
					    timeLine: 40
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
]
 | 
					]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user