Oinone
Product
Oinone
Oinone Framework
100% Metadata-Driven Enterprise Low-Code Framework
Aino
Aino
AI Innovation, Now I Know — Enterprise AI Agent Platform
Use CasesPricingCommunity
Resources
📖
Documentation
Developer docs & API reference
💬
Support
Technical support
📄
Changelog
Product release notes
🏡
About
About Us
0571-88757863

Vue UI


In Oinone Kunlun, some components are implemented based on independent third-party component libraries, such as Vxe-Table, vuedreggable, etc. These components can be used not only for Widget components, but also directly for any Vue component using Vue native writing. This article will provide a detailed introduction to the usage and API definitions of these components.

Ⅰ. Import

import { OioTable } from '@oinone/kunlun-vue-ui';

Ⅱ. Reference List

(Ⅰ) Table

Basic Usage

<template>
  <oio-table :data="tableData">
    <oio-column label="Name" field="name" />
    <oio-column label="Description" field="description" />
  </oio-table>
</template>
<script lang="ts">
import { OioColumn, OioTable } from '@oinone/kunlun-dependencies';
import { defineComponent, ref } from 'vue';

interface DataItem {
  name: string;
  description: string;
}

export default defineComponent({
  components: {
    OioTable,
    OioColumn
  },
  props: {},
  setup(props) {
    const tableData = ref<DataItem[]>([]);

    for (let i = 1; i <= 50; i++) {
      tableData.value.push({
        name: `Name ${i}`,
        description: `This is a description ${i}`
      });
    }

    return {
      tableData
    };
  }
});
</script>

Fixed Header

<template>
  <oio-table :data="tableData" height="100%">
    <oio-column label="Name" field="name" />
    <oio-column label="Description" field="description" />
  </oio-table>
</template>

Grouped Header

<template>
  <oio-table :data="tableData" height="100%">
    <oio-column label="Name" field="name" />
    <oio-column label="Description" field="description" />
    <oio-colgroup label="Address">
      <oio-column label="Province" field="address.province" />
      <oio-column label="City" field="address.city" />
      <oio-column label="District" field="address.district" />
    </oio-colgroup>
  </oio-table>
</template>
<script lang="ts">
import { OioColgroup, OioColumn, OioTable } from '@oinone/kunlun-dependencies';
import { defineComponent, ref } from 'vue';

interface DataItem {
  name: string;
  description: string;
  address: {
    province: string;
    city: string;
    district: string;
  };
}

export default defineComponent({
  components: {
    OioTable,
    OioColumn,
    OioColgroup
  },
  props: {},
  setup(props) {
    const tableData = ref<DataItem[]>([]);

    for (let i = 1; i <= 50; i++) {
      tableData.value.push({
        name: `Name ${i}`,
        description: `This is a description ${i}`,
        address: {
          province: 'Province',
          city: 'City',
          district: 'District'
        }
      });
    }

    return {
      tableData
    };
  }
});
</script>

Frozen Action Column

<template>
  <div style="width: 1000px; height: 800px">
    <oio-table :data="tableData" height="100%">
      <oio-column label="Name" field="name" width="200px" />
      <oio-column label="Description" field="description" min-width="300px" />
      <oio-column label="Gender" field="sex" min-width="300px" />
      <oio-column label="Age" field="age" min-width="300px" />
      <oio-column label="Actions" fixed="right" width="200px">
        <template #default>
          <div style="display: flex; column-gap: 16px">
            <oio-button type="link">Action 1</oio-button>
            <oio-button type="link">Action 2</oio-button>
          </div>
        </template>
      </oio-column>
    </oio-table>
  </div>
</template>

Resizable Columns

<template>
  <oio-table :data="tableData" height="100%" resizable>
    <oio-column label="Name" field="name" />
    <oio-column label="Description" field="description" />
  </oio-table>
</template>

Full Border and Zebra Stripes

<template>
  <oio-table :data="tableData" height="100%" border="full" stripe>
    <oio-column label="Name" field="name" />
    <oio-column label="Description" field="description" />
  </oio-table>
</template>

Filter and Sort

<template>
  <oio-table :data="tableData" height="100%" border="full" stripe>
    <oio-column label="Name" field="name" />
    <oio-column label="Description" field="description" />
    <oio-column
      label="Gender"
      field="sex"
      :component-data="{
        filters: sexFilters,
        filterMultiple: false
      }"
    />
    <oio-column label="Age" field="age" sortable />
  </oio-table>
</template>
<script lang="ts">
import { OioColgroup, OioColumn, OioTable } from '@oinone/kunlun-dependencies';
import { random } from 'lodash-es';
import { defineComponent, ref } from 'vue';
import type { VxeColumnPropTypes } from 'vxe-table';

interface DataItem {
  name: string;
  description: string;
  age: number;
  sex: 'woman' | 'man';
}

export default defineComponent({
  components: {
    OioTable,
    OioColumn,
    OioColgroup
  },
  props: {},
  setup(props) {
    const tableData = ref<DataItem[]>([]);

    for (let i = 1; i <= 50; i++) {
      tableData.value.push({
        name: `Name ${i}`,
        description: `This is a description ${i}`,
        age: random(100),
        sex: i % 3 === 0 ? 'woman' : 'man'
      });
    }

    const sexFilters: VxeColumnPropTypes.Filters = [
      { label: 'Male', value: 'man' },
      { label: 'Female', value: 'woman' }
    ];

    return {
      tableData,
      sexFilters
    };
  }
});
</script>

Content Formatting

<template>
  <oio-table :data="tableData" height="100%" border="full" stripe>
    <oio-column label="Name" field="name" />
    <oio-column label="Description" field="description" />
    <oio-column
      label="Gender"
      field="sex"
      :component-data="{
        formatter: sexFormatter
      }"
    />
    <oio-column
      label="Age"
      field="age"
      :component-data="{
        formatter: ageFormatter
      }"
    />
  </oio-table>
</template>
<script lang="ts">
import { OioColgroup, OioColumn, OioTable } from '@oinone/kunlun-dependencies';
import { random } from 'lodash-es';
import { defineComponent, ref } from 'vue';
import type { RowVO, VxeColumnPropTypes } from 'vxe-table';

interface DataItem {
  name: string;
  description: string;
  age: number;
  sex: 'Woman' | 'Man';
}

export default defineComponent({
  components: {
    OioTable,
    OioColumn,
    OioColgroup
  },
  props: {},
  setup(props) {
    const tableData = ref<DataItem[]>([]);

    for (let i = 1; i <= 50; i++) {
      tableData.value.push({
        name: `Name ${i}`,
        description: `This is a description ${i}`,
        age: random(100),
        sex: i % 3 === 0 ? 'Woman' : 'Man'
      });
    }

    const sexFormatter: VxeColumnPropTypes.Formatter<RowVO> = ({ cellValue }) => {
      if (cellValue === 'Man') {
        return 'Male';
      }
      if (cellValue === 'Woman') {
        return 'Female';
      }
      return cellValue;
    };

    const ageFormatter: VxeColumnPropTypes.Formatter<RowVO> = ({ cellValue }) => {
      return `${cellValue} years old`;
    };

    return {
      tableData,
      sexFormatter,
      ageFormatter
    };
  }
});
</script>

Checkbox

<template>
  <oio-table
    :data="tableData"
    height="100%"
    border="full"
    stripe
    @checked-all-change="onCheckedAllChange"
    @checked-change="onCheckedChange"
  >
    <oio-column type="checkbox" width="52" />
    <oio-column label="Name" field="name" />
    <oio-column label="Description" field="description" />
    <oio-column label="Gender" field="sex" />
    <oio-column label="Age" field="age" />
  </oio-table>
</template>
<script lang="ts">
import { CheckedChangeEvent, OioColgroup, OioColumn, OioTable } from '@oinone/kunlun-dependencies';
import { random } from 'lodash-es';
import { defineComponent, ref } from 'vue';

interface DataItem {
  name: string;
  description: string;
  age: number;
  sex: 'Woman' | 'Man';
}

export default defineComponent({
  components: {
    OioTable,
    OioColumn,
    OioColgroup
  },
  props: {},
  setup(props) {
    const tableData = ref<DataItem[]>([]);

    for (let i = 1; i <= 50; i++) {
      tableData.value.push({
        name: `Name ${i}`,
        description: `This is a description ${i}`,
        age: random(100),
        sex: i % 3 === 0 ? 'Woman' : 'Man'
      });
    }

    const onCheckedAllChange = (e: CheckedChangeEvent) => {
      console.log(e);
    };

    const onCheckedChange = (e: CheckedChangeEvent) => {
      console.log(e);
    };

    return {
      tableData,
      onCheckedAllChange,
      onCheckedChange
    };
  }
});
</script>

Frontend Pagination Table

<template>
  <div class="table-pagination-demo">
    <oio-table :data="showTableData" height="100%" :loading="loading">
      <oio-column type="checkbox" width="52" />
      <oio-column label="Name" field="name" />
      <oio-column label="Description" field="description" />
      <oio-column label="Gender" field="sex" />
      <oio-column label="Age" field="age" />
      <template #footer>
        <oio-pagination
          :total="total"
          v-model:current-page="currentPage"
          v-model:page-size="currentPageSize"
          @change="onPaginationChange"
        />
      </template>
    </oio-table>
  </div>
</template>
<script lang="ts">
import { OioColgroup, OioColumn, OioTable } from '@oinone/kunlun-dependencies';
import { OioPagination } from '@oinone/kunlun-vue-ui-antd';
import { random } from 'lodash-es';
import { defineComponent, ref } from 'vue';

interface DataItem {
  name: string;
  description: string;
  age: number;
  sex: 'Woman' | 'Man';
}

export default defineComponent({
  components: {
    OioTable,
    OioColumn,
    OioColgroup,
    OioPagination
  },
  props: {},
  setup(props) {
    const allTableData = ref<DataItem[]>([]);
    const showTableData = ref<DataItem[]>([]);
    const loading = ref(false);

    const total = 50;
    const currentPage = ref(1);
    const currentPageSize = ref(15);

    const onPaginationChange = (currentPage: number, pageSize: number) => {
      loading.value = true;
      setTimeout(() => {
        showTableData.value = allTableData.value.slice((currentPage - 1) * pageSize, currentPage * pageSize);
        loading.value = false;
      }, 200);
    };

    for (let i = 1; i <= total; i++) {
      allTableData.value.push({
        name: `Name ${i}`,
        description: `This is a description ${i}`,
        age: random(100),
        sex: i % 3 === 0 ? 'Woman' : 'Man'
      });
    }

    onPaginationChange(1, currentPageSize.value);

    return {
      allTableData,
      showTableData,
      loading,
      total,
      currentPage,
      currentPageSize,
      onPaginationChange
    };
  }
});
</script>
<style lang="scss">
.table-pagination-demo {
  height: 500px;
  width: 800px;

  .oio-table-wrapper {
    height: 100%;

    & > .ant-spin-container {
      height: 100%;
    }
  }
}
</style>

API

oio-table

Props

PropertyTypeDefaultDescription
sizestringundefinedTable size, optional values are TableSize enum values (e.g., 'large', 'middle', 'small')
resizablebooleanundefinedWhether to allow column width adjustment
heightstringnumberundefined
borderbooleankeyof typeof TableBorderundefined
stripebooleanundefinedWhether to show zebra stripes
rowClassNamestring(row: Record<string, unknown>, rowIndex: number) => stringundefined
cellClassNamestring(row: Record<string, unknown>, column: ColumnInfo, rowIndex: number, columnIndex: number) => stringundefined
headerRowClassNamestring(column: ColumnInfo, columnIndex: number) => stringundefined
headerCellClassNamestring(column: ColumnInfo, columnIndex: number) => stringundefined
footerRowClassNamestringFunctionundefined
footerCellClassNamestringFunctionundefined
rowStyleObject(row: Record<string, unknown>, rowIndex: number) => Objectundefined
headerRowStyleObjectFunctionundefined
cellStyleObject(row: Record<string, unknown>, column: ColumnInfo, rowIndex: number, columnIndex: number) => Objectundefined
headerCellStyleObjectFunctionundefined
customConfigRecord<string, any>{}Custom configuration
loadingbooleanundefinedWhether to show loading state
wrapperClassNamestringstring[]undefined
dataRecord<string, unknown>[][]Table data
showOverflowbooleankeyof typeof TableOverflowundefined
showHeaderOverflowbooleankeyof typeof TableOverflowundefined
showFooterOverflowbooleankeyof typeof TableOverflowundefined
emptyTextstring''Empty data prompt text
emptyImagestringundefinedEmpty data prompt image
rowConfigVxeTablePropTypes.RowConfigundefinedRow configuration (such as row height, selection style, etc.), type is VxeTable
Row configuration interface
columnConfigVxeTablePropTypes.ColumnConfigundefinedColumn configuration (such as alignment, sorting, etc.)
sortConfigVxeTablePropTypes.SortConfigundefinedSorting configuration
radioConfigVxeTablePropTypes.SortConfigundefinedRadio button configuration
checkboxConfigVxeTablePropTypes.CheckboxConfigundefinedCheckbox configuration
tooltipConfigVxeTablePropTypes.TooltipConfigundefinedTooltip configuration
expandConfigVxeTablePropTypes.ExpandConfigundefinedExpand row configuration
editConfigVxeTablePropTypes.EditConfigundefinedEditable configuration
treeConfigVxeTablePropTypes.TreeConfigundefinedTree table configuration
scrollXVxeTablePropTypes.ScrollXundefinedHorizontal virtual scroll configuration
scrollYVxeTablePropTypes.ScrollYundefinedVertical virtual scroll configuration
showFooterbooleanundefinedWhether to show table footer
footerMethodVxeTablePropTypes.FooterMethodundefinedFooter calculation method
spanMethodVxeTablePropTypes.SpanMethodundefinedCell merging method
mergeCellsVxeTablePropTypes.MergeCells[]Cell merging configuration
componentDataRecord<string, unknown>undefinedThird-party extension properties

