0๐
const q = (ph) => {
const batches = [3, 3, 2, 2];
const template = '({0}) - {1} - {2} - {3}';
let index = 0, summator = 0;
let data = template;
batches.forEach(x => {
const part = ph.substring(summator, x + summator);
data = data.replace(`{${index}}`, part);
index++;
summator += x;
});
return data;
}
and then include it in your data:
abouts:[{phone:q('1234567890'),mail:''},{phone:'',mail:q('')}]
simple way, working. You can add trimming if phone number smaller than 10 digits
- [Vuejs]-How to configure Azure AD authentication in Hybrid ASP.NET Core MVC (backend) and Vuejs SPA (frontend)?
- [Vuejs]-Unexpected router redirection
0๐
I solved the problem. If you have the same problem you can use vue-mask package.
- [Vuejs]-Vue.js Event passthrough triggering 'click' event and named event when I only want the named event
- [Vuejs]-Problems with make responsive map areas in vue 3
Source:stackexchange.com