free-fe-core-modules 0.0.23 → 0.0.25

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.
@@ -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
  });
@@ -17,7 +17,7 @@
17
17
  :readonly="Field.ReadOnly"
18
18
  :placeholder="$attrs.placeholder || $t(getModule('field-components').config['defaultInputFieldPlaceholder'])"
19
19
  hide-bottom-space
20
- @input="rangeChanged"
20
+ @update:modelValue="rangeChanged"
21
21
  type="number"
22
22
  v-model.number="range.min"
23
23
  :ref="`input_field_validator_${Field.Name || Field.Label}`"
@@ -43,7 +43,7 @@
43
43
  :readonly="Field.ReadOnly"
44
44
  :placeholder="$attrs.placeholder || $t(getModule('field-components').config['defaultInputFieldPlaceholder'])"
45
45
  hide-bottom-space
46
- @input="rangeChanged"
46
+ @update:modelValue="rangeChanged"
47
47
  type="number"
48
48
  v-model.number="range.max"
49
49
  :ref="`input_field_validator_${Field.Name || Field.Label}2`"
@@ -17,7 +17,7 @@
17
17
  :key="idx"
18
18
  :val="r.Name"
19
19
  :label="r.Name || idx"
20
- @input="setFieldData(r.Permission || {})"/>
20
+ @update:modelValue="setFieldData(r.Permission || {})"/>
21
21
  </div>
22
22
  <permission-editor
23
23
  v-if="Field && !Field.HideEditor"
@@ -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"
@@ -81,7 +81,7 @@
81
81
  <q-pagination
82
82
  v-model="searchData.page"
83
83
  :max="searchData.pages"
84
- @input="searchPaginationChanged"
84
+ @update:modelValue="searchPaginationChanged"
85
85
  boundary-numbers
86
86
  direction-links
87
87
  :max-pages="2"
@@ -147,7 +147,7 @@
147
147
  v-model="checked"
148
148
  :val="option.Value"
149
149
  :disable="Field.ReadOnly"
150
- @input="checkChanged(option.Value)"
150
+ @update:modelValue="checkChanged(option.Value)"
151
151
  ></q-checkbox>
152
152
  </div>
153
153
  </span>
@@ -33,7 +33,7 @@
33
33
  map-options
34
34
  :label="valuesList[index] ? '' : option.Placeholder"
35
35
  emit-value
36
- @input="selectionChanged(index)"
36
+ @update:modelValue="selectionChanged(index)"
37
37
  ref="fieldsToValid"
38
38
  v-bind="inputControlSettings"
39
39
  ></q-select>
@@ -13,7 +13,7 @@
13
13
  </span>
14
14
  <q-input v-else v-model="fieldData.value" hide-bottom-space
15
15
  :readonly="Field.ReadOnly"
16
- @input="$emit('input')"
16
+ @update:modelValue="$emit('input')"
17
17
  v-bind="inputControlSettings"
18
18
  ref="fieldToValid">
19
19
  <template v-slot:before v-if="Field.Label !== void 0">
@@ -18,7 +18,7 @@
18
18
  hide-bottom-space
19
19
  :options="minYearOptions"
20
20
  :readonly="Field.ReadOnly"
21
- @input="rangeChanged"
21
+ @update:modelValue="rangeChanged"
22
22
  v-bind="inputControlSettings"
23
23
  ref="input_field_validator_first"
24
24
  >
@@ -39,7 +39,7 @@
39
39
  hide-bottom-space
40
40
  :options="maxYearOptions"
41
41
  :readonly="Field.ReadOnly"
42
- @input="rangeChanged"
42
+ @update:modelValue="rangeChanged"
43
43
  v-bind="inputControlSettings"
44
44
  ref="input_field_validator_second"
45
45
  />
@@ -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.23",
3
+ "version": "0.0.25",
4
4
  "main": "index.js",
5
5
  "repository": "https://github.com/freeeis/free-fe-core-modules.git",
6
6
  "author": "zhiquan",
@@ -74,7 +74,7 @@
74
74
  <q-pagination
75
75
  v-model="data.page"
76
76
  :max="data.pages"
77
- @input="paginationChanged"
77
+ @update:modelValue="paginationChanged"
78
78
  boundary-links
79
79
  boundary-numbers
80
80
  direction-links
@@ -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,