Move getProp and setProp to common.js

This commit is contained in:
Alex Ling
2020-12-11 09:46:56 +00:00
parent 280490fb36
commit dad02a2a30
4 changed files with 24 additions and 44 deletions
-22
View File
@@ -1,25 +1,3 @@
/**
* Set an alpine.js property
*
* @function setProp
* @param {string} key - Key of the data property
* @param {*} prop - The data property
*/
const setProp = (key, prop) => {
$('#root').get(0).__x.$data[key] = prop;
};
/**
* Get an alpine.js property
*
* @function getProp
* @param {string} key - Key of the data property
* @return {*} The data property
*/
const getProp = (key) => {
return $('#root').get(0).__x.$data[key];
};
/**
* Get the current queue and update the view
*