diff --git a/src/api/model/system.ts b/src/api/model/system.ts index 7e205b8..f6b924b 100644 --- a/src/api/model/system.ts +++ b/src/api/model/system.ts @@ -218,4 +218,18 @@ export default { return await http.get("dict_data/option", data); }, }, + translation: { + list: async function (data = {}) { + return await http.get("translation/list", data); + }, + add: async function (data = {}) { + return await http.post("translation/add", data); + }, + edit: async function (data = {}) { + return await http.put("translation/edit", data); + }, + del: async function (data = {}) { + return await http.delete("translation/del", data); + }, + }, } diff --git a/src/assets/icons/Language.vue b/src/assets/icons/Language.vue new file mode 100644 index 0000000..dbb49cc --- /dev/null +++ b/src/assets/icons/Language.vue @@ -0,0 +1,3 @@ + diff --git a/src/components/piSelect/index.vue b/src/components/piSelect/index.vue index bba354b..c57ab10 100644 --- a/src/components/piSelect/index.vue +++ b/src/components/piSelect/index.vue @@ -46,6 +46,10 @@ let defaultProps = ref({ }) let tableData = ref([]) +watch(() => props.modelValue, (val) => { + defaultValue.value = val +}, {deep: true, immediate: true}) + watch(defaultValue, () => { emit('update:modelValue', defaultValue.value) emit('change', defaultValue.value) diff --git a/src/pi.ts b/src/pi.ts index 05171d4..4807402 100644 --- a/src/pi.ts +++ b/src/pi.ts @@ -12,6 +12,7 @@ import errorHandler from "@/utils/errorHandler"; import piDialog from "@/components/piDialog" import piTable from "@/components/piTable" import piUpload from "@/components/piUpload" +import piSelect from "@/components/piSelect" export default { install(app: App) { @@ -19,6 +20,7 @@ export default { app.component('piDialog', piDialog) app.component('piTable', piTable) app.component('piUpload', piUpload) + app.component('piSelect', piSelect) //注册全局指令 app.directive('auth', auth) diff --git a/src/views/system/translation/index.vue b/src/views/system/translation/index.vue new file mode 100644 index 0000000..d9bc001 --- /dev/null +++ b/src/views/system/translation/index.vue @@ -0,0 +1,149 @@ + + + diff --git a/src/views/system/translation/save.vue b/src/views/system/translation/save.vue new file mode 100644 index 0000000..4bb0b09 --- /dev/null +++ b/src/views/system/translation/save.vue @@ -0,0 +1,97 @@ + + +