free-fe-core-modules 0.0.12 → 0.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,9 @@
1
1
  <template>
2
- <div>
2
+ <div :style="{visibility: hide ? 'hidden' : 'visible'}">
3
3
  <div class="theme-components-list" v-if="theme">
4
- <component
5
- v-for="(tc, idx) in themeComponents[theme]"
6
- :key="idx"
4
+ <component
5
+ v-for="(tc, idx) in themeComponents[theme]"
6
+ :key="idx"
7
7
  :is="tc"></component>
8
8
  </div>
9
9
  <q-btn
@@ -38,6 +38,7 @@ export default defineComponent({
38
38
  props: {
39
39
  icon: { type: String, default: 'fas fa-palette' },
40
40
  dense: { type: Boolean, default: true },
41
+ hide: { type: Boolean, default: false },
41
42
  },
42
43
  data() {
43
44
  return {
@@ -54,8 +55,9 @@ export default defineComponent({
54
55
  // Object.assign(components, this.ctx.modules[m].components || {});
55
56
  // can have same theme from diff modules
56
57
  Object.keys(this.ctx.modules[m].components || {}).forEach((ck) => {
58
+ const theComp = this.ctx.modules[m].components[ck];
57
59
  components[ck] = components[ck] || [];
58
- components[ck].push(this.ctx.modules[m].components[ck]);
60
+ components[ck].push(typeof theComp === 'function' ? theComp() : theComp);
59
61
  });
60
62
  });
61
63
 
@@ -87,7 +89,7 @@ export default defineComponent({
87
89
  },
88
90
  created() {
89
91
  const appStore = useAppStore();
90
- this.theme = appStore.theme || (this.themes && (this.themes.length > 0) && this.themes[0]);
92
+ this.theme = appStore.theme || this.ctx.config.defaultTheme || (this.themes && (this.themes.length > 0) && this.themes[0]);
91
93
  },
92
94
  });
93
95
  </script>
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "free-fe-core-modules",
3
- "version": "0.0.12",
3
+ "version": "0.0.14",
4
4
  "main": "index.js",
5
5
  "repository": "https://github.com/freeeis/free-fe-core-modules.git",
6
6
  "author": "zhiquan",
7
7
  "license": "UNLICENSED",
8
8
  "dependencies": {
9
- "@tinymce/tinymce-vue": "^5.0.1"
9
+ "@tinymce/tinymce-vue": "^5.1.0"
10
10
  }
11
11
  }