New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to use vue h render function to render one select with options #9304

Closed
xgqfrms opened this Issue Jan 11, 2019 · 3 comments

Comments

Projects
None yet
3 participants
@xgqfrms
Copy link

xgqfrms commented Jan 11, 2019

how to use vue h render function to render one select with options?

wanted React JSX style, just using html template as string

not work

let options = [];
    options = bids.map(
        (obj, i) => {
            let {
                name,
                bid,
            } = obj;
            return h("h-option", {
                props: {
                    value: bid,
                    // label: name,
                    key: i,
                },
                attrs: {
                    "data-bid": bid,
                },
                class: [
                    "audit-common-select",
                ],
                // style: {
                //     color: "#298DFF !important",
                //     textDecoration: "none",
                //     cursor: "pointer",
                //     marginRight: "5px",
                // },
                on: {
                    click: () => {
                        //
                    },
                }
            }, name);
        }
    );
    let select = () => {
        // h-select v-model="model12" filterable multiple
        return h("h-select", {
            props: {
                // values: options,
                value: bids[0].bid,
                filterable: true,
                clearable: true,
            },
        });
    };
    return h("div", select);

still not work

let options = [];
    options = bids.map(
        (obj, i) => {
            let {
                name,
                bid,
            } = obj;
            return h("h-option", {
                props: {
                    value: bid,
                    // label: name,
                    key: i,
                },
                attrs: {
                    "data-bid": bid,
                },
                class: [
                    "audit-common-select",
                ],
                // style: {
                //     color: "#298DFF !important",
                //     textDecoration: "none",
                //     cursor: "pointer",
                //     marginRight: "5px",
                // },
                on: {
                    click: () => {
                        //
                    },
                }
            }, name);
        }
    );
    let select = () => {
        // h-select v-model="model12" filterable multiple
        return h("h-select", {
            props: {
                // values: options,
                value: bids[0].bid,
                filterable: true,
                clearable: true,
            },
        }, options);
    };
    return h("div", select);
@vue-bot

This comment has been minimized.

Copy link
Contributor

vue-bot commented Jan 11, 2019

Hello, your issue has been closed because it does not conform to our issue requirements. In order to ensure every issue provides the necessary information for us to investigate, we require the use of the Issue Helper when creating new issues. Thank you!

@vue-bot vue-bot closed this Jan 11, 2019

@Justineo

This comment has been minimized.

Copy link
Member

Justineo commented Jan 11, 2019

Hi, thanks for your interest but Github issues are for bug reports and feature requests only. You can ask questions on the forum, the Discord server, gitter or StackOverflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment