<template>
<wj-flex-grid :items-source="items">
<wj-flex-grid-column
v-for="(column, index) in columns"
:key="index"
:header="column.header"
:binding="column.binding"
>
<template v-if="column.binding === 'name'">
<wj-combo-box
display-member-path="name"
:itemsSource="countries"
>
</wj-combo-box>
</template>
</wj-flex-grid-column>
</wj-flex-grid>
</template>
<script>
// import { FlexGrid, FlexGridColumn } from '@grapecity/wijmo.vue2.grid';
import "@grapecity/wijmo.vue2.core";
import "@grapecity/wijmo.vue2.input";
import "@grapecity/wijmo.styles/wijmo.css";
import "@grapecity/wijmo.vue2.grid";
export default {
// components: {
// // WjFlexGrid: FlexGrid,
// // WjFlexGridColumn: FlexGridColumn,
// WjComboBox: ComboBox,
// },
data() {
return {
countries: [
{ id: 1, name: 'China', capital: 'Beijing' },
{ id: 2, name: 'Japan', capital: 'Tokyo' },
{ id: 3, name: 'South Korea', capital: 'Seoul' },
],
columns: [
{ header: 'Country', binding: 'name' },
{ header: 'Capital', binding: 'capital' },
],
items: [
{ name: 'China', capital: 'Beijing' },
{ name: 'Japan', capital: 'Tokyo' },
{ name: 'South Korea', capital: 'Seoul' },
],
theComboObject: {
selectedValue: {}
}
};
},
};
</script>
代码如上,wijmo单元格中绑定下拉框但是没效果,请问有相关demo嘛
|