fdb2 1.0.11 → 1.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
- import { s as defineComponent, w as watch, o as openBlock, v as createElementBlock, F as Fragment, J as createVNode, N as withCtx, a as ref, z as createBaseVNode, L as withModifiers, H as createTextVNode, O as withDirectives, P as vModelText, x as renderList, A as toDisplayString, Q as vModelSelect, B as createCommentVNode, R as vModelCheckbox, G as onMounted, y as normalizeClass, S as vShow, l as computed, T as useRouter, U as createStaticVNode, K as normalizeStyle, n as nextTick, V as withKeys, c as createBlock, W as useRoute } from "./vue.js";
2
- import { r as request, M as Modal, _ as _export_sfc, s as showAlert, a as showConfirm, g as getModalInstance, d as defineStore, t as toast, c as commonjsGlobal, T as Toast } from "./index.js";
1
+ import { s as defineComponent, w as watch, o as openBlock, v as createElementBlock, F as Fragment, J as createVNode, N as withCtx, a as ref, z as createBaseVNode, H as createTextVNode, O as withDirectives, P as vModelText, Q as vModelSelect, x as renderList, A as toDisplayString, B as createCommentVNode, R as vModelCheckbox, L as withModifiers, G as onMounted, y as normalizeClass, S as vShow, l as computed, T as useRouter, U as createStaticVNode, K as normalizeStyle, n as nextTick, V as createSlots, c as createBlock, W as useRoute } from "./vue.js";
2
+ import { r as request, M as Modal, _ as _export_sfc, s as showAlert, a as showConfirm, g as getModalInstance, d as defineStore, t as toast, c as commonjsGlobal, D as DataGrid, T as Toast } from "./index.js";
3
3
  import "./bootstrap.js";