Events

EventParametersDescription
sort-changeevent: SortChangeEventFired when the sorting state changes, returns an object containing the sorting field, direction, and original event
checked-changeevent: CheckedChangeEventFired when the checkbox state changes (row level), returns an object containing the selection state, row data, and original event
checked-all-changeevent: CheckedChangeEventFired when the all-selection checkbox state changes, returns an object containing the all-selection state, row data, and original event
radio-changeevent: RadioChangeEventFired when the radio button state changes, returns an object containing the old and new row data and the original event
cell-clickrow: Record<string, unknown>, column: ColumnInfo, event: MouseEventCell click event, returns row data, column information, and mouse event object
cell-dblclickrow: Record<string, unknown>, column: ColumnInfo, event: MouseEventCell double-click event, returns row data, column information, and mouse event object
header-cell-clickcolumn: ColumnInfo, event: MouseEventHeader cell click event, returns column information and mouse event object
header-cell-dblclickcolumn: ColumnInfo, event: MouseEventHeader cell double-click event, returns column information and mouse event object
toggle-row-expandrow: Record<string, unknown>, isExpand: booleanFired when the expand row state is toggled, returns row data and expand state
edit-activedevent: ActiveEditorContextFired when a cell enters edit state, returns the edit context object
edit-closedevent: ActiveEditorContextFired when cell editing ends, returns the edit context object
scrollevent: ScrollEventFired when the table scrolls, returns the scroll event object

Slots

SlotDescription
defaultTable body content (column definitions)
headerCustom header content
footerCustom footer content

Methods

MethodParametersReturn ValueDescription
getOrigin-VxeTableInstanceGet the underlying VxeTable
instance
setCurrentRowrow: Record<string, unknown>voidSet the current row (radio state)
clearCurrentRow-voidClear the current row (radio state)
setCheckboxRowrows: Record<string, unknown>[], checked?: booleanvoidSet checkbox selected rows
clearCheckboxRow-voidClear all checkbox selected rows
resetCheckboxRowrows: Record<string, unknown>[]voidReset checkbox selected rows (clear then set)
setRadioRowrow: Record<string, unknown>voidSet radio selected row
clearRadioRow-voidClear radio selected row
getAllColumns-ColumnInfo[]Get all column configurations
refreshColumn-voidRefresh column configurations
updateFooter-voidRefresh footer calculation
loadColumnscolumns: ColumnInfo[]voidLoad column configurations (append mode)
reloadColumnscolumns: ColumnInfo[]voidReload column configurations (overwrite mode)
setEditRowrow: Record<string, unknown>voidSet editable row
getActiveEditorRecord-RowContextundefined
activeCellEditorrow: Record<string, unknown>, fieldOrColumn: stringColumnInfovoid
clearEditor-voidClear all edit states
recalculaterefull?: booleanvoidRecalculate table layout (optional force refresh)
allRowExpand-Promise<any>Expand all rows (returns Promise)
clearAllRowExpand-Promise<any>Collapse all rows (returns Promise)
setRowExpandrow: Record<string, unknown>, isExpand: booleanPromise<any>Toggle row expand state (returns Promise)
sortsortConfs: VxeTableDefines.SortConfs[]Promise<any>Manually trigger sorting (returns Promise)

For more usage, please refer to: vxe-table

oio-column

Props

PropertyTypeDefaultDescription
widthstringnumberundefined
minWidthstringnumberundefined
labelstringundefinedColumn header text
classNamestring((context: RenderCellContext) => string)undefined
headerClassNamestring((context: RenderCellContext) => string)undefined
footerClassNamestring((context: RenderCellContext) => string)undefined
alignColumnAlignType'left'Cell content alignment, optional values: 'left', 'center', 'right'
headerAlignColumnAlignType'left'Header content alignment
footerAlignColumnAlignType'left'Footer content alignment
fixedColumnFixedTypeundefinedColumn fixed position, optional values: 'left', 'right' or boolean (fixed left)
invisiblebooleanfalseWhether to hide the column
resizablebooleanundefinedWhether to allow column width adjustment
treeNodebooleanundefinedWhether to use as a node column in a tree table
editablebooleanfalseWhether to enable cell editing
cellEditableboolean((context: RowContext) => boolean)undefined
editorTriggerTableEditorTrigger'manual'Editing trigger mode, optional values: 'manual' (manual), 'click' (click)
editorModeTableEditorMode'cell'Editing mode, optional values: 'cell' (in-cell editing), 'row' (row editing)
editorCloseTriggerTableEditorCloseTrigger'manual'Editing close trigger mode, optional values: 'manual' (manual), 'blur' (blur)
disableEditorRenderbooleanfalseWhether to disable edit state rendering
rowEditorClosedByEnter((context: RowContext) => ReturnPromise<boolean>)undefinedCallback function when closing editing by pressing Enter (return false to prevent closing)
rowEditorClosedByCancel((context: RowContext) => ReturnPromise<boolean>)undefinedCallback function when closing editing by clicking cancel
editorConfirmstring((context: RowContext) => string)undefined
editorConfirmPositionPopconfirmPlacement((context: RowContext) => PopconfirmPlacement)'top'
editorCondition((context: RowContext) => ReturnPromise<booleanundefined>)undefined
editorEnterTextstring((context: RowContext) => string)'Confirm'
editorCancelTextstring((context: RowContext) => string)'Cancel'
typestringundefinedColumn type (e.g., 'seq' for sequence column)
fieldstringundefinedData field name (corresponds to the key in row data)
invisibleContentboolean((context: RowContext) => boolean)undefined
sortablebooleanundefinedWhether to enable sorting
renderDefaultSlotCellRenderFunctionundefinedCustom cell content rendering function
renderEditSlotCellRenderFunctionundefinedCustom cell rendering function in edit state
renderContentSlotCellRenderFunctionundefinedCustom content area rendering function (backup)
renderHeaderSlotCellRenderFunctionundefinedCustom header rendering function
componentDataRecord<string, unknown>undefinedThird-party extension properties

Slots

SlotTypeDescription
default(context: RenderRowContext) => VNode[]Custom cell content
edit(context: RenderRowContext) => VNode[]Custom cell content in edit state
header(context: RenderRowContext) => VNode[]Custom header content

For more usage, please refer to: vxe-column

oio-colgroup

Props

PropertyTypeDefaultDescription
widthstringnumberundefined
minWidthstringnumberundefined
labelstringundefinedColumn group header text
classNamestring((context: RenderCellContext) => string)undefined
headerClassNamestring((context: RenderCellContext) => string)undefined
footerClassNamestring((context: RenderCellContext) => string)undefined
alignColumnAlignTypeundefinedColumn group cell content alignment, optional values: 'left', 'center', 'right'
headerAlignColumnAlignType'center'Column group header content alignment (default center)
footerAlignColumnAlignTypeundefinedColumn group footer content alignment
fixedColumnFixedTypeundefinedColumn group fixed position, optional values: 'left', 'right' or boolean (fixed left)
invisiblebooleanfalseWhether to hide the column group
resizablebooleanundefinedWhether to allow column group width adjustment
treeNodebooleanundefinedWhether to use as a node column group in a tree table
fieldstringundefinedData field name (used to associate with data source)
componentDataRecord<string, unknown>undefinedThird-party extension properties

Slots

SlotDescription
defaultColumn definitions contained in the column group

For more usage, please refer to: vxe-colgroup

Edit this page
Last Updated:1/15/26, 4:02 AM
Prev
Vue UI El
Next
Metadata Service
默认页脚
Copyright © 2026 Mr.Hope