Element: [Bug Report] Pagination Paging Component slot data is not updated

Created on 29 Mar 2019  ·  4Comments  ·  Source: ElemeFE/element

Element UI version

2.5.0

OS/Browsers version

Mac 10.14.3 (18D109) / Chrome 73.0.3683.86

Vue version

2.6.10

Reproduction Link

https://codepen.io/anon/pen/bZXMOo?&editable=true

Steps to reproduce

需求自定义total 例如"共100条订单"

<el-pagination
  small
  layout="slot, total, prev, pager, next"
  :total="count">
  <span>共{{ count }}条订单</span>
</el-pagination>  
{
  data() {
    return {
      count: 50,
    };
  },
  methods: {
    changeCount() {
      this.count   ;
    },
  }
}

What is Expected?

期望修改count时,插槽数据也会同步更新

What is actually happening?

2.4.11 没毛病

https://codepen.io/anon/pen/RdXypN?&editable=true

2.5.0 插槽数据没有更新

https://codepen.io/anon/pen/bZXMOo?&editable=true

stale

Most helpful comment

是vue 2.6.10 后的问题,我也被这个不够搞了半天,加个v-slot就好了
image

All 4 comments

Translation of this issue:

Element UI version

2.5.0

OS/Browsers version

Mac 10.14.3 (18D109) / Chrome 73.0.3683.86

Vue version

2.6.10

Reproduction Link

https://codepen.io/anon/pen/bZXMOo?&editable=true

Steps to reproduce

Requirements customized totals such as "100 orders in total"


Small
Layout= "slot, total, prev, pager, next"

Total= "count">
A total of {count} orders



{

Data () {
Return {

Count: 50,
}

}
Methods: {

ChangeCount (){
This. count;

}
}

}

What is Expected?

When you expect to modify count, the slot data will also be updated synchronously

What is actually happening?

2.4.11 No problem

Https://codepen.io/anon/pen/RdXypN?&editable=true
2.5.0 slot data not updated

Https://codepen.io/anon/pen/bZXMOo?&editable=true

是vue 2.6.10 后的问题,我也被这个不够搞了半天,加个v-slot就好了
image

是vue 2.6.10 后的问题,我也被这个不够搞了半天,加个v-solt就好了
image

果然可以了,之前遇到的table header插槽问题也一起解决了

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings