free-fe-core-modules 0.0.10 → 0.0.12

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,6 +1,11 @@
1
1
  <template>
2
2
  <div>
3
- <component v-if="theme" :is="themeComponents[theme]"></component>
3
+ <div class="theme-components-list" v-if="theme">
4
+ <component
5
+ v-for="(tc, idx) in themeComponents[theme]"
6
+ :key="idx"
7
+ :is="tc"></component>
8
+ </div>
4
9
  <q-btn
5
10
  flat
6
11
  :icon="icon"
@@ -46,7 +51,12 @@ export default defineComponent({
46
51
  Object.keys(this.ctx.modules)
47
52
  .filter((m) => this.ctx.modules[m].IsTheme)
48
53
  .forEach((m) => {
49
- Object.assign(components, this.ctx.modules[m].components || {});
54
+ // Object.assign(components, this.ctx.modules[m].components || {});
55
+ // can have same theme from diff modules
56
+ Object.keys(this.ctx.modules[m].components || {}).forEach((ck) => {
57
+ components[ck] = components[ck] || [];
58
+ components[ck].push(this.ctx.modules[m].components[ck]);
59
+ });
50
60
  });
51
61
 
52
62
  return components;
@@ -1,7 +1,7 @@
1
1
  import { ref, unref, getCurrentInstance, watch, watchEffect } from "vue";
2
2
 
3
3
  export const objectDataProps = {
4
- GetData: Function,
4
+ GetData: [Function, Object, Array],
5
5
  Bus: Object,
6
6
  modelValue: {},
7
7
  autoGet: { type: Boolean, default: true },
@@ -22,9 +22,9 @@ export function useObjectData(props, ctx) {
22
22
  })
23
23
 
24
24
  // call after refresh when all function got called
25
- watchEffect(() => {
26
- if (vm.afterRefresh && callsLeft.value <= 0) {
27
- vm.afterRefresh(...args);
25
+ watch(() => callsLeft.value, () => {
26
+ if (typeof vm.afterRefresh === 'function' && callsLeft.value <= 0) {
27
+ vm.afterRefresh();
28
28
  }
29
29
  })
30
30
 
@@ -138,7 +138,7 @@ export default defineComponent({
138
138
  watch(hasThis, (v) => {
139
139
  if (v) {
140
140
  // checked from unchecked
141
- fieldData.value = fieldData.value || {};
141
+ fieldData.value = fieldData.value || { has: true };
142
142
  } else {
143
143
  // unchecked from checked
144
144
  fieldData.value = undefined;
@@ -71,4 +71,24 @@ export default {
71
71
  删除确认: "Do you want to delete {type} '{name}'?",
72
72
  菜单: 'menu',
73
73
  字典项: 'dictionary',
74
+
75
+ 自定义: 'customize',
76
+ 自定义路径: 'customized path',
77
+ 系统管理: 'system management',
78
+ 菜单管理: 'menu management',
79
+ 返回: 'back',
80
+ 暂无数据: 'NO DATA',
81
+ 审核中: 'under review',
82
+ 审核通过: 'reviewed',
83
+ 审核不通过: 'review failed',
84
+ 添加: 'add',
85
+ 字典管理: 'dictionary management',
86
+ 日期: 'date',
87
+ 代码: 'code',
88
+ 信息: 'info',
89
+ 描述: 'description',
90
+ 错误代码管理: 'error code management',
91
+ 代码数: '',
92
+ 系统设置: 'system settings',
93
+ 保存: 'save',
74
94
  }
@@ -75,4 +75,24 @@ export default {
75
75
  菜单: '菜单',
76
76
  字典项: '字典项',
77
77
 
78
+ 自定义: '自定义',
79
+ 自定义路径: '自定义路径',
80
+ 系统管理: '系统管理',
81
+ 菜单管理: '菜单管理',
82
+ 返回: '返回',
83
+ 暂无数据: '暂 无 数 据',
84
+ 审核中: '审核中',
85
+ 审核通过: '审核通过',
86
+ 审核不通过: '审核不通过',
87
+ 添加: '添加',
88
+ 字典管理: '字典管理',
89
+ 日期: '日期',
90
+ 代码: '代码',
91
+ 信息: '信息',
92
+ 描述: '描述',
93
+ 错误代码管理: '错误代码管理',
94
+ 代码数: '代码数',
95
+ 系统设置: '系统设置',
96
+ 保存: '保存',
97
+
78
98
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "free-fe-core-modules",
3
- "version": "0.0.10",
3
+ "version": "0.0.12",
4
4
  "main": "index.js",
5
5
  "repository": "https://github.com/freeeis/free-fe-core-modules.git",
6
6
  "author": "zhiquan",