free-fe-core-modules 0.0.9 → 0.0.10

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.
@@ -102,7 +102,7 @@
102
102
  </template>
103
103
 
104
104
  <script>
105
- import { defineComponent, ref, computed } from 'vue';
105
+ import { defineComponent, ref, computed, watch } from 'vue';
106
106
  import { useFormValidator } from '../../composible/useFormValidator';
107
107
  import FreeField from '../../free-field/composible/fieldWrapper';
108
108
  import EIcon from '../Basic/EIcon.vue';
@@ -1,4 +1,4 @@
1
- import { ref, getCurrentInstance, watch, watchEffect, defineEmits } from "vue";
1
+ import { ref, unref, getCurrentInstance, watch, watchEffect } from "vue";
2
2
 
3
3
  export const objectDataProps = {
4
4
  GetData: Function,
@@ -44,12 +44,12 @@ export function useObjectData(props, ctx) {
44
44
 
45
45
  if (typeof getData === 'function') {
46
46
  Promise.resolve(getData(...args)).then((d) => {
47
- Object.assign(data.value, d.value || d);
47
+ Object.assign(data.value, unref(d));
48
48
  }).finally(() => {
49
49
  callsLeft.value --;
50
50
  });
51
51
  } else {
52
- Object.assign(data.value, getData.value || getData);
52
+ Object.assign(data.value, unref(getData));
53
53
  callsLeft.value --;
54
54
  }
55
55
  }
@@ -67,4 +67,8 @@ export default {
67
67
  validatorPwd3Description: "Passwords 6-16 characters in length, must contain numbers, uppercase letters, lowercase letters, special characters",
68
68
  validatorPwd4Name: "Password (strength four)",
69
69
  validatorPwd4Description: "A password of 6-16 digits in length must contain numbers, at least 2 uppercase letters, at least 2 lowercase letters, special characters",
70
- }
70
+
71
+ 删除确认: "Do you want to delete {type} '{name}'?",
72
+ 菜单: 'menu',
73
+ 字典项: 'dictionary',
74
+ }
@@ -1,73 +1,78 @@
1
1
  export default {
2
- justNow: '刚刚',
3
- secondsAgo: '秒之前',
4
- minutesAgo: '分钟之前',
5
- hoursAgo: '小时之前',
6
- daysAgo: '天之前',
7
- monthsAgo: '月之前',
8
- yearsAgo: '年之前',
9
- SwitchTheme: '切换样式',
2
+ justNow: '刚刚',
3
+ secondsAgo: '秒之前',
4
+ minutesAgo: '分钟之前',
5
+ hoursAgo: '小时之前',
6
+ daysAgo: '天之前',
7
+ monthsAgo: '月之前',
8
+ yearsAgo: '年之前',
9
+ SwitchTheme: '切换样式',
10
10
 
11
- validatorNotEmptyName: "非空",
12
- validatorNotEmptyDescription: "不能为空",
13
- validatorMobilePhoneName: "手机号",
14
- validatorMobilePhoneDescription: "中国手机号码格式",
15
- validatorEmailName: "邮箱",
16
- validatorEmailDescription: "",
17
- validatorPhoneOrEmailName: "手机号或邮箱",
18
- validatorPhoneOrEmailDescription: "",
19
- validatorChinaIDNumberName: "中国身份证号码",
20
- validatorChinaIDNumberDescription: "",
11
+ validatorNotEmptyName: "非空",
12
+ validatorNotEmptyDescription: "不能为空",
13
+ validatorMobilePhoneName: "手机号",
14
+ validatorMobilePhoneDescription: "中国手机号码格式",
15
+ validatorEmailName: "邮箱",
16
+ validatorEmailDescription: "",
17
+ validatorPhoneOrEmailName: "手机号或邮箱",
18
+ validatorPhoneOrEmailDescription: "",
19
+ validatorChinaIDNumberName: "中国身份证号码",
20
+ validatorChinaIDNumberDescription: "",
21
21
 
22
- validatorOnlyNumberName: "只能是数字",
23
- validatorOnlyNumberDescription: "",
24
- validatorOnlyCharName: "只能是字母",
25
- validatorOnlyCharDescription: "",
26
- validatorOnlyUpCharName: "只能是大写字母",
27
- validatorOnlyUpCharDescription: "",
28
- validatorOnlyLowerCharName: "只能是小写字母",
29
- validatorOnlyLowerCharDescription: "",
30
- validatorOnlyChineseName: "只能是中文",
31
- validatorOnlyChineseDescription: "",
32
- validatorOnlyCCName: "只能是中文或字母",
33
- validatorOnlyCCDescription: "",
34
- validatorOnlyCCNName: "只能是中文或字母或数字",
35
- validatorOnlyCCNDescription: "",
36
- validatorOnlyCNName: "只能是中文或数字",
37
- validatorOnlyCNDescription: "",
38
- validatorOnlyCNUName: "只能是中文或数字或下划线",
39
- validatorOnlyCNUDescription: "",
40
- validatorOnlyCNSName: "只能是中文或数字或特殊字符",
41
- validatorOnlyCNSDescription:
42
- `只能是中文或数字或("."、{'@'}、"<"、">"、"_"、"?")`,
22
+ validatorOnlyNumberName: "只能是数字",
23
+ validatorOnlyNumberDescription: "",
24
+ validatorOnlyCharName: "只能是字母",
25
+ validatorOnlyCharDescription: "",
26
+ validatorOnlyUpCharName: "只能是大写字母",
27
+ validatorOnlyUpCharDescription: "",
28
+ validatorOnlyLowerCharName: "只能是小写字母",
29
+ validatorOnlyLowerCharDescription: "",
30
+ validatorOnlyChineseName: "只能是中文",
31
+ validatorOnlyChineseDescription: "",
32
+ validatorOnlyCCName: "只能是中文或字母",
33
+ validatorOnlyCCDescription: "",
34
+ validatorOnlyCCNName: "只能是中文或字母或数字",
35
+ validatorOnlyCCNDescription: "",
36
+ validatorOnlyCNName: "只能是中文或数字",
37
+ validatorOnlyCNDescription: "",
38
+ validatorOnlyCNUName: "只能是中文或数字或下划线",
39
+ validatorOnlyCNUDescription: "",
40
+ validatorOnlyCNSName: "只能是中文或数字或特殊字符",
41
+ validatorOnlyCNSDescription:
42
+ `只能是中文或数字或("."、{'@'}、"<"、">"、"_"、"?")`,
43
43
 
44
- validatorOnlyIntegerName: "只能是整数",
45
- validatorOnlyIntegerDescription: "",
46
- validatorOnlyPIName: "只能是正整数",
47
- validatorOnlyPIDescription: "",
48
- validatorOnlyPIZName: "只能是正整数或零",
49
- validatorOnlyPIZDescription: "",
50
- validatorOnlyNIName: "只能是负整数",
51
- validatorOnlyNIDescription: "",
52
- validatorOnlyNIZName: "只能是负整数或零",
53
- validatorOnlyNIZDescription: "",
44
+ validatorOnlyIntegerName: "只能是整数",
45
+ validatorOnlyIntegerDescription: "",
46
+ validatorOnlyPIName: "只能是正整数",
47
+ validatorOnlyPIDescription: "",
48
+ validatorOnlyPIZName: "只能是正整数或零",
49
+ validatorOnlyPIZDescription: "",
50
+ validatorOnlyNIName: "只能是负整数",
51
+ validatorOnlyNIDescription: "",
52
+ validatorOnlyNIZName: "只能是负整数或零",
53
+ validatorOnlyNIZDescription: "",
54
54
 
55
- validatorUrlName: "URL地址",
56
- validatorUrlDescription: "",
57
- validatorOfficePhoneName: "固定电话号码",
58
- validatorOfficePhoneDescription: "固定电话号码(区号-号码)",
59
- validatorChinaZipName: "中国邮政编码",
60
- validatorChinaZipDescription: "",
55
+ validatorUrlName: "URL地址",
56
+ validatorUrlDescription: "",
57
+ validatorOfficePhoneName: "固定电话号码",
58
+ validatorOfficePhoneDescription: "固定电话号码(区号-号码)",
59
+ validatorChinaZipName: "中国邮政编码",
60
+ validatorChinaZipDescription: "",
61
+
62
+ validatorPwd1Name: "密码(强度一)",
63
+ validatorPwd1Description: "长度在6-16位之间的任意密码",
64
+ validatorPwd2Name: "密码(强度二)",
65
+ validatorPwd2Description:
66
+ "长度在6-16位的密码,必须包含数字、大写字母、小写字母",
67
+ validatorPwd3Name: "密码(强度三)",
68
+ validatorPwd3Description:
69
+ "长度在6-16位的密码,必须包含数字、大写字母、小写字母、特殊字符",
70
+ validatorPwd4Name: "密码(强度四)",
71
+ validatorPwd4Description:
72
+ "长度在6-16位的密码,必须包含数字、至少2个大写字母、至少2个小写字母、特殊字符",
73
+
74
+ 删除确认: "确认删除{type}'{name}'吗?",
75
+ 菜单: '菜单',
76
+ 字典项: '字典项',
61
77
 
62
- validatorPwd1Name: "密码(强度一)",
63
- validatorPwd1Description: "长度在6-16位之间的任意密码",
64
- validatorPwd2Name: "密码(强度二)",
65
- validatorPwd2Description:
66
- "长度在6-16位的密码,必须包含数字、大写字母、小写字母",
67
- validatorPwd3Name: "密码(强度三)",
68
- validatorPwd3Description:
69
- "长度在6-16位的密码,必须包含数字、大写字母、小写字母、特殊字符",
70
- validatorPwd4Name: "密码(强度四)",
71
- validatorPwd4Description:
72
- "长度在6-16位的密码,必须包含数字、至少2个大写字母、至少2个小写字母、特殊字符",
73
78
  }
