|
@@ -5,6 +5,7 @@ import { Search } from '@/components/Search'
|
|
import { reactive, ref, unref } from 'vue'
|
|
import { reactive, ref, unref } from 'vue'
|
|
import { useValidator } from '@/hooks/web/useValidator'
|
|
import { useValidator } from '@/hooks/web/useValidator'
|
|
import { ElButton } from 'element-plus'
|
|
import { ElButton } from 'element-plus'
|
|
|
|
+import { getDictOneApi } from '@/api/common'
|
|
|
|
|
|
const { required } = useValidator()
|
|
const { required } = useValidator()
|
|
|
|
|
|
@@ -174,6 +175,14 @@ const changePosition = (position: string) => {
|
|
layout.value = 'bottom'
|
|
layout.value = 'bottom'
|
|
buttomPosition.value = position
|
|
buttomPosition.value = position
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+const getDictOne = async () => {
|
|
|
|
+ const res = await getDictOneApi()
|
|
|
|
+ if (res) {
|
|
|
|
+ schema[1].componentProps!.options = res.data
|
|
|
|
+ console.log(res.data)
|
|
|
|
+ }
|
|
|
|
+}
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<template>
|
|
<template>
|
|
@@ -196,6 +205,9 @@ const changePosition = (position: string) => {
|
|
<ElButton @click="changePosition('right')">
|
|
<ElButton @click="changePosition('right')">
|
|
{{ t('searchDemo.bottom') }} {{ t('searchDemo.position') }}-{{ t('searchDemo.right') }}
|
|
{{ t('searchDemo.bottom') }} {{ t('searchDemo.position') }}-{{ t('searchDemo.right') }}
|
|
</ElButton>
|
|
</ElButton>
|
|
|
|
+ <ElButton @click="getDictOne">
|
|
|
|
+ {{ t('searchDemo.dynamicOptions') }}
|
|
|
|
+ </ElButton>
|
|
</ContentWrap>
|
|
</ContentWrap>
|
|
|
|
|
|
<ContentWrap :title="t('searchDemo.search')" :message="t('searchDemo.searchDes')">
|
|
<ContentWrap :title="t('searchDemo.search')" :message="t('searchDemo.searchDes')">
|