From 4c9b54bc394d516740349a81cf58ddbc0163b27b Mon Sep 17 00:00:00 2001 From: liberty Date: Thu, 18 May 2023 20:19:24 +0800 Subject: [PATCH] fix: i18n --- .../components/Layout/DragGable.jsx | 2 +- .../Config/components/LogicComponent.vue | 114 +++---- .../Config/components/generateFilterdata.js | 119 ++++--- packages/formEditor/locale/en.js | 41 ++- packages/formEditor/locale/zh-cn.js | 41 ++- packages/formEditor/preview.vue | 4 - packages/hooks/use-logic/index.js | 36 +-- .../formEditor/ConfigLogicComponent.scss | 24 +- .../er-form-preview/er-form-preview.test.js | 4 +- .../__snapshots__/Cascader.test.js.snap | 24 ++ .../__snapshots__/Cellphone.test.js.snap | 6 + .../__snapshots__/Checkbox.test.js.snap | 6 + .../__snapshots__/Date.test.js.snap | 294 ++---------------- .../__snapshots__/Email.test.js.snap | 6 + .../__snapshots__/File.test.js.snap | 6 + .../__snapshots__/Html.test.js.snap | 6 + .../__snapshots__/IDnumber.test.js.snap | 6 + .../__snapshots__/Input.test.js.snap | 6 + .../__snapshots__/Number.test.js.snap | 9 + .../__snapshots__/Radio.test.js.snap | 6 + .../__snapshots__/Rate.test.js.snap | 9 + .../__snapshots__/Region.test.js.snap | 24 +- .../__snapshots__/Select.test.js.snap | 12 + .../__snapshots__/Signature.test.js.snap | 6 + .../__snapshots__/Slider.test.js.snap | 9 + .../__snapshots__/Switch.test.js.snap | 6 + .../__snapshots__/Textarea.test.js.snap | 6 + .../__snapshots__/Time.test.js.snap | 9 + .../__snapshots__/URL.test.js.snap | 6 + 29 files changed, 422 insertions(+), 425 deletions(-) diff --git a/packages/formEditor/components/Layout/DragGable.jsx b/packages/formEditor/components/Layout/DragGable.jsx index 7d5dee6..e16bbe9 100644 --- a/packages/formEditor/components/Layout/DragGable.jsx +++ b/packages/formEditor/components/Layout/DragGable.jsx @@ -145,7 +145,7 @@ export default defineComponent({ break default: let TypeComponent = '' - if (unref(isEditModel) || _.get(state.fieldsLogicState.get(element), 'visibility', undefined) !== 0) { + if (unref(isEditModel) || _.get(state.fieldsLogicState.get(element), 'visible', undefined) !== 0) { const typeProps = hooks.useProps(state, element, unref(isPc)) TypeComponent = load.findComponent('FormTypes', element.type) const params = { diff --git a/packages/formEditor/components/Panels/Config/components/LogicComponent.vue b/packages/formEditor/components/Panels/Config/components/LogicComponent.vue index 5718494..192b321 100644 --- a/packages/formEditor/components/Panels/Config/components/LogicComponent.vue +++ b/packages/formEditor/components/Panels/Config/components/LogicComponent.vue @@ -22,25 +22,23 @@ const props = defineProps({ } }) const { - t + t, + lang } = hooks.useI18n() const tabs = ref([ { - label: '显隐', - value: 'showHidden', + value: 'visible', rules: [], ifRefs: [], thenRefs: [] }, { - label: '必填', value: 'required', rules: [], ifRefs: [], thenRefs: [] }, { - label: '只读', value: 'readOnly', rules: [], ifRefs: [], @@ -55,8 +53,7 @@ const tabs = ref([ // thenRefs: [] // } ]) -window.tabs = tabs -const activeTab = ref('readOnly') +const activeTab = ref('visible') const emit = defineEmits(['update:modelValue']) const ER = inject('Everright') const scrollbarRef = ref() @@ -156,7 +153,9 @@ const handleAction = (type) => { const rules = tabs.value[curIndex.value].rules rules.push(rules.length) nextTick(() => { - scrollbarRef.value[curIndex.value].setScrollTop(scrollbarRef.value[curIndex.value].wrapRef.scrollHeight) + requestAnimationFrame(() => { + scrollbarRef.value[curIndex.value].setScrollTop(scrollbarRef.value[curIndex.value].wrapRef.scrollHeight) + }) }) break case 2: @@ -194,10 +193,10 @@ const handleListener = (ruleType, index, tab, { type, data }) => { } else { if (ruleType === 'then') { switch (activeTab.value) { - case 'validation': - _.last(tab.thenRefs).pushData('message') - break - case 'showHidden': + // case 'validation': + // _.last(tab.thenRefs).pushData('message') + // break + case 'visible': _.last(tab.thenRefs).pushData('show') break case 'required': @@ -211,19 +210,19 @@ const handleListener = (ruleType, index, tab, { type, data }) => { } } } -const addRuleHandler = (tab) => { +const addRuleHandler = (tab, index) => { switch (activeTab.value) { - case 'validation': - _.last(tab.thenRefs).pushData('message') - break - case 'showHidden': - _.last(tab.thenRefs).pushData('show') + // case 'validation': + // // _.last(tab.thenRefs).pushData('message') + // break + case 'visible': + tab.thenRefs[index].pushData('show') break case 'required': - _.last(tab.thenRefs).pushData('required') + tab.thenRefs[index].pushData('required') break case 'readOnly': - _.last(tab.thenRefs).pushData('readOnly') + tab.thenRefs[index].pushData('readOnly') break } return false @@ -235,62 +234,71 @@ const handleClosed = () => { } diff --git a/packages/formEditor/components/Panels/Config/components/generateFilterdata.js b/packages/formEditor/components/Panels/Config/components/generateFilterdata.js index 3586a2a..18e230e 100644 --- a/packages/formEditor/components/Panels/Config/components/generateFilterdata.js +++ b/packages/formEditor/components/Panels/Config/components/generateFilterdata.js @@ -1,4 +1,6 @@ import _ from 'lodash-es' +import utils from '@ER/utils' +import locale from '@ER/formEditor/locale' const generateIfFilterOptionsData = (activeTab, fields) => { const result = { options: [ @@ -151,124 +153,110 @@ const generateIfFilterOptionsData = (activeTab, fields) => { case 'Text': result.operators.Text = [ { - label: '等于', value: 'equal', style: 'noop' }, - // { - // label: '等于其中之一', - // value: 'one_of', - // style: 'tags' - // }, { - label: '不等于', value: 'not_equal', style: 'noop' }, { - label: '包含', value: 'contains', style: 'tags' }, { - label: '不包含', value: 'not_contain', style: 'tags' }, { - label: '为空', value: 'empty', style: 'none' }, { - label: '不为空', value: 'not_empty', style: 'none' } - ] + ].map(e => { + e.label = utils.transferData('zh-cn', `er.logic.filter.${e.value}`, locale) + e.en_label = utils.transferData('en', `er.logic.filter.${e.value}`, locale) + return e + }) break case 'Number': result.operators.Number = [ { - label: '等于', value: 'equal', style: 'noop' }, { - label: '不等于', value: 'not_equal', style: 'noop' }, { - label: '大于', value: 'greater_than', style: 'noop' }, { - label: '大于等于', value: 'greater_than_equal', style: 'noop' }, { - label: '小于', value: 'less_than', style: 'noop' }, { - label: '小于等于', value: 'less_than_equal', style: 'noop' }, { - label: '区间', value: 'between', style: 'range' }, { - label: '为空', value: 'empty', style: 'none' }, { - label: '不为空', value: 'not_empty', style: 'none' } - ] + ].map(e => { + e.label = utils.transferData('zh-cn', `er.logic.filter.${e.value}`, locale) + e.en_label = utils.transferData('en', `er.logic.filter.${e.value}`, locale) + return e + }) break case 'Region': - result.operators.Number = [ + result.operators.Region = [ { - label: '等于其中之一', value: 'one_of', style: 'tags' }, { - label: '不等于其中之一', value: 'not_one_of', style: 'tags' }, { - label: '属于其中之一', value: 'belong_one_of', style: 'tags' }, { - label: '不属于其中之一', value: 'not_belong_one_of', style: 'tags' }, { - label: '为空', value: 'empty', style: 'none' }, { - label: '不为空', value: 'not_empty', style: 'none' } - ] + ].map(e => { + e.label = utils.transferData('zh-cn', `er.logic.filter.${e.value}`, locale) + e.en_label = utils.transferData('en', `er.logic.filter.${e.value}`, locale) + return e + }) break } } @@ -283,13 +271,13 @@ const generateIfFilterConditionsData = (activeTab, state, property) => { if (findField.type === 'switch') { result = [ { - label: '开', - en_label: 'on', + label: utils.transferData('zh-cn', 'er.logic.filter.on', locale), + en_label: utils.transferData('en', 'er.logic.filter.on', locale), value: 1 }, { - label: '关', - en_label: 'off', + label: utils.transferData('zh-cn', 'er.logic.filter.off', locale), + en_label: utils.transferData('en', 'er.logic.filter.off', locale), value: 0 } ] @@ -302,17 +290,19 @@ const generateIfFilterConditionsData = (activeTab, state, property) => { const generateThenFilterOptionsData = (activeTab, fields) => { let result = {} switch (activeTab) { - case 'showHidden': + case 'visible': result = { options: [ { - label: '显示', + label: utils.transferData('zh-cn', 'er.logic.filter.show', locale), + en_label: utils.transferData('en', 'er.logic.filter.show', locale), value: 'show', renderType: 'SELECT', operatorKey: 'Text' }, { - label: '隐藏', + label: utils.transferData('zh-cn', 'er.logic.filter.hide', locale), + en_label: utils.transferData('en', 'er.logic.filter.hide', locale), value: 'hide', renderType: 'SELECT', operatorKey: 'Text' @@ -321,7 +311,8 @@ const generateThenFilterOptionsData = (activeTab, fields) => { operators: { Text: [ { - label: '字段', + label: utils.transferData('zh-cn', 'er.logic.filter.field', locale), + en_label: utils.transferData('en', 'er.logic.filter.field', locale), value: 'field', style: 'tags' } @@ -343,12 +334,14 @@ const generateThenFilterOptionsData = (activeTab, fields) => { operators: { Text: [ { - label: '必填', + label: utils.transferData('zh-cn', 'er.logic.filter.required', locale), + en_label: utils.transferData('en', 'er.logic.filter.required', locale), value: 'required', style: 'noop' }, { - label: '不必填', + label: utils.transferData('zh-cn', 'er.logic.filter.not_required', locale), + en_label: utils.transferData('en', 'er.logic.filter.not_required', locale), value: 'not_required', style: 'noop' } @@ -370,12 +363,14 @@ const generateThenFilterOptionsData = (activeTab, fields) => { operators: { Text: [ { - label: '只读', + label: utils.transferData('zh-cn', 'er.logic.filter.readOnly', locale), + en_label: utils.transferData('en', 'er.logic.filter.readOnly', locale), value: 'readOnly', style: 'noop' }, { - label: '可编辑', + label: utils.transferData('zh-cn', 'er.logic.filter.editable', locale), + en_label: utils.transferData('en', 'er.logic.filter.editable', locale), value: 'editable', style: 'noop' } @@ -384,26 +379,26 @@ const generateThenFilterOptionsData = (activeTab, fields) => { } break case 'validation': - result = { - options: [ - { - label: '提示内容', - value: 'message', - renderType: 'TEXT', - isShowOperator: false, - operatorKey: 'Text' - } - ], - operators: { - Text: [ - { - label: '', - value: 'required', - style: 'noop' - } - ] - } - } + // result = { + // options: [ + // { + // label: utils.transferData('zh-cn', 'er.logic.filter.message', locale), + // en_label: utils.transferData('en', 'er.logic.filter.message', locale), + // renderType: 'TEXT', + // isShowOperator: false, + // operatorKey: 'Text' + // } + // ], + // operators: { + // Text: [ + // { + // label: '', + // value: 'required', + // style: 'noop' + // } + // ] + // } + // } break } return result diff --git a/packages/formEditor/locale/en.js b/packages/formEditor/locale/en.js index f11287c..8a3c1de 100644 --- a/packages/formEditor/locale/en.js +++ b/packages/formEditor/locale/en.js @@ -199,7 +199,8 @@ export default { disabled: 'disabled', back: 'Back', save: 'Save', - reset: 'Reset' + reset: 'Reset', + add: 'Add' }, validateMsg: { required: 'Required', @@ -238,6 +239,44 @@ export default { delColumn: 'Delete column', splitColumn: 'Split column', splitRow: 'Split row' + }, + logic: { + filter: { + equal: 'Equal', + not_equal: 'Not equal', + contains: 'Contains', + not_contain: 'Not contain', + empty: 'Empty', + not_empty: 'Not empty', + greater_than: 'Greater than', + greater_than_equal: 'Greater than or equal to', + less_than: 'Less than', + less_than_equal: 'Less than or equal to', + between: 'Between', + one_of: 'Equal to one of', + not_one_of: 'Not equal to one of', + belong_one_of: 'Belong to one of', + not_belong_one_of: 'Not belong to one of', + on: 'On', + off: 'Off', + show: 'Show', + hide: 'Hide', + field: 'Field', + required: 'Required', + not_required: 'Not required', + readOnly: 'Readonly', + editable: 'Editable' + }, + filterLabel: { + if: 'When the following conditions are met', + then: 'Then execute' + }, + tabs: { + visible: 'Visible', + required: 'Required', + readOnly: 'Readonly' + }, + button: 'Logic Control' } } } diff --git a/packages/formEditor/locale/zh-cn.js b/packages/formEditor/locale/zh-cn.js index 08ba8ea..72e1820 100644 --- a/packages/formEditor/locale/zh-cn.js +++ b/packages/formEditor/locale/zh-cn.js @@ -199,7 +199,8 @@ export default { disabled: '禁用', back: '返回', save: '保存', - reset: '重置' + reset: '重置', + add: '添加' }, validateMsg: { required: '必填', @@ -238,6 +239,44 @@ export default { delColumn: '删除整列', splitColumn: '拆分成列', splitRow: '拆分成行' + }, + logic: { + filter: { + equal: '等于', + not_equal: '不等于', + contains: '包含', + not_contain: '不包含', + empty: '为空', + not_empty: '不为空', + greater_than: '大于', + greater_than_equal: '大于等于', + less_than: '小于', + less_than_equal: '小于等于', + between: '区间', + one_of: '等于其中之一', + not_one_of: '不等于其中之一', + belong_one_of: '属于其中之一', + not_belong_one_of: '不属于其中之一', + on: '开', + off: '关', + show: '显示', + hide: '隐藏', + field: '字段', + required: '必填', + not_required: '不必填', + readOnly: '只读', + editable: '可编辑' + }, + filterLabel: { + if: '当满足以下条件时', + then: '则执行' + }, + tabs: { + visible: '显隐', + required: '必填', + readOnly: '只读' + }, + button: '逻辑控制' } } } diff --git a/packages/formEditor/preview.vue b/packages/formEditor/preview.vue index 3213c2c..a5c6fc2 100644 --- a/packages/formEditor/preview.vue +++ b/packages/formEditor/preview.vue @@ -29,9 +29,6 @@ const state = reactive({ data: {}, fields: [], logic: {}, - // fieldsVisibility: ref(new WeakMap()), - // fieldsRequired: ref(new WeakMap()), - // fieldsValidation: new Map(), fieldsLogicState: new Map() }) const ns = hooks.useNamespace('Main', state.Namespace) @@ -67,7 +64,6 @@ provide('Everright', { props // checkFieldsValidation }) -window.state = state const setData2 = (data, value) => { const newData = _.cloneDeep(data) layout.pc = newData.layout.pc diff --git a/packages/hooks/use-logic/index.js b/packages/hooks/use-logic/index.js index 651c6f3..2e44701 100644 --- a/packages/hooks/use-logic/index.js +++ b/packages/hooks/use-logic/index.js @@ -203,48 +203,34 @@ export const validator = (logic, value, field) => { } return result } -// const operatingShowHidden = (fields, rules) => { -// rules.forEach(rule => { -// const targetFields = findFieldsByid(rule.if.conditions.map(e => e.property), fields) -// const operator = (v) => rule.if.logicalOperator === 'and' ? v.every(v => v) : v.some(v => v) -// console.log(rule) -// watch(() => targetFields.map(e => e.options.defaultValue), (values) => { -// console.log(operator(values.map((value, index) => validator(rule.if.conditions[index], value, targetFields[index])))) -// }, { -// immediate: true, -// deep: true -// }) -// // console.log(rule.if.conditions.map(e => e.property)) -// }) -// } const changeState = (fieldsLogicState, field, key, value) => { if (!fieldsLogicState.has(field)) { fieldsLogicState.set(field, {}) } fieldsLogicState.get(field)[key] = value } -const operatingShowHidden = (isValidation, rule, fields, fieldsLogicState) => { +const operatingVisible = (isValidation, rule, fields, fieldsLogicState) => { _.get(rule, 'then.conditions', []).forEach(condition => { switch (condition.property) { case 'show': if (isValidation) { findFieldsByid(condition.value, state.fields).forEach(field => { - changeState(fieldsLogicState, field, 'visibility', 1) + changeState(fieldsLogicState, field, 'visible', 1) }) } else { findFieldsByid(condition.value, state.fields).forEach(field => { - changeState(fieldsLogicState, field, 'visibility', 0) + changeState(fieldsLogicState, field, 'visible', 0) }) } break case 'hide': if (isValidation) { findFieldsByid(condition.value, state.fields).forEach(field => { - changeState(fieldsLogicState, field, 'visibility', 0) + changeState(fieldsLogicState, field, 'visible', 0) }) } else { findFieldsByid(condition.value, state.fields).forEach(field => { - changeState(fieldsLogicState, field, 'visibility', 1) + changeState(fieldsLogicState, field, 'visible', 1) }) } break @@ -330,8 +316,8 @@ const listenEvent = (state) => { watch(() => targetFields.map(e => e.options.defaultValue), (values) => { // console.log(operator(values.map((value, index) => validator(rule.if.conditions[index], value, targetFields[index])))) switch (type) { - case 'showHidden': - operatingShowHidden(operator(values.map((value, index) => validator(rule.if.conditions[index], value, targetFields[index]))), rule, state.fields, state.fieldsLogicState) + case 'visible': + operatingVisible(operator(values.map((value, index) => validator(rule.if.conditions[index], value, targetFields[index]))), rule, state.fields, state.fieldsLogicState) break case 'required': operatingRequired(operator(values.map((value, index) => validator(rule.if.conditions[index], value, targetFields[index]))), rule, state.fields, state.fieldsLogicState) @@ -348,18 +334,10 @@ const listenEvent = (state) => { deep: true }) }) - // switch (type) { - // case 'showHidden': - // operatingShowHidden(state.fields, rules[type]) - // break - // } } } export const useLogic = (state) => { - // console.log(state) - // console.log(state.logic) watch(() => state.logic, () => { listenEvent(state) }) - // findValidityFields(state) } diff --git a/packages/theme/formEditor/ConfigLogicComponent.scss b/packages/theme/formEditor/ConfigLogicComponent.scss index 8f9394d..41c6a08 100644 --- a/packages/theme/formEditor/ConfigLogicComponent.scss +++ b/packages/theme/formEditor/ConfigLogicComponent.scss @@ -1,20 +1,18 @@ @include b(ConfigLogicComponent) { - margin-top: 4vh; @include e(rule) { - //background-color: #f9f9f9; margin: 10px; border-radius: 6px; padding: 10px 20px; box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.1); - //margin: 16px 0; position: relative; &>div { &:first-child { margin-top: 0; } - h2 { + h3 { padding: 10px 0 0; margin: 0; + color: #333333; } } } @@ -36,6 +34,7 @@ .Everright-filter-FilterItem{ background: none; margin-top: 0; + padding-top: 10px; padding-bottom: 40px; } .Everright-filter-Main { @@ -45,6 +44,21 @@ width: calc(100% - 20px); border: none; margin: 10px; - box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.1); + box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.1) !important; + &:focus { + background-color: transparent; + } + &:hover { + background: var(--el-button-hover-bg-color); + } + } + .Everright-filter-OperatorComponent__width { + width: 100px; + } + .Everright-filter-TriggerComponent,.Everright-filter-TextType__width,.Everright-filter-SelectType__width,.Everright-filter-RegionType__width { + width: 200px !important; + } + .Everright-filter-NumberType__width { + width: 150px; } } diff --git a/test/logic/er-form-preview/er-form-preview.test.js b/test/logic/er-form-preview/er-form-preview.test.js index f57a159..ca90d32 100644 --- a/test/logic/er-form-preview/er-form-preview.test.js +++ b/test/logic/er-form-preview/er-form-preview.test.js @@ -93,7 +93,7 @@ describe('er-form-preview', () => { }) test('logic & Hide ByW9gM4L6R8ScRvEh-xRB when QENpBBxQfZVSzk2ahMmOH is empty', async () => { testData.logic = { - showHidden: [ + visible: [ { ifRules: { filters: [ @@ -184,7 +184,7 @@ describe('er-form-preview', () => { }) test('logic & Hide and Required ByW9gM4L6R8ScRvEh-xRB when QENpBBxQfZVSzk2ahMmOH is empty', async () => { testData.logic = { - showHidden: [ + visible: [ { ifRules: { filters: [ diff --git a/test/logic/generateFilterdata/__snapshots__/Cascader.test.js.snap b/test/logic/generateFilterdata/__snapshots__/Cascader.test.js.snap index 72e257e..21b0672 100644 --- a/test/logic/generateFilterdata/__snapshots__/Cascader.test.js.snap +++ b/test/logic/generateFilterdata/__snapshots__/Cascader.test.js.snap @@ -5,31 +5,37 @@ exports[`Generate filter data: Cascader > property:["multiple = false", "checkSt "operators": { "Text": [ { + "en_label": "Equal", "label": "等于", "style": "noop", "value": "equal", }, { + "en_label": "Not equal", "label": "不等于", "style": "noop", "value": "not_equal", }, { + "en_label": "Contains", "label": "包含", "style": "tags", "value": "contains", }, { + "en_label": "Not contain", "label": "不包含", "style": "tags", "value": "not_contain", }, { + "en_label": "Empty", "label": "为空", "style": "none", "value": "empty", }, { + "en_label": "Not empty", "label": "不为空", "style": "none", "value": "not_empty", @@ -68,31 +74,37 @@ exports[`Generate filter data: Cascader > property:["multiple = false", "checkSt "operators": { "Text": [ { + "en_label": "Equal", "label": "等于", "style": "noop", "value": "equal", }, { + "en_label": "Not equal", "label": "不等于", "style": "noop", "value": "not_equal", }, { + "en_label": "Contains", "label": "包含", "style": "tags", "value": "contains", }, { + "en_label": "Not contain", "label": "不包含", "style": "tags", "value": "not_contain", }, { + "en_label": "Empty", "label": "为空", "style": "none", "value": "empty", }, { + "en_label": "Not empty", "label": "不为空", "style": "none", "value": "not_empty", @@ -131,31 +143,37 @@ exports[`Generate filter data: Cascader > property:["multiple = true", "checkStr "operators": { "Text": [ { + "en_label": "Equal", "label": "等于", "style": "noop", "value": "equal", }, { + "en_label": "Not equal", "label": "不等于", "style": "noop", "value": "not_equal", }, { + "en_label": "Contains", "label": "包含", "style": "tags", "value": "contains", }, { + "en_label": "Not contain", "label": "不包含", "style": "tags", "value": "not_contain", }, { + "en_label": "Empty", "label": "为空", "style": "none", "value": "empty", }, { + "en_label": "Not empty", "label": "不为空", "style": "none", "value": "not_empty", @@ -194,31 +212,37 @@ exports[`Generate filter data: Cascader > property:["multiple = true", "checkStr "operators": { "Text": [ { + "en_label": "Equal", "label": "等于", "style": "noop", "value": "equal", }, { + "en_label": "Not equal", "label": "不等于", "style": "noop", "value": "not_equal", }, { + "en_label": "Contains", "label": "包含", "style": "tags", "value": "contains", }, { + "en_label": "Not contain", "label": "不包含", "style": "tags", "value": "not_contain", }, { + "en_label": "Empty", "label": "为空", "style": "none", "value": "empty", }, { + "en_label": "Not empty", "label": "不为空", "style": "none", "value": "not_empty", diff --git a/test/logic/generateFilterdata/__snapshots__/Cellphone.test.js.snap b/test/logic/generateFilterdata/__snapshots__/Cellphone.test.js.snap index 216cbf1..2ea1664 100644 --- a/test/logic/generateFilterdata/__snapshots__/Cellphone.test.js.snap +++ b/test/logic/generateFilterdata/__snapshots__/Cellphone.test.js.snap @@ -5,31 +5,37 @@ exports[`Generate filter data: Cellphone > default 1`] = ` "operators": { "Text": [ { + "en_label": "Equal", "label": "等于", "style": "noop", "value": "equal", }, { + "en_label": "Not equal", "label": "不等于", "style": "noop", "value": "not_equal", }, { + "en_label": "Contains", "label": "包含", "style": "tags", "value": "contains", }, { + "en_label": "Not contain", "label": "不包含", "style": "tags", "value": "not_contain", }, { + "en_label": "Empty", "label": "为空", "style": "none", "value": "empty", }, { + "en_label": "Not empty", "label": "不为空", "style": "none", "value": "not_empty", diff --git a/test/logic/generateFilterdata/__snapshots__/Checkbox.test.js.snap b/test/logic/generateFilterdata/__snapshots__/Checkbox.test.js.snap index 74c540f..d3f2b08 100644 --- a/test/logic/generateFilterdata/__snapshots__/Checkbox.test.js.snap +++ b/test/logic/generateFilterdata/__snapshots__/Checkbox.test.js.snap @@ -5,31 +5,37 @@ exports[`Generate filter data: Checkbox > default 1`] = ` "operators": { "Text": [ { + "en_label": "Equal", "label": "等于", "style": "noop", "value": "equal", }, { + "en_label": "Not equal", "label": "不等于", "style": "noop", "value": "not_equal", }, { + "en_label": "Contains", "label": "包含", "style": "tags", "value": "contains", }, { + "en_label": "Not contain", "label": "不包含", "style": "tags", "value": "not_contain", }, { + "en_label": "Empty", "label": "为空", "style": "none", "value": "empty", }, { + "en_label": "Not empty", "label": "不为空", "style": "none", "value": "not_empty", diff --git a/test/logic/generateFilterdata/__snapshots__/Date.test.js.snap b/test/logic/generateFilterdata/__snapshots__/Date.test.js.snap index e3840c5..af984cd 100644 --- a/test/logic/generateFilterdata/__snapshots__/Date.test.js.snap +++ b/test/logic/generateFilterdata/__snapshots__/Date.test.js.snap @@ -5,46 +5,55 @@ exports[`Generate filter data: Date > property:["type = date"] 1`] = ` "operators": { "Number": [ { + "en_label": "Equal", "label": "等于", "style": "noop", "value": "equal", }, { + "en_label": "Not equal", "label": "不等于", "style": "noop", "value": "not_equal", }, { + "en_label": "Greater than", "label": "大于", "style": "noop", "value": "greater_than", }, { + "en_label": "Greater than or equal to", "label": "大于等于", "style": "noop", "value": "greater_than_equal", }, { + "en_label": "Less than", "label": "小于", "style": "noop", "value": "less_than", }, { + "en_label": "Less than or equal to", "label": "小于等于", "style": "noop", "value": "less_than_equal", }, { + "en_label": "Between", "label": "区间", "style": "range", "value": "between", }, { + "en_label": "Empty", "label": "为空", "style": "none", "value": "empty", }, { + "en_label": "Not empty", "label": "不为空", "style": "none", "value": "not_empty", @@ -77,31 +86,37 @@ exports[`Generate filter data: Date > property:["type = daterange"] 1`] = ` "operators": { "Text": [ { + "en_label": "Equal", "label": "等于", "style": "noop", "value": "equal", }, { + "en_label": "Not equal", "label": "不等于", "style": "noop", "value": "not_equal", }, { + "en_label": "Contains", "label": "包含", "style": "tags", "value": "contains", }, { + "en_label": "Not contain", "label": "不包含", "style": "tags", "value": "not_contain", }, { + "en_label": "Empty", "label": "为空", "style": "none", "value": "empty", }, { + "en_label": "Not empty", "label": "不为空", "style": "none", "value": "not_empty", @@ -140,31 +155,37 @@ exports[`Generate filter data: Date > property:["type = dates"] 1`] = ` "operators": { "Text": [ { + "en_label": "Equal", "label": "等于", "style": "noop", "value": "equal", }, { + "en_label": "Not equal", "label": "不等于", "style": "noop", "value": "not_equal", }, { + "en_label": "Contains", "label": "包含", "style": "tags", "value": "contains", }, { + "en_label": "Not contain", "label": "不包含", "style": "tags", "value": "not_contain", }, { + "en_label": "Empty", "label": "为空", "style": "none", "value": "empty", }, { + "en_label": "Not empty", "label": "不为空", "style": "none", "value": "not_empty", @@ -197,310 +218,55 @@ exports[`Generate filter data: Date > property:["type = datetime"] 1`] = ` "operators": { "Number": [ { + "en_label": "Equal", "label": "等于", "style": "noop", "value": "equal", }, { + "en_label": "Not equal", "label": "不等于", "style": "noop", "value": "not_equal", }, { + "en_label": "Greater than", "label": "大于", "style": "noop", "value": "greater_than", }, { + "en_label": "Greater than or equal to", "label": "大于等于", "style": "noop", "value": "greater_than_equal", }, { + "en_label": "Less than", "label": "小于", "style": "noop", "value": "less_than", }, { + "en_label": "Less than or equal to", "label": "小于等于", "style": "noop", "value": "less_than_equal", }, { + "en_label": "Between", "label": "区间", "style": "range", "value": "between", }, { + "en_label": "Empty", "label": "为空", "style": "none", "value": "empty", }, { - "label": "不为空", - "style": "none", - "value": "not_empty", - }, - ], - }, - "options": [ - { - "datePanel": { - "excludeManuals": -1, - "excludeShortcuts": -1, - "pickerType": "datetime", - }, - "includeOperator": { - "dateOperator": [ - "date", - ], - }, - "label": "Date", - "operatorKey": "Number", - "renderType": "DATE", - "value": "mczJoB7trWElolPW48BEm", - }, - ], -} -`; - -exports[`Generate filter data: Textarea > property:["type = date"] 1`] = ` -{ - "operators": { - "Number": [ - { - "label": "等于", - "style": "noop", - "value": "equal", - }, - { - "label": "不等于", - "style": "noop", - "value": "not_equal", - }, - { - "label": "大于", - "style": "noop", - "value": "greater_than", - }, - { - "label": "大于等于", - "style": "noop", - "value": "greater_than_equal", - }, - { - "label": "小于", - "style": "noop", - "value": "less_than", - }, - { - "label": "小于等于", - "style": "noop", - "value": "less_than_equal", - }, - { - "label": "区间", - "style": "range", - "value": "between", - }, - { - "label": "为空", - "style": "none", - "value": "empty", - }, - { - "label": "不为空", - "style": "none", - "value": "not_empty", - }, - ], - }, - "options": [ - { - "datePanel": { - "excludeManuals": -1, - "excludeShortcuts": -1, - "pickerType": "date", - }, - "includeOperator": { - "dateOperator": [ - "date", - ], - }, - "label": "Date", - "operatorKey": "Number", - "renderType": "DATE", - "value": "mczJoB7trWElolPW48BEm", - }, - ], -} -`; - -exports[`Generate filter data: Textarea > property:["type = daterange"] 1`] = ` -{ - "operators": { - "Text": [ - { - "label": "等于", - "style": "noop", - "value": "equal", - }, - { - "label": "不等于", - "style": "noop", - "value": "not_equal", - }, - { - "label": "包含", - "style": "tags", - "value": "contains", - }, - { - "label": "不包含", - "style": "tags", - "value": "not_contain", - }, - { - "label": "为空", - "style": "none", - "value": "empty", - }, - { - "label": "不为空", - "style": "none", - "value": "not_empty", - }, - ], - }, - "options": [ - { - "datePanel": { - "excludeManuals": -1, - "excludeShortcuts": -1, - "pickerType": "daterange", - }, - "excludeOperator": { - "operator": [ - "contains", - "not_contain", - ], - }, - "includeOperator": { - "dateOperator": [ - "date", - ], - }, - "label": "Date", - "operatorKey": "Text", - "renderType": "DATE", - "value": "mczJoB7trWElolPW48BEm", - }, - ], -} -`; - -exports[`Generate filter data: Textarea > property:["type = dates"] 1`] = ` -{ - "operators": { - "Text": [ - { - "label": "等于", - "style": "noop", - "value": "equal", - }, - { - "label": "不等于", - "style": "noop", - "value": "not_equal", - }, - { - "label": "包含", - "style": "tags", - "value": "contains", - }, - { - "label": "不包含", - "style": "tags", - "value": "not_contain", - }, - { - "label": "为空", - "style": "none", - "value": "empty", - }, - { - "label": "不为空", - "style": "none", - "value": "not_empty", - }, - ], - }, - "options": [ - { - "datePanel": { - "excludeManuals": -1, - "excludeShortcuts": -1, - "pickerType": "dates", - }, - "includeOperator": { - "dateOperator": [ - "date", - ], - }, - "label": "Date", - "operatorKey": "Text", - "renderType": "DATE", - "value": "mczJoB7trWElolPW48BEm", - }, - ], -} -`; - -exports[`Generate filter data: Textarea > property:["type = datetime"] 1`] = ` -{ - "operators": { - "Number": [ - { - "label": "等于", - "style": "noop", - "value": "equal", - }, - { - "label": "不等于", - "style": "noop", - "value": "not_equal", - }, - { - "label": "大于", - "style": "noop", - "value": "greater_than", - }, - { - "label": "大于等于", - "style": "noop", - "value": "greater_than_equal", - }, - { - "label": "小于", - "style": "noop", - "value": "less_than", - }, - { - "label": "小于等于", - "style": "noop", - "value": "less_than_equal", - }, - { - "label": "区间", - "style": "range", - "value": "between", - }, - { - "label": "为空", - "style": "none", - "value": "empty", - }, - { + "en_label": "Not empty", "label": "不为空", "style": "none", "value": "not_empty", diff --git a/test/logic/generateFilterdata/__snapshots__/Email.test.js.snap b/test/logic/generateFilterdata/__snapshots__/Email.test.js.snap index bd201c5..b59e525 100644 --- a/test/logic/generateFilterdata/__snapshots__/Email.test.js.snap +++ b/test/logic/generateFilterdata/__snapshots__/Email.test.js.snap @@ -5,31 +5,37 @@ exports[`Generate filter data: Email > default 1`] = ` "operators": { "Text": [ { + "en_label": "Equal", "label": "等于", "style": "noop", "value": "equal", }, { + "en_label": "Not equal", "label": "不等于", "style": "noop", "value": "not_equal", }, { + "en_label": "Contains", "label": "包含", "style": "tags", "value": "contains", }, { + "en_label": "Not contain", "label": "不包含", "style": "tags", "value": "not_contain", }, { + "en_label": "Empty", "label": "为空", "style": "none", "value": "empty", }, { + "en_label": "Not empty", "label": "不为空", "style": "none", "value": "not_empty", diff --git a/test/logic/generateFilterdata/__snapshots__/File.test.js.snap b/test/logic/generateFilterdata/__snapshots__/File.test.js.snap index e672e30..f936ee5 100644 --- a/test/logic/generateFilterdata/__snapshots__/File.test.js.snap +++ b/test/logic/generateFilterdata/__snapshots__/File.test.js.snap @@ -5,31 +5,37 @@ exports[`Generate filter data: File > default 1`] = ` "operators": { "Text": [ { + "en_label": "Equal", "label": "等于", "style": "noop", "value": "equal", }, { + "en_label": "Not equal", "label": "不等于", "style": "noop", "value": "not_equal", }, { + "en_label": "Contains", "label": "包含", "style": "tags", "value": "contains", }, { + "en_label": "Not contain", "label": "不包含", "style": "tags", "value": "not_contain", }, { + "en_label": "Empty", "label": "为空", "style": "none", "value": "empty", }, { + "en_label": "Not empty", "label": "不为空", "style": "none", "value": "not_empty", diff --git a/test/logic/generateFilterdata/__snapshots__/Html.test.js.snap b/test/logic/generateFilterdata/__snapshots__/Html.test.js.snap index 7c0178c..d55b192 100644 --- a/test/logic/generateFilterdata/__snapshots__/Html.test.js.snap +++ b/test/logic/generateFilterdata/__snapshots__/Html.test.js.snap @@ -5,31 +5,37 @@ exports[`Generate filter data: Html > default 1`] = ` "operators": { "Text": [ { + "en_label": "Equal", "label": "等于", "style": "noop", "value": "equal", }, { + "en_label": "Not equal", "label": "不等于", "style": "noop", "value": "not_equal", }, { + "en_label": "Contains", "label": "包含", "style": "tags", "value": "contains", }, { + "en_label": "Not contain", "label": "不包含", "style": "tags", "value": "not_contain", }, { + "en_label": "Empty", "label": "为空", "style": "none", "value": "empty", }, { + "en_label": "Not empty", "label": "不为空", "style": "none", "value": "not_empty", diff --git a/test/logic/generateFilterdata/__snapshots__/IDnumber.test.js.snap b/test/logic/generateFilterdata/__snapshots__/IDnumber.test.js.snap index 716b72b..df92066 100644 --- a/test/logic/generateFilterdata/__snapshots__/IDnumber.test.js.snap +++ b/test/logic/generateFilterdata/__snapshots__/IDnumber.test.js.snap @@ -5,31 +5,37 @@ exports[`Generate filter data: ID number > default 1`] = ` "operators": { "Text": [ { + "en_label": "Equal", "label": "等于", "style": "noop", "value": "equal", }, { + "en_label": "Not equal", "label": "不等于", "style": "noop", "value": "not_equal", }, { + "en_label": "Contains", "label": "包含", "style": "tags", "value": "contains", }, { + "en_label": "Not contain", "label": "不包含", "style": "tags", "value": "not_contain", }, { + "en_label": "Empty", "label": "为空", "style": "none", "value": "empty", }, { + "en_label": "Not empty", "label": "不为空", "style": "none", "value": "not_empty", diff --git a/test/logic/generateFilterdata/__snapshots__/Input.test.js.snap b/test/logic/generateFilterdata/__snapshots__/Input.test.js.snap index ae0d194..eddfaa5 100644 --- a/test/logic/generateFilterdata/__snapshots__/Input.test.js.snap +++ b/test/logic/generateFilterdata/__snapshots__/Input.test.js.snap @@ -5,31 +5,37 @@ exports[`Generate filter data: Input > default 1`] = ` "operators": { "Text": [ { + "en_label": "Equal", "label": "等于", "style": "noop", "value": "equal", }, { + "en_label": "Not equal", "label": "不等于", "style": "noop", "value": "not_equal", }, { + "en_label": "Contains", "label": "包含", "style": "tags", "value": "contains", }, { + "en_label": "Not contain", "label": "不包含", "style": "tags", "value": "not_contain", }, { + "en_label": "Empty", "label": "为空", "style": "none", "value": "empty", }, { + "en_label": "Not empty", "label": "不为空", "style": "none", "value": "not_empty", diff --git a/test/logic/generateFilterdata/__snapshots__/Number.test.js.snap b/test/logic/generateFilterdata/__snapshots__/Number.test.js.snap index 0be847d..350cbee 100644 --- a/test/logic/generateFilterdata/__snapshots__/Number.test.js.snap +++ b/test/logic/generateFilterdata/__snapshots__/Number.test.js.snap @@ -5,46 +5,55 @@ exports[`Generate filter data: Number > default 1`] = ` "operators": { "Number": [ { + "en_label": "Equal", "label": "等于", "style": "noop", "value": "equal", }, { + "en_label": "Not equal", "label": "不等于", "style": "noop", "value": "not_equal", }, { + "en_label": "Greater than", "label": "大于", "style": "noop", "value": "greater_than", }, { + "en_label": "Greater than or equal to", "label": "大于等于", "style": "noop", "value": "greater_than_equal", }, { + "en_label": "Less than", "label": "小于", "style": "noop", "value": "less_than", }, { + "en_label": "Less than or equal to", "label": "小于等于", "style": "noop", "value": "less_than_equal", }, { + "en_label": "Between", "label": "区间", "style": "range", "value": "between", }, { + "en_label": "Empty", "label": "为空", "style": "none", "value": "empty", }, { + "en_label": "Not empty", "label": "不为空", "style": "none", "value": "not_empty", diff --git a/test/logic/generateFilterdata/__snapshots__/Radio.test.js.snap b/test/logic/generateFilterdata/__snapshots__/Radio.test.js.snap index 56e05e3..a53fdc9 100644 --- a/test/logic/generateFilterdata/__snapshots__/Radio.test.js.snap +++ b/test/logic/generateFilterdata/__snapshots__/Radio.test.js.snap @@ -5,31 +5,37 @@ exports[`Generate filter data: Radio > default 1`] = ` "operators": { "Text": [ { + "en_label": "Equal", "label": "等于", "style": "noop", "value": "equal", }, { + "en_label": "Not equal", "label": "不等于", "style": "noop", "value": "not_equal", }, { + "en_label": "Contains", "label": "包含", "style": "tags", "value": "contains", }, { + "en_label": "Not contain", "label": "不包含", "style": "tags", "value": "not_contain", }, { + "en_label": "Empty", "label": "为空", "style": "none", "value": "empty", }, { + "en_label": "Not empty", "label": "不为空", "style": "none", "value": "not_empty", diff --git a/test/logic/generateFilterdata/__snapshots__/Rate.test.js.snap b/test/logic/generateFilterdata/__snapshots__/Rate.test.js.snap index 803c209..b249242 100644 --- a/test/logic/generateFilterdata/__snapshots__/Rate.test.js.snap +++ b/test/logic/generateFilterdata/__snapshots__/Rate.test.js.snap @@ -5,46 +5,55 @@ exports[`Generate filter data: Rate > default 1`] = ` "operators": { "Number": [ { + "en_label": "Equal", "label": "等于", "style": "noop", "value": "equal", }, { + "en_label": "Not equal", "label": "不等于", "style": "noop", "value": "not_equal", }, { + "en_label": "Greater than", "label": "大于", "style": "noop", "value": "greater_than", }, { + "en_label": "Greater than or equal to", "label": "大于等于", "style": "noop", "value": "greater_than_equal", }, { + "en_label": "Less than", "label": "小于", "style": "noop", "value": "less_than", }, { + "en_label": "Less than or equal to", "label": "小于等于", "style": "noop", "value": "less_than_equal", }, { + "en_label": "Between", "label": "区间", "style": "range", "value": "between", }, { + "en_label": "Empty", "label": "为空", "style": "none", "value": "empty", }, { + "en_label": "Not empty", "label": "不为空", "style": "none", "value": "not_empty", diff --git a/test/logic/generateFilterdata/__snapshots__/Region.test.js.snap b/test/logic/generateFilterdata/__snapshots__/Region.test.js.snap index 7fa40e1..1d8c857 100644 --- a/test/logic/generateFilterdata/__snapshots__/Region.test.js.snap +++ b/test/logic/generateFilterdata/__snapshots__/Region.test.js.snap @@ -3,33 +3,39 @@ exports[`Generate filter data: Region > property:["selectType = 1"] 1`] = ` { "operators": { - "Number": [ + "Region": [ { + "en_label": "Equal to one of", "label": "等于其中之一", "style": "tags", "value": "one_of", }, { + "en_label": "Not equal to one of", "label": "不等于其中之一", "style": "tags", "value": "not_one_of", }, { + "en_label": "Belong to one of", "label": "属于其中之一", "style": "tags", "value": "belong_one_of", }, { + "en_label": "Not belong to one of", "label": "不属于其中之一", "style": "tags", "value": "not_belong_one_of", }, { + "en_label": "Empty", "label": "为空", "style": "none", "value": "empty", }, { + "en_label": "Not empty", "label": "不为空", "style": "none", "value": "not_empty", @@ -51,33 +57,39 @@ exports[`Generate filter data: Region > property:["selectType = 1"] 1`] = ` exports[`Generate filter data: Region > property:["selectType = 2"] 1`] = ` { "operators": { - "Number": [ + "Region": [ { + "en_label": "Equal to one of", "label": "等于其中之一", "style": "tags", "value": "one_of", }, { + "en_label": "Not equal to one of", "label": "不等于其中之一", "style": "tags", "value": "not_one_of", }, { + "en_label": "Belong to one of", "label": "属于其中之一", "style": "tags", "value": "belong_one_of", }, { + "en_label": "Not belong to one of", "label": "不属于其中之一", "style": "tags", "value": "not_belong_one_of", }, { + "en_label": "Empty", "label": "为空", "style": "none", "value": "empty", }, { + "en_label": "Not empty", "label": "不为空", "style": "none", "value": "not_empty", @@ -99,33 +111,39 @@ exports[`Generate filter data: Region > property:["selectType = 2"] 1`] = ` exports[`Generate filter data: Region > property:["selectType = 3"] 1`] = ` { "operators": { - "Number": [ + "Region": [ { + "en_label": "Equal to one of", "label": "等于其中之一", "style": "tags", "value": "one_of", }, { + "en_label": "Not equal to one of", "label": "不等于其中之一", "style": "tags", "value": "not_one_of", }, { + "en_label": "Belong to one of", "label": "属于其中之一", "style": "tags", "value": "belong_one_of", }, { + "en_label": "Not belong to one of", "label": "不属于其中之一", "style": "tags", "value": "not_belong_one_of", }, { + "en_label": "Empty", "label": "为空", "style": "none", "value": "empty", }, { + "en_label": "Not empty", "label": "不为空", "style": "none", "value": "not_empty", diff --git a/test/logic/generateFilterdata/__snapshots__/Select.test.js.snap b/test/logic/generateFilterdata/__snapshots__/Select.test.js.snap index 65a753f..5cc94bd 100644 --- a/test/logic/generateFilterdata/__snapshots__/Select.test.js.snap +++ b/test/logic/generateFilterdata/__snapshots__/Select.test.js.snap @@ -5,31 +5,37 @@ exports[`Generate filter data: Select > property:["multiple = false"] 1`] = ` "operators": { "Text": [ { + "en_label": "Equal", "label": "等于", "style": "noop", "value": "equal", }, { + "en_label": "Not equal", "label": "不等于", "style": "noop", "value": "not_equal", }, { + "en_label": "Contains", "label": "包含", "style": "tags", "value": "contains", }, { + "en_label": "Not contain", "label": "不包含", "style": "tags", "value": "not_contain", }, { + "en_label": "Empty", "label": "为空", "style": "none", "value": "empty", }, { + "en_label": "Not empty", "label": "不为空", "style": "none", "value": "not_empty", @@ -53,31 +59,37 @@ exports[`Generate filter data: Select > property:["multiple = true"] 1`] = ` "operators": { "Text": [ { + "en_label": "Equal", "label": "等于", "style": "noop", "value": "equal", }, { + "en_label": "Not equal", "label": "不等于", "style": "noop", "value": "not_equal", }, { + "en_label": "Contains", "label": "包含", "style": "tags", "value": "contains", }, { + "en_label": "Not contain", "label": "不包含", "style": "tags", "value": "not_contain", }, { + "en_label": "Empty", "label": "为空", "style": "none", "value": "empty", }, { + "en_label": "Not empty", "label": "不为空", "style": "none", "value": "not_empty", diff --git a/test/logic/generateFilterdata/__snapshots__/Signature.test.js.snap b/test/logic/generateFilterdata/__snapshots__/Signature.test.js.snap index 94d521d..3156f2f 100644 --- a/test/logic/generateFilterdata/__snapshots__/Signature.test.js.snap +++ b/test/logic/generateFilterdata/__snapshots__/Signature.test.js.snap @@ -5,31 +5,37 @@ exports[`Generate filter data: Signature > default 1`] = ` "operators": { "Text": [ { + "en_label": "Equal", "label": "等于", "style": "noop", "value": "equal", }, { + "en_label": "Not equal", "label": "不等于", "style": "noop", "value": "not_equal", }, { + "en_label": "Contains", "label": "包含", "style": "tags", "value": "contains", }, { + "en_label": "Not contain", "label": "不包含", "style": "tags", "value": "not_contain", }, { + "en_label": "Empty", "label": "为空", "style": "none", "value": "empty", }, { + "en_label": "Not empty", "label": "不为空", "style": "none", "value": "not_empty", diff --git a/test/logic/generateFilterdata/__snapshots__/Slider.test.js.snap b/test/logic/generateFilterdata/__snapshots__/Slider.test.js.snap index f362dde..fa8e68b 100644 --- a/test/logic/generateFilterdata/__snapshots__/Slider.test.js.snap +++ b/test/logic/generateFilterdata/__snapshots__/Slider.test.js.snap @@ -5,46 +5,55 @@ exports[`Generate filter data: Slider > default 1`] = ` "operators": { "Number": [ { + "en_label": "Equal", "label": "等于", "style": "noop", "value": "equal", }, { + "en_label": "Not equal", "label": "不等于", "style": "noop", "value": "not_equal", }, { + "en_label": "Greater than", "label": "大于", "style": "noop", "value": "greater_than", }, { + "en_label": "Greater than or equal to", "label": "大于等于", "style": "noop", "value": "greater_than_equal", }, { + "en_label": "Less than", "label": "小于", "style": "noop", "value": "less_than", }, { + "en_label": "Less than or equal to", "label": "小于等于", "style": "noop", "value": "less_than_equal", }, { + "en_label": "Between", "label": "区间", "style": "range", "value": "between", }, { + "en_label": "Empty", "label": "为空", "style": "none", "value": "empty", }, { + "en_label": "Not empty", "label": "不为空", "style": "none", "value": "not_empty", diff --git a/test/logic/generateFilterdata/__snapshots__/Switch.test.js.snap b/test/logic/generateFilterdata/__snapshots__/Switch.test.js.snap index 7fcbe72..d9c4022 100644 --- a/test/logic/generateFilterdata/__snapshots__/Switch.test.js.snap +++ b/test/logic/generateFilterdata/__snapshots__/Switch.test.js.snap @@ -5,31 +5,37 @@ exports[`Generate filter data: Switch > default 1`] = ` "operators": { "Text": [ { + "en_label": "Equal", "label": "等于", "style": "noop", "value": "equal", }, { + "en_label": "Not equal", "label": "不等于", "style": "noop", "value": "not_equal", }, { + "en_label": "Contains", "label": "包含", "style": "tags", "value": "contains", }, { + "en_label": "Not contain", "label": "不包含", "style": "tags", "value": "not_contain", }, { + "en_label": "Empty", "label": "为空", "style": "none", "value": "empty", }, { + "en_label": "Not empty", "label": "不为空", "style": "none", "value": "not_empty", diff --git a/test/logic/generateFilterdata/__snapshots__/Textarea.test.js.snap b/test/logic/generateFilterdata/__snapshots__/Textarea.test.js.snap index 4b83a93..0779866 100644 --- a/test/logic/generateFilterdata/__snapshots__/Textarea.test.js.snap +++ b/test/logic/generateFilterdata/__snapshots__/Textarea.test.js.snap @@ -5,31 +5,37 @@ exports[`Generate filter data: Textarea > default 1`] = ` "operators": { "Text": [ { + "en_label": "Equal", "label": "等于", "style": "noop", "value": "equal", }, { + "en_label": "Not equal", "label": "不等于", "style": "noop", "value": "not_equal", }, { + "en_label": "Contains", "label": "包含", "style": "tags", "value": "contains", }, { + "en_label": "Not contain", "label": "不包含", "style": "tags", "value": "not_contain", }, { + "en_label": "Empty", "label": "为空", "style": "none", "value": "empty", }, { + "en_label": "Not empty", "label": "不为空", "style": "none", "value": "not_empty", diff --git a/test/logic/generateFilterdata/__snapshots__/Time.test.js.snap b/test/logic/generateFilterdata/__snapshots__/Time.test.js.snap index ef68ff8..35ee9c5 100644 --- a/test/logic/generateFilterdata/__snapshots__/Time.test.js.snap +++ b/test/logic/generateFilterdata/__snapshots__/Time.test.js.snap @@ -5,46 +5,55 @@ exports[`Generate filter data: Time > default 1`] = ` "operators": { "Number": [ { + "en_label": "Equal", "label": "等于", "style": "noop", "value": "equal", }, { + "en_label": "Not equal", "label": "不等于", "style": "noop", "value": "not_equal", }, { + "en_label": "Greater than", "label": "大于", "style": "noop", "value": "greater_than", }, { + "en_label": "Greater than or equal to", "label": "大于等于", "style": "noop", "value": "greater_than_equal", }, { + "en_label": "Less than", "label": "小于", "style": "noop", "value": "less_than", }, { + "en_label": "Less than or equal to", "label": "小于等于", "style": "noop", "value": "less_than_equal", }, { + "en_label": "Between", "label": "区间", "style": "range", "value": "between", }, { + "en_label": "Empty", "label": "为空", "style": "none", "value": "empty", }, { + "en_label": "Not empty", "label": "不为空", "style": "none", "value": "not_empty", diff --git a/test/logic/generateFilterdata/__snapshots__/URL.test.js.snap b/test/logic/generateFilterdata/__snapshots__/URL.test.js.snap index f502fdd..a0f20a1 100644 --- a/test/logic/generateFilterdata/__snapshots__/URL.test.js.snap +++ b/test/logic/generateFilterdata/__snapshots__/URL.test.js.snap @@ -5,31 +5,37 @@ exports[`Generate filter data: URL > default 1`] = ` "operators": { "Text": [ { + "en_label": "Equal", "label": "等于", "style": "noop", "value": "equal", }, { + "en_label": "Not equal", "label": "不等于", "style": "noop", "value": "not_equal", }, { + "en_label": "Contains", "label": "包含", "style": "tags", "value": "contains", }, { + "en_label": "Not contain", "label": "不包含", "style": "tags", "value": "not_contain", }, { + "en_label": "Empty", "label": "为空", "style": "none", "value": "empty", }, { + "en_label": "Not empty", "label": "不为空", "style": "none", "value": "not_empty",