Can I get the value of vuex in html?

is there a html file in the vu project? do you want to fetch the data in vuex and put it in title? I can do it with localStorage, but the effect is not good

Jul.24,2021

Yes, if it is a pure html page, remember to introduce various library files, and then instantiate a Vue object object to mount the template, you can take the value of $store.state in html.

<div id="component">
   {{ msg }}
</div>

<script>
new Vue({
  el: '-sharpcomponent',
  data () {
    return {
      msg: $store.state.msg
    }
})
</script>

$store.state.xxx


as long as you can get an instance of vuex's store, you can get any value in store

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