fix: DBMS-数据查询无数据时分页信息未清除

This commit is contained in:
meilin.huang
2023-03-25 22:22:55 +08:00
parent cefad86b85
commit 14da4d77e0
3 changed files with 3 additions and 5 deletions

View File

@@ -37,7 +37,7 @@
</el-tooltip>
</el-col>
<el-col :span="16">
<el-input v-model="condition" placeholder="若需条件过滤,可选择列并点击对应的字段并输入需要过滤的内容点击查询按钮即可" clearable size="small"
<el-input v-model="condition" placeholder="若需条件过滤,可选择列并点击对应的字段并输入需要过滤的内容点击查询按钮即可" clearable @clear="selectData" size="small"
style="width: 100%">
<template #prepend>
<el-popover trigger="click" :width="320" placement="right">
@@ -204,7 +204,7 @@ const selectData = async () => {
const dbInst = state.ti.getNowDbInst();
const { db } = state.ti;
try {
const countRes = await dbInst.runSql(db, DbInst.getDefaultCountSql(state.table));
const countRes = await dbInst.runSql(db, DbInst.getDefaultCountSql(state.table, state.condition));
state.count = countRes.res[0].count;
let sql = dbInst.getDefaultSelectSql(state.table, state.condition, state.orderBy, state.pageNum);
state.sql = sql;

View File

@@ -193,8 +193,6 @@ const {
dataHeight,
findDialog,
docEditDialog,
insertDocDialog,
jsonEditorDialog,
} = toRefs(state)
/**

View File

@@ -14,7 +14,7 @@ require (
github.com/robfig/cron/v3 v3.0.1 //
github.com/sirupsen/logrus v1.9.0
github.com/xwb1989/sqlparser v0.0.0-20180606152119-120387863bf2
go.mongodb.org/mongo-driver v1.11.1 // mongo
go.mongodb.org/mongo-driver v1.11.3 // mongo
golang.org/x/crypto v0.7.0 // ssh
gopkg.in/yaml.v3 v3.0.1
// gorm