Skip to content

远程搜索初始化如何赋值? #48

@codepandy

Description

@codepandy

使用了远程搜索。但是当页面进入编辑状态时,需要把原来设置的值给设置上,这个怎么弄?
我通过locale的方式设置,不管用。

       $.ajax({
            url: `url?page=1&limit=100&ids=${ids}`,
            async: false,
            success: function (res) {
                if (res && res.data) {
                    
                    const arr = res.data.map(item => {
                        return {
                            name: item.baseCoinDesc,
                            value: item.id + ''
                        }
                    })
                    formSelects.data('spotPlate', 'local', {
                        arr
                    });
                    formSelects.value(formSelectId, ids.split(",").map(item => {
                        return parseInt(item)
                    }));
                }
            }
        });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions