From 9c7c1d97efb611c56ee8884577f288e3113f1ec1 Mon Sep 17 00:00:00 2001 From: Liberty Date: Thu, 17 Aug 2023 16:47:12 +0800 Subject: [PATCH 01/30] test(erFormConfig): email:pc|Email:mobile --- examples/views/formEditorConfig.vue | 3 +- .../Config/components/CheckboxComponent.vue | 1 - .../Config/components/GlobalConfigPanel.vue | 2 +- .../Panels/Config/components/PropsPanel.vue | 47 +++++-- .../components/Panels/Config/index.vue | 6 +- packages/utils/nanoid.js | 2 +- packages/utils/test.js | 23 ++++ test/erFormConfig.test.js | 129 ++++++++++++++++++ 8 files changed, 197 insertions(+), 16 deletions(-) create mode 100644 packages/utils/test.js create mode 100644 test/erFormConfig.test.js diff --git a/examples/views/formEditorConfig.vue b/examples/views/formEditorConfig.vue index 5848561..29507e0 100644 --- a/examples/views/formEditorConfig.vue +++ b/examples/views/formEditorConfig.vue @@ -55,8 +55,7 @@ const sector = computed(() => { } else { result = _.find(all.value, { id: value0.value }) } - console.log(result?.columns?.[0]) - return result?.columns?.[0] || result + return result }) const handleListener = async ({ type, data }) => { console.log(type) diff --git a/packages/formEditor/components/Panels/Config/components/CheckboxComponent.vue b/packages/formEditor/components/Panels/Config/components/CheckboxComponent.vue index ffc683b..d27d487 100644 --- a/packages/formEditor/components/Panels/Config/components/CheckboxComponent.vue +++ b/packages/formEditor/components/Panels/Config/components/CheckboxComponent.vue @@ -3,7 +3,6 @@ import utils from '@ER/utils' import hooks from '@ER/hooks' export default { name: 'ConfigCheckboxComponent', - inheritAttrs: false, customOptions: {} } diff --git a/packages/formEditor/components/Panels/Config/components/GlobalConfigPanel.vue b/packages/formEditor/components/Panels/Config/components/GlobalConfigPanel.vue index e75cc90..57e5be9 100644 --- a/packages/formEditor/components/Panels/Config/components/GlobalConfigPanel.vue +++ b/packages/formEditor/components/Panels/Config/components/GlobalConfigPanel.vue @@ -128,7 +128,7 @@ const handleTypeListener = ({ property, data }) => {
- + {{ t('er.config.globalConfig.sync.warning') }}
diff --git a/packages/formEditor/components/Panels/Config/components/PropsPanel.vue b/packages/formEditor/components/Panels/Config/components/PropsPanel.vue index 2a26cfa..2244322 100644 --- a/packages/formEditor/components/Panels/Config/components/PropsPanel.vue +++ b/packages/formEditor/components/Panels/Config/components/PropsPanel.vue @@ -399,7 +399,7 @@ onMounted(() => { - + @@ -408,12 +408,14 @@ onMounted(() => { v-if="isSelectField" :label="t('er.config.propsPanel.title')" operationKey="options" - field="isShowLabel"> + field="isShowLabel" + v-bind="utils.addTestId('propsPanel:title')" + >