1. The existence of the cache data:
sessionStorage.setItem ( 'name', JSON.stringify (data));
2. Take the data from the cache:
JSON.parse(sessionStorage.getItem('名字'));
sessionStorage.removeItem('名字');
this.$router.replace({ query });
3. Dynamic name class name
:class="['right-icon',(topMsg.warnType==='2' || topMsg.topMsg==='3')?'warn':'remind']"
: class = "[ 'default name', {{ 'border': isShowMore}
}]"
4. The array of objects to replace a key name:
JSON.parse (JSON.stringify (item) .replace (/ "roleList (need to replace the key)": / g, ' "tagList (key required)': '));
5. Scroll Top
this.$refs.list.$el.scrollIntoView();
6. anchor (to move to a letter) to scroll through the list
document.querySelectorAll('.sc-scroller-module')[i].scrollIntoView();
7.js change css
Element .style.top = `$ {top + height / 2 - iconHeight / 2} px`
8. Analyzing models is ios or Andrews
/android/gi.test(navigator.userAgent)
9.html Back
$router.back()