OnChange事件在rzslider中不起作用

时间:2018-12-05 08:06:48

标签: angularjs

rzslider中未触发OnChange事件。

const faultGroup = [{
  comments: "",
  faults: [{
      id: 31,
      name: "speaker"
    },
    {
      id: 22,
      name: "earphones"
    },
    {
      id: 25,
      name: "keyboard"
    }
  ]
}];
const idArray = [25,22];
const result = faultGroup.reduce((a, { faults }) => {
  if (faults) faults.forEach(({ id, name }) => {
    if (idArray.includes(id)) a.push(name);
  });
  return a;
}, []);
console.log(result);

我在控制器内部的功能就是这样

<div ng-repeat="data in datas">
<div ng-repeat="info in data">
  <rzslider rz-slider-model="info.min"
            rz-slider-high="info.max"
            rz-slider-options="info.options"
            rz-slider-on-change="apply(data.id,data.type)">

            </rzslider>
</div>
</div>

最小值和最大值已在滑块中正确更新,但未调用onchange事件。

0 个答案:

没有答案