找回密码
 立即注册

QQ登录

只需一步,快速开始

潘棒棒

注册会员

12

主题

36

帖子

148

积分

注册会员

积分
148

[已处理] 下拉框

潘棒棒
注册会员   /  发表于:2023-3-23 16:37  /   查看:1293  /  回复:3
1金币

<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嘛



附件: 您需要 登录 才可以下载或查看,没有帐号?立即注册

最佳答案

查看完整内容

https://www.grapecity.com/wijmo/demos/Grid/Editing/CustomEditors/vue

3 个回复

倒序浏览
最佳答案
最佳答案
Richard.Ma讲师达人认证 悬赏达人认证 SpreadJS 开发认证
超级版主   /  发表于:2023-3-23 16:37:03
来自 2#
回复 使用道具 举报
潘棒棒
注册会员   /  发表于:2023-3-23 17:54:37
3#
根据您给的案例,加到我上面的代码会报错

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复 使用道具 举报
Richard.Ma讲师达人认证 悬赏达人认证 SpreadJS 开发认证
超级版主   /  发表于:2023-3-23 18:16:17
4#
我没看懂你的代码,autocomplete这个是可以作为editor设置给列。上面的datamap是直接作为列的属性设置的。两个任选其一就行的,都能实现下拉效果

回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部