Skip to content
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

Select 选择器 能外部清除选项么 #116

Closed
hackersean opened this issue Dec 7, 2016 · 6 comments
Closed

Select 选择器 能外部清除选项么 #116

hackersean opened this issue Dec 7, 2016 · 6 comments

Comments

@hackersean
Copy link

在外部一个按钮后,希望让选择器返回初始状态。

@icarusion
Copy link
Contributor

将绑定的 model 设置为 空即可

@hackersean
Copy link
Author

我试了一下不行。
:model.sync="NewID"
我改了这个值,没用。选择器里那行文字还在。那个id并不是原文字。是一个id号

@icarusion
Copy link
Contributor

<template>
    <i-button @click="model8 = ''">clear</i-button>
    <i-select :model.sync="model8" clearable style="width:200px">
        <i-option v-for="item in cityList" :value="item.value">{{ item.label }}</i-option>
    </i-select>
</template>
<script>
    export default {
        data () {
            return {
                cityList: [
                    {
                        value: 'beijing',
                        label: '北京市'
                    },
                    {
                        value: 'shanghai',
                        label: '上海市'
                    },
                    {
                        value: 'shenzhen',
                        label: '深圳市'
                    },
                    {
                        value: 'hangzhou',
                        label: '杭州市'
                    },
                    {
                        value: 'nanjing',
                        label: '南京市'
                    },
                    {
                        value: 'chongqing',
                        label: '重庆市'
                    }
                ],
                model8: ''
            }
        }
    }
</script>

@hackersean
Copy link
Author

带搜索的不行。我仅仅是想清除掉那个输入框。但你这个似乎把数组里的那个value给置为空了吧。

@icarusion
Copy link
Contributor

暂无此功能

@hackersean
Copy link
Author

😳

icarusion added a commit that referenced this issue Dec 8, 2016
fixed #116
luckyMY pushed a commit to tm-fe/iview that referenced this issue Jan 13, 2022
修复调整缩放比例,刷新页面,导致无限更新this.scale,出现卡死状况
luckyMY pushed a commit to tm-fe/iview that referenced this issue Jan 13, 2022
fix: 修复avatar组件在部分缩放比例下出现页面卡死 iview#116
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants