Currently, I am utilizing Firefox 56 with the setting dom.moduleScripts.enabled
enabled. This configuration allows me to engage with native ES6 modules seamlessly.
In my Vue2 component, there is a method that I have defined:
import StorageZonesAjaxMethods from '../../ajax/storage-zones.js';
....
methods: {
updateList()
{
//console.log(StorageZonesAjaxMethods);
StorageZonesAjaxMethods.getList();//function(response) { this.list = response.data.payload;});
},
},
The class containing these methods looks like this:
export default new class StorageZonesAjaxMethods {
static getItem(id, then)
{
axios.get(`${Config.apiBaseUrl}/storage-zones/${id}`)
.then(response => then);
}
static getList(then)
{
alert('in get list');
axios.get(`${Config.apiBaseUrl}/storage-zones`)
.then(response => then);
}
When running this code, I encounter the error message
"TypeError: (intermediate value).getList is not a function"
in Firefox. Surprisingly, the console.log statement does show it as a function, albeit within a constructor. This situation has left me puzzled about what might be happening. Any insights?