【调整】前后空格移除的方法和调整部分提示不准确的问题

This commit is contained in:
chudong
2025-05-20 11:45:02 +08:00
parent 59dc0a4108
commit ad0cd016f6
128 changed files with 10519 additions and 10314 deletions

View File

@@ -6,6 +6,7 @@ import rules from './verify'
import DnsProviderSelect from '@components/dnsProviderSelect'
import type { ApplyNodeConfig } from '@components/flowChart/types'
import { deepClone } from '@baota/utils/data'
import { noSideSpace } from '@lib/utils'
export default defineComponent({
name: 'ApplyNodeDrawer',
@@ -43,18 +44,14 @@ export default defineComponent({
return [
useFormInput($t('t_17_1745227838561'), 'domains', {
placeholder: $t('t_0_1745735774005'),
allowInput: noSideSpace,
onInput: (val: string) => {
param.value.domains = val.trim() // 去除空格
param.value.domains = param.value.domains.replace(//g, ',') // 中文逗号分隔
param.value.domains = param.value.domains.replace(/;/g, ',') // 去除分号
},
onFocus: () => {
param.value.domains = param.value.domains.replace(/,^/g, '') // 中文逗号分隔
param.value.domains = val.replace(//g, ',').replace(/;/g, ',') // 中文逗号分隔
},
}),
useFormInput($t('t_1_1745735764953'), 'email', {
placeholder: $t('t_2_1745735773668'),
onInput: (val: string) => (param.value.email = val.trim()),
allowInput: noSideSpace,
}),
{
type: 'custom' as const,
@@ -111,13 +108,9 @@ export default defineComponent({
'name_server',
{
placeholder: $t('t_1_1747106961747'),
allowInput: noSideSpace,
onInput: (val: string) => {
param.value.name_server = val.trim() // 去除空格
param.value.name_server = param.value.name_server.replace(//g, ',') // 中文逗号分隔
param.value.name_server = param.value.name_server.replace(/;/g, ',') // 去除分号
},
onFocus: () => {
param.value.name_server = param.value.name_server.replace(/,^/g, '') // 中文逗号分隔
param.value.name_server = val.replace(//g, ',').replace(/;/g, ',') // 中文逗号分隔
},
},
{ showRequireMark: false },

View File

@@ -25,6 +25,7 @@ import SearchOutlined from '@vicons/antd/es/SearchOutlined'
import styles from './index.module.css'
import verifyRules from './verify'
import { deepClone } from '@baota/utils/data'
import { noSideSpace } from '@lib/utils'
type StepStatus = 'process' | 'wait' | 'finish' | 'error'
@@ -153,11 +154,11 @@ export default defineComponent({
...[
useFormInput($t('t_1_1747280813656'), 'certPath', {
placeholder: $t('t_30_1746667591892'),
onInput: (val: string) => (param.value.certPath = val.trim()),
allowInput: noSideSpace,
}),
useFormInput($t('t_2_1747280811593'), 'keyPath', {
placeholder: $t('t_31_1746667593074'),
onInput: (val: string) => (param.value.keyPath = val.trim()),
allowInput: noSideSpace,
}),
useFormTextarea(
$t('t_3_1747280812067'),
@@ -182,7 +183,7 @@ export default defineComponent({
...[
useFormInput($t('t_0_1747296173751'), 'siteName', {
placeholder: $t('t_1_1747296175494'),
onInput: (val: string) => (param.value.siteName = val.trim()),
allowInput: noSideSpace,
}),
],
)
@@ -192,7 +193,7 @@ export default defineComponent({
...[
useFormInput($t('t_6_1747280809615'), 'site_id', {
placeholder: $t('t_24_1745735766826'),
onInput: (val: string) => (param.value.site_id = val.trim()),
allowInput: noSideSpace,
}),
],
)
@@ -203,7 +204,7 @@ export default defineComponent({
...[
useFormInput($t('t_17_1745227838561'), 'domain', {
placeholder: $t('t_0_1744958839535'),
onInput: (val: string) => (param.value.domain = val.trim()),
allowInput: noSideSpace,
}),
],
)
@@ -214,7 +215,7 @@ export default defineComponent({
...[
useFormInput($t('t_17_1745227838561'), 'domain', {
placeholder: $t('t_0_1744958839535'),
onInput: (val: string) => (param.value.domain = val.trim()),
allowInput: noSideSpace,
}),
],
)
@@ -222,7 +223,7 @@ export default defineComponent({
...[
useFormInput($t('t_7_1747280808936'), 'region', {
placeholder: $t('t_25_1745735766651'),
onInput: (val: string) => (param.value.region = val.trim()),
allowInput: noSideSpace,
}),
],
)
@@ -230,7 +231,7 @@ export default defineComponent({
...[
useFormInput($t('t_8_1747280809382'), 'bucket', {
placeholder: $t('t_26_1745735767144'),
onInput: (val: string) => (param.value.bucket = val.trim()),
allowInput: noSideSpace,
}),
],
)

View File

@@ -10,6 +10,7 @@ import verify from './verify'
import { NotifyNodeConfig } from '@components/flowChart/types'
import { deepClone } from '@baota/utils/data'
import { noSideSpace } from '@lib/utils'
export default defineComponent({
name: 'NotifyNodeDrawer',
@@ -39,12 +40,12 @@ export default defineComponent({
const formConfig: FormConfig = [
useFormInput($t('t_0_1745920566646'), 'subject', {
placeholder: $t('t_3_1745887835089'),
onInput: (val: string) => (param.value.subject = val.trim()),
allowInput: noSideSpace,
}),
useFormTextarea($t('t_1_1745920567200'), 'body', {
placeholder: $t('t_4_1745887835265'),
rows: 4,
onInput: (val: string) => (param.value.body = val.trim()),
allowInput: noSideSpace,
}),
useFormCustom(() => (
<NotifyProviderSelect

View File

@@ -10,6 +10,7 @@ import verifyRules from './verify'
import type { FormConfig } from '@baota/naive-ui/types/form'
import type { UploadNodeConfig } from '@components/flowChart/types'
import type { CertItem } from '@/types/cert'
import { noSideSpace } from '@lib/utils'
export default defineComponent({
name: 'UploadNodeDrawer',
@@ -76,13 +77,13 @@ export default defineComponent({
placeholder: $t('t_35_1745735781545'),
rows: 6,
readonly: param.value.cert_id === '' ? false : true,
onInput: (val: string) => (param.value.cert = val.trim()),
allowInput: noSideSpace,
}),
useFormTextarea($t('t_36_1745735769443'), 'key', {
placeholder: $t('t_37_1745735779980'),
rows: 6,
readonly: param.value.cert_id === '' ? false : true,
onInput: (val: string) => (param.value.key = val.trim()),
allowInput: noSideSpace,
}),
useFormHelp([
{

View File

@@ -1,10 +1,5 @@
:root {
--bg-color: #f5f5f7;
--border-color: #5a5e66;
}
.flowContainer {
@apply flex relative box-border w-full h-[calc(100vh-19rem)] overflow-x-auto overflow-y-auto bg-slate-50 ;
@apply flex relative box-border w-full h-[calc(100vh-19rem)] overflow-x-auto overflow-y-auto p-[1rem];
}
.flowProcess {
@@ -17,7 +12,7 @@
.flowZoomIcon {
@apply w-[2.5rem] h-[2.5rem] cursor-pointer border flex items-center justify-center;
border-color: var(--border-color);
border-color: var(--n-border-color);
}
/* 嵌套节点包装器样式 */