free-fe-core-modules 0.0.22 → 0.0.24

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.
@@ -14,7 +14,7 @@
14
14
  <template v-slot:header>
15
15
  <div class="header row full-width">
16
16
  <q-item-section v-if="showIcon && m.Icon" avatar>
17
- <q-icon class="leaf-icon" :name="m.Icon"></q-icon>
17
+ <q-icon class="leaf-icon" :name="m.Icon" :class="{'svg-icon': m.Icon && m.Icon.endsWith('.svg')}"></q-icon>
18
18
  </q-item-section>
19
19
  <q-item-section>
20
20
  <div class="q-item__label leaf-label">{{translate ? $t(m.Label) : m.Label}}</div>
@@ -88,8 +88,13 @@ export default defineComponent({
88
88
  });
89
89
  </script>
90
90
 
91
- <style lang="sass">
91
+ <style lang="sass" scoped>
92
92
  .leveled-menu
93
- .simple-expand-icon
93
+ :deep(.simple-expand-icon)
94
94
  display: none
95
+ .svg-icon
96
+ overflow: hidden
97
+ :deep(img)
98
+ filter: drop-shadow(1000px 0 0 currentColor)
99
+ transform: translateX(-1000px)
95
100
  </style>
@@ -330,6 +330,12 @@ export default defineComponent({
330
330
  btnCancel,
331
331
  btn_ok,
332
332
  timeout_counter,
333
+
334
+ onInputFieldInput: (field) => {
335
+ if(field.onInput) {
336
+ field.onInput(field);
337
+ }
338
+ }
333
339
  };
334
340
  },
335
341
  });
@@ -26,6 +26,7 @@
26
26
  Label: scope.Label,
27
27
  Name: `Scope.${scope.Field}`,
28
28
  Options: scope.Options || [],
29
+ Multiple: scope.Multiple || false,
29
30
  }"
30
31
  :values="fieldData"
31
32
  @input="scopeChanged"
@@ -184,16 +184,19 @@ export function useUploader(props, ctx) {
184
184
  switch (fExt) {
185
185
  case 'doc':
186
186
  case 'docx':
187
+ case 'msword':
187
188
  case 'vnd.openxmlformats-officedocument.wordprocessingml.document':
188
189
  type = 'far fa-file-word';
189
190
  break;
190
191
  case 'xls':
191
192
  case 'xlsx':
193
+ case 'vnd.ms-excel':
192
194
  case 'vnd.openxmlformats-officedocument.spreadsheetml.sheet':
193
195
  type = 'far fa-file-excel';
194
196
  break;
195
197
  case 'ppt':
196
198
  case 'pptx':
199
+ case 'vnd.ms-powerpoint':
197
200
  case 'vnd.openxmlformats-officedocument.presentationml.presentation':
198
201
  type = 'far fa-file-powerpoint';
199
202
  break;
package/index.js CHANGED
@@ -65,11 +65,9 @@ const filters = {
65
65
  padding: (d, p = 2, c = '0') => {
66
66
  if (!d) d = '';
67
67
 
68
- for (let i = 0; i < (p - d.toString().length); i += 1) {
69
- d = `${c}${d}`;
70
- }
68
+ const fullStr = `${Array.from({length: p}, () => c).join('')}${d.toString()}`;
71
69
 
72
- return d;
70
+ return fullStr.substring(fullStr.length - p, fullStr.length);
73
71
  },
74
72
  normalDate: (d) => {
75
73
  if (!d) return '';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "free-fe-core-modules",
3
- "version": "0.0.22",
3
+ "version": "0.0.24",
4
4
  "main": "index.js",
5
5
  "repository": "https://github.com/freeeis/free-fe-core-modules.git",
6
6
  "author": "zhiquan",
@@ -87,7 +87,8 @@
87
87
  </template>
88
88
 
89
89
  <script>
90
- import { defineComponent } from 'vue';
90
+ import { defineComponent, watch } from 'vue';
91
+ import { useI18n } from 'vue-i18n';
91
92
  import { useObjectData, objectDataProps } from '../../composible/useObjectData';
92
93
  import { updateErrorCode, updateDescription } from '../../router/error/api';
93
94
 
@@ -103,6 +104,11 @@ export default defineComponent({
103
104
  refreshData,
104
105
  } = useObjectData(props, ctx);
105
106
 
107
+ const i18n = useI18n();
108
+ watch(i18n.locale, () => {
109
+ refreshData();
110
+ });
111
+
106
112
  return {
107
113
  data,
108
114
  refreshData,
@@ -335,9 +335,3 @@ export default defineComponent({
335
335
  },
336
336
  });
337
337
  </script>
338
-
339
- <style lang="scss" scoped>
340
- .admin-menu-mgmt-wrapper {
341
- background: $background;
342
- }
343
- </style>