How to use set () to add attributes to determine how to optimize to the simplest?

use the set () method to store the status of the payment, and then assign values to the button and title according to the status

data() {
    return {
      val: "",
      paymentState: "",
      goBackBtn: "",
      anewPayBtn: "",
      paymentTitle: {
        payAchieve: "",
        payCancel: "",
        payFailure: "",
      },
    };
  },

methods:{
    operate() {
          const _this = this;
          success() {
          // 
          _this.$set(_this.payVal, "seate", "payAchieve");

          if (_this.payVal.seate) {
            _this.val = _this.paymentTitle.payAchieve;
            _this.getPayState();
          }
        },
        cancel() {
          // 
          _this.$set(_this.payVal, "seate", "payCancel");

          if (_this.payVal.seate) {
            _this.paymentState = _this.anewPayBtn;
            _this.val = _this.paymentTitle.payCancel;
          }
        },
    },
    
    getPayState() {
        // 
        this.$set(this.payVal, "seate", "payFailure");

        if (this.payVal.seate) {
          this.paymentState = this.paymentTitle.payFailure;
          this.val = this.paymentTitle.payCancel;
        }
    }
}
May.26,2022

use calculation properties?

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3bcc7-4ef28.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3bcc7-4ef28.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?