slice()
a = '1234'
a.slice(1) // a log '234'
scrollLeft // element.scrollLeft 获取该节点的横向滚动条偏移位置
watch:{
$route(to, from){
console.log(to.path)
}
}
element.onclick = function(){}
document.addEventListener('DOMContentLoaded', function () {
var button = document.getElementById('slide');
button.onclick = function () {
document.getElementById('container').scrollLeft += 20;
};
}, false);复制代码
转载于:https://juejin.im/post/5b481aaa6fb9a04fb614d74b