diff --git a/dolphinscheduler-ui/src/views/data-quality/rule/index.tsx b/dolphinscheduler-ui/src/views/data-quality/rule/index.tsx index 070c3fe16b..bcb6fc0dc0 100644 --- a/dolphinscheduler-ui/src/views/data-quality/rule/index.tsx +++ b/dolphinscheduler-ui/src/views/data-quality/rule/index.tsx @@ -15,7 +15,7 @@ * limitations under the License. */ -import { defineComponent, onMounted, ref, toRefs } from 'vue' +import { defineComponent, getCurrentInstance, onMounted, ref, toRefs } from 'vue' import { NSpace, NInput, @@ -73,6 +73,8 @@ const TaskResult = defineComponent({ ruleEntryData.value = ruleJson } + const trim = getCurrentInstance()?.appContext.config.globalProperties.trim + onMounted(() => { requestTableData() }) @@ -87,7 +89,8 @@ const TaskResult = defineComponent({ onConfirm, onSearch, ruleEntryData, - viewRuleEntry + viewRuleEntry, + trim } }, render() { @@ -111,6 +114,7 @@ const TaskResult = defineComponent({ { createColumns(variables) requestTableData() @@ -73,7 +75,8 @@ const TaskResult = defineComponent({ ...toRefs(variables), requestTableData, onUpdatePageSize, - onSearch + onSearch, + trim } }, render() { @@ -84,6 +87,7 @@ const TaskResult = defineComponent({ props.show, async () => { @@ -105,7 +107,8 @@ const DetailModal = defineComponent({ onChangePort, onSubmit, onTest, - onCancel + onCancel, + trim } }, render() { @@ -168,6 +171,7 @@ const DetailModal = defineComponent({ show-require-mark > { changePage(1) columns.value = getColumns() @@ -79,7 +81,8 @@ const list = defineComponent({ changePage, changePageSize, onCreate, - onUpdatedList: updateList + onUpdatedList: updateList, + trim } }, render() { @@ -119,6 +122,7 @@ const list = defineComponent({ >
diff --git a/dolphinscheduler-ui/src/views/login/index.tsx b/dolphinscheduler-ui/src/views/login/index.tsx index 6328a6a4e7..0da17e1f53 100644 --- a/dolphinscheduler-ui/src/views/login/index.tsx +++ b/dolphinscheduler-ui/src/views/login/index.tsx @@ -15,7 +15,7 @@ * limitations under the License. */ -import { defineComponent, toRefs, withKeys } from 'vue' +import { defineComponent, getCurrentInstance, toRefs, withKeys } from 'vue' import styles from './index.module.scss' import { NInput, @@ -47,9 +47,11 @@ const login = defineComponent({ themeStore.setDarkTheme() } + const trim = getCurrentInstance()?.appContext.config.globalProperties.trim + cookies.set('language', localesStore.getLocales, { path: '/' }) - return { t, handleChange, handleLogin, ...toRefs(state), localesStore } + return { t, handleChange, handleLogin, ...toRefs(state), localesStore, trim } }, render() { return ( @@ -79,6 +81,7 @@ const login = defineComponent({ path='userName' > { createColumns(variables) requestTableData() @@ -71,7 +73,8 @@ const AuditLog = defineComponent({ ...toRefs(variables), requestTableData, onUpdatePageSize, - onSearch + onSearch, + trim } }, render() { @@ -82,6 +85,7 @@ const AuditLog = defineComponent({ diff --git a/dolphinscheduler-ui/src/views/projects/list/components/project-modal.tsx b/dolphinscheduler-ui/src/views/projects/list/components/project-modal.tsx index e90b8f530b..7e67942ee9 100644 --- a/dolphinscheduler-ui/src/views/projects/list/components/project-modal.tsx +++ b/dolphinscheduler-ui/src/views/projects/list/components/project-modal.tsx @@ -15,7 +15,7 @@ * limitations under the License. */ -import { defineComponent, PropType, toRefs, watch } from 'vue' +import { defineComponent, getCurrentInstance, PropType, toRefs, watch } from 'vue' import { NForm, NFormItem, NInput } from 'naive-ui' import { useForm } from './use-form' import Modal from '@/components/modal' @@ -62,6 +62,8 @@ const ProjectModal = defineComponent({ handleValidate(props.statusRef) } + const trim = getCurrentInstance()?.appContext.config.globalProperties.trim + watch( () => props.statusRef, () => { @@ -88,7 +90,7 @@ const ProjectModal = defineComponent({ } ) - return { ...toRefs(variables), t, cancelModal, confirmModal } + return { ...toRefs(variables), t, cancelModal, confirmModal, trim} }, render() { const { t } = this @@ -110,6 +112,7 @@ const ProjectModal = defineComponent({ { createColumns(variables) requestData() @@ -87,7 +89,8 @@ const list = defineComponent({ handleSearch, onCancelModal, onConfirmModal, - handleChangePageSize + handleChangePageSize, + trim } }, render() { @@ -106,6 +109,7 @@ const list = defineComponent({ { createColumns(variables) requestData() @@ -110,7 +112,8 @@ const TaskDefinition = defineComponent({ onCreate, onTaskSubmit, onTaskCancel, - projectCode + projectCode, + trim } }, render() { @@ -135,12 +138,14 @@ const TaskDefinition = defineComponent({
{ createColumns(variables) requestTableData() @@ -130,7 +132,8 @@ const TaskInstance = defineComponent({ onUpdatePageSize, onSearch, onConfirmModal, - refreshLogs + refreshLogs, + trim } }, render() { @@ -149,24 +152,28 @@ const TaskInstance = defineComponent({ updateModalData()) watch( @@ -189,10 +191,12 @@ export default defineComponent({ > - + { getWorkerGroups() getAlertGroups() @@ -214,7 +217,8 @@ export default defineComponent({ updateParamsList, ...toRefs(variables), ...toRefs(startState), - ...toRefs(props) + ...toRefs(props), + trim } }, @@ -357,6 +361,7 @@ export default defineComponent({ {t('project.workflow.custom_parallelism')} ) : ( ( { getWorkerGroups() getAlertGroups() @@ -225,7 +228,8 @@ export default defineComponent({ handlePreview, ...toRefs(variables), ...toRefs(timingState), - ...toRefs(props) + ...toRefs(props), + trim } }, @@ -262,6 +266,7 @@ export default defineComponent({ {{ trigger: () => ( { createColumns(variables) @@ -107,7 +108,8 @@ export default defineComponent({ batchExportWorkflow, batchCopyWorkflow, handleCopyUpdateList, - ...toRefs(variables) + ...toRefs(variables), + trim } }, render() { @@ -141,6 +143,7 @@ export default defineComponent({
diff --git a/dolphinscheduler-ui/src/views/projects/workflow/instance/components/process-instance-condition.tsx b/dolphinscheduler-ui/src/views/projects/workflow/instance/components/process-instance-condition.tsx index d532b44a89..9322d40a41 100644 --- a/dolphinscheduler-ui/src/views/projects/workflow/instance/components/process-instance-condition.tsx +++ b/dolphinscheduler-ui/src/views/projects/workflow/instance/components/process-instance-condition.tsx @@ -25,7 +25,7 @@ import { NSelect, NIcon } from 'naive-ui' -import { defineComponent, ref } from 'vue' +import { defineComponent, getCurrentInstance, ref } from 'vue' import { useI18n } from 'vue-i18n' import { format } from 'date-fns' import { stateType } from '@/common/common' @@ -64,13 +64,16 @@ export default defineComponent({ }) } + const trim = getCurrentInstance()?.appContext.config.globalProperties.trim + return { searchValRef, executorNameRef, hostRef, stateTypeRef, startEndTimeRef, - handleSearch + handleSearch, + trim } }, render() { @@ -80,18 +83,21 @@ export default defineComponent({ diff --git a/dolphinscheduler-ui/src/views/resource/file/create/index.tsx b/dolphinscheduler-ui/src/views/resource/file/create/index.tsx index fdff756bff..49c2a8ab32 100644 --- a/dolphinscheduler-ui/src/views/resource/file/create/index.tsx +++ b/dolphinscheduler-ui/src/views/resource/file/create/index.tsx @@ -15,7 +15,7 @@ * limitations under the License. */ -import { defineComponent, toRefs } from 'vue' +import { defineComponent, getCurrentInstance, toRefs } from 'vue' import { useRouter } from 'vue-router' import { NForm, NFormItem, NInput, NSelect, NButton } from 'naive-ui' import { useI18n } from 'vue-i18n' @@ -54,11 +54,14 @@ export default defineComponent({ router.push({ name, params: { id } }) } + const trim = getCurrentInstance()?.appContext.config.globalProperties.trim + return { fileSuffixOptions, handleFile, handleReturn, - ...toRefs(state) + ...toRefs(state), + trim } }, render() { @@ -72,6 +75,7 @@ export default defineComponent({ > { const currFileId = Number(router.currentRoute.value.params.id) || -1 if (currFileId === -1) { @@ -235,7 +237,8 @@ export default defineComponent({ handleGoRoot, pagination: paginationReactive, renameInfo, - breadcrumbItemsRef + breadcrumbItemsRef, + trim } }, render() { @@ -282,6 +285,7 @@ export default defineComponent({
diff --git a/dolphinscheduler-ui/src/views/resource/file/rename/index.tsx b/dolphinscheduler-ui/src/views/resource/file/rename/index.tsx index d57302c362..b68c87fd73 100644 --- a/dolphinscheduler-ui/src/views/resource/file/rename/index.tsx +++ b/dolphinscheduler-ui/src/views/resource/file/rename/index.tsx @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { defineComponent, toRefs, PropType, watch } from 'vue' +import { defineComponent, toRefs, PropType, watch, getCurrentInstance } from 'vue' import { NForm, NFormItem, NInput } from 'naive-ui' import { useI18n } from 'vue-i18n' import Modal from '@/components/modal' @@ -56,6 +56,8 @@ export default defineComponent({ handleRenameFile(ctx.emit, hideModal, resetForm) } + const trim = getCurrentInstance()?.appContext.config.globalProperties.trim + watch( () => props.show, () => { @@ -65,7 +67,7 @@ export default defineComponent({ } ) - return { hideModal, handleFile, ...toRefs(state) } + return { hideModal, handleFile, ...toRefs(state), trim } }, render() { const { t } = useI18n() @@ -82,6 +84,7 @@ export default defineComponent({ @@ -147,6 +150,7 @@ const FormModal = defineComponent({ path='description' > { requestData() }) @@ -122,7 +124,8 @@ const taskGroupOption = defineComponent({ modelStatusRef, onCancel, onConfirm, - updateItemData + updateItemData, + trim } }, render() { @@ -157,6 +160,7 @@ const taskGroupOption = defineComponent({
- + diff --git a/dolphinscheduler-ui/src/views/resource/task-group/queue/index.tsx b/dolphinscheduler-ui/src/views/resource/task-group/queue/index.tsx index e191ed7212..622a0f8e7b 100644 --- a/dolphinscheduler-ui/src/views/resource/task-group/queue/index.tsx +++ b/dolphinscheduler-ui/src/views/resource/task-group/queue/index.tsx @@ -15,7 +15,7 @@ * limitations under the License. */ -import { ref, defineComponent, toRefs, reactive, onMounted, Ref } from 'vue' +import { ref, defineComponent, toRefs, reactive, onMounted, Ref, getCurrentInstance } from 'vue' import { NButton, NIcon, @@ -99,6 +99,8 @@ const taskGroupQueue = defineComponent({ resetTableData() } + const trim = getCurrentInstance()?.appContext.config.globalProperties.trim + onMounted(() => { const taskGroupOptionsParams = { pageNo: 1, @@ -134,7 +136,8 @@ const taskGroupQueue = defineComponent({ onConfirm, showModalRef, updateItemData, - taskGroupOptions + taskGroupOptions, + trim } }, render() { @@ -168,6 +171,7 @@ const taskGroupQueue = defineComponent({ placeholder={t('resource.task_group_queue.task_group_name')} /> { getUdfList() }) @@ -108,7 +110,8 @@ export default defineComponent({ handleUpload, ...toRefs(state), ...toRefs(uploadState), - ...toRefs(variables) + ...toRefs(variables), + trim } }, render() { @@ -143,6 +146,7 @@ export default defineComponent({ path='funcName' > @@ -237,6 +243,7 @@ export default defineComponent({ style={{ marginBottom: '5px' }} > { createColumns(variables) }) @@ -83,7 +85,8 @@ export default defineComponent({ handleUpdateList, handleCreateFolder, handleChangePageSize, - ...toRefs(variables) + ...toRefs(variables), + trim } }, render() { @@ -114,6 +117,7 @@ export default defineComponent({
diff --git a/dolphinscheduler-ui/src/views/resource/udf/resource/components/folder-modal.tsx b/dolphinscheduler-ui/src/views/resource/udf/resource/components/folder-modal.tsx index be13ace5c8..d0ae644010 100644 --- a/dolphinscheduler-ui/src/views/resource/udf/resource/components/folder-modal.tsx +++ b/dolphinscheduler-ui/src/views/resource/udf/resource/components/folder-modal.tsx @@ -15,7 +15,7 @@ * limitations under the License. */ -import { defineComponent, toRefs, PropType, watch, computed } from 'vue' +import { defineComponent, toRefs, PropType, watch, computed, getCurrentInstance } from 'vue' import { NForm, NFormItem, NInput } from 'naive-ui' import { useI18n } from 'vue-i18n' import Modal from '@/components/modal' @@ -55,6 +55,8 @@ export default defineComponent({ handleRenameResource(props.row.id) } + const trim = getCurrentInstance()?.appContext.config.globalProperties.trim + watch( () => props.row, () => { @@ -69,7 +71,8 @@ export default defineComponent({ hideModal, handleCreate, handleRename, - ...toRefs(state) + ...toRefs(state), + trim } }, render() { @@ -97,6 +100,7 @@ export default defineComponent({ path='name' > { createColumns(variables) }) @@ -104,7 +106,8 @@ export default defineComponent({ handleCreateFolder, handleUploadFile, handleChangePageSize, - ...toRefs(variables) + ...toRefs(variables), + trim } }, render() { @@ -143,6 +146,7 @@ export default defineComponent({
diff --git a/dolphinscheduler-ui/src/views/security/alarm-group-manage/components/alarm-group-modal.tsx b/dolphinscheduler-ui/src/views/security/alarm-group-manage/components/alarm-group-modal.tsx index abcab1ab49..18532e2e76 100644 --- a/dolphinscheduler-ui/src/views/security/alarm-group-manage/components/alarm-group-modal.tsx +++ b/dolphinscheduler-ui/src/views/security/alarm-group-manage/components/alarm-group-modal.tsx @@ -15,7 +15,7 @@ * limitations under the License. */ -import { defineComponent, PropType, toRefs, watch } from 'vue' +import { defineComponent, getCurrentInstance, PropType, toRefs, watch } from 'vue' import Modal from '@/components/modal' import { NForm, NFormItem, NInput, NSelect } from 'naive-ui' import { useModal } from './use-modal' @@ -55,6 +55,8 @@ const AlarmGroupModal = defineComponent({ handleValidate(props.statusRef) } + const trim = getCurrentInstance()?.appContext.config.globalProperties.trim + watch( () => props.showModalRef, () => { @@ -92,7 +94,7 @@ const AlarmGroupModal = defineComponent({ } ) - return { t, ...toRefs(variables), cancelModal, confirmModal } + return { t, ...toRefs(variables), cancelModal, confirmModal, trim } }, render() { const { t } = this @@ -124,6 +126,7 @@ const AlarmGroupModal = defineComponent({ path='groupName' > { createColumns(variables) requestData() @@ -85,7 +87,8 @@ const alarmGroupManage = defineComponent({ onConfirmModal, onUpdatePageSize, handleModalChange, - onSearch + onSearch, + trim } }, render() { @@ -109,6 +112,7 @@ const alarmGroupManage = defineComponent({ props.show, async () => { @@ -116,7 +118,8 @@ const DetailModal = defineComponent({ elements, onChangePlugin, onSubmit, - onCancel + onCancel, + trim } }, render(props: { currentRecord: IRecord }) { @@ -165,6 +168,7 @@ const DetailModal = defineComponent({ label: t('security.alarm_instance.alarm_instance_name'), widget: ( { changePage(1) columns.value = getColumns() @@ -85,7 +87,8 @@ const AlarmInstanceManage = defineComponent({ changePageSize, onCreate, onCloseModal, - onUpdatedList: updateList + onUpdatedList: updateList, + trim } }, render() { @@ -123,6 +126,7 @@ const AlarmInstanceManage = defineComponent({ wrap={false} > props.statusRef, () => { @@ -113,7 +115,7 @@ const ClusterModal = defineComponent({ } ) - return { t, ...toRefs(variables), cancelModal, confirmModal } + return { t, ...toRefs(variables), cancelModal, confirmModal, trim } }, render() { const { t } = this @@ -141,6 +143,7 @@ const ClusterModal = defineComponent({ path='name' > { createColumns(variables) requestData() @@ -85,7 +87,8 @@ const clusterManage = defineComponent({ onConfirmModal, onUpdatePageSize, handleModalChange, - onSearch + onSearch, + trim } }, render() { @@ -114,6 +117,7 @@ const clusterManage = defineComponent({ props.showModalRef, () => { @@ -105,7 +107,7 @@ const EnvironmentModal = defineComponent({ } ) - return { t, ...toRefs(variables), cancelModal, confirmModal } + return { t, ...toRefs(variables), cancelModal, confirmModal, trim } }, render() { const { t } = this @@ -139,6 +141,7 @@ const EnvironmentModal = defineComponent({ path='name' > { createColumns(variables) requestData() @@ -85,7 +87,8 @@ const environmentManage = defineComponent({ onConfirmModal, onUpdatePageSize, handleModalChange, - onSearch + onSearch, + trim } }, render() { @@ -114,6 +117,7 @@ const environmentManage = defineComponent({ props.showModalRef, () => { @@ -103,7 +105,7 @@ const K8sNamespaceModal = defineComponent({ } ) - return { t, ...toRefs(variables), cancelModal, confirmModal } + return { t, ...toRefs(variables), cancelModal, confirmModal, trim } }, render() { const { t } = this @@ -133,6 +135,7 @@ const K8sNamespaceModal = defineComponent({ path='namespace' > @@ -167,6 +171,7 @@ const K8sNamespaceModal = defineComponent({ > { createColumns(variables) requestData() @@ -85,7 +87,8 @@ const k8sNamespaceManage = defineComponent({ onConfirmModal, onUpdatePageSize, handleModalChange, - onSearch + onSearch, + trim } }, render() { @@ -109,6 +112,7 @@ const k8sNamespaceManage = defineComponent({ props.showModalRef, () => { @@ -87,7 +89,7 @@ const TenantModal = defineComponent({ } ) - return { t, ...toRefs(variables), cancelModal, confirmModal } + return { t, ...toRefs(variables), cancelModal, confirmModal, trim } }, render() { const { t } = this @@ -121,6 +123,7 @@ const TenantModal = defineComponent({ path='tenantCode' > { createColumns(variables) requestData() @@ -85,7 +87,8 @@ const tenementManage = defineComponent({ onCancelModal, onConfirmModal, handleSearch, - handleChangePageSize + handleChangePageSize, + trim } }, render() { @@ -104,6 +107,7 @@ const tenementManage = defineComponent({ props.showModalRef, () => { @@ -130,7 +132,8 @@ const TokenModal = defineComponent({ confirmModal, getToken, changeUser, - userStore + userStore, + trim } }, render() { @@ -189,6 +192,7 @@ const TokenModal = defineComponent({ { createColumns(variables) requestData() @@ -85,7 +87,8 @@ const tokenManage = defineComponent({ onConfirmModal, onUpdatePageSize, handleModalChange, - onSearch + onSearch, + trim } }, render() { @@ -114,6 +117,7 @@ const tokenManage = defineComponent({ props.show, () => { @@ -75,7 +77,8 @@ export const UserModal = defineComponent({ IS_ADMIN, formRules, onCancel, - onConfirm + onConfirm, + trim } }, render(props: { currentRecord: IRecord }) { @@ -105,6 +108,7 @@ export const UserModal = defineComponent({ > { state.authorizeModalShow = false } + const trim = getCurrentInstance()?.appContext.config.globalProperties.trim return { t, @@ -60,7 +61,8 @@ const UsersManage = defineComponent({ onAddUser, onUpdatedList: updateList, onDetailModalCancel, - onAuthorizeModalCancel + onAuthorizeModalCancel, + trim } }, render() { @@ -77,7 +79,8 @@ const UsersManage = defineComponent({ {this.t('security.user.create_user')} - + diff --git a/dolphinscheduler-ui/src/views/security/worker-group-manage/components/worker-group-modal.tsx b/dolphinscheduler-ui/src/views/security/worker-group-manage/components/worker-group-modal.tsx index 43626d644c..b84f0ba84b 100644 --- a/dolphinscheduler-ui/src/views/security/worker-group-manage/components/worker-group-modal.tsx +++ b/dolphinscheduler-ui/src/views/security/worker-group-manage/components/worker-group-modal.tsx @@ -15,7 +15,7 @@ * limitations under the License. */ -import { defineComponent, PropType, toRefs, watch } from 'vue' +import { defineComponent, getCurrentInstance, PropType, toRefs, watch } from 'vue' import Modal from '@/components/modal' import { NForm, NFormItem, NInput, NSelect } from 'naive-ui' import { useModal } from './use-modal' @@ -54,6 +54,8 @@ const WorkerGroupModal = defineComponent({ handleValidate(props.statusRef) } + const trim = getCurrentInstance()?.appContext.config.globalProperties.trim + watch( () => props.showModalRef, () => { @@ -84,7 +86,7 @@ const WorkerGroupModal = defineComponent({ } ) - return { t, ...toRefs(variables), cancelModal, confirmModal } + return { t, ...toRefs(variables), cancelModal, confirmModal, trim } }, render() { const { t } = this @@ -116,6 +118,7 @@ const WorkerGroupModal = defineComponent({ path='name' > { createColumns(variables) requestData() @@ -85,7 +87,8 @@ const workerGroupManage = defineComponent({ onConfirmModal, onUpdatePageSize, handleModalChange, - onSearch + onSearch, + trim } }, render() { @@ -114,6 +117,7 @@ const workerGroupManage = defineComponent({ props.statusRef, () => { @@ -77,7 +79,7 @@ const YarnQueueModal = defineComponent({ } ) - return { t, ...toRefs(variables), cancelModal, confirmModal } + return { t, ...toRefs(variables), cancelModal, confirmModal, trim } }, render() { const { t } = this @@ -109,6 +111,7 @@ const YarnQueueModal = defineComponent({ path='queueName' > { createColumns(variables) requestData() @@ -85,7 +87,8 @@ const yarnQueueManage = defineComponent({ onConfirmModal, onUpdatePageSize, handleModalChange, - onSearch + onSearch, + trim } }, render() { @@ -114,6 +117,7 @@ const yarnQueueManage = defineComponent({