Advertisement
Guest User

Untitled

a guest
Jun 15th, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. almost 600 values
  2. }
  3. },
  4. {
  5. ‘item’: {
  6. ‘term’: ‘2’,
  7. ‘timing’:‘B’
  8. ‘steps’: [{}],
  9. ‘parameter’: [{}]
  10.  
  11. ....
  12. ....
  13.  
  14. almost 600 values
  15. }
  16. }
  17. ]
  18.  
  19. ///In old dojo the code was like
  20. for (c = 0; c < itemList.length; c++) {
  21. item=itemList[c];
  22. var itemWatch = item.watch(function(name,oldVal,newVal) {
  23. }
  24. }
  25.  
  26. computed:{
  27. clonedItems: function(){
  28. return JSON.parse(JSON.stringify(this.itemList));
  29. }
  30. },
  31. watch:{
  32.  
  33. clonedItems:{
  34. deep: true,
  35. handler: function (val, oldVal) {
  36.  
  37.  
  38. This I tried which is working fine. But to get to know what value is changed of this will be heavy computation.this array can be of 100 items and each item have 600 items where we have arrays as well.
  39.  
  40.  
  41. Please guide what is the best way to achieve the similar functionality what we have
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement