Giter VIP home page Giter VIP logo

iview-form's People

Contributors

viewweiwu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

iview-form's Issues

iview的button按钮点击做的模态对话框调用formList貌似渲染不出来

               iview的button按钮点击做的模态对话框调用formList貌似渲染不出来

import iViewForm from 'iview-form'
export default {
name: 'devlist',
components: {
Tables,
iViewForm
},


               on: {
                  click: () => {
                    this.$Modal.confirm({
                      render: (h) => {
                        return h('div',[
                          h('i-switch',{
                             props:{
                               value:true      
                             }}),
                          h('iview-form',{  //这里替替换成iViewForm也试了,没渲染出来呢
                            props: {
                              formList: [
                                {
                                  title: '输入框',
                                  type: 'input'
                                }
                              ]
                            }
                          }),
                        ])

image

使用iview Select远程搜索无法设置默认值问题

页面上有新增编辑功能,新增后点击编辑,Select无法获取新增时设置的值,即无法设置默认值,按照iview文档动态设置了label,点击编辑时给label赋值,但是没有效果,关键代码如下:

editForm:[
        {
          title: '客户名',
          key: 'id',
          renderContent:(h,item,form) => {
            let $select = h(
              "Select",
              {
                props:{
                 label:this.idName,
                  filterable:true,
                  remote:true,
                  'remote-method':(query) => {
                      if (query !== '') {
                        this.gradeList = []
                        this.loading1 = true
                        this.getCustomer({name:query}).then(res => {
                          let data = res
                          data.map(item => {
                            item.text = item.name +' '+ item.username
                            this.gradeList.push({value:item.id,text:item.text})
                          })
                          this.loading1 = false
                        })

                    } else {
                        this.gradeList = [];
                    }
                  },
                },
                on: {
                  'on-change': (val) => {
                    form['id'] = val
                  }
                }
              },
              this.gradeList.map((val, index) => {
                return h("Option", {
                  props: {
                    label: val.text,
                    value: val.value
                  }
                });
              })
            );
            return h("div", [$select]);
          }
        },
]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.