diff --git a/src/config/axios/index.ts b/src/config/axios/index.ts index ee9074084..3b2ab4a88 100644 --- a/src/config/axios/index.ts +++ b/src/config/axios/index.ts @@ -25,6 +25,8 @@ service.interceptors.request.use( ) { config.data = qs.stringify(config.data) } + // 添加token,可根据实际业务修改 + // config!.headers!['Authorization'] = 'something' // get参数编码 if (config.method === 'get' && config.params) { let url = config.url as string diff --git a/src/locales/en.ts b/src/locales/en.ts index b565a0b18..8117056c0 100644 --- a/src/locales/en.ts +++ b/src/locales/en.ts @@ -341,7 +341,8 @@ export default { position: 'position', left: 'left', center: 'center', - right: 'right' + right: 'right', + dynamicOptions: 'Dynamic options' }, stickyDemo: { sticky: 'Sticky' diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index 9519ebb66..5f7ba06fa 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -338,7 +338,8 @@ export default { position: '位置', left: '左', center: '中', - right: '右' + right: '右', + dynamicOptions: '动态选项' }, stickyDemo: { sticky: '黏性' diff --git a/src/views/Components/Search.vue b/src/views/Components/Search.vue index 5c3cf0ede..652e04b2c 100644 --- a/src/views/Components/Search.vue +++ b/src/views/Components/Search.vue @@ -5,6 +5,7 @@ import { Search } from '@/components/Search' import { reactive, ref, unref } from 'vue' import { useValidator } from '@/hooks/web/useValidator' import { ElButton } from 'element-plus' +import { getDictOneApi } from '@/api/common' const { required } = useValidator() @@ -174,6 +175,14 @@ const changePosition = (position: string) => { layout.value = 'bottom' buttomPosition.value = position } + +const getDictOne = async () => { + const res = await getDictOneApi() + if (res) { + schema[1].componentProps!.options = res.data + console.log(res.data) + } +}