allMoreSelectInput.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. export default {
  2. data() {
  3. return {
  4. isActive: false,
  5. isFocus: false,
  6. isActiveOne: false,
  7. isFocusOne: false,
  8. };
  9. },
  10. methods: {
  11. // 计算重量
  12. countWeight(){
  13. let ratio = this.customData.ratio;
  14. let smallCount = this.customData.smallCount;
  15. let bigCount = this.customData.bigCount;
  16. let weight = this.customData.weight;
  17. },
  18. // 离开全选input
  19. moveAllInput(e){
  20. this.isActive=false;
  21. this.isFocus=false;
  22. if(e==''){return}
  23. this.customData.bigCount = e;
  24. this.countWeight();
  25. },
  26. //input点击删除按键
  27. deleteInputVal(){
  28. this.isActive=false;
  29. this.customData.bigCount = '';
  30. },
  31. // 选中input
  32. initAllInput(){
  33. this.isActive=true;
  34. this.isFocus=true;
  35. },
  36. // 离开全选input
  37. moveAllInputOne(e){
  38. this.isActiveOne=false;
  39. this.isFocusOne=false;
  40. if(e==''){return}
  41. this.customData.smallCount = e;
  42. this.countWeight();
  43. },
  44. //input点击删除按键
  45. deleteInputValOne(){
  46. this.isActiveOne=false;
  47. this.customData.smallCount = '';
  48. },
  49. // 选中input
  50. initAllInputOne(){
  51. this.isActiveOne=true;
  52. this.isFocusOne=true;
  53. },
  54. }
  55. };