zoukankan      html  css  js  c++  java
  • iview 多选下拉列表选项回显问题

    如,简单的多选Select,

    <Select  v-model="model" filterable  clearable transfer multiple >
    <Option v-for="form in props.options" :value="form.value" :key="form.value" >{{form.value}}</Option>
    </Select>

    如props.options的值为:
    [
                        {
                            "name":"police_type",
                            "value":"其他"
                        },
                        {
                            "name":"police_type",
                            "value":"户政"
                        },
                        {
                            "name":"police_type",
                            "value":"法制"
                        }
                    ]

    如果想让当前的Select的值为选中了,"其他"和"户政",这个时候,就需要设置Select绑定的model的值,

    this.model= ['其他', '户政']

    这个初始化传递过去是数组类型的。
  • 相关阅读:
    hdu 5053 the Sum of Cube
    [LeetCode] Word Pattern
    [LeetCode] Minimum Depth of Binary Tree
    [C++] std::vector
    [LeetCode] Count Binary Substrings
    [LeetCode] Degree of an Array
    [LeetCode] String to Integer (atoi)
    [LintCode] 比较字符串
    [LeetCode] Valid Parentheses
    [LeetCode] Perfect Number
  • 原文地址:https://www.cnblogs.com/chenmz1995/p/11492655.html
Copyright © 2011-2022 走看看