+ import { useIsWidthOverflow } from '@hooks';
+
import useValidtor, { type Rules } from './hooks/useValidtor';
interface Props {
@@ -51,6 +58,12 @@
const props = defineProps
();
+ const textRef = ref();
+
+ const renderData = computed(() => props.data);
+
+ const { isOverflow } = useIsWidthOverflow(textRef, renderData);
+
const {
message: errorMessage,
validator,
diff --git a/dbm-ui/frontend/src/components/tools-table-input/index.vue b/dbm-ui/frontend/src/components/tools-table-input/index.vue
index ca1b75fea7..0a2fe9da43 100644
--- a/dbm-ui/frontend/src/components/tools-table-input/index.vue
+++ b/dbm-ui/frontend/src/components/tools-table-input/index.vue
@@ -102,11 +102,15 @@
event.preventDefault();
return;
}
- validator(localValue.value)
- .then(() => {
- window.changeConfirm = true;
- emits('submit', localValue.value);
- });
+ if (localValue.value) {
+ validator(localValue.value)
+ .then(() => {
+ window.changeConfirm = true;
+ emits('submit', localValue.value);
+ });
+ return;
+ }
+ emits('submit', localValue.value);
};
// enter键提交
@@ -152,6 +156,10 @@
:deep(input) {
background-color: #fff0f1;
}
+
+ :deep(.bk-input--number-control) {
+ display: none !important;
+ }
}
.is-disabled {
@@ -159,6 +167,10 @@
cursor: not-allowed !important;
border: none !important;
}
+
+ :deep(.bk-input--number-control) {
+ background-color: #fafbfd;
+ }
}
.table-edit-input {
@@ -176,10 +188,6 @@
border: none;
outline: none;
- :deep(.bk-input--number-control) {
- display: none !important;
- }
-
:deep(input) {
border: 1px solid transparent;
border-radius: 0;
diff --git a/dbm-ui/frontend/src/components/tools-table-spec/index.vue b/dbm-ui/frontend/src/components/tools-table-spec/index.vue
index d08d8de492..24f8f57856 100644
--- a/dbm-ui/frontend/src/components/tools-table-spec/index.vue
+++ b/dbm-ui/frontend/src/components/tools-table-spec/index.vue
@@ -30,7 +30,7 @@
- {{ data?.name ? `${data.name} ${$t('((n))台', {n: data?.count})}` : '' }}
+ {{ data?.name ? `${data.name} ${isIgnoreCounts ? '' : $t('((n))台', {n: data?.count})}` : '' }}
@@ -63,6 +63,7 @@
count?: number;
};
isLoading?: boolean;
+ isIgnoreCounts?: boolean;
}
const props = defineProps