用render渲染poptip,再往poptip裏面渲染內容

columns: [
                                  {
                                    title: "數據來源",
                                    key: "q",
                                    render: (h, params) => {
                                      return h("div", {}, [
                                        h(
                                          "poptip",
                                          {
                                            props: {
                                              placement: "bottom"
                                            },
                                            style: {
                                              cursor: "pointer",
                                              color: "#f00"
                                            }
                                          },
                                          [
                                            h('span',{},'添加數據'),
                                            h("div",
                                              {
                                                  slot: "content"
                                              },
                                              [
                                                h(
                                                  "checkboxGroup",
                                                  {
                                                    vModel: "checkboxValue",
                                                    on: {
                                                      "on-change": val => {
                                                        this.checkboxValue = val;
                                                        console.log(val,"111111111",this.checkboxValue);
                                                      }
                                                    }
                                                  },
                                                  [ 
                                                    h("checkbox", {
                                                      props: {
                                                        label: "人力總數"
                                                      },
                                                      style: {
                                                        display: "flex"
                                                      }
                                                    }),
                                                    h("checkbox", {
                                                      props: {
                                                        label: "新進人力"
                                                      },
                                                      style: {
                                                        display: "flex"
                                                      }
                                                    }),
                                                    h("checkbox", {
                                                      props: {
                                                        label: "流失人力"
                                                      },
                                                      style: {
                                                        display: "flex"
                                                      }
                                                    }),
                                                    h("checkbox", {
                                                      props: {
                                                        label: "出勤"
                                                      },
                                                      style: {
                                                        display: "flex"
                                                      }
                                                    }),
                                                    h("checkbox", {
                                                      props: {
                                                        label: "直接人力"
                                                      },
                                                      style: {
                                                        display: "flex"
                                                      }
                                                    }),
                                                    h("checkbox", {
                                                      props: {
                                                        label: "間接人力"
                                                      },
                                                      style: {
                                                        display: "flex"
                                                      }
                                                    })
                                                  ]
                                                )
                                              ]
                                            )
                                          ],
                                        )
                                      ]);
                                    }
                                  },

 

posted @ 2020-06-28 17:16  史密斯崔  阅读(269)  评论(0编辑  收藏  举报