Skip to content

CGridBranchGraphColumn

Defines branch graph column.

Vue Template Structure

vue
<template>
  <div class="demo-grid large">
    <c-grid :data="records">
      <c-grid-branch-graph-column :width="200" cache field="command">
        Graph
      </c-grid-branch-graph-column>
    </c-grid>
  </div>
</template>
<script>
const records = [
  {
    command: [
      { command: "commit", branch: "main" },
      { command: "tag", branch: "main", tag: "v1.1.0" },
    ],
  },
  {
    command: [{ command: "commit", branch: "develop2" }],
  },
  {
    command: [{ command: "merge", branch: { from: "main", to: "develop2" } }],
  },
  {
    command: [{ command: "merge", branch: { from: "develop3", to: "main" } }],
  },
  {
    command: [{ command: "commit", branch: "develop2" }],
  },
  {
    command: [
      { command: "branch", branch: { from: "main", to: "develop3" } },
      { command: "commit", branch: "develop3" },
    ],
  },
  {
    command: [{ command: "branch", branch: { from: "main", to: "develop2" } }],
  },
  {
    command: [{ command: "merge", branch: { from: "develop", to: "main" } }],
  },
  {
    command: [{ command: "commit", branch: "develop" }],
  },
  {
    command: [
      { command: "commit", branch: "main" },
      { command: "tag", branch: "main", tag: "v1.0.0" },
      { command: "branch", branch: { from: "main", to: "develop" } },
    ],
  },
  {
    command: [
      { command: "branch", branch: "main" },
      { command: "commit", branch: "main" },
    ],
  },
];
export default {
  data() {
    return {
      records,
    };
  },
};
</script>

Slots

default slot

Use this slot to set the header caption

Properties

Optional Properties

NameTypeDescriptionDefault
fieldobject|string|functionDefines a column data fieldundefined
widthnumber|stringDefines a default column widthundefined
min-widthnumber|stringDefines a column min widthundefined
max-widthnumber|stringDefines a column max widthundefined
column-styleobject|string|functionDefines a column style. Same as the style property of the JS API.undefined
actionobject|string|functionDefines an actionundefined
captionstring|functionDefines a header caption''
cachebooleanEnable cacheundefined
colspannumber|stringDefines the layout colspan.
This property can be used when defining in the layout-header and layout-body slots.
undefined
filterstring|functionDefines a vue filter nameundefined
header-actionobject|string|functionDefines a column header action. Same as the headerAction property of the JS API.undefined
header-fieldstringDefines a column header data fieldundefined
header-iconobject|stringDefines a header iconundefined
header-styleobject|string|functionDefines a column header style. Same as the headerStyle property of the JS APIundefined
header-typeobject|string|functionDefines a column header type. Same as the headerStyle property of the JS APIundefined
iconobject|string|functionDefines an icon. Same as the icon property of the JS API.undefined
messageobject|string|functionDefines a message generation method. Same as the message property of the JS API.undefined
rowspannumber|stringDefines the layout rowspan.
This property can be used when defining in the layout-header and layout-body slots.
undefined
sortboolean|string|functionDefines a sort. See "Sort by Column" for detail.undefined
startstringDefines a start typeundefined

Methods

NameReturn TypeDescription
invalidate---Redraws the whole grid.