Comments (12)
由于设置了 :key="index"
,当 onProvince 变化后 index 的值没有变化,所以 Vue 2.0 不会重新渲染。建议改为 :key="item.name"
,同时在 onProvince 变化后处理一下 onCity 的值。
from element.
el-select组件的onchange方法,执行this.$forceUpdate(); 重新渲染实例就好了
from element.
@Leopoldthecoder 多谢,解决了
from element.
@Leopoldthecoder 写文档里?
from element.
@QingWei-Li Vue本身的不需要写文档吧?
from element.
其实文档里提了一句,可能不太明显,我想想怎么改一下
from element.
@csvwolf 不写的话出问题就赖 Element 🌚
from element.
@QingWei-Li -0-(逃2333
from element.
Leopoldthecoder ,按照你的方法,我同时在 onProvince 变化后处理一下 onCity 的值,发现出现第一个el-option的label值不变,还是不变,
"element-ui": "^1.0.0-rc.4",
"vue": "2.0.0-rc.6",
computed: {
city () {
console.log('cicici', this.onCity)
for (const province of this.maps) {
if (this.onProvince == province.name) {
this.onCity = ''
return province.city
}
}
}
}
from element.
代码如下:
from element.
@perfectyang 我按你说的写了个 Demo:https://jsfiddle.net/gL6mf2te/ ,看起来是正常的。你说的 label 值不变是指什么?
from element.
抱歉, 我也有同样的问题。似乎在mac os 12.4里才会发生。
chrome 58 , element-ui网站上都ok,上面jsfiddle的例子也ok,就是自己使用不行,select后label显示不变。
同样的代码在el captian上就似乎没有问题。
我使用laravel。
多谢!
from element.
Related Issues (20)
- [Bug Report] 主题功能 Server Error 500 HOT 5
- [Feature Request] el-table-column的prop属性能否支持数组类型?Can the prop attribute of el-table-column support array type?
- [Bug Report] 树形表格和展开行不能一起使用吗?
- [Feature Request] Uploader Support for Folder selection with webkitdirectory attribute
- [Bug Report] select框设置filterable,在选中一个之后切屏,再切回来,组件的options会自动打开 HOT 1
- [Feature Request] table组件的多选能够根据table绑定的data渲染是否选中,使用toggleRowSelection方法不能满足需求
- [Bug Report] datepicker组件type是datetime时怎么全局更改它的默认format HOT 1
- [Feature Request] DatePicker 日期选择器type="dates"时怎么限制选择的日期数量
- [Bug Report] 日期选择器type="week"时,Picker Options中设置disabledDate为昨天和firstDayOfWeek为1,点击4月1日日期选择器不作用
- [Bug Report] 多语言里繁体翻译不全
- 2.13.2版本的日期或者时间控件el-time-picker手动输入数字不会自动转时间格式 HOT 1
- [Feature Request] el-upload 如何实现取消上传后继续上传及已上传文件不移出列表?
- [Bug Report] el-body嵌套el-table只有两列时候第二列设置fixed后高度异常 HOT 1
- [Bug Report] form-item.vue validate source对象不能访问form model中的其他属性
- [Bug Report] el-table的展开行里面再放一个el-table,设置了fixed的el-table-column会显示异常
- [Feature Request] el-drawer打开想要点击页面其他元素,并且页面可以滚动
- [Bug Report] <el-time-picker is-range 时 时间范围联动限制时异常 HOT 1
- [Bug Report] Nested dialog boxes contain tables with checkbox properties set. Selecting a checkbox can cause Google Chrome to crash HOT 2
- [Bug Report] when messageBox‘s render function use a observable data, it can't update the ui
- [Bug Report] cascader组件修改v-model值不触发lazyLoad
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from element.