package/index.js CHANGED
@@ -310,6 +310,7 @@ export default (app, root) => {
310
310
  Name: "Enabled",
311
311
  Label: "启用",
312
312
  Type: "Boolean",
313
+ showLabel: true,
313
314
  },
314
315
  {
315
316
  Name: "Description",
@@ -394,4 +395,4 @@ export default (app, root) => {
394
395
  validatorPwd4: (d) => /^.*(?=.{6,16})(?=.*\d)(?=.*[A-Z]{2,})(?=.*[a-z]{2,})(?=.*[!@#$%^&*?\(\)]).*$/.test(d),
395
396
  },
396
397
  }
397
- };
398
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "free-fe-core-modules",
3
- "version": "0.0.9",
3
+ "version": "0.0.10",
4
4
  "main": "index.js",
5
5
  "repository": "https://github.com/freeeis/free-fe-core-modules.git",
6
6
  "author": "zhiquan",
@@ -237,7 +237,7 @@ export default defineComponent({
237
237
 
238
238
  this.$MsgDialog({
239
239
  type: '',
240
- content: `确认要删除字典项 '${n.Name}' 吗?`,
240
+ content: this.$t('删除确认', { type: this.$t('字典项'), name: n.Name }),
241
241
  canCancel: true,
242
242
  okText: this.$t('okButtonText'),
243
243
  cancelText: this.$t('cancelButtonText'),
@@ -116,7 +116,7 @@ export default defineComponent({
116
116
  selectedMenuNode,
117
117
  editingMenu,
118
118
  menuFields,
119
- data,
119
+ data,
120
120
  refreshData,
121
121
  validate,
122
122
  };
@@ -226,7 +226,7 @@ export default defineComponent({
226
226
 
227
227
  this.$MsgDialog({
228
228
  type: '',
229
- content: `确认要删除菜单 '${n.Label}' 吗?`,
229
+ content: this.$t('删除确认', {type: this.$t('菜单'), name: n.Label}),
230
230
  canCancel: true,
231
231
  okText: this.$t('okButtonText'),
232
232
  cancelText: this.$t('cancelButtonText'),