Actions in created and mounted are triggered when vue is refreshed, but the style is removed when hot updates are saved after something has been modified.

effect of the page when the vue file is refreshed:

clipboard.png

:


:

clipboard.png

the inline style is gone

what is the reason for this?

Mar.17,2021

 created() {
    Vue.nextTick(() => {
      let select_created01 = document.getElementById("select01");
      select_created01.style.color = "red";
    });
  },
  mounted() {
    // alert("hah");
    let select_mounted01 = document.getElementById("select01");
    select_mounted01.style.backgroundColor = "green";
    console.log(select_mounted01);
    this.$nextTick(() => {});
  },
Menu