未验证 提交 d6fb46b6 编写于 作者: L labbomb 提交者: GitHub

fix: Fix some mistakes in the datasource (#12775)

* fix: Fix some mistakes in the datasource

* fix: delete useless console
上级 58721ba8
......@@ -19,6 +19,7 @@ export default {
datasource: 'DataSource',
create_datasource: 'Create DataSource',
choose_datasource_type: 'Choose DataSource Type',
select: 'Select',
search_input_tips: 'Please input the keywords',
datasource_name: 'Datasource Name',
datasource_name_tips: 'Please enter datasource name',
......
......@@ -19,6 +19,7 @@ export default {
datasource: '数据源',
create_datasource: '创建源',
choose_datasource_type: '选择源类型',
select: '更改',
search_input_tips: '请输入关键字',
datasource_name: '源名称',
datasource_name_tips: '请输入数据源名称',
......
......@@ -199,7 +199,7 @@ const DetailModal = defineComponent({
>
<div class={[styles.typeBox, !!id && styles.disabledBox]}>
<div v-model={[detailForm.type, 'value']}>{detailForm.label}</div>
<div class={[styles['text-color'], 'btn-data-source-type-drop-down']} onClick={handleSourceModalOpen}>更换</div>
<div class={[styles['text-color'], 'btn-data-source-type-drop-down']} onClick={handleSourceModalOpen}>{t('datasource.select')}</div>
</div>
</NFormItem>
<NFormItem
......
......@@ -56,10 +56,11 @@ const list = defineComponent({
const { data, changePage, changePageSize, deleteRecord, updateList } =
useTable()
const { getColumns } = useColumns((id: number, type: 'edit' | 'delete') => {
const { getColumns } = useColumns((id: number, type: 'edit' | 'delete', row?: any) => {
if (type === 'edit') {
showDetailModal.value = true
selectId.value = id
selectType.value = row.type
} else {
deleteRecord(id)
}
......
......@@ -118,7 +118,7 @@ export function useColumns(onCallback: Function) {
circle: true,
type: 'info',
size: 'small',
onClick: () => void onCallback(rowData.id, 'edit')
onClick: () => void onCallback(rowData.id, 'edit', rowData)
},
{
default: () =>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册