Conflict between submenu using default-opened and vue Page Information Refresh in element-ui

<div id="body">
  <div>{{now}}</div>
    <el-menu :default-openeds="["1"]">
      <el-submenu index="1">
        <template slot="title"><i class="el-icon-menu"></i></template>
        <el-menu-item>option-1</el-menu-item>
        <el-menu-item-group title="option-1-1">
          <el-menu-item>option-1-1-1</el-menu-item>
          <el-menu-item>option-1-1-2</el-menu-item>
        </el-menu-item-group>
      </el-submenu>
      <el-submenu index="2">
        <template slot="title"><i class="el-icon-menu"></i></template>
        <el-menu-item>option-2</el-menu-item>
        <el-menu-item-group title="option-2-1">
          <el-menu-item>option-2-1-1</el-menu-item>
          <el-menu-item>option-2-1-2</el-menu-item>
        </el-menu-item-group>
      </el-submenu>
    </el-menu>
</div>

<script src="/scripts/vue.min.js"></script>
<script src="/element-ui-2.3.7/lib/index.js"></script>
<link rel="stylesheet" href="/element-ui-2.3.7/lib/theme-chalk/index.css" crossorigin="anonymous">

<script type="text/javascript">
var page = new Vue({
  el : "-sharpbody",
  data : {
    now : "",
  },
  mounted : function () {
    this.get_date();
  },
  methods : {
    get_date : function() {
        this.$set(this, "now", new Date().toLocaleString(undefined, {hour12:false}));
        setTimeout(() => {
          this.get_date();
        }, 1000);
    },
  },
});
</script>
The

code is shown in the figure, and the vue version is 2.5.16 Magi element version as shown in the figure.

The

page is displayed as

el-menu turns on option-1, and closes option-2 by default using default-openeds.
but there is a problem:
after clicking option-1 to close, time refresh will make option-1 automatically expand,
after clicking option-2 to open, time refresh will make option-2 automatically close.
at first glance, it seems that the default-openeds-related configuration has been refreshed when the display is refreshed after changing the now after using vue setTimeout.

how to solve this problem?

question add:

<div id="body">
  <div>{{now}}</div><el-button @click="get_date()"></el-button>
    <el-menu :default-openeds="["1"]">
      <el-submenu index="1">
        <template slot="title"><i class="el-icon-menu"></i></template>
        <el-menu-item>option-1</el-menu-item>
        <el-menu-item-group title="option-1-1">
          <el-menu-item>option-1-1-1</el-menu-item>
          <el-menu-item>option-1-1-2</el-menu-item>
        </el-menu-item-group>
      </el-submenu>
      <el-submenu index="2">
        <template slot="title"><i class="el-icon-menu"></i></template>
        <el-menu-item>option-2</el-menu-item>
        <el-menu-item-group title="option-2-1">
          <el-menu-item>option-2-1-1</el-menu-item>
          <el-menu-item>option-2-1-2</el-menu-item>
        </el-menu-item-group>
      </el-submenu>
    </el-menu>
</div>

<script src="/scripts/vue.min.js"></script>
<script src="/element-ui-2.3.7/lib/index.js"></script>
<link rel="stylesheet" href="/element-ui-2.3.7/lib/theme-chalk/index.css" crossorigin="anonymous">

<script type="text/javascript">
var page = new Vue({
  el : "-sharpbody",
  data : {
    now : "",
  },
  mounted : function () {
    this.get_date();
  },
  methods : {
    get_date : function() {
        this.$set(this, "now", new Date().toLocaleString(undefined, {hour12:false}));
    },
  },
});
</script>
Changing the button refresh time to

will also trigger this problem.

above.

Mar.10,2021

< el-menu: default-openeds= "['1']" > Don't write dead here, change it to the following

< el-menu: default-openeds= "open_list" >
var page = new Vue ({
.

data:{
...
    open_list: ["1"]
...
},

.
})
if you don't bind default-openeds to a variable of data in vue, even if you manually drop down another menu, the menu you select cannot be updated to a variable. In this way, if vue refreshes dom, at this time, the default expanded menu is still'1'

.
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-1ea5e4f-1d8c.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-1ea5e4f-1d8c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?