refreshBorder.js 481 B

12345678910111213141516171819202122232425262728
  1. const refreshBorder = {
  2. data () {
  3. return {
  4. updateKey: 0
  5. }
  6. },
  7. computed: {
  8. Data () {
  9. return JSON.parse(JSON.stringify(this.config))
  10. }
  11. },
  12. watch: {
  13. Data: {
  14. handler (newVal, oldVal) {
  15. this.$nextTick(() => {
  16. if ((newVal.w !== oldVal.w) || (newVal.h !== oldVal.h)) {
  17. this.updateKey = new Date().getTime()
  18. }
  19. })
  20. },
  21. deep: true
  22. }
  23. },
  24. methods: {
  25. }
  26. }
  27. export { refreshBorder }