mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-08 01:06:59 +08:00
feat(querying data): When querying data, the step of selecting a data source can be skipped by clicking "OK". #796
This commit is contained in:
@@ -75,6 +75,11 @@ function selectDsInDialog(ds: any) {
|
||||
innerDs.value = ds.id
|
||||
}
|
||||
|
||||
function selectDsDirectlyInDialog(ds: any) {
|
||||
innerDs.value = ds.id
|
||||
confirmSelectDs()
|
||||
}
|
||||
|
||||
function confirmSelectDs() {
|
||||
if (innerDs.value) {
|
||||
if (assistantStore.getType == 1) {
|
||||
@@ -207,6 +212,7 @@ defineExpose({
|
||||
:is-selected="ele.id === innerDs"
|
||||
:description="ele.description"
|
||||
@select-ds="selectDsInDialog(ele)"
|
||||
@select-ds-directly="selectDsDirectlyInDialog(ele)"
|
||||
></Card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
@@ -23,7 +23,7 @@ const props = withDefaults(
|
||||
}
|
||||
)
|
||||
|
||||
const emits = defineEmits(['selectDs'])
|
||||
const emits = defineEmits(['selectDs', 'selectDsDirectly'])
|
||||
const icon = computed(() => {
|
||||
return (dsTypeWithImg.find((ele) => props.type === ele.type) || {}).img
|
||||
})
|
||||
@@ -31,10 +31,19 @@ const icon = computed(() => {
|
||||
const SelectDs = () => {
|
||||
emits('selectDs')
|
||||
}
|
||||
|
||||
const SelectDsDirectly = () => {
|
||||
emits('selectDsDirectly')
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="card" :class="isSelected && 'is-selected'" @click="SelectDs">
|
||||
<div
|
||||
class="card"
|
||||
:class="isSelected && 'is-selected'"
|
||||
@dblclick="SelectDsDirectly"
|
||||
@click="SelectDs"
|
||||
>
|
||||
<div class="name-icon">
|
||||
<img :src="icon" width="32px" height="32px" />
|
||||
<div class="info">
|
||||
|
||||
Reference in New Issue
Block a user