free-fe-core-modules 0.0.7 → 0.0.8
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.
- package/README.md +2 -2
- package/components/Dialog/BasicDialog.vue +3 -1
- package/components/SlidingNews/index.vue +12 -23
- package/free-field/Fields/ApiCall.js +1 -4
- package/free-field/Fields/Boolean.js +1 -4
- package/free-field/Fields/Check.js +1 -4
- package/free-field/Fields/Column.vue +126 -0
- package/free-field/Fields/Date.js +1 -4
- package/free-field/Fields/DateRange.js +1 -4
- package/free-field/Fields/DynamicList.js +1 -4
- package/free-field/Fields/Number.js +1 -4
- package/free-field/Fields/NumberRange.vue +145 -0
- package/free-field/Fields/Password.js +1 -4
- package/free-field/Fields/Row.vue +126 -0
- package/free-field/Fields/String.js +1 -4
- package/free-field/Fields/Tabs.vue +162 -0
- package/free-field/Fields/Text.js +1 -4
- package/free-field/Fields/Year.js +1 -4
- package/free-field/Fields/index.js +2 -38
- package/free-field/composible/useFreeField.js +0 -45
- package/i18n/en-us/index.js +64 -67
- package/index.js +32 -50
- package/package.json +1 -1
- package/router/dict/data.js +0 -4
- package/router/error/data.js +0 -4
- package/router/menu/data.js +0 -4
- package/router/system/data.js +3 -4
- package/view/dict/index.vue +14 -2
- package/view/menu/index.vue +0 -3
package/router/system/data.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
// import Vue from 'vue';
|
|
2
1
|
import { getConfig } from './api';
|
|
2
|
+
import { i18n } from '@/boot/i18n';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
const {global:{t}} = i18n;
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
7
|
systemConfig: () => ({
|
|
@@ -28,7 +28,7 @@ export default {
|
|
|
28
28
|
Index: i + 1,
|
|
29
29
|
Actions: [
|
|
30
30
|
{
|
|
31
|
-
Label: '保存',
|
|
31
|
+
Label: t('保存'),
|
|
32
32
|
Action: 'save',
|
|
33
33
|
},
|
|
34
34
|
],
|
|
@@ -41,6 +41,5 @@ export default {
|
|
|
41
41
|
|
|
42
42
|
return data;
|
|
43
43
|
}),
|
|
44
|
-
// Bus: bus,
|
|
45
44
|
}),
|
|
46
45
|
};
|
package/view/dict/index.vue
CHANGED
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
v-if="field.Name !== 'Name' || !selectedDictNode.Parent"
|
|
54
54
|
:values="editingDict"
|
|
55
55
|
:Field="field"
|
|
56
|
+
ref="fieldsToValidate"
|
|
56
57
|
></free-field>
|
|
57
58
|
</div>
|
|
58
59
|
|
|
@@ -98,10 +99,11 @@
|
|
|
98
99
|
</template>
|
|
99
100
|
|
|
100
101
|
<script>
|
|
101
|
-
import { defineComponent } from 'vue';
|
|
102
|
+
import { defineComponent, watch } from 'vue';
|
|
102
103
|
import { copyToClipboard } from 'quasar';
|
|
103
104
|
import { requests } from '@/boot/axios';
|
|
104
105
|
import { useObjectData, objectDataProps } from '../../composible/useObjectData';
|
|
106
|
+
import { useFormValidator} from '../../composible/useFormValidator';
|
|
105
107
|
|
|
106
108
|
export default defineComponent({
|
|
107
109
|
name: 'DictionaryPage',
|
|
@@ -127,9 +129,16 @@ export default defineComponent({
|
|
|
127
129
|
refreshData,
|
|
128
130
|
} = useObjectData(props, ctx);
|
|
129
131
|
|
|
132
|
+
const { validate } = useFormValidator('fieldsToValidate');
|
|
133
|
+
|
|
134
|
+
watch(() => data, () => {
|
|
135
|
+
console.log(data)
|
|
136
|
+
})
|
|
137
|
+
|
|
130
138
|
return {
|
|
131
|
-
data,
|
|
139
|
+
data,
|
|
132
140
|
refreshData,
|
|
141
|
+
validate,
|
|
133
142
|
};
|
|
134
143
|
},
|
|
135
144
|
watch: {
|
|
@@ -243,6 +252,9 @@ export default defineComponent({
|
|
|
243
252
|
},
|
|
244
253
|
onSaveClick() {
|
|
245
254
|
if (Object.keys(this.editingDict) <= 0) return;
|
|
255
|
+
|
|
256
|
+
if (!this.validate()) return;
|
|
257
|
+
|
|
246
258
|
// if is adding new
|
|
247
259
|
if (this.selectedDictNode.addingNew) {
|
|
248
260
|
this.editingDict = {
|