4
4
  class ConnectionService {
5
5
  /**
@@ -362,33 +362,33 @@ class DatabaseService {
362
362
  });
363
363
  }
364
364
  }
365
- const _hoisted_1$8 = { class: "form-section" };
366
- const _hoisted_2$8 = { class: "section-content" };
367
- const _hoisted_3$8 = { class: "form-grid" };
368
- const _hoisted_4$8 = { class: "form-group-modern" };
369
- const _hoisted_5$8 = { class: "form-group-modern" };
370
- const _hoisted_6$8 = ["value"];
371
- const _hoisted_7$8 = {
365
+ const _hoisted_1$9 = { class: "form-section" };
366
+ const _hoisted_2$9 = { class: "section-content" };
367
+ const _hoisted_3$9 = { class: "form-grid" };
368
+ const _hoisted_4$9 = { class: "form-group-modern" };
369
+ const _hoisted_5$9 = { class: "form-group-modern" };
370
+ const _hoisted_6$9 = ["value"];
371
+ const _hoisted_7$9 = {
372
372
  key: 0,
373
373
  class: "form-section"
374
374
  };
375
- const _hoisted_8$8 = { class: "section-content" };
376
- const _hoisted_9$8 = { class: "form-grid" };
377
- const _hoisted_10$8 = { class: "form-group-modern" };
378
- const _hoisted_11$8 = { class: "form-group-modern" };
379
- const _hoisted_12$8 = { class: "form-group-modern" };
380
- const _hoisted_13$8 = { class: "form-group-modern" };
381
- const _hoisted_14$8 = {
375
+ const _hoisted_8$9 = { class: "section-content" };
376
+ const _hoisted_9$9 = { class: "form-grid" };
377
+ const _hoisted_10$9 = { class: "form-group-modern" };
378
+ const _hoisted_11$9 = { class: "form-group-modern" };
379
+ const _hoisted_12$9 = { class: "form-group-modern" };
380
+ const _hoisted_13$9 = { class: "form-group-modern" };
381
+ const _hoisted_14$9 = {
382
382
  key: 1,
383
383
  class: "form-section"
384
384
  };
385
- const _hoisted_15$8 = { class: "section-content" };
386
- const _hoisted_16$7 = { class: "form-grid" };
387
- const _hoisted_17$7 = { class: "form-group-modern" };
388
- const _hoisted_18$7 = { class: "form-section" };
389
- const _hoisted_19$7 = { class: "section-content" };
390
- const _hoisted_20$7 = { class: "form-grid" };
391
- const _hoisted_21$7 = { class: "form-group-modern" };
385
+ const _hoisted_15$9 = { class: "section-content" };
386
+ const _hoisted_16$8 = { class: "form-grid" };
387
+ const _hoisted_17$8 = { class: "form-group-modern" };
388
+ const _hoisted_18$8 = { class: "form-section" };
389
+ const _hoisted_19$8 = { class: "section-content" };
390
+ const _hoisted_20$8 = { class: "form-grid" };
391
+ const _hoisted_21$8 = { class: "form-group-modern" };
392
392
  const _hoisted_22$7 = { class: "form-group-modern" };
393
393
  const _hoisted_23$7 = { class: "form-section" };
394
394
  const _hoisted_24$7 = { class: "section-content" };
@@ -396,7 +396,7 @@ const _hoisted_25$7 = { class: "form-group-modern" };
396
396
  const _hoisted_26$7 = { class: "form-check-modern" };
397
397
  const _hoisted_27$7 = { class: "error-content" };
398
398
  const _hoisted_28$7 = { class: "error-message" };
399
- const _sfc_main$8 = /* @__PURE__ */ defineComponent({
399
+ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
400
400
  __name: "index",
401
401
  props: {
402
402
  modelValue: { type: Boolean, default: false },
@@ -632,16 +632,16 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
632
632
  onSubmit: withModifiers(saveConnection, ["prevent"]),
633
633
  class: "connection-form-modern"
634
634
  }, [
635
- createBaseVNode("div", _hoisted_1$8, [
635
+ createBaseVNode("div", _hoisted_1$9, [
636
636
  _cache[14] || (_cache[14] = createBaseVNode("div", { class: "section-header" }, [
637
637
  createBaseVNode("div", { class: "section-icon" }, [
638
638
  createBaseVNode("i", { class: "bi bi-info-circle" })
639
639
  ]),
640
640
  createBaseVNode("h3", { class: "section-title" }, "基本信息")
641
641
  ], -1)),
642
- createBaseVNode("div", _hoisted_2$8, [
643
- createBaseVNode("div", _hoisted_3$8, [
644
- createBaseVNode("div", _hoisted_4$8, [
642
+ createBaseVNode("div", _hoisted_2$9, [
643
+ createBaseVNode("div", _hoisted_3$9, [
644
+ createBaseVNode("div", _hoisted_4$9, [
645
645
  _cache[11] || (_cache[11] = createBaseVNode("label", { class: "form-label-modern" }, [
646
646
  createBaseVNode("i", { class: "bi bi-tag me-2" }),
647
647
  createTextVNode("连接名称 "),
@@ -657,7 +657,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
657
657
  [vModelText, connectionForm.value.name]
658
658
  ])
659
659
  ]),
660
- createBaseVNode("div", _hoisted_5$8, [
660
+ createBaseVNode("div", _hoisted_5$9, [
661
661
  _cache[13] || (_cache[13] = createBaseVNode("label", { class: "form-label-modern" }, [
662
662
  createBaseVNode("i", { class: "bi bi-diagram-3 me-2" }),
663
663
  createTextVNode("数据库类型 "),
@@ -674,7 +674,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
674
674
  return openBlock(), createElementBlock("option", {
675
675
  key: dbType.value,
676
676
  value: dbType.value
677
- }, toDisplayString(dbType.label), 9, _hoisted_6$8);
677
+ }, toDisplayString(dbType.label), 9, _hoisted_6$9);
678
678
  }), 128))
679
679
  ], 544), [
680
680
  [vModelSelect, connectionForm.value.type]
@@ -683,16 +683,16 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
683
683
  ])
684
684
  ])
685
685
  ]),
686
- connectionForm.value.type !== "sqlite" ? (openBlock(), createElementBlock("div", _hoisted_7$8, [
686
+ connectionForm.value.type !== "sqlite" ? (openBlock(), createElementBlock("div", _hoisted_7$9, [
687
687
  _cache[19] || (_cache[19] = createBaseVNode("div", { class: "section-header" }, [
688
688
  createBaseVNode("div", { class: "section-icon" }, [
689
689
  createBaseVNode("i", { class: "bi bi-hdd-network" })
690
690
  ]),
691
691
  createBaseVNode("h3", { class: "section-title" }, "连接配置")
692
692
  ], -1)),
693
- createBaseVNode("div", _hoisted_8$8, [
694
- createBaseVNode("div", _hoisted_9$8, [
695
- createBaseVNode("div", _hoisted_10$8, [
693
+ createBaseVNode("div", _hoisted_8$9, [
694
+ createBaseVNode("div", _hoisted_9$9, [
695
+ createBaseVNode("div", _hoisted_10$9, [
696
696
  _cache[15] || (_cache[15] = createBaseVNode("label", { class: "form-label-modern" }, [
697
697
  createBaseVNode("i", { class: "bi bi-server me-2" }),
698
698
  createTextVNode("主机地址 "),
@@ -708,7 +708,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
708
708
  [vModelText, connectionForm.value.host]
709
709
  ])
710
710
  ]),
711
- createBaseVNode("div", _hoisted_11$8, [
711
+ createBaseVNode("div", _hoisted_11$9, [
712
712
  _cache[16] || (_cache[16] = createBaseVNode("label", { class: "form-label-modern" }, [
713
713
  createBaseVNode("i", { class: "bi bi-door-closed me-2" }),
714
714
  createTextVNode("端口 "),
@@ -731,7 +731,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
731
731
  ]
732
732
  ])
733
733
  ]),
734
- createBaseVNode("div", _hoisted_12$8, [
734
+ createBaseVNode("div", _hoisted_12$9, [
735
735
  _cache[17] || (_cache[17] = createBaseVNode("label", { class: "form-label-modern" }, [
736
736
  createBaseVNode("i", { class: "bi bi-database me-2" }),
737
737
  createTextVNode("数据库名 "),
@@ -747,7 +747,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
747
747
  [vModelText, connectionForm.value.database]
748
748
  ])
749
749
  ]),
750
- createBaseVNode("div", _hoisted_13$8, [
750
+ createBaseVNode("div", _hoisted_13$9, [
751
751
  _cache[18] || (_cache[18] = createBaseVNode("label", { class: "form-label-modern" }, [
752
752
  createBaseVNode("i", { class: "bi bi-clock me-2" }),
753
753
  createTextVNode("连接超时 ")
@@ -770,16 +770,16 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
770
770
  ])
771
771
  ])
772
772
  ])) : createCommentVNode("", true),
773
- connectionForm.value.type === "sqlite" ? (openBlock(), createElementBlock("div", _hoisted_14$8, [
773
+ connectionForm.value.type === "sqlite" ? (openBlock(), createElementBlock("div", _hoisted_14$9, [
774
774
  _cache[21] || (_cache[21] = createBaseVNode("div", { class: "section-header" }, [
775
775
  createBaseVNode("div", { class: "section-icon" }, [
776
776
  createBaseVNode("i", { class: "bi bi-file-earmark-text" })
777
777
  ]),
778
778
  createBaseVNode("h3", { class: "section-title" }, "SQLite配置")
779
779
  ], -1)),
780
- createBaseVNode("div", _hoisted_15$8, [
781
- createBaseVNode("div", _hoisted_16$7, [
782
- createBaseVNode("div", _hoisted_17$7, [
780
+ createBaseVNode("div", _hoisted_15$9, [
781
+ createBaseVNode("div", _hoisted_16$8, [
782
+ createBaseVNode("div", _hoisted_17$8, [
783
783
  _cache[20] || (_cache[20] = createBaseVNode("label", { class: "form-label-modern" }, [
784
784
  createBaseVNode("i", { class: "bi bi-file-earmark me-2" }),
785
785
  createTextVNode("数据库文件 "),
@@ -798,16 +798,16 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
798
798
  ])
799
799
  ])
800
800
  ])) : createCommentVNode("", true),
801
- createBaseVNode("div", _hoisted_18$7, [
801
+ createBaseVNode("div", _hoisted_18$8, [
802
802
  _cache[24] || (_cache[24] = createBaseVNode("div", { class: "section-header" }, [
803
803
  createBaseVNode("div", { class: "section-icon" }, [
804
804
  createBaseVNode("i", { class: "bi bi-shield-lock" })
805
805
  ]),
806
806
  createBaseVNode("h3", { class: "section-title" }, "认证信息")
807
807
  ], -1)),
808
- createBaseVNode("div", _hoisted_19$7, [
809
- createBaseVNode("div", _hoisted_20$7, [
810
- createBaseVNode("div", _hoisted_21$7, [
808
+ createBaseVNode("div", _hoisted_19$8, [
809
+ createBaseVNode("div", _hoisted_20$8, [
810
+ createBaseVNode("div", _hoisted_21$8, [
811
811
  _cache[22] || (_cache[22] = createBaseVNode("label", { class: "form-label-modern" }, [
812
812
  createBaseVNode("i", { class: "bi bi-person me-2" }),
813
813
  createTextVNode("用户名 ")
@@ -898,7 +898,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
898
898
  };
899
899
  }
900
900
  });
901
- const ConnectionEditor = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-60ee1360"]]);
901
+ const ConnectionEditor = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-60ee1360"]]);
902
902
  class ModalHelper {
903
903
  /**
904
904
  * 获取全局modal实例
@@ -43736,37 +43736,37 @@ function formatFileName(baseName, extension) {
43736
43736
  const timestamp = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19);
43737
43737
  return `${baseName}_${timestamp}.${extension}`;
43738
43738
  }
43739
- const _hoisted_1$7 = { class: "sql-executor" };
43740
- const _hoisted_2$7 = { class: "sql-toolbar" };
43741
- const _hoisted_3$7 = { class: "toolbar-left" };
43742
- const _hoisted_4$7 = ["disabled"];
43743
- const _hoisted_5$7 = { class: "sql-editor" };
43744
- const _hoisted_6$7 = { class: "sql-result" };
43745
- const _hoisted_7$7 = { class: "result-content" };
43746
- const _hoisted_8$7 = { class: "result-header" };
43747
- const _hoisted_9$7 = { class: "result-title" };
43748
- const _hoisted_10$7 = {
43739
+ const _hoisted_1$8 = { class: "sql-executor" };
43740
+ const _hoisted_2$8 = { class: "sql-toolbar" };
43741
+ const _hoisted_3$8 = { class: "toolbar-left" };
43742
+ const _hoisted_4$8 = ["disabled"];
43743
+ const _hoisted_5$8 = { class: "sql-editor" };
43744
+ const _hoisted_6$8 = { class: "sql-result" };
43745
+ const _hoisted_7$8 = { class: "result-content" };
43746
+ const _hoisted_8$8 = { class: "result-header" };
43747
+ const _hoisted_9$8 = { class: "result-title" };
43748
+ const _hoisted_10$8 = {
43749
43749
  key: 0,
43750
43750
  class: "sql-loading"
43751
43751
  };
43752
- const _hoisted_11$7 = {
43752
+ const _hoisted_11$8 = {
43753
43753
  key: 0,
43754
43754
  class: "bi bi-check-circle-fill text-success"
43755
43755
  };
43756
- const _hoisted_12$7 = {
43756
+ const _hoisted_12$8 = {
43757
43757
  key: 1,
43758
43758
  class: "bi bi-x-circle-fill text-danger"
43759
43759
  };
43760
- const _hoisted_13$7 = {
43760
+ const _hoisted_13$8 = {
43761
43761
  key: 0,
43762
43762
  class: "result-actions"
43763
43763
  };
43764
- const _hoisted_14$7 = {
43764
+ const _hoisted_14$8 = {
43765
43765
  key: 0,
43766
43766
  class: "sql-loading-state"
43767
43767
  };
43768
- const _hoisted_15$7 = { class: "json-result" };
43769
- const _sfc_main$7 = /* @__PURE__ */ defineComponent({
43768
+ const _hoisted_15$8 = { class: "json-result" };
43769
+ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
43770
43770
  __name: "sql-executor",
43771
43771
  props: {
43772
43772
  connection: {},
@@ -44070,9 +44070,9 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
44070
44070
  }
44071
44071
  });
44072
44072
  return (_ctx, _cache) => {
44073
- return openBlock(), createElementBlock("div", _hoisted_1$7, [
44074
- createBaseVNode("div", _hoisted_2$7, [
44075
- createBaseVNode("div", _hoisted_3$7, [
44073
+ return openBlock(), createElementBlock("div", _hoisted_1$8, [
44074
+ createBaseVNode("div", _hoisted_2$8, [
44075
+ createBaseVNode("div", _hoisted_3$8, [
44076
44076
  createBaseVNode("button", {
44077
44077
  class: "btn btn-primary btn-sm",
44078
44078
  onClick: executeSql,
@@ -44080,7 +44080,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
44080
44080
  }, [..._cache[1] || (_cache[1] = [
44081
44081
  createBaseVNode("i", { class: "bi bi-play-fill" }, null, -1),
44082
44082
  createTextVNode(" 执行SQL ", -1)
44083
- ])], 8, _hoisted_4$7),
44083
+ ])], 8, _hoisted_4$8),
44084
44084
  createBaseVNode("button", {
44085
44085
  class: "btn btn-outline-secondary btn-sm",
44086
44086
  onClick: formatSql
@@ -44104,7 +44104,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
44104
44104
  ref_key: "containerRef",
44105
44105
  ref: containerRef
44106
44106
  }, [
44107
- createBaseVNode("div", _hoisted_5$7, [
44107
+ createBaseVNode("div", _hoisted_5$8, [
44108
44108
  createBaseVNode("div", {
44109
44109
  ref_key: "editorRef",
44110
44110
  ref: editorRef,
@@ -44115,21 +44115,21 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
44115
44115
  class: normalizeClass(["resizer", { "resizing": isResizing.value }]),
44116
44116
  onMousedown: startResize
44117
44117
  }, null, 34),
44118
- createBaseVNode("div", _hoisted_6$7, [
44119
- createBaseVNode("div", _hoisted_7$7, [
44120
- createBaseVNode("div", _hoisted_8$7, [
44121
- createBaseVNode("h6", _hoisted_9$7, [
44122
- loading.value ? (openBlock(), createElementBlock("div", _hoisted_10$7, [..._cache[4] || (_cache[4] = [
44118
+ createBaseVNode("div", _hoisted_6$8, [
44119
+ createBaseVNode("div", _hoisted_7$8, [
44120
+ createBaseVNode("div", _hoisted_8$8, [
44121
+ createBaseVNode("h6", _hoisted_9$8, [
44122
+ loading.value ? (openBlock(), createElementBlock("div", _hoisted_10$8, [..._cache[4] || (_cache[4] = [
44123
44123
  createBaseVNode("div", { class: "spinner-border spinner-border-sm me-2" }, null, -1),
44124
44124
  createTextVNode(" 执行中... ", -1)
44125
44125
  ])])) : sqlResult.value ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
44126
- sqlResult.value.success ? (openBlock(), createElementBlock("i", _hoisted_11$7)) : (openBlock(), createElementBlock("i", _hoisted_12$7)),
44126
+ sqlResult.value.success ? (openBlock(), createElementBlock("i", _hoisted_11$8)) : (openBlock(), createElementBlock("i", _hoisted_12$8)),
44127
44127
  _cache[5] || (_cache[5] = createTextVNode(" 执行结果 ", -1))
44128
44128
  ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [
44129
44129
  createTextVNode(" 执行结果 ")
44130
44130
  ], 64))
44131
44131
  ]),
44132
- sqlResult.value && !loading.value ? (openBlock(), createElementBlock("div", _hoisted_13$7, [
44132
+ sqlResult.value && !loading.value ? (openBlock(), createElementBlock("div", _hoisted_13$8, [
44133
44133
  createBaseVNode("button", {
44134
44134
  class: "btn btn-sm btn-outline-secondary me-2",
44135
44135
  onClick: formatJsonResult
@@ -44146,7 +44146,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
44146
44146
  ])])
44147
44147
  ])) : createCommentVNode("", true)
44148
44148
  ]),
44149
- loading.value ? (openBlock(), createElementBlock("div", _hoisted_14$7, [..._cache[8] || (_cache[8] = [
44149
+ loading.value ? (openBlock(), createElementBlock("div", _hoisted_14$8, [..._cache[8] || (_cache[8] = [
44150
44150
  createBaseVNode("div", { class: "d-flex align-items-center justify-content-center py-4" }, [
44151
44151
  createBaseVNode("div", { class: "spinner-border text-primary me-3" }),
44152
44152
  createBaseVNode("div", null, [
@@ -44155,7 +44155,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
44155
44155
  ])
44156
44156
  ], -1)
44157
44157
  ])])) : createCommentVNode("", true),
44158
- createBaseVNode("div", _hoisted_15$7, [
44158
+ createBaseVNode("div", _hoisted_15$8, [
44159
44159
  createBaseVNode("div", {
44160
44160
  ref_key: "resultEditorRef",
44161
44161
  ref: resultEditorRef,
@@ -44169,31 +44169,31 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
44169
44169
  };
44170
44170
  }
44171
44171
  });
44172
- const SqlExecutor = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-82959a5b"]]);
44173
- const _hoisted_1$6 = { class: "connection-detail" };
44174
- const _hoisted_2$6 = { class: "connection-header" };
44175
- const _hoisted_3$6 = { class: "connection-info" };
44176
- const _hoisted_4$6 = { class: "connection-avatar" };
44177
- const _hoisted_5$6 = { class: "connection-meta" };
44178
- const _hoisted_6$6 = { class: "connection-name" };
44179
- const _hoisted_7$6 = { class: "connection-type-info" };
44180
- const _hoisted_8$6 = { class: "db-type" };
44181
- const _hoisted_9$6 = { class: "connection-actions" };
44182
- const _hoisted_10$6 = {
44172
+ const SqlExecutor = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-82959a5b"]]);
44173
+ const _hoisted_1$7 = { class: "connection-detail" };
44174
+ const _hoisted_2$7 = { class: "connection-header" };
44175
+ const _hoisted_3$7 = { class: "connection-info" };
44176
+ const _hoisted_4$7 = { class: "connection-avatar" };
44177
+ const _hoisted_5$7 = { class: "connection-meta" };
44178
+ const _hoisted_6$7 = { class: "connection-name" };
44179
+ const _hoisted_7$7 = { class: "connection-type-info" };
44180
+ const _hoisted_8$7 = { class: "db-type" };
44181
+ const _hoisted_9$7 = { class: "connection-actions" };
44182
+ const _hoisted_10$7 = {
44183
44183
  key: 0,
44184
44184
  class: "connection-details-panel"
44185
44185
  };
44186
- const _hoisted_11$6 = { class: "detail-card" };
44187
- const _hoisted_12$6 = { class: "card-body" };
44188
- const _hoisted_13$6 = { class: "row" };
44189
- const _hoisted_14$6 = { class: "col-md-6" };
44190
- const _hoisted_15$6 = { class: "info-grid" };
44191
- const _hoisted_16$6 = { class: "info-item" };
44192
- const _hoisted_17$6 = { class: "info-value" };
44193
- const _hoisted_18$6 = { class: "info-item" };
44194
- const _hoisted_19$6 = { class: "info-value" };
44195
- const _hoisted_20$6 = { class: "info-item" };
44196
- const _hoisted_21$6 = { class: "info-value" };
44186
+ const _hoisted_11$7 = { class: "detail-card" };
44187
+ const _hoisted_12$7 = { class: "card-body" };
44188
+ const _hoisted_13$7 = { class: "row" };
44189
+ const _hoisted_14$7 = { class: "col-md-6" };
44190
+ const _hoisted_15$7 = { class: "info-grid" };
44191
+ const _hoisted_16$7 = { class: "info-item" };
44192
+ const _hoisted_17$7 = { class: "info-value" };
44193
+ const _hoisted_18$7 = { class: "info-item" };
44194
+ const _hoisted_19$7 = { class: "info-value" };
44195
+ const _hoisted_20$7 = { class: "info-item" };
44196
+ const _hoisted_21$7 = { class: "info-value" };
44197
44197
  const _hoisted_22$6 = { class: "info-item" };
44198
44198
  const _hoisted_23$6 = { class: "info-value" };
44199
44199
  const _hoisted_24$6 = { class: "col-md-6" };
@@ -44253,26 +44253,26 @@ const _hoisted_59$3 = {
44253
44253
  };
44254
44254
  const _hoisted_60$3 = { class: "modal-dialog" };
44255
44255
  const _hoisted_61$3 = { class: "modal-content" };
44256
- const _hoisted_62$2 = { class: "modal-header" };
44257
- const _hoisted_63$2 = { class: "modal-body" };
44258
- const _hoisted_64$2 = { class: "mb-3" };
44259
- const _hoisted_65$2 = { key: 0 };
44260
- const _hoisted_66$2 = { class: "mb-3" };
44261
- const _hoisted_67$2 = { class: "mb-3" };
44262
- const _hoisted_68$2 = { key: 1 };
44263
- const _hoisted_69$2 = { class: "mb-3" };
44264
- const _hoisted_70$2 = { class: "mb-3" };
44265
- const _hoisted_71$2 = { class: "mb-3" };
44266
- const _hoisted_72$2 = { class: "mb-3" };
44267
- const _hoisted_73$2 = { key: 2 };
44268
- const _hoisted_74$2 = { class: "mb-3" };
44269
- const _hoisted_75$2 = { class: "modal-footer" };
44270
- const _hoisted_76$2 = ["disabled"];
44271
- const _hoisted_77$2 = {
44256
+ const _hoisted_62$1 = { class: "modal-header" };
44257
+ const _hoisted_63$1 = { class: "modal-body" };
44258
+ const _hoisted_64$1 = { class: "mb-3" };
44259
+ const _hoisted_65$1 = { key: 0 };
44260
+ const _hoisted_66$1 = { class: "mb-3" };
44261
+ const _hoisted_67$1 = { class: "mb-3" };
44262
+ const _hoisted_68$1 = { key: 1 };
44263
+ const _hoisted_69$1 = { class: "mb-3" };
44264
+ const _hoisted_70$1 = { class: "mb-3" };
44265
+ const _hoisted_71$1 = { class: "mb-3" };
44266
+ const _hoisted_72$1 = { class: "mb-3" };
44267
+ const _hoisted_73$1 = { key: 2 };
44268
+ const _hoisted_74$1 = { class: "mb-3" };
44269
+ const _hoisted_75$1 = { class: "modal-footer" };
44270
+ const _hoisted_76$1 = ["disabled"];
44271
+ const _hoisted_77$1 = {
44272
44272
  key: 0,
44273
44273
  class: "spinner-border spinner-border-sm me-2"
44274
44274
  };
44275
- const _sfc_main$6 = /* @__PURE__ */ defineComponent({
44275
+ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
44276
44276
  __name: "connection-detail",
44277
44277
  props: {
44278
44278
  connection: {}
@@ -44470,18 +44470,18 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
44470
44470
  return textMap[type || ""] || "DB";
44471
44471
  }
44472
44472
  return (_ctx, _cache) => {
44473
- return openBlock(), createElementBlock("div", _hoisted_1$6, [
44474
- createBaseVNode("div", _hoisted_2$6, [
44475
- createBaseVNode("div", _hoisted_3$6, [
44476
- createBaseVNode("div", _hoisted_4$6, [
44473
+ return openBlock(), createElementBlock("div", _hoisted_1$7, [
44474
+ createBaseVNode("div", _hoisted_2$7, [
44475
+ createBaseVNode("div", _hoisted_3$7, [
44476
+ createBaseVNode("div", _hoisted_4$7, [
44477
44477
  createBaseVNode("div", {
44478
44478
  class: normalizeClass(["db-logo", getDbLogoClass(__props.connection?.type)])
44479
44479
  }, toDisplayString(getDbLogoText(__props.connection?.type)), 3)
44480
44480
  ]),
44481
- createBaseVNode("div", _hoisted_5$6, [
44482
- createBaseVNode("h4", _hoisted_6$6, toDisplayString(__props.connection?.name), 1),
44483
- createBaseVNode("div", _hoisted_7$6, [
44484
- createBaseVNode("span", _hoisted_8$6, toDisplayString(getDbTypeLabel(__props.connection?.type)), 1),
44481
+ createBaseVNode("div", _hoisted_5$7, [
44482
+ createBaseVNode("h4", _hoisted_6$7, toDisplayString(__props.connection?.name), 1),
44483
+ createBaseVNode("div", _hoisted_7$7, [
44484
+ createBaseVNode("span", _hoisted_8$7, toDisplayString(getDbTypeLabel(__props.connection?.type)), 1),
44485
44485
  createBaseVNode("span", {
44486
44486
  class: normalizeClass(["connection-status", connectionStatusClass.value])
44487
44487
  }, [
@@ -44491,7 +44491,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
44491
44491
  ])
44492
44492
  ])
44493
44493
  ]),
44494
- createBaseVNode("div", _hoisted_9$6, [
44494
+ createBaseVNode("div", _hoisted_9$7, [
44495
44495
  createBaseVNode("button", {
44496
44496
  class: "btn btn-sm btn-outline-info",
44497
44497
  onClick: toggleDetails,
@@ -44517,27 +44517,27 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
44517
44517
  ])])
44518
44518
  ])
44519
44519
  ]),
44520
- isDetailsExpanded.value ? (openBlock(), createElementBlock("div", _hoisted_10$6, [
44521
- createBaseVNode("div", _hoisted_11$6, [
44522
- createBaseVNode("div", _hoisted_12$6, [
44523
- createBaseVNode("div", _hoisted_13$6, [
44524
- createBaseVNode("div", _hoisted_14$6, [
44520
+ isDetailsExpanded.value ? (openBlock(), createElementBlock("div", _hoisted_10$7, [
44521
+ createBaseVNode("div", _hoisted_11$7, [
44522
+ createBaseVNode("div", _hoisted_12$7, [
44523
+ createBaseVNode("div", _hoisted_13$7, [
44524
+ createBaseVNode("div", _hoisted_14$7, [
44525
44525
  _cache[22] || (_cache[22] = createBaseVNode("h6", { class: "section-title" }, [
44526
44526
  createBaseVNode("i", { class: "bi bi-info-circle" }),
44527
44527
  createTextVNode(" 基本信息 ")
44528
44528
  ], -1)),
44529
- createBaseVNode("div", _hoisted_15$6, [
44530
- createBaseVNode("div", _hoisted_16$6, [
44529
+ createBaseVNode("div", _hoisted_15$7, [
44530
+ createBaseVNode("div", _hoisted_16$7, [
44531
44531
  _cache[18] || (_cache[18] = createBaseVNode("label", { class: "info-label" }, "主机地址", -1)),
44532
- createBaseVNode("div", _hoisted_17$6, toDisplayString(__props.connection?.host), 1)
44532
+ createBaseVNode("div", _hoisted_17$7, toDisplayString(__props.connection?.host), 1)
44533
44533
  ]),
44534
- createBaseVNode("div", _hoisted_18$6, [
44534
+ createBaseVNode("div", _hoisted_18$7, [
44535
44535
  _cache[19] || (_cache[19] = createBaseVNode("label", { class: "info-label" }, "端口", -1)),
44536
- createBaseVNode("div", _hoisted_19$6, toDisplayString(__props.connection?.port), 1)
44536
+ createBaseVNode("div", _hoisted_19$7, toDisplayString(__props.connection?.port), 1)
44537
44537
  ]),
44538
- createBaseVNode("div", _hoisted_20$6, [
44538
+ createBaseVNode("div", _hoisted_20$7, [
44539
44539
  _cache[20] || (_cache[20] = createBaseVNode("label", { class: "info-label" }, "用户名", -1)),
44540
- createBaseVNode("div", _hoisted_21$6, toDisplayString(__props.connection?.username), 1)
44540
+ createBaseVNode("div", _hoisted_21$7, toDisplayString(__props.connection?.username), 1)
44541
44541
  ]),
44542
44542
  createBaseVNode("div", _hoisted_22$6, [
44543
44543
  _cache[21] || (_cache[21] = createBaseVNode("label", { class: "info-label" }, "数据库类型", -1)),
@@ -44728,7 +44728,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
44728
44728
  showCreateDatabase.value ? (openBlock(), createElementBlock("div", _hoisted_59$3, [
44729
44729
  createBaseVNode("div", _hoisted_60$3, [
44730
44730
  createBaseVNode("div", _hoisted_61$3, [
44731
- createBaseVNode("div", _hoisted_62$2, [
44731
+ createBaseVNode("div", _hoisted_62$1, [
44732
44732
  _cache[43] || (_cache[43] = createBaseVNode("h5", { class: "modal-title" }, "创建数据库", -1)),
44733
44733
  createBaseVNode("button", {
44734
44734
  type: "button",
@@ -44736,9 +44736,9 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
44736
44736
  onClick: _cache[4] || (_cache[4] = ($event) => showCreateDatabase.value = false)
44737
44737
  })
44738
44738
  ]),
44739
- createBaseVNode("div", _hoisted_63$2, [
44739
+ createBaseVNode("div", _hoisted_63$1, [
44740
44740
  createBaseVNode("form", null, [
44741
- createBaseVNode("div", _hoisted_64$2, [
44741
+ createBaseVNode("div", _hoisted_64$1, [
44742
44742
  _cache[44] || (_cache[44] = createBaseVNode("label", { class: "form-label" }, [
44743
44743
  createTextVNode("数据库名称 "),
44744
44744
  createBaseVNode("span", { class: "text-danger" }, "*")
@@ -44753,8 +44753,8 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
44753
44753
  [vModelText, newDatabase.value.name]
44754
44754
  ])
44755
44755
  ]),
44756
- __props.connection?.type === "mysql" ? (openBlock(), createElementBlock("div", _hoisted_65$2, [
44757
- createBaseVNode("div", _hoisted_66$2, [
44756
+ __props.connection?.type === "mysql" ? (openBlock(), createElementBlock("div", _hoisted_65$1, [
44757
+ createBaseVNode("div", _hoisted_66$1, [
44758
44758
  _cache[46] || (_cache[46] = createBaseVNode("label", { class: "form-label" }, "字符集", -1)),
44759
44759
  withDirectives(createBaseVNode("select", {
44760
44760
  class: "form-select",
@@ -44768,7 +44768,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
44768
44768
  [vModelSelect, newDatabase.value.options.charset]
44769
44769
  ])
44770
44770
  ]),
44771
- createBaseVNode("div", _hoisted_67$2, [
44771
+ createBaseVNode("div", _hoisted_67$1, [
44772
44772
  _cache[48] || (_cache[48] = createBaseVNode("label", { class: "form-label" }, "排序规则", -1)),
44773
44773
  withDirectives(createBaseVNode("select", {
44774
44774
  class: "form-select",
@@ -44783,8 +44783,8 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
44783
44783
  ])
44784
44784
  ])
44785
44785
  ])) : createCommentVNode("", true),
44786
- __props.connection?.type === "postgres" ? (openBlock(), createElementBlock("div", _hoisted_68$2, [
44787
- createBaseVNode("div", _hoisted_69$2, [
44786
+ __props.connection?.type === "postgres" ? (openBlock(), createElementBlock("div", _hoisted_68$1, [
44787
+ createBaseVNode("div", _hoisted_69$1, [
44788
44788
  _cache[49] || (_cache[49] = createBaseVNode("label", { class: "form-label" }, "所有者", -1)),
44789
44789
  withDirectives(createBaseVNode("input", {
44790
44790
  type: "text",
@@ -44795,7 +44795,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
44795
44795
  [vModelText, newDatabase.value.options.owner]
44796
44796
  ])
44797
44797
  ]),
44798
- createBaseVNode("div", _hoisted_70$2, [
44798
+ createBaseVNode("div", _hoisted_70$1, [
44799
44799
  _cache[50] || (_cache[50] = createBaseVNode("label", { class: "form-label" }, "模板", -1)),
44800
44800
  withDirectives(createBaseVNode("input", {
44801
44801
  type: "text",
@@ -44806,7 +44806,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
44806
44806
  [vModelText, newDatabase.value.options.template]
44807
44807
  ])
44808
44808
  ]),
44809
- createBaseVNode("div", _hoisted_71$2, [
44809
+ createBaseVNode("div", _hoisted_71$1, [
44810
44810
  _cache[52] || (_cache[52] = createBaseVNode("label", { class: "form-label" }, "编码", -1)),
44811
44811
  withDirectives(createBaseVNode("select", {
44812
44812
  class: "form-select",
@@ -44819,7 +44819,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
44819
44819
  [vModelSelect, newDatabase.value.options.encoding]
44820
44820
  ])
44821
44821
  ]),
44822
- createBaseVNode("div", _hoisted_72$2, [
44822
+ createBaseVNode("div", _hoisted_72$1, [
44823
44823
  _cache[53] || (_cache[53] = createBaseVNode("label", { class: "form-label" }, "表空间", -1)),
44824
44824
  withDirectives(createBaseVNode("input", {
44825
44825
  type: "text",
@@ -44831,8 +44831,8 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
44831
44831
  ])
44832
44832
  ])
44833
44833
  ])) : createCommentVNode("", true),
44834
- __props.connection?.type === "mssql" ? (openBlock(), createElementBlock("div", _hoisted_73$2, [
44835
- createBaseVNode("div", _hoisted_74$2, [
44834
+ __props.connection?.type === "mssql" ? (openBlock(), createElementBlock("div", _hoisted_73$1, [
44835
+ createBaseVNode("div", _hoisted_74$1, [
44836
44836
  _cache[54] || (_cache[54] = createBaseVNode("label", { class: "form-label" }, "排序规则", -1)),
44837
44837
  withDirectives(createBaseVNode("input", {
44838
44838
  type: "text",
@@ -44846,7 +44846,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
44846
44846
  ])) : createCommentVNode("", true)
44847
44847
  ])
44848
44848
  ]),
44849
- createBaseVNode("div", _hoisted_75$2, [
44849
+ createBaseVNode("div", _hoisted_75$1, [
44850
44850
  createBaseVNode("button", {
44851
44851
  type: "button",
44852
44852
  class: "btn btn-secondary",
@@ -44858,9 +44858,9 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
44858
44858
  onClick: createDatabase,
44859
44859
  disabled: !newDatabase.value.name || creatingDatabase.value
44860
44860
  }, [
44861
- creatingDatabase.value ? (openBlock(), createElementBlock("span", _hoisted_77$2)) : createCommentVNode("", true),
44861
+ creatingDatabase.value ? (openBlock(), createElementBlock("span", _hoisted_77$1)) : createCommentVNode("", true),
44862
44862
  _cache[55] || (_cache[55] = createTextVNode(" 创建 ", -1))
44863
- ], 8, _hoisted_76$2)
44863
+ ], 8, _hoisted_76$1)
44864
44864
  ])
44865
44865
  ])
44866
44866
  ])
@@ -44869,7 +44869,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
44869
44869
  };
44870
44870
  }
44871
44871
  });
44872
- const ConnectionDetail = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-283b71e5"]]);
44872
+ const ConnectionDetail = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-283b71e5"]]);
44873
44873
  var DatabaseType = /* @__PURE__ */ ((DatabaseType2) => {
44874
44874
  DatabaseType2["MYSQL"] = "mysql";
44875
44875
  DatabaseType2["POSTGRESQL"] = "postgres";
@@ -45221,30 +45221,30 @@ function isJsonType(type) {
45221
45221
  function isArrayType(type) {
45222
45222
  return type.toLowerCase().endsWith("[]");
45223
45223
  }
45224
- const _hoisted_1$5 = { class: "modal-content" };
45225
- const _hoisted_2$5 = { class: "modal-header" };
45226
- const _hoisted_3$5 = { class: "modal-title" };
45227
- const _hoisted_4$5 = { class: "modal-body" };
45228
- const _hoisted_5$5 = { class: "table-info-section mb-4" };
45229
- const _hoisted_6$5 = { class: "row" };
45230
- const _hoisted_7$5 = { class: "col-md-6" };
45231
- const _hoisted_8$5 = { class: "mb-3" };
45232
- const _hoisted_9$5 = ["disabled"];
45233
- const _hoisted_10$5 = { class: "col-md-6" };
45234
- const _hoisted_11$5 = { class: "mb-3" };
45235
- const _hoisted_12$5 = { class: "columns-section" };
45236
- const _hoisted_13$5 = { class: "table-responsive" };
45237
- const _hoisted_14$5 = { class: "table table-sm table-bordered" };
45238
- const _hoisted_15$5 = ["onUpdate:modelValue"];
45239
- const _hoisted_16$5 = ["onUpdate:modelValue"];
45240
- const _hoisted_17$5 = ["label"];
45241
- const _hoisted_18$5 = ["value"];
45242
- const _hoisted_19$5 = {
45224
+ const _hoisted_1$6 = { class: "modal-content" };
45225
+ const _hoisted_2$6 = { class: "modal-header" };
45226
+ const _hoisted_3$6 = { class: "modal-title" };
45227
+ const _hoisted_4$6 = { class: "modal-body" };
45228
+ const _hoisted_5$6 = { class: "table-info-section mb-4" };
45229
+ const _hoisted_6$6 = { class: "row" };
45230
+ const _hoisted_7$6 = { class: "col-md-6" };
45231
+ const _hoisted_8$6 = { class: "mb-3" };
45232
+ const _hoisted_9$6 = ["disabled"];
45233
+ const _hoisted_10$6 = { class: "col-md-6" };
45234
+ const _hoisted_11$6 = { class: "mb-3" };
45235
+ const _hoisted_12$6 = { class: "columns-section" };
45236
+ const _hoisted_13$6 = { class: "table-responsive" };
45237
+ const _hoisted_14$6 = { class: "table table-sm table-bordered" };
45238
+ const _hoisted_15$6 = ["onUpdate:modelValue"];
45239
+ const _hoisted_16$6 = ["onUpdate:modelValue"];
45240
+ const _hoisted_17$6 = ["label"];
45241
+ const _hoisted_18$6 = ["value"];
45242
+ const _hoisted_19$6 = {
45243
45243
  key: 0,
45244
45244
  class: "input-group input-group-sm"
45245
45245
  };
45246
- const _hoisted_20$5 = ["onUpdate:modelValue"];
45247
- const _hoisted_21$5 = ["onUpdate:modelValue"];
45246
+ const _hoisted_20$6 = ["onUpdate:modelValue"];
45247
+ const _hoisted_21$6 = ["onUpdate:modelValue"];
45248
45248
  const _hoisted_22$5 = ["onUpdate:modelValue"];
45249
45249
  const _hoisted_23$5 = {
45250
45250
  key: 1,
@@ -45261,7 +45261,7 @@ const _hoisted_31$4 = ["onUpdate:modelValue"];
45261
45261
  const _hoisted_32$4 = ["onClick", "disabled"];
45262
45262
  const _hoisted_33$4 = { class: "sql-preview-section mt-4" };
45263
45263
  const _hoisted_34$4 = { class: "sql-preview bg-light p-3 rounded" };
45264
- const _sfc_main$5 = /* @__PURE__ */ defineComponent({
45264
+ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
45265
45265
  __name: "table-editor",
45266
45266
  props: {
45267
45267
  visible: { type: Boolean },
@@ -45772,9 +45772,9 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
45772
45772
  onClick: _cache[2] || (_cache[2] = withModifiers(() => {
45773
45773
  }, ["stop"]))
45774
45774
  }, [
45775
- createBaseVNode("div", _hoisted_1$5, [
45776
- createBaseVNode("div", _hoisted_2$5, [
45777
- createBaseVNode("h5", _hoisted_3$5, [
45775
+ createBaseVNode("div", _hoisted_1$6, [
45776
+ createBaseVNode("div", _hoisted_2$6, [
45777
+ createBaseVNode("h5", _hoisted_3$6, [
45778
45778
  _cache[3] || (_cache[3] = createBaseVNode("i", { class: "bi bi-pencil-square me-2" }, null, -1)),
45779
45779
  createTextVNode(" " + toDisplayString(__props.mode === "create" ? "创建新表" : "修改表结构"), 1)
45780
45780
  ]),
@@ -45784,12 +45784,12 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
45784
45784
  onClick: close
45785
45785
  })
45786
45786
  ]),
45787
- createBaseVNode("div", _hoisted_4$5, [
45788
- createBaseVNode("div", _hoisted_5$5, [
45787
+ createBaseVNode("div", _hoisted_4$6, [
45788
+ createBaseVNode("div", _hoisted_5$6, [
45789
45789
  _cache[6] || (_cache[6] = createBaseVNode("h6", { class: "section-title" }, "表信息", -1)),
45790
- createBaseVNode("div", _hoisted_6$5, [
45791
- createBaseVNode("div", _hoisted_7$5, [
45792
- createBaseVNode("div", _hoisted_8$5, [
45790
+ createBaseVNode("div", _hoisted_6$6, [
45791
+ createBaseVNode("div", _hoisted_7$6, [
45792
+ createBaseVNode("div", _hoisted_8$6, [
45793
45793
  _cache[4] || (_cache[4] = createBaseVNode("label", { class: "form-label" }, "表名", -1)),
45794
45794
  withDirectives(createBaseVNode("input", {
45795
45795
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => formData.value.tableName = $event),
@@ -45797,13 +45797,13 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
45797
45797
  class: "form-control",
45798
45798
  disabled: __props.mode === "edit",
45799
45799
  placeholder: "请输入表名"
45800
- }, null, 8, _hoisted_9$5), [
45800
+ }, null, 8, _hoisted_9$6), [
45801
45801
  [vModelText, formData.value.tableName]
45802
45802
  ])
45803
45803
  ])
45804
45804
  ]),
45805
- createBaseVNode("div", _hoisted_10$5, [
45806
- createBaseVNode("div", _hoisted_11$5, [
45805
+ createBaseVNode("div", _hoisted_10$6, [
45806
+ createBaseVNode("div", _hoisted_11$6, [
45807
45807
  _cache[5] || (_cache[5] = createBaseVNode("label", { class: "form-label" }, "表注释", -1)),
45808
45808
  withDirectives(createBaseVNode("input", {
45809
45809
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => formData.value.tableComment = $event),
@@ -45817,7 +45817,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
45817
45817
  ])
45818
45818
  ])
45819
45819
  ]),
45820
- createBaseVNode("div", _hoisted_12$5, [
45820
+ createBaseVNode("div", _hoisted_12$6, [
45821
45821
  createBaseVNode("div", { class: "section-header d-flex justify-content-between align-items-center mb-3" }, [
45822
45822
  _cache[8] || (_cache[8] = createBaseVNode("h6", { class: "section-title mb-0" }, "字段管理", -1)),
45823
45823
  createBaseVNode("button", {
@@ -45828,8 +45828,8 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
45828
45828
  createTextVNode(" 添加字段 ", -1)
45829
45829
  ])])
45830
45830
  ]),
45831
- createBaseVNode("div", _hoisted_13$5, [
45832
- createBaseVNode("table", _hoisted_14$5, [
45831
+ createBaseVNode("div", _hoisted_13$6, [
45832
+ createBaseVNode("table", _hoisted_14$6, [
45833
45833
  _cache[11] || (_cache[11] = createBaseVNode("thead", { class: "table-light" }, [
45834
45834
  createBaseVNode("tr", null, [
45835
45835
  createBaseVNode("th", { width: "120" }, "字段名"),
@@ -45852,7 +45852,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
45852
45852
  type: "text",
45853
45853
  class: "form-control form-control-sm",
45854
45854
  placeholder: "字段名"
45855
- }, null, 8, _hoisted_15$5), [
45855
+ }, null, 8, _hoisted_15$6), [
45856
45856
  [vModelText, column.name]
45857
45857
  ])
45858
45858
  ]),
@@ -45871,23 +45871,23 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
45871
45871
  return openBlock(), createElementBlock("option", {
45872
45872
  key: type.name,
45873
45873
  value: type.name
45874
- }, toDisplayString(type.label), 9, _hoisted_18$5);
45874
+ }, toDisplayString(type.label), 9, _hoisted_18$6);
45875
45875
  }), 128))
45876
- ], 8, _hoisted_17$5);
45876
+ ], 8, _hoisted_17$6);
45877
45877
  }), 128))
45878
- ], 8, _hoisted_16$5), [
45878
+ ], 8, _hoisted_16$6), [
45879
45879
  [vModelSelect, column.type]
45880
45880
  ])
45881
45881
  ]),
45882
45882
  createBaseVNode("td", null, [
45883
- needsLength(column) || needsPrecision(column) ? (openBlock(), createElementBlock("div", _hoisted_19$5, [
45883
+ needsLength(column) || needsPrecision(column) ? (openBlock(), createElementBlock("div", _hoisted_19$6, [
45884
45884
  needsLength(column) ? withDirectives((openBlock(), createElementBlock("input", {
45885
45885
  key: 0,
45886
45886
  "onUpdate:modelValue": ($event) => column.length = $event,
45887
45887
  type: "number",
45888
45888
  class: "form-control form-control-sm",
45889
45889
  placeholder: "长度"
45890
- }, null, 8, _hoisted_20$5)), [
45890
+ }, null, 8, _hoisted_20$6)), [
45891
45891
  [vModelText, column.length]
45892
45892
  ]) : createCommentVNode("", true),
45893
45893
  needsPrecision(column) ? withDirectives((openBlock(), createElementBlock("input", {
@@ -45896,7 +45896,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
45896
45896
  type: "number",
45897
45897
  class: "form-control form-control-sm",
45898
45898
  placeholder: "精度"
45899
- }, null, 8, _hoisted_21$5)), [
45899
+ }, null, 8, _hoisted_21$6)), [
45900
45900
  [vModelText, column.precision]
45901
45901
  ]) : createCommentVNode("", true),
45902
45902
  needsScale(column) ? withDirectives((openBlock(), createElementBlock("input", {
@@ -46003,37 +46003,37 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
46003
46003
  };
46004
46004
  }
46005
46005
  });
46006
- const TableEditor = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-d08de09c"]]);
46007
- const _hoisted_1$4 = { class: "db-tools" };
46008
- const _hoisted_2$4 = { class: "tools-content" };
46009
- const _hoisted_3$4 = { class: "tool-section" };
46010
- const _hoisted_4$4 = { class: "tool-actions" };
46011
- const _hoisted_5$4 = {
46006
+ const TableEditor = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-d08de09c"]]);
46007
+ const _hoisted_1$5 = { class: "db-tools" };
46008
+ const _hoisted_2$5 = { class: "tools-content" };
46009
+ const _hoisted_3$5 = { class: "tool-section" };
46010
+ const _hoisted_4$5 = { class: "tool-actions" };
46011
+ const _hoisted_5$5 = {
46012
46012
  key: 0,
46013
46013
  class: "tool-component-area"
46014
46014
  };
46015
- const _hoisted_6$4 = { class: "component-header" };
46016
- const _hoisted_7$4 = { class: "component-title" };
46017
- const _hoisted_8$4 = {
46015
+ const _hoisted_6$5 = { class: "component-header" };
46016
+ const _hoisted_7$5 = { class: "component-title" };
46017
+ const _hoisted_8$5 = {
46018
46018
  key: 0,
46019
46019
  class: "tool-component sync-component"
46020
46020
  };
46021
- const _hoisted_9$4 = { class: "mb-4" };
46022
- const _hoisted_10$4 = { class: "row g-3" };
46023
- const _hoisted_11$4 = { class: "col-md-6" };
46024
- const _hoisted_12$4 = { class: "col-md-6" };
46025
- const _hoisted_13$4 = ["value"];
46026
- const _hoisted_14$4 = { class: "mb-4" };
46027
- const _hoisted_15$4 = { class: "mb-3" };
46028
- const _hoisted_16$4 = { class: "form-check form-switch" };
46029
- const _hoisted_17$4 = {
46021
+ const _hoisted_9$5 = { class: "mb-4" };
46022
+ const _hoisted_10$5 = { class: "row g-3" };
46023
+ const _hoisted_11$5 = { class: "col-md-6" };
46024
+ const _hoisted_12$5 = { class: "col-md-6" };
46025
+ const _hoisted_13$5 = ["value"];
46026
+ const _hoisted_14$5 = { class: "mb-4" };
46027
+ const _hoisted_15$5 = { class: "mb-3" };
46028
+ const _hoisted_16$5 = { class: "form-check form-switch" };
46029
+ const _hoisted_17$5 = {
46030
46030
  key: 0,
46031
46031
  class: "row g-3"
46032
46032
  };
46033
- const _hoisted_18$4 = { class: "col-md-6" };
46034
- const _hoisted_19$4 = ["value"];
46035
- const _hoisted_20$4 = { class: "col-md-6" };
46036
- const _hoisted_21$4 = ["value"];
46033
+ const _hoisted_18$5 = { class: "col-md-6" };
46034
+ const _hoisted_19$5 = ["value"];
46035
+ const _hoisted_20$5 = { class: "col-md-6" };
46036
+ const _hoisted_21$5 = ["value"];
46037
46037
  const _hoisted_22$4 = { class: "col-md-12" };
46038
46038
  const _hoisted_23$4 = {
46039
46039
  key: 1,
@@ -46089,7 +46089,7 @@ const _hoisted_61$2 = {
46089
46089
  key: 0,
46090
46090
  class: "spinner-border spinner-border-sm me-2"
46091
46091
  };
46092
- const _sfc_main$4 = /* @__PURE__ */ defineComponent({
46092
+ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
46093
46093
  __name: "db-tools",
46094
46094
  props: {
46095
46095
  connection: {},
@@ -46538,14 +46538,14 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
46538
46538
  addExecutionResult("定时备份", "info", { message: "定时备份功能开发中..." });
46539
46539
  }
46540
46540
  return (_ctx, _cache) => {
46541
- return openBlock(), createElementBlock("div", _hoisted_1$4, [
46541
+ return openBlock(), createElementBlock("div", _hoisted_1$5, [
46542
46542
  _cache[82] || (_cache[82] = createBaseVNode("div", { class: "tools-header" }, [
46543
46543
  createBaseVNode("h5", { class: "tools-title" }, [
46544
46544
  createBaseVNode("i", { class: "bi bi-tools" }),
46545
46545
  createTextVNode(" 数据库管理工具 ")
46546
46546
  ])
46547
46547
  ], -1)),
46548
- createBaseVNode("div", _hoisted_2$4, [
46548
+ createBaseVNode("div", _hoisted_2$5, [
46549
46549
  createBaseVNode("div", { class: "tool-section" }, [
46550
46550
  _cache[25] || (_cache[25] = createBaseVNode("h6", { class: "section-title" }, [
46551
46551
  createBaseVNode("i", { class: "bi bi-shield-check" }),
@@ -46669,12 +46669,12 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
46669
46669
  ])])
46670
46670
  ])
46671
46671
  ]),
46672
- createBaseVNode("div", _hoisted_3$4, [
46672
+ createBaseVNode("div", _hoisted_3$5, [
46673
46673
  _cache[42] || (_cache[42] = createBaseVNode("h6", { class: "section-title" }, [
46674
46674
  createBaseVNode("i", { class: "bi bi-arrow-left-right" }),
46675
46675
  createTextVNode(" 数据迁移 ")
46676
46676
  ], -1)),
46677
- createBaseVNode("div", _hoisted_4$4, [
46677
+ createBaseVNode("div", _hoisted_4$5, [
46678
46678
  createBaseVNode("button", {
46679
46679
  class: "btn btn-outline-primary btn-sm",
46680
46680
  onClick: showExportModal
@@ -46728,9 +46728,9 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
46728
46728
  ])
46729
46729
  ])
46730
46730
  ]),
46731
- selectedTool.value ? (openBlock(), createElementBlock("div", _hoisted_5$4, [
46732
- createBaseVNode("div", _hoisted_6$4, [
46733
- createBaseVNode("h6", _hoisted_7$4, [
46731
+ selectedTool.value ? (openBlock(), createElementBlock("div", _hoisted_5$5, [
46732
+ createBaseVNode("div", _hoisted_6$5, [
46733
+ createBaseVNode("h6", _hoisted_7$5, [
46734
46734
  createBaseVNode("i", {
46735
46735
  class: normalizeClass(getToolIcon(selectedTool.value))
46736
46736
  }, null, 2),
@@ -46744,14 +46744,14 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
46744
46744
  createTextVNode(" 关闭 ", -1)
46745
46745
  ])])
46746
46746
  ]),
46747
- selectedTool.value === "sync" ? (openBlock(), createElementBlock("div", _hoisted_8$4, [
46748
- createBaseVNode("div", _hoisted_9$4, [
46747
+ selectedTool.value === "sync" ? (openBlock(), createElementBlock("div", _hoisted_8$5, [
46748
+ createBaseVNode("div", _hoisted_9$5, [
46749
46749
  _cache[51] || (_cache[51] = createBaseVNode("h6", { class: "text-primary mb-2" }, [
46750
46750
  createBaseVNode("i", { class: "bi bi-database" }),
46751
46751
  createTextVNode(" 源数据库")
46752
46752
  ], -1)),
46753
- createBaseVNode("div", _hoisted_10$4, [
46754
- createBaseVNode("div", _hoisted_11$4, [
46753
+ createBaseVNode("div", _hoisted_10$5, [
46754
+ createBaseVNode("div", _hoisted_11$5, [
46755
46755
  _cache[48] || (_cache[48] = createBaseVNode("label", { class: "form-label" }, "数据库名称", -1)),
46756
46756
  withDirectives(createBaseVNode("input", {
46757
46757
  type: "text",
@@ -46762,7 +46762,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
46762
46762
  [vModelText, syncConfig.value.source.database]
46763
46763
  ])
46764
46764
  ]),
46765
- createBaseVNode("div", _hoisted_12$4, [
46765
+ createBaseVNode("div", _hoisted_12$5, [
46766
46766
  _cache[50] || (_cache[50] = createBaseVNode("label", { class: "form-label" }, "选择表", -1)),
46767
46767
  withDirectives(createBaseVNode("select", {
46768
46768
  class: "form-select",
@@ -46773,7 +46773,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
46773
46773
  return openBlock(), createElementBlock("option", {
46774
46774
  key: table.name,
46775
46775
  value: table.name
46776
- }, toDisplayString(table.name), 9, _hoisted_13$4);
46776
+ }, toDisplayString(table.name), 9, _hoisted_13$5);
46777
46777
  }), 128))
46778
46778
  ], 512), [
46779
46779
  [vModelSelect, syncConfig.value.source.tableName]
@@ -46781,13 +46781,13 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
46781
46781
  ])
46782
46782
  ])
46783
46783
  ]),
46784
- createBaseVNode("div", _hoisted_14$4, [
46784
+ createBaseVNode("div", _hoisted_14$5, [
46785
46785
  _cache[66] || (_cache[66] = createBaseVNode("h6", { class: "text-primary mb-2" }, [
46786
46786
  createBaseVNode("i", { class: "bi bi-database" }),
46787
46787
  createTextVNode(" 目标数据库")
46788
46788
  ], -1)),
46789
- createBaseVNode("div", _hoisted_15$4, [
46790
- createBaseVNode("div", _hoisted_16$4, [
46789
+ createBaseVNode("div", _hoisted_15$5, [
46790
+ createBaseVNode("div", _hoisted_16$5, [
46791
46791
  withDirectives(createBaseVNode("input", {
46792
46792
  class: "form-check-input",
46793
46793
  type: "checkbox",
@@ -46802,8 +46802,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
46802
46802
  }, "使用已配置的数据库连接", -1))
46803
46803
  ])
46804
46804
  ]),
46805
- useExistingConnection.value ? (openBlock(), createElementBlock("div", _hoisted_17$4, [
46806
- createBaseVNode("div", _hoisted_18$4, [
46805
+ useExistingConnection.value ? (openBlock(), createElementBlock("div", _hoisted_17$5, [
46806
+ createBaseVNode("div", _hoisted_18$5, [
46807
46807
  _cache[54] || (_cache[54] = createBaseVNode("label", { class: "form-label" }, "选择数据库连接", -1)),
46808
46808
  withDirectives(createBaseVNode("select", {
46809
46809
  class: "form-select",
@@ -46814,13 +46814,13 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
46814
46814
  return openBlock(), createElementBlock("option", {
46815
46815
  key: conn.id,
46816
46816
  value: conn.id
46817
- }, toDisplayString(conn.name) + " (" + toDisplayString(conn.type) + ")", 9, _hoisted_19$4);
46817
+ }, toDisplayString(conn.name) + " (" + toDisplayString(conn.type) + ")", 9, _hoisted_19$5);
46818
46818
  }), 128))
46819
46819
  ], 512), [
46820
46820
  [vModelSelect, selectedConnectionId.value]
46821
46821
  ])
46822
46822
  ]),
46823
- createBaseVNode("div", _hoisted_20$4, [
46823
+ createBaseVNode("div", _hoisted_20$5, [
46824
46824
  _cache[56] || (_cache[56] = createBaseVNode("label", { class: "form-label" }, "选择数据库", -1)),
46825
46825
  withDirectives(createBaseVNode("select", {
46826
46826
  class: "form-select",
@@ -46831,7 +46831,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
46831
46831
  return openBlock(), createElementBlock("option", {
46832
46832
  key: db,
46833
46833
  value: db
46834
- }, toDisplayString(db), 9, _hoisted_21$4);
46834
+ }, toDisplayString(db), 9, _hoisted_21$5);
46835
46835
  }), 128))
46836
46836
  ], 512), [
46837
46837
  [vModelSelect, selectedDatabaseName.value]
@@ -47148,28 +47148,28 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
47148
47148
  };
47149
47149
  }
47150
47150
  });
47151
- const DbTools = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-622732f3"]]);
47152
- const _hoisted_1$3 = { class: "database-detail" };
47153
- const _hoisted_2$3 = { class: "database-header" };
47154
- const _hoisted_3$3 = { class: "database-header-content" };
47155
- const _hoisted_4$3 = { class: "database-info" };
47156
- const _hoisted_5$3 = { class: "database-meta" };
47157
- const _hoisted_6$3 = { class: "database-name" };
47158
- const _hoisted_7$3 = { class: "connection-info" };
47159
- const _hoisted_8$3 = { class: "connection-name" };
47160
- const _hoisted_9$3 = { class: "connection-type" };
47161
- const _hoisted_10$3 = { class: "database-stats" };
47162
- const _hoisted_11$3 = { class: "stat-item" };
47163
- const _hoisted_12$3 = { class: "stat-value" };
47164
- const _hoisted_13$3 = { class: "stat-item" };
47165
- const _hoisted_14$3 = { class: "stat-value" };
47166
- const _hoisted_15$3 = { class: "database-tabs" };
47167
- const _hoisted_16$3 = { class: "nav nav-tabs" };
47168
- const _hoisted_17$3 = { class: "nav-item" };
47169
- const _hoisted_18$3 = { class: "nav-item" };
47170
- const _hoisted_19$3 = { class: "nav-item" };
47171
- const _hoisted_20$3 = { class: "nav-item" };
47172
- const _hoisted_21$3 = { class: "nav-item" };
47151
+ const DbTools = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-622732f3"]]);
47152
+ const _hoisted_1$4 = { class: "database-detail" };
47153
+ const _hoisted_2$4 = { class: "database-header" };
47154
+ const _hoisted_3$4 = { class: "database-header-content" };
47155
+ const _hoisted_4$4 = { class: "database-info" };
47156
+ const _hoisted_5$4 = { class: "database-meta" };
47157
+ const _hoisted_6$4 = { class: "database-name" };
47158
+ const _hoisted_7$4 = { class: "connection-info" };
47159
+ const _hoisted_8$4 = { class: "connection-name" };
47160
+ const _hoisted_9$4 = { class: "connection-type" };
47161
+ const _hoisted_10$4 = { class: "database-stats" };
47162
+ const _hoisted_11$4 = { class: "stat-item" };
47163
+ const _hoisted_12$4 = { class: "stat-value" };
47164
+ const _hoisted_13$4 = { class: "stat-item" };
47165
+ const _hoisted_14$4 = { class: "stat-value" };
47166
+ const _hoisted_15$4 = { class: "database-tabs" };
47167
+ const _hoisted_16$4 = { class: "nav nav-tabs" };
47168
+ const _hoisted_17$4 = { class: "nav-item" };
47169
+ const _hoisted_18$4 = { class: "nav-item" };
47170
+ const _hoisted_19$4 = { class: "nav-item" };
47171
+ const _hoisted_20$4 = { class: "nav-item" };
47172
+ const _hoisted_21$4 = { class: "nav-item" };
47173
47173
  const _hoisted_22$3 = { class: "tab-content" };
47174
47174
  const _hoisted_23$3 = { class: "tab-panel" };
47175
47175
  const _hoisted_24$3 = {
@@ -47181,121 +47181,119 @@ const _hoisted_26$3 = { class: "table-grid" };
47181
47181
  const _hoisted_27$3 = ["onClick"];
47182
47182
  const _hoisted_28$3 = { class: "card-header" };
47183
47183
  const _hoisted_29$2 = { class: "table-info" };
47184
- const _hoisted_30$2 = { class: "table-name" };
47185
- const _hoisted_31$2 = { class: "table-engine" };
47186
- const _hoisted_32$2 = { class: "card-body" };
47187
- const _hoisted_33$2 = { class: "table-stats" };
47188
- const _hoisted_34$2 = {
47189
- key: 0,
47190
- class: "stat"
47191
- };
47192
- const _hoisted_35$2 = { class: "stat-value" };
47184
+ const _hoisted_30$2 = { class: "table-name-wrapper" };
47185
+ const _hoisted_31$2 = ["title"];
47186
+ const _hoisted_32$2 = { class: "table-engine" };
47187
+ const _hoisted_33$2 = ["title"];
47188
+ const _hoisted_34$2 = { class: "card-body" };
47189
+ const _hoisted_35$2 = { class: "table-stats" };
47193
47190
  const _hoisted_36$2 = {
47194
- key: 1,
47191
+ key: 0,
47195
47192
  class: "stat"
47196
47193
  };
47197
47194
  const _hoisted_37$2 = { class: "stat-value" };
47198
47195
  const _hoisted_38$2 = {
47199
- key: 0,
47200
- class: "table-comment"
47196
+ key: 1,
47197
+ class: "stat"
47201
47198
  };
47202
- const _hoisted_39$2 = { class: "table-actions" };
47203
- const _hoisted_40$2 = ["onClick"];
47204
- const _hoisted_41$1 = {
47199
+ const _hoisted_39$2 = { class: "stat-value" };
47200
+ const _hoisted_40$2 = { class: "table-actions" };
47201
+ const _hoisted_41$1 = ["onClick"];
47202
+ const _hoisted_42$1 = {
47205
47203
  key: 0,
47206
47204
  class: "empty-state"
47207
47205
  };
47208
- const _hoisted_42$1 = { class: "tab-panel" };
47209
- const _hoisted_43$1 = {
47206
+ const _hoisted_43$1 = { class: "tab-panel" };
47207
+ const _hoisted_44$1 = {
47210
47208
  key: 0,
47211
47209
  class: "views-grid"
47212
47210
  };
47213
- const _hoisted_44$1 = { class: "card-header" };
47214
- const _hoisted_45$1 = { class: "view-info" };
47215
- const _hoisted_46$1 = { class: "view-name" };
47216
- const _hoisted_47$1 = {
47211
+ const _hoisted_45$1 = { class: "card-header" };
47212
+ const _hoisted_46$1 = { class: "view-info" };
47213
+ const _hoisted_47$1 = { class: "view-name" };
47214
+ const _hoisted_48$1 = {
47217
47215
  key: 0,
47218
47216
  class: "view-comment"
47219
47217
  };
47220
- const _hoisted_48$1 = { class: "card-body" };
47221
- const _hoisted_49$1 = { class: "view-actions" };
47222
- const _hoisted_50$1 = ["onClick"];
47218
+ const _hoisted_49$1 = { class: "card-body" };
47219
+ const _hoisted_50$1 = { class: "view-actions" };
47223
47220
  const _hoisted_51$1 = ["onClick"];
47224
- const _hoisted_52$1 = {
47221
+ const _hoisted_52$1 = ["onClick"];
47222
+ const _hoisted_53$1 = {
47225
47223
  key: 1,
47226
47224
  class: "empty-state"
47227
47225
  };
47228
- const _hoisted_53$1 = { class: "tab-panel" };
47229
- const _hoisted_54$1 = {
47226
+ const _hoisted_54$1 = { class: "tab-panel" };
47227
+ const _hoisted_55$1 = {
47230
47228
  key: 0,
47231
47229
  class: "procedures-grid"
47232
47230
  };
47233
- const _hoisted_55$1 = { class: "card-header" };
47234
- const _hoisted_56$1 = { class: "procedure-info" };
47235
- const _hoisted_57$1 = { class: "procedure-name" };
47236
- const _hoisted_58$1 = {
47231
+ const _hoisted_56$1 = { class: "card-header" };
47232
+ const _hoisted_57$1 = { class: "procedure-info" };
47233
+ const _hoisted_58$1 = { class: "procedure-name" };
47234
+ const _hoisted_59$1 = {
47237
47235
  key: 0,
47238
47236
  class: "procedure-comment"
47239
47237
  };
47240
- const _hoisted_59$1 = { class: "procedure-type" };
47241
- const _hoisted_60$1 = { class: "badge bg-info" };
47242
- const _hoisted_61$1 = {
47238
+ const _hoisted_60$1 = { class: "procedure-type" };
47239
+ const _hoisted_61$1 = { class: "badge bg-info" };
47240
+ const _hoisted_62 = {
47243
47241
  key: 0,
47244
47242
  class: "badge bg-secondary ms-1"
47245
47243
  };
47246
- const _hoisted_62$1 = { class: "card-body" };
47247
- const _hoisted_63$1 = { class: "procedure-actions" };
47248
- const _hoisted_64$1 = ["onClick"];
47249
- const _hoisted_65$1 = ["onClick"];
47250
- const _hoisted_66$1 = {
47244
+ const _hoisted_63 = { class: "card-body" };
47245
+ const _hoisted_64 = { class: "procedure-actions" };
47246
+ const _hoisted_65 = ["onClick"];
47247
+ const _hoisted_66 = ["onClick"];
47248
+ const _hoisted_67 = {
47251
47249
  key: 1,
47252
47250
  class: "empty-state"
47253
47251
  };
47254
- const _hoisted_67$1 = { class: "tab-panel" };
47255
- const _hoisted_68$1 = { class: "tab-panel" };
47256
- const _hoisted_69$1 = { class: "sql-executor-section" };
47257
- const _hoisted_70$1 = { class: "tab-panel" };
47258
- const _hoisted_71$1 = {
47252
+ const _hoisted_68 = { class: "tab-panel" };
47253
+ const _hoisted_69 = { class: "tab-panel" };
47254
+ const _hoisted_70 = { class: "sql-executor-section" };
47255
+ const _hoisted_71 = { class: "tab-panel" };
47256
+ const _hoisted_72 = {
47259
47257
  key: 0,
47260
47258
  class: "modal fade show d-block",
47261
47259
  style: { "background": "rgba(0,0,0,0.5)" }
47262
47260
  };
47263
- const _hoisted_72$1 = { class: "modal-dialog modal-lg" };
47264
- const _hoisted_73$1 = { class: "modal-content" };
47265
- const _hoisted_74$1 = { class: "modal-header" };
47266
- const _hoisted_75$1 = { class: "modal-body" };
47267
- const _hoisted_76$1 = { class: "mb-3" };
47268
- const _hoisted_77$1 = { class: "mb-3" };
47269
- const _hoisted_78$1 = { class: "modal-footer" };
47270
- const _hoisted_79$1 = {
47261
+ const _hoisted_73 = { class: "modal-dialog modal-lg" };
47262
+ const _hoisted_74 = { class: "modal-content" };
47263
+ const _hoisted_75 = { class: "modal-header" };
47264
+ const _hoisted_76 = { class: "modal-body" };
47265
+ const _hoisted_77 = { class: "mb-3" };
47266
+ const _hoisted_78 = { class: "mb-3" };
47267
+ const _hoisted_79 = { class: "modal-footer" };
47268
+ const _hoisted_80 = {
47271
47269
  key: 1,
47272
47270
  class: "modal fade show d-block",
47273
47271
  style: { "background": "rgba(0,0,0,0.5)" }
47274
47272
  };
47275
- const _hoisted_80$1 = { class: "modal-dialog modal-lg" };
47276
- const _hoisted_81$1 = { class: "modal-content" };
47277
- const _hoisted_82$1 = { class: "modal-header" };
47278
- const _hoisted_83$1 = { class: "modal-title" };
47279
- const _hoisted_84$1 = { class: "modal-body" };
47280
- const _hoisted_85$1 = { class: "mb-3" };
47281
- const _hoisted_86$1 = { class: "mb-3" };
47282
- const _hoisted_87$1 = { class: "mb-3" };
47283
- const _hoisted_88 = { class: "modal-footer" };
47284
- const _hoisted_89 = {
47273
+ const _hoisted_81 = { class: "modal-dialog modal-lg" };
47274
+ const _hoisted_82 = { class: "modal-content" };
47275
+ const _hoisted_83 = { class: "modal-header" };
47276
+ const _hoisted_84 = { class: "modal-title" };
47277
+ const _hoisted_85 = { class: "modal-body" };
47278
+ const _hoisted_86 = { class: "mb-3" };
47279
+ const _hoisted_87 = { class: "mb-3" };
47280
+ const _hoisted_88 = { class: "mb-3" };
47281
+ const _hoisted_89 = { class: "modal-footer" };
47282
+ const _hoisted_90 = {
47285
47283
  key: 2,
47286
47284
  class: "modal fade show d-block",
47287
47285
  style: { "background": "rgba(0,0,0,0.5)" }
47288
47286
  };
47289
- const _hoisted_90 = { class: "modal-dialog modal-lg" };
47290
- const _hoisted_91 = { class: "modal-content" };
47291
- const _hoisted_92 = { class: "modal-header" };
47292
- const _hoisted_93 = { class: "modal-title" };
47293
- const _hoisted_94 = { class: "modal-body" };
47294
- const _hoisted_95 = { class: "mb-3" };
47287
+ const _hoisted_91 = { class: "modal-dialog modal-lg" };
47288
+ const _hoisted_92 = { class: "modal-content" };
47289
+ const _hoisted_93 = { class: "modal-header" };
47290
+ const _hoisted_94 = { class: "modal-title" };
47291
+ const _hoisted_95 = { class: "modal-body" };
47295
47292
  const _hoisted_96 = { class: "mb-3" };
47296
47293
  const _hoisted_97 = { class: "mb-3" };
47297
- const _hoisted_98 = { class: "modal-footer" };
47298
- const _sfc_main$3 = /* @__PURE__ */ defineComponent({
47294
+ const _hoisted_98 = { class: "mb-3" };
47295
+ const _hoisted_99 = { class: "modal-footer" };
47296
+ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
47299
47297
  __name: "database-detail",
47300
47298
  props: {
47301
47299
  connection: {},
@@ -47562,36 +47560,36 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
47562
47560
  emit("execute-sql", sql2);
47563
47561
  }
47564
47562
  return (_ctx, _cache) => {
47565
- return openBlock(), createElementBlock("div", _hoisted_1$3, [
47566
- createBaseVNode("div", _hoisted_2$3, [
47567
- createBaseVNode("div", _hoisted_3$3, [
47568
- createBaseVNode("div", _hoisted_4$3, [
47563
+ return openBlock(), createElementBlock("div", _hoisted_1$4, [
47564
+ createBaseVNode("div", _hoisted_2$4, [
47565
+ createBaseVNode("div", _hoisted_3$4, [
47566
+ createBaseVNode("div", _hoisted_4$4, [
47569
47567
  _cache[19] || (_cache[19] = createBaseVNode("div", { class: "database-icon" }, [
47570
47568
  createBaseVNode("i", { class: "bi bi-database" })
47571
47569
  ], -1)),
47572
- createBaseVNode("div", _hoisted_5$3, [
47573
- createBaseVNode("h4", _hoisted_6$3, toDisplayString(__props.database), 1),
47574
- createBaseVNode("div", _hoisted_7$3, [
47575
- createBaseVNode("span", _hoisted_8$3, toDisplayString(__props.connection?.name), 1),
47576
- createBaseVNode("span", _hoisted_9$3, toDisplayString(getDbTypeLabel(__props.connection?.type)), 1)
47570
+ createBaseVNode("div", _hoisted_5$4, [
47571
+ createBaseVNode("h4", _hoisted_6$4, toDisplayString(__props.database), 1),
47572
+ createBaseVNode("div", _hoisted_7$4, [
47573
+ createBaseVNode("span", _hoisted_8$4, toDisplayString(__props.connection?.name), 1),
47574
+ createBaseVNode("span", _hoisted_9$4, toDisplayString(getDbTypeLabel(__props.connection?.type)), 1)
47577
47575
  ])
47578
47576
  ])
47579
47577
  ]),
47580
- createBaseVNode("div", _hoisted_10$3, [
47581
- createBaseVNode("div", _hoisted_11$3, [
47582
- createBaseVNode("div", _hoisted_12$3, toDisplayString(__props.databaseInfo?.tableCount || 0), 1),
47578
+ createBaseVNode("div", _hoisted_10$4, [
47579
+ createBaseVNode("div", _hoisted_11$4, [
47580
+ createBaseVNode("div", _hoisted_12$4, toDisplayString(__props.databaseInfo?.tableCount || 0), 1),
47583
47581
  _cache[20] || (_cache[20] = createBaseVNode("div", { class: "stat-label" }, "表", -1))
47584
47582
  ]),
47585
- createBaseVNode("div", _hoisted_13$3, [
47586
- createBaseVNode("div", _hoisted_14$3, toDisplayString(formatSize(__props.databaseInfo?.size || 0)), 1),
47583
+ createBaseVNode("div", _hoisted_13$4, [
47584
+ createBaseVNode("div", _hoisted_14$4, toDisplayString(formatSize(__props.databaseInfo?.size || 0)), 1),
47587
47585
  _cache[21] || (_cache[21] = createBaseVNode("div", { class: "stat-label" }, "大小", -1))
47588
47586
  ])
47589
47587
  ])
47590
47588
  ])
47591
47589
  ]),
47592
- createBaseVNode("div", _hoisted_15$3, [
47593
- createBaseVNode("ul", _hoisted_16$3, [
47594
- createBaseVNode("li", _hoisted_17$3, [
47590
+ createBaseVNode("div", _hoisted_15$4, [
47591
+ createBaseVNode("ul", _hoisted_16$4, [
47592
+ createBaseVNode("li", _hoisted_17$4, [
47595
47593
  createBaseVNode("button", {
47596
47594
  class: normalizeClass(["nav-link", { active: activeTab.value === "tables" }]),
47597
47595
  onClick: _cache[0] || (_cache[0] = ($event) => activeTab.value = "tables")
@@ -47600,7 +47598,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
47600
47598
  createTextVNode(" 数据表 ", -1)
47601
47599
  ])], 2)
47602
47600
  ]),
47603
- createBaseVNode("li", _hoisted_18$3, [
47601
+ createBaseVNode("li", _hoisted_18$4, [
47604
47602
  createBaseVNode("button", {
47605
47603
  class: normalizeClass(["nav-link", { active: activeTab.value === "views" }]),
47606
47604
  onClick: _cache[1] || (_cache[1] = ($event) => activeTab.value = "views")
@@ -47609,7 +47607,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
47609
47607
  createTextVNode(" 视图 ", -1)
47610
47608
  ])], 2)
47611
47609
  ]),
47612
- createBaseVNode("li", _hoisted_19$3, [
47610
+ createBaseVNode("li", _hoisted_19$4, [
47613
47611
  createBaseVNode("button", {
47614
47612
  class: normalizeClass(["nav-link", { active: activeTab.value === "procedures" }]),
47615
47613
  onClick: _cache[2] || (_cache[2] = ($event) => activeTab.value = "procedures")
@@ -47618,7 +47616,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
47618
47616
  createTextVNode(" 存储过程 ", -1)
47619
47617
  ])], 2)
47620
47618
  ]),
47621
- createBaseVNode("li", _hoisted_20$3, [
47619
+ createBaseVNode("li", _hoisted_20$4, [
47622
47620
  createBaseVNode("button", {
47623
47621
  class: normalizeClass(["nav-link", { active: activeTab.value === "sql" }]),
47624
47622
  onClick: _cache[3] || (_cache[3] = ($event) => activeTab.value = "sql")
@@ -47627,7 +47625,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
47627
47625
  createTextVNode(" 执行SQL ", -1)
47628
47626
  ])], 2)
47629
47627
  ]),
47630
- createBaseVNode("li", _hoisted_21$3, [
47628
+ createBaseVNode("li", _hoisted_21$4, [
47631
47629
  createBaseVNode("button", {
47632
47630
  class: normalizeClass(["nav-link", { active: activeTab.value === "tools" }]),
47633
47631
  onClick: _cache[4] || (_cache[4] = ($event) => activeTab.value = "tools")
@@ -47676,35 +47674,44 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
47676
47674
  createBaseVNode("i", { class: "bi bi-table" })
47677
47675
  ], -1)),
47678
47676
  createBaseVNode("div", _hoisted_29$2, [
47679
- createBaseVNode("div", _hoisted_30$2, toDisplayString(table.name), 1),
47680
- createBaseVNode("div", _hoisted_31$2, toDisplayString(table.engine || "-"), 1)
47677
+ createBaseVNode("div", _hoisted_30$2, [
47678
+ createBaseVNode("div", {
47679
+ class: "table-name",
47680
+ title: table.name
47681
+ }, toDisplayString(table.name), 9, _hoisted_31$2),
47682
+ createBaseVNode("div", _hoisted_32$2, toDisplayString(table.engine || "-"), 1)
47683
+ ]),
47684
+ table.comment ? (openBlock(), createElementBlock("div", {
47685
+ key: 0,
47686
+ class: "table-comment-header",
47687
+ title: table.comment
47688
+ }, toDisplayString(table.comment), 9, _hoisted_33$2)) : createCommentVNode("", true)
47681
47689
  ])
47682
47690
  ]),
47683
- createBaseVNode("div", _hoisted_32$2, [
47684
- createBaseVNode("div", _hoisted_33$2, [
47685
- table.rowCount !== void 0 ? (openBlock(), createElementBlock("div", _hoisted_34$2, [
47691
+ createBaseVNode("div", _hoisted_34$2, [
47692
+ createBaseVNode("div", _hoisted_35$2, [
47693
+ table.rowCount !== void 0 ? (openBlock(), createElementBlock("div", _hoisted_36$2, [
47686
47694
  _cache[31] || (_cache[31] = createBaseVNode("span", { class: "stat-label" }, "行数", -1)),
47687
- createBaseVNode("span", _hoisted_35$2, toDisplayString(formatNumber2(table.rowCount)), 1)
47695
+ createBaseVNode("span", _hoisted_37$2, toDisplayString(formatNumber2(table.rowCount)), 1)
47688
47696
  ])) : createCommentVNode("", true),
47689
- table.dataSize !== void 0 ? (openBlock(), createElementBlock("div", _hoisted_36$2, [
47697
+ table.dataSize !== void 0 ? (openBlock(), createElementBlock("div", _hoisted_38$2, [
47690
47698
  _cache[32] || (_cache[32] = createBaseVNode("span", { class: "stat-label" }, "大小", -1)),
47691
- createBaseVNode("span", _hoisted_37$2, toDisplayString(formatSize(table.dataSize)), 1)
47699
+ createBaseVNode("span", _hoisted_39$2, toDisplayString(formatSize(table.dataSize)), 1)
47692
47700
  ])) : createCommentVNode("", true)
47693
47701
  ]),
47694
- table.comment ? (openBlock(), createElementBlock("div", _hoisted_38$2, toDisplayString(table.comment), 1)) : createCommentVNode("", true),
47695
- createBaseVNode("div", _hoisted_39$2, [
47702
+ createBaseVNode("div", _hoisted_40$2, [
47696
47703
  createBaseVNode("button", {
47697
47704
  class: "btn btn-sm btn-outline-primary",
47698
47705
  onClick: withModifiers(($event) => editTable(table), ["stop"])
47699
47706
  }, [..._cache[33] || (_cache[33] = [
47700
47707
  createBaseVNode("i", { class: "bi bi-pencil" }, null, -1)
47701
- ])], 8, _hoisted_40$2)
47708
+ ])], 8, _hoisted_41$1)
47702
47709
  ])
47703
47710
  ])
47704
47711
  ], 8, _hoisted_27$3);
47705
47712
  }), 128))
47706
47713
  ]),
47707
- !tables.value || tables.value.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_41$1, [
47714
+ !tables.value || tables.value.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_42$1, [
47708
47715
  _cache[35] || (_cache[35] = createBaseVNode("i", { class: "bi bi-inbox" }, null, -1)),
47709
47716
  _cache[36] || (_cache[36] = createBaseVNode("p", null, "暂无数据表", -1)),
47710
47717
  createBaseVNode("button", {
@@ -47719,7 +47726,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
47719
47726
  ], 512), [
47720
47727
  [vShow, activeTab.value === "tables"]
47721
47728
  ]),
47722
- withDirectives(createBaseVNode("div", _hoisted_42$1, [
47729
+ withDirectives(createBaseVNode("div", _hoisted_43$1, [
47723
47730
  createBaseVNode("div", { class: "views-actions mb-3" }, [
47724
47731
  createBaseVNode("button", {
47725
47732
  class: "btn btn-success btn-sm",
@@ -47736,42 +47743,42 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
47736
47743
  createTextVNode(" 刷新 ", -1)
47737
47744
  ])])
47738
47745
  ]),
47739
- views.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_43$1, [
47746
+ views.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_44$1, [
47740
47747
  (openBlock(true), createElementBlock(Fragment, null, renderList(views.value, (view) => {
47741
47748
  return openBlock(), createElementBlock("div", {
47742
47749
  key: view.name,
47743
47750
  class: "view-card"
47744
47751
  }, [
47745
- createBaseVNode("div", _hoisted_44$1, [
47752
+ createBaseVNode("div", _hoisted_45$1, [
47746
47753
  _cache[39] || (_cache[39] = createBaseVNode("div", { class: "view-icon" }, [
47747
47754
  createBaseVNode("i", { class: "bi bi-eye" })
47748
47755
  ], -1)),
47749
- createBaseVNode("div", _hoisted_45$1, [
47750
- createBaseVNode("div", _hoisted_46$1, toDisplayString(view.name), 1),
47751
- view.comment ? (openBlock(), createElementBlock("div", _hoisted_47$1, toDisplayString(view.comment), 1)) : createCommentVNode("", true)
47756
+ createBaseVNode("div", _hoisted_46$1, [
47757
+ createBaseVNode("div", _hoisted_47$1, toDisplayString(view.name), 1),
47758
+ view.comment ? (openBlock(), createElementBlock("div", _hoisted_48$1, toDisplayString(view.comment), 1)) : createCommentVNode("", true)
47752
47759
  ])
47753
47760
  ]),
47754
- createBaseVNode("div", _hoisted_48$1, [
47755
- createBaseVNode("div", _hoisted_49$1, [
47761
+ createBaseVNode("div", _hoisted_49$1, [
47762
+ createBaseVNode("div", _hoisted_50$1, [
47756
47763
  createBaseVNode("button", {
47757
47764
  class: "btn btn-sm btn-outline-primary",
47758
47765
  onClick: ($event) => editView(view)
47759
47766
  }, [..._cache[40] || (_cache[40] = [
47760
47767
  createBaseVNode("i", { class: "bi bi-pencil" }, null, -1),
47761
47768
  createTextVNode(" 编辑 ", -1)
47762
- ])], 8, _hoisted_50$1),
47769
+ ])], 8, _hoisted_51$1),
47763
47770
  createBaseVNode("button", {
47764
47771
  class: "btn btn-sm btn-outline-danger",
47765
47772
  onClick: ($event) => deleteView(view)
47766
47773
  }, [..._cache[41] || (_cache[41] = [
47767
47774
  createBaseVNode("i", { class: "bi bi-trash" }, null, -1),
47768
47775
  createTextVNode(" 删除 ", -1)
47769
- ])], 8, _hoisted_51$1)
47776
+ ])], 8, _hoisted_52$1)
47770
47777
  ])
47771
47778
  ])
47772
47779
  ]);
47773
47780
  }), 128))
47774
- ])) : (openBlock(), createElementBlock("div", _hoisted_52$1, [
47781
+ ])) : (openBlock(), createElementBlock("div", _hoisted_53$1, [
47775
47782
  _cache[43] || (_cache[43] = createBaseVNode("i", { class: "bi bi-eye" }, null, -1)),
47776
47783
  _cache[44] || (_cache[44] = createBaseVNode("p", null, "暂无视图", -1)),
47777
47784
  createBaseVNode("button", {
@@ -47785,7 +47792,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
47785
47792
  ], 512), [
47786
47793
  [vShow, activeTab.value === "views"]
47787
47794
  ]),
47788
- withDirectives(createBaseVNode("div", _hoisted_53$1, [
47795
+ withDirectives(createBaseVNode("div", _hoisted_54$1, [
47789
47796
  createBaseVNode("div", { class: "procedures-actions mb-3" }, [
47790
47797
  createBaseVNode("button", {
47791
47798
  class: "btn btn-info btn-sm",
@@ -47802,46 +47809,46 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
47802
47809
  createTextVNode(" 刷新 ", -1)
47803
47810
  ])])
47804
47811
  ]),
47805
- procedures.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_54$1, [
47812
+ procedures.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_55$1, [
47806
47813
  (openBlock(true), createElementBlock(Fragment, null, renderList(procedures.value, (procedure) => {
47807
47814
  return openBlock(), createElementBlock("div", {
47808
47815
  key: procedure.name,
47809
47816
  class: "procedure-card"
47810
47817
  }, [
47811
- createBaseVNode("div", _hoisted_55$1, [
47818
+ createBaseVNode("div", _hoisted_56$1, [
47812
47819
  _cache[47] || (_cache[47] = createBaseVNode("div", { class: "procedure-icon" }, [
47813
47820
  createBaseVNode("i", { class: "bi bi-gear" })
47814
47821
  ], -1)),
47815
- createBaseVNode("div", _hoisted_56$1, [
47816
- createBaseVNode("div", _hoisted_57$1, toDisplayString(procedure.name), 1),
47817
- procedure.comment ? (openBlock(), createElementBlock("div", _hoisted_58$1, toDisplayString(procedure.comment), 1)) : createCommentVNode("", true),
47818
- createBaseVNode("div", _hoisted_59$1, [
47819
- createBaseVNode("span", _hoisted_60$1, toDisplayString(procedure.type), 1),
47820
- procedure.returnType ? (openBlock(), createElementBlock("span", _hoisted_61$1, toDisplayString(procedure.returnType), 1)) : createCommentVNode("", true)
47822
+ createBaseVNode("div", _hoisted_57$1, [
47823
+ createBaseVNode("div", _hoisted_58$1, toDisplayString(procedure.name), 1),
47824
+ procedure.comment ? (openBlock(), createElementBlock("div", _hoisted_59$1, toDisplayString(procedure.comment), 1)) : createCommentVNode("", true),
47825
+ createBaseVNode("div", _hoisted_60$1, [
47826
+ createBaseVNode("span", _hoisted_61$1, toDisplayString(procedure.type), 1),
47827
+ procedure.returnType ? (openBlock(), createElementBlock("span", _hoisted_62, toDisplayString(procedure.returnType), 1)) : createCommentVNode("", true)
47821
47828
  ])
47822
47829
  ])
47823
47830
  ]),
47824
- createBaseVNode("div", _hoisted_62$1, [
47825
- createBaseVNode("div", _hoisted_63$1, [
47831
+ createBaseVNode("div", _hoisted_63, [
47832
+ createBaseVNode("div", _hoisted_64, [
47826
47833
  createBaseVNode("button", {
47827
47834
  class: "btn btn-sm btn-outline-primary",
47828
47835
  onClick: ($event) => editProcedure(procedure)
47829
47836
  }, [..._cache[48] || (_cache[48] = [
47830
47837
  createBaseVNode("i", { class: "bi bi-pencil" }, null, -1),
47831
47838
  createTextVNode(" 编辑 ", -1)
47832
- ])], 8, _hoisted_64$1),
47839
+ ])], 8, _hoisted_65),
47833
47840
  createBaseVNode("button", {
47834
47841
  class: "btn btn-sm btn-outline-danger",
47835
47842
  onClick: ($event) => deleteProcedure(procedure)
47836
47843
  }, [..._cache[49] || (_cache[49] = [
47837
47844
  createBaseVNode("i", { class: "bi bi-trash" }, null, -1),
47838
47845
  createTextVNode(" 删除 ", -1)
47839
- ])], 8, _hoisted_65$1)
47846
+ ])], 8, _hoisted_66)
47840
47847
  ])
47841
47848
  ])
47842
47849
  ]);
47843
47850
  }), 128))
47844
- ])) : (openBlock(), createElementBlock("div", _hoisted_66$1, [
47851
+ ])) : (openBlock(), createElementBlock("div", _hoisted_67, [
47845
47852
  _cache[51] || (_cache[51] = createBaseVNode("i", { class: "bi bi-gear" }, null, -1)),
47846
47853
  _cache[52] || (_cache[52] = createBaseVNode("p", null, "暂无存储过程", -1)),
47847
47854
  createBaseVNode("button", {
@@ -47855,7 +47862,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
47855
47862
  ], 512), [
47856
47863
  [vShow, activeTab.value === "procedures"]
47857
47864
  ]),
47858
- withDirectives(createBaseVNode("div", _hoisted_67$1, [..._cache[53] || (_cache[53] = [
47865
+ withDirectives(createBaseVNode("div", _hoisted_68, [..._cache[53] || (_cache[53] = [
47859
47866
  createBaseVNode("div", { class: "empty-state" }, [
47860
47867
  createBaseVNode("i", { class: "bi bi-code-slash" }),
47861
47868
  createBaseVNode("p", null, "函数功能开发中...")
@@ -47863,8 +47870,8 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
47863
47870
  ])], 512), [
47864
47871
  [vShow, activeTab.value === "functions"]
47865
47872
  ]),
47866
- withDirectives(createBaseVNode("div", _hoisted_68$1, [
47867
- createBaseVNode("div", _hoisted_69$1, [
47873
+ withDirectives(createBaseVNode("div", _hoisted_69, [
47874
+ createBaseVNode("div", _hoisted_70, [
47868
47875
  createVNode(SqlExecutor, {
47869
47876
  connection: __props.connection,
47870
47877
  database: __props.database
@@ -47873,7 +47880,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
47873
47880
  ], 512), [
47874
47881
  [vShow, activeTab.value === "sql"]
47875
47882
  ]),
47876
- withDirectives(createBaseVNode("div", _hoisted_70$1, [
47883
+ withDirectives(createBaseVNode("div", _hoisted_71, [
47877
47884
  createVNode(DbTools, {
47878
47885
  connection: __props.connection,
47879
47886
  database: __props.database,
@@ -47884,10 +47891,10 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
47884
47891
  ])
47885
47892
  ])
47886
47893
  ]),
47887
- showCreateTable.value ? (openBlock(), createElementBlock("div", _hoisted_71$1, [
47888
- createBaseVNode("div", _hoisted_72$1, [
47889
- createBaseVNode("div", _hoisted_73$1, [
47890
- createBaseVNode("div", _hoisted_74$1, [
47894
+ showCreateTable.value ? (openBlock(), createElementBlock("div", _hoisted_72, [
47895
+ createBaseVNode("div", _hoisted_73, [
47896
+ createBaseVNode("div", _hoisted_74, [
47897
+ createBaseVNode("div", _hoisted_75, [
47891
47898
  _cache[54] || (_cache[54] = createBaseVNode("h5", { class: "modal-title" }, "创建数据表", -1)),
47892
47899
  createBaseVNode("button", {
47893
47900
  type: "button",
@@ -47895,9 +47902,9 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
47895
47902
  onClick: _cache[5] || (_cache[5] = ($event) => showCreateTable.value = false)
47896
47903
  })
47897
47904
  ]),
47898
- createBaseVNode("div", _hoisted_75$1, [
47905
+ createBaseVNode("div", _hoisted_76, [
47899
47906
  createBaseVNode("form", null, [
47900
- createBaseVNode("div", _hoisted_76$1, [
47907
+ createBaseVNode("div", _hoisted_77, [
47901
47908
  _cache[55] || (_cache[55] = createBaseVNode("label", { class: "form-label" }, "表名", -1)),
47902
47909
  withDirectives(createBaseVNode("input", {
47903
47910
  type: "text",
@@ -47908,7 +47915,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
47908
47915
  [vModelText, newTable.value.name]
47909
47916
  ])
47910
47917
  ]),
47911
- createBaseVNode("div", _hoisted_77$1, [
47918
+ createBaseVNode("div", _hoisted_78, [
47912
47919
  _cache[56] || (_cache[56] = createBaseVNode("label", { class: "form-label" }, "注释", -1)),
47913
47920
  withDirectives(createBaseVNode("textarea", {
47914
47921
  class: "form-control",
@@ -47920,7 +47927,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
47920
47927
  ])
47921
47928
  ])
47922
47929
  ]),
47923
- createBaseVNode("div", _hoisted_78$1, [
47930
+ createBaseVNode("div", _hoisted_79, [
47924
47931
  createBaseVNode("button", {
47925
47932
  type: "button",
47926
47933
  class: "btn btn-secondary",
@@ -47935,20 +47942,20 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
47935
47942
  ])
47936
47943
  ])
47937
47944
  ])) : createCommentVNode("", true),
47938
- showCreateView.value && editingView.value ? (openBlock(), createElementBlock("div", _hoisted_79$1, [
47939
- createBaseVNode("div", _hoisted_80$1, [
47940
- createBaseVNode("div", _hoisted_81$1, [
47941
- createBaseVNode("div", _hoisted_82$1, [
47942
- createBaseVNode("h5", _hoisted_83$1, toDisplayString(views.value.some((v) => v.name === editingView.value.name) ? "编辑视图" : "创建视图"), 1),
47945
+ showCreateView.value && editingView.value ? (openBlock(), createElementBlock("div", _hoisted_80, [
47946
+ createBaseVNode("div", _hoisted_81, [
47947
+ createBaseVNode("div", _hoisted_82, [
47948
+ createBaseVNode("div", _hoisted_83, [
47949
+ createBaseVNode("h5", _hoisted_84, toDisplayString(views.value.some((v) => v.name === editingView.value.name) ? "编辑视图" : "创建视图"), 1),
47943
47950
  createBaseVNode("button", {
47944
47951
  type: "button",
47945
47952
  class: "btn-close",
47946
47953
  onClick: _cache[9] || (_cache[9] = ($event) => showCreateView.value = false)
47947
47954
  })
47948
47955
  ]),
47949
- createBaseVNode("div", _hoisted_84$1, [
47956
+ createBaseVNode("div", _hoisted_85, [
47950
47957
  createBaseVNode("form", null, [
47951
- createBaseVNode("div", _hoisted_85$1, [
47958
+ createBaseVNode("div", _hoisted_86, [
47952
47959
  _cache[57] || (_cache[57] = createBaseVNode("label", { class: "form-label" }, "视图名称", -1)),
47953
47960
  withDirectives(createBaseVNode("input", {
47954
47961
  type: "text",
@@ -47959,7 +47966,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
47959
47966
  [vModelText, editingView.value.name]
47960
47967
  ])
47961
47968
  ]),
47962
- createBaseVNode("div", _hoisted_86$1, [
47969
+ createBaseVNode("div", _hoisted_87, [
47963
47970
  _cache[58] || (_cache[58] = createBaseVNode("label", { class: "form-label" }, "视图定义 (SQL查询)", -1)),
47964
47971
  withDirectives(createBaseVNode("textarea", {
47965
47972
  class: "form-control",
@@ -47970,7 +47977,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
47970
47977
  [vModelText, editingView.value.definition]
47971
47978
  ])
47972
47979
  ]),
47973
- createBaseVNode("div", _hoisted_87$1, [
47980
+ createBaseVNode("div", _hoisted_88, [
47974
47981
  _cache[59] || (_cache[59] = createBaseVNode("label", { class: "form-label" }, "注释", -1)),
47975
47982
  withDirectives(createBaseVNode("input", {
47976
47983
  type: "text",
@@ -47983,7 +47990,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
47983
47990
  ])
47984
47991
  ])
47985
47992
  ]),
47986
- createBaseVNode("div", _hoisted_88, [
47993
+ createBaseVNode("div", _hoisted_89, [
47987
47994
  createBaseVNode("button", {
47988
47995
  type: "button",
47989
47996
  class: "btn btn-secondary",
@@ -47998,20 +48005,20 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
47998
48005
  ])
47999
48006
  ])
48000
48007
  ])) : createCommentVNode("", true),
48001
- showCreateProcedure.value && editingProcedure.value ? (openBlock(), createElementBlock("div", _hoisted_89, [
48002
- createBaseVNode("div", _hoisted_90, [
48003
- createBaseVNode("div", _hoisted_91, [
48004
- createBaseVNode("div", _hoisted_92, [
48005
- createBaseVNode("h5", _hoisted_93, toDisplayString(procedures.value.some((p) => p.name === editingProcedure.value.name) ? "编辑存储过程" : "创建存储过程"), 1),
48008
+ showCreateProcedure.value && editingProcedure.value ? (openBlock(), createElementBlock("div", _hoisted_90, [
48009
+ createBaseVNode("div", _hoisted_91, [
48010
+ createBaseVNode("div", _hoisted_92, [
48011
+ createBaseVNode("div", _hoisted_93, [
48012
+ createBaseVNode("h5", _hoisted_94, toDisplayString(procedures.value.some((p) => p.name === editingProcedure.value.name) ? "编辑存储过程" : "创建存储过程"), 1),
48006
48013
  createBaseVNode("button", {
48007
48014
  type: "button",
48008
48015
  class: "btn-close",
48009
48016
  onClick: _cache[14] || (_cache[14] = ($event) => showCreateProcedure.value = false)
48010
48017
  })
48011
48018
  ]),
48012
- createBaseVNode("div", _hoisted_94, [
48019
+ createBaseVNode("div", _hoisted_95, [
48013
48020
  createBaseVNode("form", null, [
48014
- createBaseVNode("div", _hoisted_95, [
48021
+ createBaseVNode("div", _hoisted_96, [
48015
48022
  _cache[60] || (_cache[60] = createBaseVNode("label", { class: "form-label" }, "存储过程名称", -1)),
48016
48023
  withDirectives(createBaseVNode("input", {
48017
48024
  type: "text",
@@ -48022,7 +48029,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
48022
48029
  [vModelText, editingProcedure.value.name]
48023
48030
  ])
48024
48031
  ]),
48025
- createBaseVNode("div", _hoisted_96, [
48032
+ createBaseVNode("div", _hoisted_97, [
48026
48033
  _cache[61] || (_cache[61] = createBaseVNode("label", { class: "form-label" }, "存储过程定义", -1)),
48027
48034
  withDirectives(createBaseVNode("textarea", {
48028
48035
  class: "form-control",
@@ -48033,7 +48040,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
48033
48040
  [vModelText, editingProcedure.value.definition]
48034
48041
  ])
48035
48042
  ]),
48036
- createBaseVNode("div", _hoisted_97, [
48043
+ createBaseVNode("div", _hoisted_98, [
48037
48044
  _cache[62] || (_cache[62] = createBaseVNode("label", { class: "form-label" }, "注释", -1)),
48038
48045
  withDirectives(createBaseVNode("input", {
48039
48046
  type: "text",
@@ -48046,7 +48053,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
48046
48053
  ])
48047
48054
  ])
48048
48055
  ]),
48049
- createBaseVNode("div", _hoisted_98, [
48056
+ createBaseVNode("div", _hoisted_99, [
48050
48057
  createBaseVNode("button", {
48051
48058
  type: "button",
48052
48059
  class: "btn btn-secondary",
@@ -48075,43 +48082,43 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
48075
48082
  };
48076
48083
  }
48077
48084
  });
48078
- const DatabaseDetail = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-7ce335e1"]]);
48079
- const _hoisted_1$2 = { class: "modal-dialog modal-lg" };
48080
- const _hoisted_2$2 = { class: "modal-content" };
48081
- const _hoisted_3$2 = {
48085
+ const DatabaseDetail = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-608988e0"]]);
48086
+ const _hoisted_1$3 = { class: "modal-dialog modal-lg" };
48087
+ const _hoisted_2$3 = { class: "modal-content" };
48088
+ const _hoisted_3$3 = {
48082
48089
  class: "modal-header",
48083
48090
  style: { "padding": "15px" }
48084
48091
  };
48085
- const _hoisted_4$2 = { class: "modal-title" };
48086
- const _hoisted_5$2 = {
48092
+ const _hoisted_4$3 = { class: "modal-title" };
48093
+ const _hoisted_5$3 = {
48087
48094
  key: 0,
48088
48095
  class: "bi bi-pencil-square"
48089
48096
  };
48090
- const _hoisted_6$2 = {
48097
+ const _hoisted_6$3 = {
48091
48098
  key: 1,
48092
48099
  class: "bi bi-plus-circle"
48093
48100
  };
48094
- const _hoisted_7$2 = { class: "modal-body" };
48095
- const _hoisted_8$2 = { class: "row g-3" };
48096
- const _hoisted_9$2 = ["data-type"];
48097
- const _hoisted_10$2 = { class: "form-label" };
48098
- const _hoisted_11$2 = {
48101
+ const _hoisted_7$3 = { class: "modal-body" };
48102
+ const _hoisted_8$3 = { class: "row g-3" };
48103
+ const _hoisted_9$3 = ["data-type"];
48104
+ const _hoisted_10$3 = { class: "form-label" };
48105
+ const _hoisted_11$3 = {
48099
48106
  key: 0,
48100
48107
  class: "text-danger"
48101
48108
  };
48102
- const _hoisted_12$2 = { class: "text-muted ms-2" };
48103
- const _hoisted_13$2 = ["value"];
48104
- const _hoisted_14$2 = ["onUpdate:modelValue", "placeholder", "required", "step"];
48105
- const _hoisted_15$2 = ["onUpdate:modelValue", "required"];
48106
- const _hoisted_16$2 = ["onUpdate:modelValue", "placeholder", "required"];
48107
- const _hoisted_17$2 = ["onUpdate:modelValue", "required"];
48108
- const _hoisted_18$2 = ["value"];
48109
- const _hoisted_19$2 = ["onUpdate:modelValue"];
48110
- const _hoisted_20$2 = {
48109
+ const _hoisted_12$3 = { class: "text-muted ms-2" };
48110
+ const _hoisted_13$3 = ["value"];
48111
+ const _hoisted_14$3 = ["onUpdate:modelValue", "placeholder", "required", "step"];
48112
+ const _hoisted_15$3 = ["onUpdate:modelValue", "required"];
48113
+ const _hoisted_16$3 = ["onUpdate:modelValue", "placeholder", "required"];
48114
+ const _hoisted_17$3 = ["onUpdate:modelValue", "required"];
48115
+ const _hoisted_18$3 = ["value"];
48116
+ const _hoisted_19$3 = ["onUpdate:modelValue"];
48117
+ const _hoisted_20$3 = {
48111
48118
  key: 6,
48112
48119
  class: "json-editor"
48113
48120
  };
48114
- const _hoisted_21$2 = ["onUpdate:modelValue", "placeholder", "required", "onInput"];
48121
+ const _hoisted_21$3 = ["onUpdate:modelValue", "placeholder", "required", "onInput"];
48115
48122
  const _hoisted_22$2 = { class: "d-flex justify-content-between mt-1" };
48116
48123
  const _hoisted_23$2 = { class: "text-muted" };
48117
48124
  const _hoisted_24$2 = ["onClick"];
@@ -48122,7 +48129,7 @@ const _hoisted_28$2 = {
48122
48129
  key: 0,
48123
48130
  class: "spinner-border spinner-border-sm me-2"
48124
48131
  };
48125
- const _sfc_main$2 = /* @__PURE__ */ defineComponent({
48132
+ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
48126
48133
  __name: "data-editor",
48127
48134
  props: {
48128
48135
  visible: { type: Boolean },
@@ -48333,11 +48340,11 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
48333
48340
  class: normalizeClass(["modal fade", { show: __props.visible }]),
48334
48341
  style: normalizeStyle({ display: __props.visible ? "block" : "none" })
48335
48342
  }, [
48336
- createBaseVNode("div", _hoisted_1$2, [
48337
- createBaseVNode("div", _hoisted_2$2, [
48338
- createBaseVNode("div", _hoisted_3$2, [
48339
- createBaseVNode("h5", _hoisted_4$2, [
48340
- __props.isEdit ? (openBlock(), createElementBlock("i", _hoisted_5$2)) : (openBlock(), createElementBlock("i", _hoisted_6$2)),
48343
+ createBaseVNode("div", _hoisted_1$3, [
48344
+ createBaseVNode("div", _hoisted_2$3, [
48345
+ createBaseVNode("div", _hoisted_3$3, [
48346
+ createBaseVNode("h5", _hoisted_4$3, [
48347
+ __props.isEdit ? (openBlock(), createElementBlock("i", _hoisted_5$3)) : (openBlock(), createElementBlock("i", _hoisted_6$3)),
48341
48348
  createTextVNode(" " + toDisplayString(__props.isEdit ? "编辑数据" : "新增数据"), 1)
48342
48349
  ]),
48343
48350
  createBaseVNode("button", {
@@ -48346,21 +48353,21 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
48346
48353
  onClick: closeModal
48347
48354
  })
48348
48355
  ]),
48349
- createBaseVNode("div", _hoisted_7$2, [
48356
+ createBaseVNode("div", _hoisted_7$3, [
48350
48357
  createBaseVNode("form", {
48351
48358
  onSubmit: withModifiers(handleSubmit, ["prevent"])
48352
48359
  }, [
48353
- createBaseVNode("div", _hoisted_8$2, [
48360
+ createBaseVNode("div", _hoisted_8$3, [
48354
48361
  (openBlock(true), createElementBlock(Fragment, null, renderList(__props.columns, (column) => {
48355
48362
  return openBlock(), createElementBlock("div", {
48356
48363
  key: column.name,
48357
48364
  "data-type": column.type,
48358
48365
  class: "col-md-6"
48359
48366
  }, [
48360
- createBaseVNode("label", _hoisted_10$2, [
48367
+ createBaseVNode("label", _hoisted_10$3, [
48361
48368
  createTextVNode(toDisplayString(column.name) + " ", 1),
48362
- column.isPrimary ? (openBlock(), createElementBlock("span", _hoisted_11$2, "*")) : createCommentVNode("", true),
48363
- createBaseVNode("small", _hoisted_12$2, toDisplayString(column.type), 1)
48369
+ column.isPrimary ? (openBlock(), createElementBlock("span", _hoisted_11$3, "*")) : createCommentVNode("", true),
48370
+ createBaseVNode("small", _hoisted_12$3, toDisplayString(column.type), 1)
48364
48371
  ]),
48365
48372
  column.isPrimary && column.isAutoIncrement ? (openBlock(), createElementBlock("input", {
48366
48373
  key: 0,
@@ -48370,7 +48377,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
48370
48377
  value: __props.isEdit ? formData.value[column.name] : "自动生成",
48371
48378
  disabled: "",
48372
48379
  readonly: ""
48373
- }, null, 8, _hoisted_13$2)) : isNumberInput(column.type) ? withDirectives((openBlock(), createElementBlock("input", {
48380
+ }, null, 8, _hoisted_13$3)) : isNumberInput(column.type) ? withDirectives((openBlock(), createElementBlock("input", {
48374
48381
  key: 1,
48375
48382
  type: "number",
48376
48383
  "data-type": "number",
@@ -48379,7 +48386,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
48379
48386
  placeholder: "请输入" + column.name,
48380
48387
  required: !column.nullable,
48381
48388
  step: isDecimalInput(column.type) ? "0.01" : "1"
48382
- }, null, 8, _hoisted_14$2)), [
48389
+ }, null, 8, _hoisted_14$3)), [
48383
48390
  [vModelText, formData.value[column.name]]
48384
48391
  ]) : isDateInput(column.type) ? withDirectives((openBlock(), createElementBlock("input", {
48385
48392
  key: 2,
@@ -48388,7 +48395,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
48388
48395
  "data-type": "date",
48389
48396
  "onUpdate:modelValue": ($event) => formData.value[column.name] = $event,
48390
48397
  required: !column.nullable
48391
- }, null, 8, _hoisted_15$2)), [
48398
+ }, null, 8, _hoisted_15$3)), [
48392
48399
  [vModelText, formData.value[column.name]]
48393
48400
  ]) : isTextArea(column.type) ? withDirectives((openBlock(), createElementBlock("textarea", {
48394
48401
  key: 3,
@@ -48398,7 +48405,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
48398
48405
  placeholder: "请输入" + column.name,
48399
48406
  required: !column.nullable,
48400
48407
  rows: "3"
48401
- }, null, 8, _hoisted_16$2)), [
48408
+ }, null, 8, _hoisted_16$3)), [
48402
48409
  [vModelText, formData.value[column.name]]
48403
48410
  ]) : isEnumInput(column.type) ? withDirectives((openBlock(), createElementBlock("select", {
48404
48411
  key: 4,
@@ -48412,9 +48419,9 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
48412
48419
  return openBlock(), createElementBlock("option", {
48413
48420
  key: option,
48414
48421
  value: option
48415
- }, toDisplayString(option), 9, _hoisted_18$2);
48422
+ }, toDisplayString(option), 9, _hoisted_18$3);
48416
48423
  }), 128))
48417
- ], 8, _hoisted_17$2)), [
48424
+ ], 8, _hoisted_17$3)), [
48418
48425
  [vModelSelect, formData.value[column.name]]
48419
48426
  ]) : isBooleanInput(column.type) ? withDirectives((openBlock(), createElementBlock("select", {
48420
48427
  key: 5,
@@ -48424,9 +48431,9 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
48424
48431
  }, [..._cache[1] || (_cache[1] = [
48425
48432
  createBaseVNode("option", { value: true }, "是/True", -1),
48426
48433
  createBaseVNode("option", { value: false }, "否/False", -1)
48427
- ])], 8, _hoisted_19$2)), [
48434
+ ])], 8, _hoisted_19$3)), [
48428
48435
  [vModelSelect, formData.value[column.name]]
48429
- ]) : isJsonInput(column.type, "input") || isArrayInput(column.type) ? (openBlock(), createElementBlock("div", _hoisted_20$2, [
48436
+ ]) : isJsonInput(column.type, "input") || isArrayInput(column.type) ? (openBlock(), createElementBlock("div", _hoisted_20$3, [
48430
48437
  withDirectives(createBaseVNode("textarea", {
48431
48438
  class: "form-control font-monospace",
48432
48439
  "data-type": "json",
@@ -48435,7 +48442,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
48435
48442
  required: !column.nullable,
48436
48443
  rows: "6",
48437
48444
  onInput: ($event) => validateJson(column.name)
48438
- }, null, 40, _hoisted_21$2), [
48445
+ }, null, 40, _hoisted_21$3), [
48439
48446
  [vModelText, jsonText.value[column.name]]
48440
48447
  ]),
48441
48448
  createBaseVNode("div", _hoisted_22$2, [
@@ -48457,7 +48464,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
48457
48464
  }, null, 8, _hoisted_25$2)), [
48458
48465
  [vModelText, formData.value[column.name]]
48459
48466
  ])
48460
- ], 8, _hoisted_9$2);
48467
+ ], 8, _hoisted_9$3);
48461
48468
  }), 128))
48462
48469
  ])
48463
48470
  ], 32)
@@ -48484,7 +48491,249 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
48484
48491
  };
48485
48492
  }
48486
48493
  });
48487
- const DataEditor = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-dc8f434a"]]);
48494
+ const DataEditor = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-dc8f434a"]]);
48495
+ const _hoisted_1$2 = { class: "table-data-grid" };
48496
+ const _hoisted_2$2 = { class: "data-grid-wrapper" };
48497
+ const _hoisted_3$2 = { class: "btn-group btn-group-sm" };
48498
+ const _hoisted_4$2 = ["onClick"];
48499
+ const _hoisted_5$2 = ["onClick"];
48500
+ const _hoisted_6$2 = ["onClick", "title"];
48501
+ const _hoisted_7$2 = { class: "header-main" };
48502
+ const _hoisted_8$2 = { class: "column-name" };
48503
+ const _hoisted_9$2 = {
48504
+ key: 0,
48505
+ class: "column-key text-primary ms-1",
48506
+ title: "主键"
48507
+ };
48508
+ const _hoisted_10$2 = { class: "sort-icon ms-1" };
48509
+ const _hoisted_11$2 = {
48510
+ key: 0,
48511
+ class: "bi bi-caret-up-fill"
48512
+ };
48513
+ const _hoisted_12$2 = {
48514
+ key: 1,
48515
+ class: "bi bi-caret-down-fill"
48516
+ };
48517
+ const _hoisted_13$2 = {
48518
+ key: 2,
48519
+ class: "bi bi-caret-up text-muted opacity-50"
48520
+ };
48521
+ const _hoisted_14$2 = { class: "header-sub" };
48522
+ const _hoisted_15$2 = { class: "text-muted column-type" };
48523
+ const _hoisted_16$2 = {
48524
+ key: 0,
48525
+ class: "text-muted column-comment ms-1"
48526
+ };
48527
+ const _hoisted_17$2 = ["title"];
48528
+ const _hoisted_18$2 = ["colspan"];
48529
+ const _hoisted_19$2 = { class: "grid-footer-bar mt-2 d-flex justify-content-between align-items-center px-3" };
48530
+ const _hoisted_20$2 = { class: "pagination-info text-muted small" };
48531
+ const _hoisted_21$2 = { class: "page-size-selector d-flex align-items-center" };
48532
+ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
48533
+ __name: "table-data-grid",
48534
+ props: {
48535
+ connection: {},
48536
+ database: {},
48537
+ table: {},
48538
+ columns: {}
48539
+ },
48540
+ emits: ["edit-row", "delete-row"],
48541
+ setup(__props, { expose: __expose, emit: __emit }) {
48542
+ const props = __props;
48543
+ const emits = __emit;
48544
+ const databaseService2 = new DatabaseService();
48545
+ const tableData = ref([]);
48546
+ const loading = ref(false);
48547
+ const total = ref(0);
48548
+ const currentPage = ref(1);
48549
+ const pageSize = ref(50);
48550
+ const sortField = ref("");
48551
+ const sortOrder = ref("");
48552
+ const totalPages = computed(() => Math.ceil(total.value / pageSize.value) || 1);
48553
+ const gridColumns = computed(() => {
48554
+ const cols = props.columns.map((col) => ({
48555
+ name: col.name,
48556
+ text: col.name,
48557
+ sortable: true
48558
+ }));
48559
+ cols.push({
48560
+ name: "actions",
48561
+ text: "操作",
48562
+ sortable: false,
48563
+ headerStyle: "width: 100px;"
48564
+ });
48565
+ return cols;
48566
+ });
48567
+ async function loadData() {
48568
+ if (!props.connection || !props.database || !props.table) return;
48569
+ loading.value = true;
48570
+ try {
48571
+ let orderBy = "";
48572
+ if (sortField.value && sortOrder.value) {
48573
+ orderBy = `${sortField.value} ${sortOrder.value}`;
48574
+ }
48575
+ const result = await databaseService2.getTableData(
48576
+ props.connection.id,
48577
+ props.database,
48578
+ props.table.name,
48579
+ currentPage.value,
48580
+ pageSize.value,
48581
+ void 0,
48582
+ orderBy
48583
+ );
48584
+ if (result.ret === 0) {
48585
+ tableData.value = result.data?.data || [];
48586
+ total.value = result.data?.total || 0;
48587
+ }
48588
+ } catch (error) {
48589
+ console.error("加载表数据失败:", error);
48590
+ } finally {
48591
+ loading.value = false;
48592
+ }
48593
+ }
48594
+ function handlePageChange(page) {
48595
+ currentPage.value = page;
48596
+ loadData();
48597
+ }
48598
+ function handlePageSizeChange() {
48599
+ currentPage.value = 1;
48600
+ loadData();
48601
+ }
48602
+ function handleSortChange({ field, order }) {
48603
+ sortField.value = field;
48604
+ sortOrder.value = order;
48605
+ currentPage.value = 1;
48606
+ loadData();
48607
+ }
48608
+ function formatCellValue(value) {
48609
+ if (value === null || value === void 0) return "NULL";
48610
+ if (typeof value === "object") return JSON.stringify(value);
48611
+ return String(value);
48612
+ }
48613
+ __expose({
48614
+ refresh: loadData
48615
+ });
48616
+ watch(() => [props.connection?.id, props.database, props.table?.name], () => {
48617
+ currentPage.value = 1;
48618
+ sortField.value = "";
48619
+ sortOrder.value = "";
48620
+ loadData();
48621
+ });
48622
+ onMounted(() => {
48623
+ loadData();
48624
+ });
48625
+ return (_ctx, _cache) => {
48626
+ return openBlock(), createElementBlock("div", _hoisted_1$2, [
48627
+ createBaseVNode("div", _hoisted_2$2, [
48628
+ createVNode(DataGrid, {
48629
+ data: tableData.value,
48630
+ columns: gridColumns.value,
48631
+ "is-loading": loading.value,
48632
+ "total-pages": totalPages.value,
48633
+ "current-page": currentPage.value,
48634
+ "sort-field": sortField.value,
48635
+ "sort-order": sortOrder.value,
48636
+ onPageChanged: handlePageChange,
48637
+ onSortChanged: handleSortChange
48638
+ }, createSlots({
48639
+ actions: withCtx(({ row }) => [
48640
+ createBaseVNode("div", _hoisted_3$2, [
48641
+ createBaseVNode("button", {
48642
+ class: "btn btn-outline-primary btn-sm",
48643
+ onClick: withModifiers(($event) => emits("edit-row", row), ["stop"])
48644
+ }, [..._cache[1] || (_cache[1] = [
48645
+ createBaseVNode("i", { class: "bi bi-pencil" }, null, -1)
48646
+ ])], 8, _hoisted_4$2),
48647
+ createBaseVNode("button", {
48648
+ class: "btn btn-outline-danger btn-sm",
48649
+ onClick: withModifiers(($event) => emits("delete-row", row), ["stop"])
48650
+ }, [..._cache[2] || (_cache[2] = [
48651
+ createBaseVNode("i", { class: "bi bi-trash" }, null, -1)
48652
+ ])], 8, _hoisted_5$2)
48653
+ ])
48654
+ ]),
48655
+ _: 2
48656
+ }, [
48657
+ renderList(props.columns, (column) => {
48658
+ return {
48659
+ name: column.name + `_header`,
48660
+ fn: withCtx(() => [
48661
+ createBaseVNode("div", {
48662
+ class: "column-header-custom",
48663
+ onClick: ($event) => handleSortChange({ field: column.name, order: sortField.value === column.name ? sortOrder.value === "ASC" ? "DESC" : sortOrder.value === "DESC" ? "" : "ASC" : "ASC" }),
48664
+ title: column.comment || column.name
48665
+ }, [
48666
+ createBaseVNode("div", _hoisted_7$2, [
48667
+ createBaseVNode("span", _hoisted_8$2, toDisplayString(column.name), 1),
48668
+ column.isPrimary ? (openBlock(), createElementBlock("span", _hoisted_9$2, [..._cache[3] || (_cache[3] = [
48669
+ createBaseVNode("i", { class: "bi bi-key-fill" }, null, -1)
48670
+ ])])) : createCommentVNode("", true),
48671
+ createBaseVNode("span", _hoisted_10$2, [
48672
+ sortField.value === column.name && sortOrder.value === "ASC" ? (openBlock(), createElementBlock("i", _hoisted_11$2)) : sortField.value === column.name && sortOrder.value === "DESC" ? (openBlock(), createElementBlock("i", _hoisted_12$2)) : (openBlock(), createElementBlock("i", _hoisted_13$2))
48673
+ ])
48674
+ ]),
48675
+ createBaseVNode("div", _hoisted_14$2, [
48676
+ createBaseVNode("small", _hoisted_15$2, toDisplayString(column.type), 1),
48677
+ column.comment ? (openBlock(), createElementBlock("small", _hoisted_16$2, "- " + toDisplayString(column.comment), 1)) : createCommentVNode("", true)
48678
+ ])
48679
+ ], 8, _hoisted_6$2)
48680
+ ])
48681
+ };
48682
+ }),
48683
+ renderList(props.columns, (column) => {
48684
+ return {
48685
+ name: column.name,
48686
+ fn: withCtx(({ row }) => [
48687
+ createBaseVNode("div", {
48688
+ class: "cell-value",
48689
+ title: String(row[column.name])
48690
+ }, toDisplayString(formatCellValue(row[column.name])), 9, _hoisted_17$2)
48691
+ ])
48692
+ };
48693
+ }),
48694
+ !loading.value && tableData.value.length === 0 ? {
48695
+ name: "footer",
48696
+ fn: withCtx(() => [
48697
+ createBaseVNode("tr", null, [
48698
+ createBaseVNode("td", {
48699
+ colspan: gridColumns.value.length,
48700
+ class: "text-center py-5"
48701
+ }, [..._cache[4] || (_cache[4] = [
48702
+ createBaseVNode("div", { class: "empty-state" }, [
48703
+ createBaseVNode("i", { class: "bi bi-inbox fs-1 text-muted" }),
48704
+ createBaseVNode("p", { class: "mt-2 text-muted" }, "表中暂无数据")
48705
+ ], -1)
48706
+ ])], 8, _hoisted_18$2)
48707
+ ])
48708
+ ]),
48709
+ key: "0"
48710
+ } : void 0
48711
+ ]), 1032, ["data", "columns", "is-loading", "total-pages", "current-page", "sort-field", "sort-order"])
48712
+ ]),
48713
+ createBaseVNode("div", _hoisted_19$2, [
48714
+ createBaseVNode("div", _hoisted_20$2, " 共 " + toDisplayString(total.value) + " 条记录 ", 1),
48715
+ createBaseVNode("div", _hoisted_21$2, [
48716
+ _cache[6] || (_cache[6] = createBaseVNode("label", { class: "small text-muted me-2" }, "每页显示:", -1)),
48717
+ withDirectives(createBaseVNode("select", {
48718
+ class: "form-select form-select-sm",
48719
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => pageSize.value = $event),
48720
+ onChange: handlePageSizeChange,
48721
+ style: { "width": "80px" }
48722
+ }, [..._cache[5] || (_cache[5] = [
48723
+ createBaseVNode("option", { value: 10 }, "10", -1),
48724
+ createBaseVNode("option", { value: 20 }, "20", -1),
48725
+ createBaseVNode("option", { value: 50 }, "50", -1),
48726
+ createBaseVNode("option", { value: 100 }, "100", -1)
48727
+ ])], 544), [
48728
+ [vModelSelect, pageSize.value]
48729
+ ])
48730
+ ])
48731
+ ])
48732
+ ]);
48733
+ };
48734
+ }
48735
+ });
48736
+ const TableDataGrid = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-485b2e18"]]);
48488
48737
  const _hoisted_1$1 = { class: "table-detail" };
48489
48738
  const _hoisted_2$1 = { class: "table-header" };
48490
48739
  const _hoisted_3$1 = { class: "table-header-content" };
@@ -48528,92 +48777,39 @@ const _hoisted_31$1 = { class: "nav-item" };
48528
48777
  const _hoisted_32$1 = { class: "nav-item" };
48529
48778
  const _hoisted_33$1 = { class: "tab-content" };
48530
48779
  const _hoisted_34$1 = { class: "tab-panel" };
48531
- const _hoisted_35$1 = {
48532
- key: 0,
48533
- class: "table-responsive"
48534
- };
48535
- const _hoisted_36$1 = { class: "table table-sm table-striped table-hover" };
48536
- const _hoisted_37$1 = { class: "table-light" };
48537
- const _hoisted_38$1 = { class: "column-header" };
48538
- const _hoisted_39$1 = { class: "text-muted d-block" };
48539
- const _hoisted_40$1 = {
48540
- key: 0,
48541
- class: "column-key"
48542
- };
48543
- const _hoisted_41 = { class: "cell-value" };
48544
- const _hoisted_42 = { class: "btn-group btn-group-sm" };
48545
- const _hoisted_43 = ["onClick"];
48546
- const _hoisted_44 = ["onClick"];
48547
- const _hoisted_45 = {
48548
- key: 1,
48549
- class: "loading-state"
48550
- };
48551
- const _hoisted_46 = {
48552
- key: 2,
48553
- class: "empty-state"
48554
- };
48555
- const _hoisted_47 = { key: 0 };
48556
- const _hoisted_48 = { key: 1 };
48557
- const _hoisted_49 = {
48558
- key: 3,
48559
- class: "pagination-nav"
48560
- };
48561
- const _hoisted_50 = { class: "pagination-container" };
48562
- const _hoisted_51 = { class: "pagination-info" };
48563
- const _hoisted_52 = { class: "pagination pagination-sm" };
48564
- const _hoisted_53 = {
48565
- key: 0,
48566
- class: "page-item"
48567
- };
48568
- const _hoisted_54 = {
48569
- key: 1,
48570
- class: "page-item disabled"
48571
- };
48572
- const _hoisted_55 = ["onClick"];
48573
- const _hoisted_56 = {
48574
- key: 2,
48575
- class: "page-item disabled"
48576
- };
48577
- const _hoisted_57 = {
48578
- key: 3,
48579
- class: "page-item"
48580
- };
48581
- const _hoisted_58 = { class: "page-size-selector" };
48582
- const _hoisted_59 = { class: "page-jump" };
48583
- const _hoisted_60 = ["max"];
48584
- const _hoisted_61 = { class: "tab-panel" };
48585
- const _hoisted_62 = { class: "structure-content" };
48586
- const _hoisted_63 = { class: "structure-table" };
48587
- const _hoisted_64 = { class: "table table-bordered" };
48588
- const _hoisted_65 = {
48780
+ const _hoisted_35$1 = { class: "tab-panel" };
48781
+ const _hoisted_36$1 = { class: "structure-content" };
48782
+ const _hoisted_37$1 = { class: "structure-table" };
48783
+ const _hoisted_38$1 = { class: "table table-bordered" };
48784
+ const _hoisted_39$1 = {
48589
48785
  key: 0,
48590
48786
  class: "badge bg-primary"
48591
48787
  };
48592
- const _hoisted_66 = { key: 1 };
48593
- const _hoisted_67 = {
48788
+ const _hoisted_40$1 = { key: 1 };
48789
+ const _hoisted_41 = {
48594
48790
  key: 0,
48595
48791
  class: "badge bg-success"
48596
48792
  };
48597
- const _hoisted_68 = { key: 1 };
48598
- const _hoisted_69 = { class: "btn-group btn-group-sm" };
48599
- const _hoisted_70 = ["onClick"];
48600
- const _hoisted_71 = ["onClick"];
48601
- const _hoisted_72 = { class: "tab-panel" };
48602
- const _hoisted_73 = { class: "indexes-content" };
48603
- const _hoisted_74 = { class: "indexes-table" };
48604
- const _hoisted_75 = { class: "table table-bordered" };
48605
- const _hoisted_76 = { class: "badge bg-info" };
48606
- const _hoisted_77 = { class: "btn-group btn-group-sm" };
48607
- const _hoisted_78 = ["onClick"];
48608
- const _hoisted_79 = ["onClick"];
48609
- const _hoisted_80 = { class: "tab-panel" };
48610
- const _hoisted_81 = { class: "relations-content" };
48611
- const _hoisted_82 = { class: "relations-table" };
48612
- const _hoisted_83 = { class: "table table-bordered" };
48613
- const _hoisted_84 = { class: "btn-group btn-group-sm" };
48614
- const _hoisted_85 = ["onClick"];
48615
- const _hoisted_86 = { class: "tab-panel" };
48616
- const _hoisted_87 = { class: "sql-section" };
48793
+ const _hoisted_42 = { key: 1 };
48794
+ const _hoisted_43 = { class: "btn-group btn-group-sm" };
48795
+ const _hoisted_44 = ["onClick"];
48796
+ const _hoisted_45 = ["onClick"];
48797
+ const _hoisted_46 = { class: "tab-panel" };
48798
+ const _hoisted_47 = { class: "indexes-content" };
48799
+ const _hoisted_48 = { class: "indexes-table" };
48800
+ const _hoisted_49 = { class: "table table-bordered" };
48801
+ const _hoisted_50 = { class: "badge bg-info" };
48802
+ const _hoisted_51 = { class: "btn-group btn-group-sm" };
48803
+ const _hoisted_52 = ["onClick"];
48804
+ const _hoisted_53 = ["onClick"];
48805
+ const _hoisted_54 = { class: "tab-panel" };
48806
+ const _hoisted_55 = { class: "relations-content" };
48807
+ const _hoisted_56 = { class: "relations-table" };
48808
+ const _hoisted_57 = { class: "table table-bordered" };
48809
+ const _hoisted_58 = { class: "btn-group btn-group-sm" };
48810
+ const _hoisted_59 = ["onClick"];
48811
+ const _hoisted_60 = { class: "tab-panel" };
48812
+ const _hoisted_61 = { class: "sql-section" };
48617
48813
  const _sfc_main$1 = /* @__PURE__ */ defineComponent({
48618
48814
  __name: "table-detail",
48619
48815
  props: {
@@ -48632,11 +48828,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
48632
48828
  const props = __props;
48633
48829
  const emit = __emit;
48634
48830
  const databaseService2 = new DatabaseService();
48831
+ const tableDataGridRef = ref();
48635
48832
  const activeTab = ref("data");
48636
- const searchQuery = ref("");
48637
- const currentPage = ref(1);
48638
- const pageSize = ref(50);
48639
- const jumpToPage = ref(1);
48640
48833
  const showDataEditor = ref(false);
48641
48834
  const isEditMode = ref(false);
48642
48835
  const editingRow = ref(null);
@@ -48654,37 +48847,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
48654
48847
  comment: col.comment || ""
48655
48848
  }));
48656
48849
  });
48657
- const paginatedData = computed(() => {
48658
- return props.tableData || [];
48659
- });
48660
- const totalPages = computed(() => {
48661
- const total = parseInt(props.total) || 0;
48662
- return Math.ceil(total / pageSize.value);
48663
- });
48664
- const visiblePages = computed(() => {
48665
- const pages = [];
48666
- let start = Math.max(1, currentPage.value - 2);
48667
- let end = Math.min(totalPages.value, start + 4);
48668
- if (end - start < 4) {
48669
- start = Math.max(1, end - 4);
48670
- }
48671
- for (let i = start; i <= end; i++) {
48672
- pages.push(i);
48673
- }
48674
- return pages;
48675
- });
48676
48850
  watch(() => props.table, () => {
48677
48851
  activeTab.value = "data";
48678
- currentPage.value = 1;
48679
- searchQuery.value = "";
48680
- });
48681
- watch(pageSize, () => {
48682
- currentPage.value = 1;
48683
- jumpToPage.value = 1;
48684
- emit("refresh-data", currentPage.value, pageSize.value, searchQuery.value);
48685
- });
48686
- watch(currentPage, (newPage) => {
48687
- jumpToPage.value = newPage;
48688
48852
  });
48689
48853
  function formatSize(bytes) {
48690
48854
  if (bytes === 0) return "0 B";
@@ -48696,53 +48860,10 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
48696
48860
  function formatNumber2(num) {
48697
48861
  return num?.toLocaleString?.() || num?.toString() || "";
48698
48862
  }
48699
- function formatCellValue(value) {
48700
- if (value === null || value === void 0) return "NULL";
48701
- let strValue = String(value);
48702
- if (typeof value === "string") {
48703
- const trimmedValue = strValue.trim();
48704
- if (trimmedValue.startsWith("{") && trimmedValue.endsWith("}") || trimmedValue.startsWith("[") && trimmedValue.endsWith("]")) {
48705
- try {
48706
- const parsed = JSON.parse(trimmedValue);
48707
- const formatted = JSON.stringify(parsed, null, 2);
48708
- if (formatted.length > 50) {
48709
- return formatted.substring(0, 50) + "...";
48710
- }
48711
- return formatted;
48712
- } catch (e) {
48713
- }
48714
- }
48715
- } else if (typeof value === "object") {
48716
- try {
48717
- const formatted = JSON.stringify(value, null, 2);
48718
- if (formatted.length > 50) {
48719
- return formatted.substring(0, 50) + "...";
48720
- }
48721
- return formatted;
48722
- } catch (e) {
48723
- }
48724
- }
48725
- if (strValue.length > 50) return strValue.substring(0, 50) + "...";
48726
- return strValue;
48727
- }
48728
- function goToPage(page) {
48729
- if (page >= 1 && page <= totalPages.value) {
48730
- currentPage.value = page;
48731
- emit("refresh-data", currentPage.value, pageSize.value, searchQuery.value);
48732
- }
48733
- }
48734
- function jumpToPageHandler() {
48735
- if (jumpToPage.value >= 1 && jumpToPage.value <= totalPages.value) {
48736
- currentPage.value = jumpToPage.value;
48737
- emit("refresh-data", currentPage.value, pageSize.value, searchQuery.value);
48738
- } else {
48739
- jumpToPage.value = Math.max(1, Math.min(jumpToPage.value, totalPages.value));
48740
- currentPage.value = jumpToPage.value;
48741
- emit("refresh-data", currentPage.value, pageSize.value, searchQuery.value);
48742
- }
48743
- }
48744
48863
  function refreshData() {
48745
- emit("refresh-data", currentPage.value, pageSize.value, searchQuery.value);
48864
+ if (tableDataGridRef.value) {
48865
+ tableDataGridRef.value.refresh();
48866
+ }
48746
48867
  }
48747
48868
  function insertData(newData) {
48748
48869
  {
@@ -48764,10 +48885,31 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
48764
48885
  type: "danger"
48765
48886
  });
48766
48887
  if (result) {
48767
- emit("delete-row", row);
48888
+ const primaryKeys = props.tableStructure?.columns?.filter((col) => col.isPrimary) || [];
48889
+ if (primaryKeys.length === 0) {
48890
+ await modal.warning("该表没有主键,无法删除单行。");
48891
+ return;
48892
+ }
48893
+ const where = {};
48894
+ primaryKeys.forEach((pk) => {
48895
+ where[pk.name] = row[pk.name];
48896
+ });
48897
+ const response = await databaseService2.deleteData(
48898
+ props.connection?.id || "",
48899
+ props.database,
48900
+ props.table?.name || "",
48901
+ where
48902
+ );
48903
+ if (response.ret === 0) {
48904
+ await modal.success("删除成功");
48905
+ refreshData();
48906
+ } else {
48907
+ await modal.error("删除失败: " + (response.msg || "未知错误"));
48908
+ }
48768
48909
  }
48769
48910
  } catch (error) {
48770
48911
  console.error("删除行失败:", error);
48912
+ modal.error("删除行失败: " + error.message);
48771
48913
  }
48772
48914
  }
48773
48915
  async function truncateTable() {
@@ -48778,7 +48920,17 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
48778
48920
  type: "danger"
48779
48921
  });
48780
48922
  if (result) {
48781
- emit("truncate-table");
48923
+ const response = await databaseService2.truncateTable(
48924
+ props.connection?.id || "",
48925
+ props.database,
48926
+ props.table?.name || ""
48927
+ );
48928
+ if (response.ret === 0) {
48929
+ await modal.success("表清空成功");
48930
+ refreshData();
48931
+ } else {
48932
+ await modal.error("清空表失败");
48933
+ }
48782
48934
  }
48783
48935
  } catch (error) {
48784
48936
  console.error("清空表失败:", error);
@@ -48820,7 +48972,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
48820
48972
  function handleDataSubmit(result) {
48821
48973
  try {
48822
48974
  if (result.ret === 0) {
48823
- emit("refresh-data");
48975
+ refreshData();
48824
48976
  closeDataEditor();
48825
48977
  } else {
48826
48978
  modal.error("操作失败");
@@ -49040,16 +49192,16 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
49040
49192
  createBaseVNode("div", _hoisted_2$1, [
49041
49193
  createBaseVNode("div", _hoisted_3$1, [
49042
49194
  createBaseVNode("div", _hoisted_4$1, [
49043
- _cache[22] || (_cache[22] = createBaseVNode("div", { class: "table-icon" }, [
49195
+ _cache[13] || (_cache[13] = createBaseVNode("div", { class: "table-icon" }, [
49044
49196
  createBaseVNode("i", { class: "bi bi-table" })
49045
49197
  ], -1)),
49046
49198
  createBaseVNode("div", _hoisted_5$1, [
49047
49199
  createBaseVNode("h4", _hoisted_6$1, toDisplayString(__props.table?.name), 1),
49048
49200
  createBaseVNode("div", _hoisted_7$1, [
49049
49201
  createBaseVNode("span", _hoisted_8$1, toDisplayString(__props.connection?.name), 1),
49050
- _cache[20] || (_cache[20] = createBaseVNode("i", { class: "bi bi-chevron-right" }, null, -1)),
49202
+ _cache[11] || (_cache[11] = createBaseVNode("i", { class: "bi bi-chevron-right" }, null, -1)),
49051
49203
  createBaseVNode("span", _hoisted_9$1, toDisplayString(__props.database), 1),
49052
- _cache[21] || (_cache[21] = createBaseVNode("i", { class: "bi bi-chevron-right" }, null, -1)),
49204
+ _cache[12] || (_cache[12] = createBaseVNode("i", { class: "bi bi-chevron-right" }, null, -1)),
49053
49205
  createBaseVNode("span", _hoisted_10$1, toDisplayString(__props.table?.name), 1)
49054
49206
  ])
49055
49207
  ])
@@ -49057,19 +49209,19 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
49057
49209
  createBaseVNode("div", _hoisted_11$1, [
49058
49210
  __props.table?.rowCount !== void 0 ? (openBlock(), createElementBlock("div", _hoisted_12$1, [
49059
49211
  createBaseVNode("div", _hoisted_13$1, toDisplayString(formatNumber2(__props.table?.rowCount)), 1),
49060
- _cache[23] || (_cache[23] = createBaseVNode("div", { class: "stat-label" }, "行数据", -1))
49212
+ _cache[14] || (_cache[14] = createBaseVNode("div", { class: "stat-label" }, "行数据", -1))
49061
49213
  ])) : createCommentVNode("", true),
49062
49214
  createBaseVNode("div", _hoisted_14$1, [
49063
49215
  createBaseVNode("div", _hoisted_15$1, toDisplayString(__props.tableStructure?.columns?.length || 0), 1),
49064
- _cache[24] || (_cache[24] = createBaseVNode("div", { class: "stat-label" }, "列", -1))
49216
+ _cache[15] || (_cache[15] = createBaseVNode("div", { class: "stat-label" }, "列", -1))
49065
49217
  ]),
49066
49218
  createBaseVNode("div", _hoisted_16$1, [
49067
49219
  createBaseVNode("div", _hoisted_17$1, toDisplayString(__props.tableStructure?.indexes?.length || 0), 1),
49068
- _cache[25] || (_cache[25] = createBaseVNode("div", { class: "stat-label" }, "索引", -1))
49220
+ _cache[16] || (_cache[16] = createBaseVNode("div", { class: "stat-label" }, "索引", -1))
49069
49221
  ]),
49070
49222
  __props.table?.dataSize !== void 0 ? (openBlock(), createElementBlock("div", _hoisted_18$1, [
49071
49223
  createBaseVNode("div", _hoisted_19$1, toDisplayString(formatSize(__props.table?.dataSize)), 1),
49072
- _cache[26] || (_cache[26] = createBaseVNode("div", { class: "stat-label" }, "大小", -1))
49224
+ _cache[17] || (_cache[17] = createBaseVNode("div", { class: "stat-label" }, "大小", -1))
49073
49225
  ])) : createCommentVNode("", true)
49074
49226
  ])
49075
49227
  ])
@@ -49079,26 +49231,26 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
49079
49231
  createBaseVNode("button", {
49080
49232
  class: "btn btn-primary btn-sm",
49081
49233
  onClick: refreshData
49082
- }, [..._cache[27] || (_cache[27] = [
49234
+ }, [..._cache[18] || (_cache[18] = [
49083
49235
  createBaseVNode("i", { class: "bi bi-arrow-clockwise" }, null, -1),
49084
49236
  createTextVNode(" 刷新数据 ", -1)
49085
49237
  ])]),
49086
49238
  createBaseVNode("button", {
49087
49239
  class: "btn btn-info btn-sm",
49088
49240
  onClick: editTableStructure
49089
- }, [..._cache[28] || (_cache[28] = [
49241
+ }, [..._cache[19] || (_cache[19] = [
49090
49242
  createBaseVNode("i", { class: "bi bi-pencil-square" }, null, -1),
49091
49243
  createTextVNode(" 修改表结构 ", -1)
49092
49244
  ])]),
49093
49245
  createBaseVNode("button", {
49094
49246
  class: "btn btn-success btn-sm",
49095
49247
  onClick: _cache[0] || (_cache[0] = () => insertData())
49096
- }, [..._cache[29] || (_cache[29] = [
49248
+ }, [..._cache[20] || (_cache[20] = [
49097
49249
  createBaseVNode("i", { class: "bi bi-plus-lg" }, null, -1),
49098
49250
  createTextVNode(" 插入数据 ", -1)
49099
49251
  ])]),
49100
49252
  createBaseVNode("div", _hoisted_22$1, [
49101
- _cache[36] || (_cache[36] = createBaseVNode("button", {
49253
+ _cache[27] || (_cache[27] = createBaseVNode("button", {
49102
49254
  class: "btn btn-info btn-sm dropdown-toggle",
49103
49255
  "data-bs-toggle": "dropdown"
49104
49256
  }, [
@@ -49110,7 +49262,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
49110
49262
  createBaseVNode("button", {
49111
49263
  class: "dropdown-item",
49112
49264
  onClick: _cache[1] || (_cache[1] = ($event) => exportTableData("csv"))
49113
- }, [..._cache[30] || (_cache[30] = [
49265
+ }, [..._cache[21] || (_cache[21] = [
49114
49266
  createBaseVNode("i", { class: "bi bi-file-earmark-spreadsheet me-2" }, null, -1),
49115
49267
  createTextVNode("导出 CSV ", -1)
49116
49268
  ])])
@@ -49119,7 +49271,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
49119
49271
  createBaseVNode("button", {
49120
49272
  class: "dropdown-item",
49121
49273
  onClick: _cache[2] || (_cache[2] = ($event) => exportTableData("json"))
49122
- }, [..._cache[31] || (_cache[31] = [
49274
+ }, [..._cache[22] || (_cache[22] = [
49123
49275
  createBaseVNode("i", { class: "bi bi-file-earmark-code me-2" }, null, -1),
49124
49276
  createTextVNode("导出 JSON ", -1)
49125
49277
  ])])
@@ -49128,19 +49280,19 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
49128
49280
  createBaseVNode("button", {
49129
49281
  class: "dropdown-item",
49130
49282
  onClick: _cache[3] || (_cache[3] = ($event) => exportTableData("excel"))
49131
- }, [..._cache[32] || (_cache[32] = [
49283
+ }, [..._cache[23] || (_cache[23] = [
49132
49284
  createBaseVNode("i", { class: "bi bi-file-earmark-excel me-2" }, null, -1),
49133
49285
  createTextVNode("导出 Excel ", -1)
49134
49286
  ])])
49135
49287
  ]),
49136
- _cache[35] || (_cache[35] = createBaseVNode("li", null, [
49288
+ _cache[26] || (_cache[26] = createBaseVNode("li", null, [
49137
49289
  createBaseVNode("hr", { class: "dropdown-divider" })
49138
49290
  ], -1)),
49139
49291
  createBaseVNode("li", null, [
49140
49292
  createBaseVNode("button", {
49141
49293
  class: "dropdown-item",
49142
49294
  onClick: _cache[4] || (_cache[4] = ($event) => exportTableStructure())
49143
- }, [..._cache[33] || (_cache[33] = [
49295
+ }, [..._cache[24] || (_cache[24] = [
49144
49296
  createBaseVNode("i", { class: "bi bi-file-earmark-text me-2" }, null, -1),
49145
49297
  createTextVNode("导出表结构 ", -1)
49146
49298
  ])])
@@ -49149,7 +49301,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
49149
49301
  createBaseVNode("button", {
49150
49302
  class: "dropdown-item",
49151
49303
  onClick: _cache[5] || (_cache[5] = ($event) => exportTableDataSQL())
49152
- }, [..._cache[34] || (_cache[34] = [
49304
+ }, [..._cache[25] || (_cache[25] = [
49153
49305
  createBaseVNode("i", { class: "bi bi-file-earmark-code me-2" }, null, -1),
49154
49306
  createTextVNode("导出表数据(SQL) ", -1)
49155
49307
  ])])
@@ -49158,18 +49310,18 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
49158
49310
  ])
49159
49311
  ]),
49160
49312
  createBaseVNode("div", _hoisted_24$1, [
49161
- __props.tableData.length > 0 ? (openBlock(), createElementBlock("button", {
49313
+ __props.table?.rowCount ? (openBlock(), createElementBlock("button", {
49162
49314
  key: 0,
49163
49315
  class: "btn btn-outline-warning btn-sm",
49164
49316
  onClick: truncateTable
49165
- }, [..._cache[37] || (_cache[37] = [
49317
+ }, [..._cache[28] || (_cache[28] = [
49166
49318
  createBaseVNode("i", { class: "bi bi-trash" }, null, -1),
49167
49319
  createTextVNode(" 清空表 ", -1)
49168
49320
  ])])) : createCommentVNode("", true),
49169
49321
  createBaseVNode("button", {
49170
49322
  class: "btn btn-outline-danger btn-sm",
49171
49323
  onClick: dropTable
49172
- }, [..._cache[38] || (_cache[38] = [
49324
+ }, [..._cache[29] || (_cache[29] = [
49173
49325
  createBaseVNode("i", { class: "bi bi-x-circle" }, null, -1),
49174
49326
  createTextVNode(" 删除表 ", -1)
49175
49327
  ])])
@@ -49182,16 +49334,16 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
49182
49334
  class: normalizeClass(["nav-link", { active: activeTab.value === "data" }]),
49183
49335
  onClick: _cache[6] || (_cache[6] = ($event) => activeTab.value = "data")
49184
49336
  }, [
49185
- _cache[39] || (_cache[39] = createBaseVNode("i", { class: "bi bi-grid" }, null, -1)),
49186
- _cache[40] || (_cache[40] = createTextVNode(" 数据 ", -1)),
49187
- __props.tableData.length > 0 ? (openBlock(), createElementBlock("span", _hoisted_28$1, toDisplayString(__props.tableData.length), 1)) : createCommentVNode("", true)
49337
+ _cache[30] || (_cache[30] = createBaseVNode("i", { class: "bi bi-grid" }, null, -1)),
49338
+ _cache[31] || (_cache[31] = createTextVNode(" 数据 ", -1)),
49339
+ __props.table?.rowCount ? (openBlock(), createElementBlock("span", _hoisted_28$1, toDisplayString(formatNumber2(__props.table?.rowCount)), 1)) : createCommentVNode("", true)
49188
49340
  ], 2)
49189
49341
  ]),
49190
49342
  createBaseVNode("li", _hoisted_29$1, [
49191
49343
  createBaseVNode("button", {
49192
49344
  class: normalizeClass(["nav-link", { active: activeTab.value === "structure" }]),
49193
49345
  onClick: _cache[7] || (_cache[7] = ($event) => activeTab.value = "structure")
49194
- }, [..._cache[41] || (_cache[41] = [
49346
+ }, [..._cache[32] || (_cache[32] = [
49195
49347
  createBaseVNode("i", { class: "bi bi-diagram-3" }, null, -1),
49196
49348
  createTextVNode(" 结构 ", -1)
49197
49349
  ])], 2)
@@ -49200,7 +49352,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
49200
49352
  createBaseVNode("button", {
49201
49353
  class: normalizeClass(["nav-link", { active: activeTab.value === "indexes" }]),
49202
49354
  onClick: _cache[8] || (_cache[8] = ($event) => activeTab.value = "indexes")
49203
- }, [..._cache[42] || (_cache[42] = [
49355
+ }, [..._cache[33] || (_cache[33] = [
49204
49356
  createBaseVNode("i", { class: "bi bi-key" }, null, -1),
49205
49357
  createTextVNode(" 索引 ", -1)
49206
49358
  ])], 2)
@@ -49209,7 +49361,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
49209
49361
  createBaseVNode("button", {
49210
49362
  class: normalizeClass(["nav-link", { active: activeTab.value === "relations" }]),
49211
49363
  onClick: _cache[9] || (_cache[9] = ($event) => activeTab.value = "relations")
49212
- }, [..._cache[43] || (_cache[43] = [
49364
+ }, [..._cache[34] || (_cache[34] = [
49213
49365
  createBaseVNode("i", { class: "bi bi-link-45deg" }, null, -1),
49214
49366
  createTextVNode(" 关系 ", -1)
49215
49367
  ])], 2)
@@ -49218,7 +49370,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
49218
49370
  createBaseVNode("button", {
49219
49371
  class: normalizeClass(["nav-link", { active: activeTab.value === "sql" }]),
49220
49372
  onClick: _cache[10] || (_cache[10] = ($event) => activeTab.value = "sql")
49221
- }, [..._cache[44] || (_cache[44] = [
49373
+ }, [..._cache[35] || (_cache[35] = [
49222
49374
  createBaseVNode("i", { class: "bi bi-code-slash" }, null, -1),
49223
49375
  createTextVNode(" SQL ", -1)
49224
49376
  ])], 2)
@@ -49226,233 +49378,40 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
49226
49378
  ]),
49227
49379
  createBaseVNode("div", _hoisted_33$1, [
49228
49380
  withDirectives(createBaseVNode("div", _hoisted_34$1, [
49229
- createBaseVNode("div", {
49230
- class: normalizeClass(["data-content", { "loading": __props.loading }])
49231
- }, [
49232
- !__props.loading && paginatedData.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_35$1, [
49233
- createBaseVNode("table", _hoisted_36$1, [
49234
- createBaseVNode("thead", _hoisted_37$1, [
49235
- createBaseVNode("tr", null, [
49236
- (openBlock(true), createElementBlock(Fragment, null, renderList(safeTableColumns.value, (column) => {
49237
- return openBlock(), createElementBlock("th", {
49238
- key: column.name
49239
- }, [
49240
- createBaseVNode("div", _hoisted_38$1, [
49241
- createBaseVNode("span", null, toDisplayString(column.name), 1),
49242
- createBaseVNode("small", _hoisted_39$1, toDisplayString(column.type), 1),
49243
- column.isPrimary ? (openBlock(), createElementBlock("span", _hoisted_40$1, [..._cache[45] || (_cache[45] = [
49244
- createBaseVNode("i", { class: "bi bi-key-fill" }, null, -1)
49245
- ])])) : createCommentVNode("", true)
49246
- ])
49247
- ]);
49248
- }), 128)),
49249
- _cache[46] || (_cache[46] = createBaseVNode("th", { width: "100" }, "操作", -1))
49250
- ])
49251
- ]),
49252
- createBaseVNode("tbody", null, [
49253
- (openBlock(true), createElementBlock(Fragment, null, renderList(paginatedData.value, (row, index) => {
49254
- return openBlock(), createElementBlock("tr", { key: index }, [
49255
- (openBlock(true), createElementBlock(Fragment, null, renderList(safeTableColumns.value, (column) => {
49256
- return openBlock(), createElementBlock("td", {
49257
- key: column.name
49258
- }, [
49259
- createBaseVNode("div", _hoisted_41, toDisplayString(formatCellValue(row[column.name])), 1)
49260
- ]);
49261
- }), 128)),
49262
- createBaseVNode("td", null, [
49263
- createBaseVNode("div", _hoisted_42, [
49264
- createBaseVNode("button", {
49265
- class: "btn btn-outline-primary btn-sm",
49266
- onClick: ($event) => editRow(row)
49267
- }, [..._cache[47] || (_cache[47] = [
49268
- createBaseVNode("i", { class: "bi bi-pencil" }, null, -1)
49269
- ])], 8, _hoisted_43),
49270
- createBaseVNode("button", {
49271
- class: "btn btn-outline-danger btn-sm",
49272
- onClick: ($event) => deleteRow(row)
49273
- }, [..._cache[48] || (_cache[48] = [
49274
- createBaseVNode("i", { class: "bi bi-trash" }, null, -1)
49275
- ])], 8, _hoisted_44)
49276
- ])
49277
- ])
49278
- ]);
49279
- }), 128))
49280
- ])
49281
- ])
49282
- ])) : createCommentVNode("", true),
49283
- __props.loading ? (openBlock(), createElementBlock("div", _hoisted_45, [..._cache[49] || (_cache[49] = [
49284
- createBaseVNode("div", {
49285
- class: "spinner-border text-primary",
49286
- role: "status"
49287
- }, [
49288
- createBaseVNode("span", { class: "visually-hidden" }, "加载中...")
49289
- ], -1),
49290
- createBaseVNode("p", null, "正在加载数据...", -1)
49291
- ])])) : createCommentVNode("", true),
49292
- !__props.loading && paginatedData.value.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_46, [
49293
- _cache[51] || (_cache[51] = createBaseVNode("i", { class: "bi bi-inbox" }, null, -1)),
49294
- searchQuery.value ? (openBlock(), createElementBlock("p", _hoisted_47, "没有找到匹配的数据")) : (openBlock(), createElementBlock("p", _hoisted_48, "表中暂无数据")),
49295
- createBaseVNode("button", {
49296
- class: "btn btn-success",
49297
- onClick: _cache[11] || (_cache[11] = () => insertData())
49298
- }, [..._cache[50] || (_cache[50] = [
49299
- createBaseVNode("i", { class: "bi bi-plus" }, null, -1),
49300
- createTextVNode(" 插入第一条数据 ", -1)
49301
- ])])
49302
- ])) : createCommentVNode("", true),
49303
- !__props.loading && totalPages.value > 0 ? (openBlock(), createElementBlock("nav", _hoisted_49, [
49304
- createBaseVNode("div", _hoisted_50, [
49305
- createBaseVNode("div", _hoisted_51, " 共 " + toDisplayString(formatNumber2(__props.total)) + " 条记录,第 " + toDisplayString(formatNumber2(currentPage.value)) + " 页/共 " + toDisplayString(formatNumber2(totalPages.value)) + " 页 ", 1),
49306
- createBaseVNode("ul", _hoisted_52, [
49307
- createBaseVNode("li", {
49308
- class: normalizeClass(["page-item", { disabled: currentPage.value === 1 }])
49309
- }, [
49310
- createBaseVNode("a", {
49311
- class: "page-link",
49312
- href: "#",
49313
- onClick: _cache[12] || (_cache[12] = withModifiers(($event) => goToPage(1), ["prevent"])),
49314
- title: "首页"
49315
- }, [..._cache[52] || (_cache[52] = [
49316
- createBaseVNode("i", { class: "bi bi-chevron-double-left" }, null, -1)
49317
- ])])
49318
- ], 2),
49319
- createBaseVNode("li", {
49320
- class: normalizeClass(["page-item", { disabled: currentPage.value === 1 }])
49321
- }, [
49322
- createBaseVNode("a", {
49323
- class: "page-link",
49324
- href: "#",
49325
- onClick: _cache[13] || (_cache[13] = withModifiers(($event) => goToPage(currentPage.value - 1), ["prevent"])),
49326
- title: "上一页"
49327
- }, [..._cache[53] || (_cache[53] = [
49328
- createBaseVNode("i", { class: "bi bi-chevron-left" }, null, -1)
49329
- ])])
49330
- ], 2),
49331
- currentPage.value > 4 ? (openBlock(), createElementBlock("li", _hoisted_53, [
49332
- createBaseVNode("a", {
49333
- class: "page-link",
49334
- href: "#",
49335
- onClick: _cache[14] || (_cache[14] = withModifiers(($event) => goToPage(1), ["prevent"]))
49336
- }, "1")
49337
- ])) : createCommentVNode("", true),
49338
- currentPage.value > 5 ? (openBlock(), createElementBlock("li", _hoisted_54, [..._cache[54] || (_cache[54] = [
49339
- createBaseVNode("span", { class: "page-link" }, "...", -1)
49340
- ])])) : createCommentVNode("", true),
49341
- (openBlock(true), createElementBlock(Fragment, null, renderList(visiblePages.value, (page) => {
49342
- return openBlock(), createElementBlock("li", {
49343
- key: page,
49344
- class: normalizeClass(["page-item", { active: currentPage.value === page }])
49345
- }, [
49346
- createBaseVNode("a", {
49347
- class: "page-link",
49348
- href: "#",
49349
- onClick: withModifiers(($event) => goToPage(page), ["prevent"])
49350
- }, toDisplayString(page), 9, _hoisted_55)
49351
- ], 2);
49352
- }), 128)),
49353
- currentPage.value < totalPages.value - 4 ? (openBlock(), createElementBlock("li", _hoisted_56, [..._cache[55] || (_cache[55] = [
49354
- createBaseVNode("span", { class: "page-link" }, "...", -1)
49355
- ])])) : createCommentVNode("", true),
49356
- currentPage.value < totalPages.value - 3 ? (openBlock(), createElementBlock("li", _hoisted_57, [
49357
- createBaseVNode("a", {
49358
- class: "page-link",
49359
- href: "#",
49360
- onClick: _cache[15] || (_cache[15] = withModifiers(($event) => goToPage(totalPages.value), ["prevent"]))
49361
- }, toDisplayString(totalPages.value), 1)
49362
- ])) : createCommentVNode("", true),
49363
- createBaseVNode("li", {
49364
- class: normalizeClass(["page-item", { disabled: currentPage.value === totalPages.value }])
49365
- }, [
49366
- createBaseVNode("a", {
49367
- class: "page-link",
49368
- href: "#",
49369
- onClick: _cache[16] || (_cache[16] = withModifiers(($event) => goToPage(currentPage.value + 1), ["prevent"])),
49370
- title: "下一页"
49371
- }, [..._cache[56] || (_cache[56] = [
49372
- createBaseVNode("i", { class: "bi bi-chevron-right" }, null, -1)
49373
- ])])
49374
- ], 2),
49375
- createBaseVNode("li", {
49376
- class: normalizeClass(["page-item", { disabled: currentPage.value === totalPages.value }])
49377
- }, [
49378
- createBaseVNode("a", {
49379
- class: "page-link",
49380
- href: "#",
49381
- onClick: _cache[17] || (_cache[17] = withModifiers(($event) => goToPage(totalPages.value), ["prevent"])),
49382
- title: "末页"
49383
- }, [..._cache[57] || (_cache[57] = [
49384
- createBaseVNode("i", { class: "bi bi-chevron-double-right" }, null, -1)
49385
- ])])
49386
- ], 2)
49387
- ]),
49388
- createBaseVNode("div", _hoisted_58, [
49389
- _cache[59] || (_cache[59] = createBaseVNode("label", { class: "form-label-sm mb-0" }, "每页显示:", -1)),
49390
- withDirectives(createBaseVNode("select", {
49391
- class: "form-select form-select-sm ms-2",
49392
- "onUpdate:modelValue": _cache[18] || (_cache[18] = ($event) => pageSize.value = $event),
49393
- style: { "width": "80px" }
49394
- }, [..._cache[58] || (_cache[58] = [
49395
- createBaseVNode("option", { value: 10 }, "10", -1),
49396
- createBaseVNode("option", { value: 20 }, "20", -1),
49397
- createBaseVNode("option", { value: 50 }, "50", -1),
49398
- createBaseVNode("option", { value: 100 }, "100", -1),
49399
- createBaseVNode("option", { value: 200 }, "200", -1),
49400
- createBaseVNode("option", { value: 500 }, "500", -1)
49401
- ])], 512), [
49402
- [vModelSelect, pageSize.value]
49403
- ])
49404
- ]),
49405
- createBaseVNode("div", _hoisted_59, [
49406
- _cache[60] || (_cache[60] = createBaseVNode("label", { class: "form-label-sm mb-0" }, "跳转到:", -1)),
49407
- withDirectives(createBaseVNode("input", {
49408
- type: "number",
49409
- class: "form-control form-control-sm ms-2",
49410
- "onUpdate:modelValue": _cache[19] || (_cache[19] = ($event) => jumpToPage.value = $event),
49411
- min: "1",
49412
- max: totalPages.value,
49413
- style: { "width": "70px" },
49414
- onKeyup: withKeys(jumpToPageHandler, ["enter"]),
49415
- onBlur: jumpToPageHandler
49416
- }, null, 40, _hoisted_60), [
49417
- [
49418
- vModelText,
49419
- jumpToPage.value,
49420
- void 0,
49421
- { number: true }
49422
- ]
49423
- ]),
49424
- createBaseVNode("button", {
49425
- class: "btn btn-primary btn-sm ms-2",
49426
- onClick: jumpToPageHandler
49427
- }, " 跳转 ")
49428
- ])
49429
- ])
49430
- ])) : createCommentVNode("", true)
49431
- ], 2)
49381
+ createVNode(TableDataGrid, {
49382
+ ref_key: "tableDataGridRef",
49383
+ ref: tableDataGridRef,
49384
+ connection: __props.connection,
49385
+ database: __props.database,
49386
+ table: __props.table,
49387
+ columns: __props.tableStructure?.columns || [],
49388
+ onEditRow: editRow,
49389
+ onDeleteRow: deleteRow
49390
+ }, null, 8, ["connection", "database", "table", "columns"])
49432
49391
  ], 512), [
49433
49392
  [vShow, activeTab.value === "data"]
49434
49393
  ]),
49435
- withDirectives(createBaseVNode("div", _hoisted_61, [
49394
+ withDirectives(createBaseVNode("div", _hoisted_35$1, [
49436
49395
  createBaseVNode("div", { class: "structure-actions mb-3" }, [
49437
49396
  createBaseVNode("button", {
49438
49397
  class: "btn btn-success btn-sm",
49439
49398
  onClick: addColumn
49440
- }, [..._cache[61] || (_cache[61] = [
49399
+ }, [..._cache[36] || (_cache[36] = [
49441
49400
  createBaseVNode("i", { class: "bi bi-plus-lg" }, null, -1),
49442
49401
  createTextVNode(" 新增字段 ", -1)
49443
49402
  ])]),
49444
49403
  createBaseVNode("button", {
49445
49404
  class: "btn btn-info btn-sm",
49446
49405
  onClick: editTableStructure
49447
- }, [..._cache[62] || (_cache[62] = [
49406
+ }, [..._cache[37] || (_cache[37] = [
49448
49407
  createBaseVNode("i", { class: "bi bi-pencil-square" }, null, -1),
49449
49408
  createTextVNode(" 修改表结构 ", -1)
49450
49409
  ])])
49451
49410
  ]),
49452
- createBaseVNode("div", _hoisted_62, [
49453
- createBaseVNode("div", _hoisted_63, [
49454
- createBaseVNode("table", _hoisted_64, [
49455
- _cache[67] || (_cache[67] = createBaseVNode("thead", { class: "table-dark" }, [
49411
+ createBaseVNode("div", _hoisted_36$1, [
49412
+ createBaseVNode("div", _hoisted_37$1, [
49413
+ createBaseVNode("table", _hoisted_38$1, [
49414
+ _cache[42] || (_cache[42] = createBaseVNode("thead", { class: "table-dark" }, [
49456
49415
  createBaseVNode("tr", null, [
49457
49416
  createBaseVNode("th", null, "列名"),
49458
49417
  createBaseVNode("th", null, "数据类型"),
@@ -49487,32 +49446,32 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
49487
49446
  ]),
49488
49447
  createBaseVNode("td", null, toDisplayString(column.defaultValue || "-"), 1),
49489
49448
  createBaseVNode("td", null, [
49490
- column.isPrimary ? (openBlock(), createElementBlock("span", _hoisted_65, [..._cache[63] || (_cache[63] = [
49449
+ column.isPrimary ? (openBlock(), createElementBlock("span", _hoisted_39$1, [..._cache[38] || (_cache[38] = [
49491
49450
  createBaseVNode("i", { class: "bi bi-key-fill" }, null, -1),
49492
49451
  createTextVNode(" 主键 ", -1)
49493
- ])])) : (openBlock(), createElementBlock("span", _hoisted_66, "-"))
49452
+ ])])) : (openBlock(), createElementBlock("span", _hoisted_40$1, "-"))
49494
49453
  ]),
49495
49454
  createBaseVNode("td", null, [
49496
- column.isAutoIncrement ? (openBlock(), createElementBlock("span", _hoisted_67, [..._cache[64] || (_cache[64] = [
49455
+ column.isAutoIncrement ? (openBlock(), createElementBlock("span", _hoisted_41, [..._cache[39] || (_cache[39] = [
49497
49456
  createBaseVNode("i", { class: "bi bi-arrow-up-circle" }, null, -1),
49498
49457
  createTextVNode(" 自增 ", -1)
49499
- ])])) : (openBlock(), createElementBlock("span", _hoisted_68, "-"))
49458
+ ])])) : (openBlock(), createElementBlock("span", _hoisted_42, "-"))
49500
49459
  ]),
49501
49460
  createBaseVNode("td", null, toDisplayString(column.comment || "-"), 1),
49502
49461
  createBaseVNode("td", null, [
49503
- createBaseVNode("div", _hoisted_69, [
49462
+ createBaseVNode("div", _hoisted_43, [
49504
49463
  createBaseVNode("button", {
49505
49464
  class: "btn btn-outline-primary btn-sm",
49506
49465
  onClick: ($event) => editColumn()
49507
- }, [..._cache[65] || (_cache[65] = [
49466
+ }, [..._cache[40] || (_cache[40] = [
49508
49467
  createBaseVNode("i", { class: "bi bi-pencil" }, null, -1)
49509
- ])], 8, _hoisted_70),
49468
+ ])], 8, _hoisted_44),
49510
49469
  createBaseVNode("button", {
49511
49470
  class: "btn btn-outline-danger btn-sm",
49512
49471
  onClick: ($event) => deleteColumn(column)
49513
- }, [..._cache[66] || (_cache[66] = [
49472
+ }, [..._cache[41] || (_cache[41] = [
49514
49473
  createBaseVNode("i", { class: "bi bi-trash" }, null, -1)
49515
- ])], 8, _hoisted_71)
49474
+ ])], 8, _hoisted_45)
49516
49475
  ])
49517
49476
  ])
49518
49477
  ]);
@@ -49524,11 +49483,11 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
49524
49483
  ], 512), [
49525
49484
  [vShow, activeTab.value === "structure"]
49526
49485
  ]),
49527
- withDirectives(createBaseVNode("div", _hoisted_72, [
49528
- createBaseVNode("div", _hoisted_73, [
49529
- createBaseVNode("div", _hoisted_74, [
49530
- createBaseVNode("table", _hoisted_75, [
49531
- _cache[70] || (_cache[70] = createBaseVNode("thead", { class: "table-dark" }, [
49486
+ withDirectives(createBaseVNode("div", _hoisted_46, [
49487
+ createBaseVNode("div", _hoisted_47, [
49488
+ createBaseVNode("div", _hoisted_48, [
49489
+ createBaseVNode("table", _hoisted_49, [
49490
+ _cache[45] || (_cache[45] = createBaseVNode("thead", { class: "table-dark" }, [
49532
49491
  createBaseVNode("tr", null, [
49533
49492
  createBaseVNode("th", null, "索引名"),
49534
49493
  createBaseVNode("th", null, "类型"),
@@ -49546,7 +49505,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
49546
49505
  createBaseVNode("strong", null, toDisplayString(index.name), 1)
49547
49506
  ]),
49548
49507
  createBaseVNode("td", null, [
49549
- createBaseVNode("span", _hoisted_76, toDisplayString(index.type), 1)
49508
+ createBaseVNode("span", _hoisted_50, toDisplayString(index.type), 1)
49550
49509
  ]),
49551
49510
  createBaseVNode("td", null, [
49552
49511
  createBaseVNode("span", {
@@ -49562,19 +49521,19 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
49562
49521
  createBaseVNode("code", null, toDisplayString(index.columns.join(", ")), 1)
49563
49522
  ]),
49564
49523
  createBaseVNode("td", null, [
49565
- createBaseVNode("div", _hoisted_77, [
49524
+ createBaseVNode("div", _hoisted_51, [
49566
49525
  createBaseVNode("button", {
49567
49526
  class: "btn btn-outline-primary btn-sm",
49568
49527
  onClick: ($event) => editIndex(index)
49569
- }, [..._cache[68] || (_cache[68] = [
49528
+ }, [..._cache[43] || (_cache[43] = [
49570
49529
  createBaseVNode("i", { class: "bi bi-pencil" }, null, -1)
49571
- ])], 8, _hoisted_78),
49530
+ ])], 8, _hoisted_52),
49572
49531
  createBaseVNode("button", {
49573
49532
  class: "btn btn-outline-danger btn-sm",
49574
49533
  onClick: ($event) => deleteIndex(index)
49575
- }, [..._cache[69] || (_cache[69] = [
49534
+ }, [..._cache[44] || (_cache[44] = [
49576
49535
  createBaseVNode("i", { class: "bi bi-trash" }, null, -1)
49577
- ])], 8, _hoisted_79)
49536
+ ])], 8, _hoisted_53)
49578
49537
  ])
49579
49538
  ])
49580
49539
  ]);
@@ -49586,11 +49545,11 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
49586
49545
  ], 512), [
49587
49546
  [vShow, activeTab.value === "indexes"]
49588
49547
  ]),
49589
- withDirectives(createBaseVNode("div", _hoisted_80, [
49590
- createBaseVNode("div", _hoisted_81, [
49591
- createBaseVNode("div", _hoisted_82, [
49592
- createBaseVNode("table", _hoisted_83, [
49593
- _cache[72] || (_cache[72] = createBaseVNode("thead", { class: "table-dark" }, [
49548
+ withDirectives(createBaseVNode("div", _hoisted_54, [
49549
+ createBaseVNode("div", _hoisted_55, [
49550
+ createBaseVNode("div", _hoisted_56, [
49551
+ createBaseVNode("table", _hoisted_57, [
49552
+ _cache[47] || (_cache[47] = createBaseVNode("thead", { class: "table-dark" }, [
49594
49553
  createBaseVNode("tr", null, [
49595
49554
  createBaseVNode("th", null, "约束名"),
49596
49555
  createBaseVNode("th", null, "本表列"),
@@ -49621,13 +49580,13 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
49621
49580
  createBaseVNode("td", null, toDisplayString(fk.onDelete || "-"), 1),
49622
49581
  createBaseVNode("td", null, toDisplayString(fk.onUpdate || "-"), 1),
49623
49582
  createBaseVNode("td", null, [
49624
- createBaseVNode("div", _hoisted_84, [
49583
+ createBaseVNode("div", _hoisted_58, [
49625
49584
  createBaseVNode("button", {
49626
49585
  class: "btn btn-outline-danger btn-sm",
49627
49586
  onClick: ($event) => deleteForeignKey(fk)
49628
- }, [..._cache[71] || (_cache[71] = [
49587
+ }, [..._cache[46] || (_cache[46] = [
49629
49588
  createBaseVNode("i", { class: "bi bi-trash" }, null, -1)
49630
- ])], 8, _hoisted_85)
49589
+ ])], 8, _hoisted_59)
49631
49590
  ])
49632
49591
  ])
49633
49592
  ]);
@@ -49639,8 +49598,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
49639
49598
  ], 512), [
49640
49599
  [vShow, activeTab.value === "relations"]
49641
49600
  ]),
49642
- withDirectives(createBaseVNode("div", _hoisted_86, [
49643
- createBaseVNode("div", _hoisted_87, [
49601
+ withDirectives(createBaseVNode("div", _hoisted_60, [
49602
+ createBaseVNode("div", _hoisted_61, [
49644
49603
  createVNode(SqlExecutor, {
49645
49604
  connection: __props.connection,
49646
49605
  database: __props.database
@@ -49676,7 +49635,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
49676
49635
  };
49677
49636
  }
49678
49637
  });
49679
- const TableDetail = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-23851444"]]);
49638
+ const TableDetail = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-dccf9d97"]]);
49680
49639
  const _hoisted_1 = { class: "database-explorer" };
49681
49640
  const _hoisted_2 = { class: "explorer-layout" };
49682
49641
  const _hoisted_3 = { class: "explorer-sidebar" };