提交 0ebba1eb 编写于 作者: View Design's avatar View Design

Update Create.vue

上级 cc90e3ed
...@@ -35,8 +35,8 @@ ...@@ -35,8 +35,8 @@
</div> </div>
</template> </template>
<script setup> <script setup>
const { $setRepo } = useReposStore()
const { $repos } = storeToRefs(useReposStore()) const { $repos } = storeToRefs(useReposStore())
const { $setRepo } = useReposStore()
const { $getSearchHistory } = useSearchStore() const { $getSearchHistory } = useSearchStore()
const emits = defineEmits([ 'search' ]) const emits = defineEmits([ 'search' ])
const query = ref('') const query = ref('')
...@@ -72,7 +72,7 @@ const handleSearch = async () => { ...@@ -72,7 +72,7 @@ const handleSearch = async () => {
} }
nextTick(async () => { nextTick(async () => {
if (!$repos.length) { if (!$repos.length) {
const { data } = await useRequest('/v1/chat/repository', {}) const { data } = await useRequest('/v1/chat/repository')
const repoData = data.value.data.map(item => { const repoData = data.value.data.map(item => {
return { return {
label: item.name, label: item.name,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册