diff --git a/.vscode/settings.json b/.vscode/settings.json index fff106c..08bb1c3 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -5,11 +5,7 @@ "editor.formatOnPaste": true, "editor.formatOnType": true, // 配置eslint适用于vue代码 - "eslint.validate": [ - "javascript", - "typescript", - "vue" - ], + "eslint.validate": ["javascript", "typescript", "vue"], "[vue]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, @@ -27,7 +23,7 @@ // 保存时自动启用 eslint --fix 自动修复 "editor.codeActionsOnSave": { "source.fixAll": true, - "eslint.autoFixOnSave": true, + "eslint.autoFixOnSave": true }, "eslint.options": { "overrideConfig": { @@ -49,11 +45,7 @@ }, "i18n-ally.displayLanguage": "zh-cn", "i18n-ally.enabledParsers": ["json", "js"], - "i18n-ally.localesPaths": [ - "src/i18n/lang", - "src/i18n/pages/login", - "src/i18n/pages/menu", - ], + "i18n-ally.localesPaths": ["src/i18n/lang", "src/i18n/pages/login", "src/i18n/pages/menu"], "i18n-ally.extract.parsers.html": { "attributes": ["text", "title", "alt", "placeholder", "label", "aria-label"], "ignoredTags": ["script", "style"], @@ -61,4 +53,5 @@ "inlineText": true }, "i18n-ally.keystyle": "nested", -} \ No newline at end of file + "typescript.tsdk": "node_modules/typescript/lib" +} diff --git a/package.json b/package.json index d57ada4..b0232da 100644 --- a/package.json +++ b/package.json @@ -49,6 +49,7 @@ "@vue/compiler-sfc": "^3.3.4", "sass": "1.45.0", "tailwindcss": "^3.3.3", + "typescript": "^5.2.2", "unplugin-auto-import": "0.5.3", "vite": "^4.3.9", "vite-plugin-compression": "^0.3.6", diff --git a/src/api/system/field.ts b/src/api/system/field.ts new file mode 100644 index 0000000..fcdb817 --- /dev/null +++ b/src/api/system/field.ts @@ -0,0 +1,24 @@ +import request from '@/utils/request' + +const url = '/system/field/' +export const getModelList = () => { + return request({ + url: url + 'getModelList', + method: 'get' + }) +} + +export const getFields = (params) => { + return request({ + url: url + 'getFields', + method: 'get', + params + }) +} + +export const initFields = () => { + return request({ + url: url + 'initFields', + method: 'post' + }) +} diff --git a/src/layout/components/Settings/index.vue b/src/layout/components/Settings/index.vue index ef6264c..26d7d2e 100644 --- a/src/layout/components/Settings/index.vue +++ b/src/layout/components/Settings/index.vue @@ -116,7 +116,7 @@ const showSettings = ref(false) const theme = ref(settingsStore.theme) const sideTheme = ref(settingsStore.sideTheme) const storeSettings = computed(() => settingsStore) -const predefineColors = ref(['#409EFF', '#ff4500', '#ff8c00', '#ffd700', '#90ee90', '#00ced1', '#1e90ff', '#c71585']) +const predefineColors = ref(['#409EFF', '#ff4500', '#ff8c00', '#ffd700', '#90ee90', '#00ced1', '#1e90ff', '#D59DFF', '#c71585']) const { setWatermark, removeWatermark } = getmark() // 可以手动更改当前值 model.value = 'cafe' const mode = useColorMode({ diff --git a/src/views/monitor/ipratelimit/index.vue b/src/views/monitor/ipratelimit/index.vue index 96e33ff..8038169 100644 --- a/src/views/monitor/ipratelimit/index.vue +++ b/src/views/monitor/ipratelimit/index.vue @@ -142,14 +142,14 @@ - + 终结点:{HTTP_Verb}:{PATH},您可以使用asterix符号来定位任何HTTP谓词 例如:*、*:/api/values、*:/api/values、((post)|(put)):/api/values 期间:{INT}{PERIOD_TYPE},您可以使用以下期间类型之一:s(秒), m(分), h(时), d(天) 限制:{LONG},单位时间内的允许访问的次数 - + {{ $t('btn.cancel') }} {{ $t('btn.submit') }} diff --git a/src/views/system/rolefields/index.vue b/src/views/system/rolefields/index.vue index f86d977..f927798 100644 --- a/src/views/system/rolefields/index.vue +++ b/src/views/system/rolefields/index.vue @@ -11,12 +11,44 @@ + + + + + 模型 + + + + + + + + + + + 数据字段 + {{ $t('btn.save') }} + + + + + + + + + + + + + + - +