summaryrefslogtreecommitdiffstats
path: root/assets/js/vue-eeprom.js
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--assets/js/vue-eeprom.js28
1 files changed, 28 insertions, 0 deletions
diff --git a/assets/js/vue-eeprom.js b/assets/js/vue-eeprom.js
new file mode 100644
index 0000000..63f9bfb
--- /dev/null
+++ b/assets/js/vue-eeprom.js
@@ -0,0 +1,28 @@
+const { createApp } = Vue;
+const { loadModule } = window['vue3-sfc-loader'];
+const options = {
+ moduleCache: {
+ vue: Vue,
+ },
+ getFile(url) {
+ return fetch(url).then((resp) =>
+ resp.ok ? resp.text() : Promise.reject(resp)
+ );
+ },
+ addStyle(styleStr) {
+ const style = document.createElement('style');
+ style.textContent = styleStr;
+ const ref = document.head.getElementsByTagName('style')[0] || null;
+ document.head.insertBefore(style, ref);
+ },
+ log(type, ...args) {
+ console.log(type, ...args);
+ },
+};
+const app = createApp({
+ components: {
+ VueLantiqEeprom: Vue.defineAsyncComponent(() =>
+ loadModule('/assets/js/vue/vue-lantiq-eeprom.vue', options)
+ ),
+ },
+}).mount('#app'); \ No newline at end of file