scrollLeft in vue project can only be obtained through click event. It is invalid to try through refs.xxx.click ().
scrollLeft in vue project can only be obtained through click event. It is invalid to try through refs.xxx.click ().
if it's just a simulated click:
var e = document.createEvent('MouseEvent');
e.initEvent('click', false, false);
this.$refs.test.$el.dispatchEvent(e);
mounted () {
console.log(this.$refs.test.$el.offsetLeft)
}
the problem is not clear, it is best to provide online demo links. Maybe it's the loading problem. Why don't you try to set it in the setTimeout function?
just write a function to execute, why do you have to go to click?
nextTick try
the page has been rendered after calling the method in actions to get the data asynchronously. And reported an error. ...
how do I ensure that only the amount can be entered in the input for mobile vue projects? Including numbers and decimal points. It is found that if you adjust type= tel , there are only numbers but no decimal point, and type= number has other symbo...
list data formats first [{username: "1", content: "2", dataTime: 1534128070979},{username: "11", content: "22", dataTime: 1534128070979}] get the data from vuex and render it in a loop. DataTime is a timestamp,...
for SPA pages, the traditional multi-page application process is as follows: enter the URL, send the url corresponding to the url, to a different controller, through regular matching, and then return the data to the front end at the back end. so for SPA...
what I want to make is that is expected to arrive at the store with a fixed time of two hours, time period can be selected by yourself, after selection, there is a yellow horizontal line to select these two time periods, can you tell me how to do...