diff --git a/packages/ui-vue/components/condition/src/condition-fields.component.tsx b/packages/ui-vue/components/condition/src/condition-fields.component.tsx index ac361f94509cd3b57dcfe5541123af6f464d0cdc..555cba07607984b08d74c8e02640233efdbad853 100644 --- a/packages/ui-vue/components/condition/src/condition-fields.component.tsx +++ b/packages/ui-vue/components/condition/src/condition-fields.component.tsx @@ -21,6 +21,7 @@ import { FDynamicFormGroup } from '@farris/ui-vue/components/dynamic-form'; import { useFieldConfig } from './composition/use-field-config'; import { useSize } from './composition/use-size'; import { ConditionValue } from './composition/condition-value/types'; +import { useI18n } from 'vue-i18n'; export default defineComponent({ name: 'FConditionFields', @@ -28,8 +29,8 @@ export default defineComponent({ emits: ['valueChange', 'blur', 'focus', 'click', 'input'] as (string[] & ThisType) | undefined, setup(props: ConditionProps, context: SetupContext) { const fieldsElement = ref(); + const { locale } = useI18n(); const key = ref(props.key); - const isControlInline = ref(props.isControlInline); const conditions = ref(props.conditions); const useFieldComposition = useFieldConfig(props, context); const { initialConditionValue, fieldMap, loadFieldConfigs } = useFieldComposition; @@ -56,7 +57,7 @@ export default defineComponent({ 'f-utils-flex-row-wrap': true, 'farris-form': true, 'condition-div': true, - 'farris-form-controls-inline': props.isControlInline + 'farris-form-controls-inline': !locale.value || props.isControlInline===true || props.isControlInline === 'auto' && locale.value !== 'en' })); function onChange(condition: Condition, value: any, editor?, option?: any) { diff --git a/packages/ui-vue/components/condition/src/condition.props.ts b/packages/ui-vue/components/condition/src/condition.props.ts index addcdf980b0590d1433ef421179433df252a3c8a..30588bbee1e85ab088a4a0c76641fa7e0e1b32c4 100644 --- a/packages/ui-vue/components/condition/src/condition.props.ts +++ b/packages/ui-vue/components/condition/src/condition.props.ts @@ -20,14 +20,18 @@ export const conditionProps = { conditions: { type: Array, default: [] }, fields: { type: Array, default: [] }, key: { type: String, default: '' }, - /** - * 控间标签同行展示 - */ - isControlInline: { type: Boolean, default: true}, + /** + * 控间标签同行展示 + */ + isControlInline: { + type: [Boolean, String], default: 'auto', validator: (value) => { + return [true, false, 'auto'].includes(value); + } + }, /** * 条件项统一的样式 */ - itemClass:{type:Boolean,default:'col-12 col-md-6 col-xl-3 col-el-2'} + itemClass: { type: Boolean, default: 'col-12 col-md-6 col-xl-3 col-el-2' } }; export type ConditionProps = ExtractPropTypes; diff --git a/packages/ui-vue/components/data-grid/src/property-config/data-grid-column.property-config.ts b/packages/ui-vue/components/data-grid/src/property-config/data-grid-column.property-config.ts index 2a40a47af3700e3efc29abc27ff82c6f48b8a962..3006f2640185b1d631a0b6790df4fe69ee8304ee 100644 --- a/packages/ui-vue/components/data-grid/src/property-config/data-grid-column.property-config.ts +++ b/packages/ui-vue/components/data-grid/src/property-config/data-grid-column.property-config.ts @@ -753,4 +753,4 @@ export class DataGriColumnProperty extends BaseControlProperty { this.controlCreatorUtils.setGridFieldFormatter(propertyData.dataType, propertyData, schemaField); } -} +} \ No newline at end of file diff --git a/packages/ui-vue/components/date-picker/src/property-config/date-picker.property-config.ts b/packages/ui-vue/components/date-picker/src/property-config/date-picker.property-config.ts index 4f2f34279bfd8f8a32b94c6f4338dc47581e11ee..8978e221504682cae926d85ad211546266a2004c 100644 --- a/packages/ui-vue/components/date-picker/src/property-config/date-picker.property-config.ts +++ b/packages/ui-vue/components/date-picker/src/property-config/date-picker.property-config.ts @@ -155,4 +155,4 @@ export class DatePickerProperty extends InputBaseProperty { } } -} +} \ No newline at end of file diff --git a/packages/ui-vue/components/query-solution/src/composition/use-header.tsx b/packages/ui-vue/components/query-solution/src/composition/use-header.tsx index 8d4cfd97175380228baff7522f4ff05443b4c75a..2294f808be2c97ec41a666c8234d6bc9f5008bc8 100644 --- a/packages/ui-vue/components/query-solution/src/composition/use-header.tsx +++ b/packages/ui-vue/components/query-solution/src/composition/use-header.tsx @@ -60,7 +60,7 @@ export function useHeader( const { getGuid, loadAllSolution, handleQuery, fieldToCondition, handleSolution, query } = useSolutionComposition; const modalService: FModalService | null = inject(F_MODAL_SERVICE_TOKEN, null); const title = computed(() => currentSolution.value ? currentSolution.value.name : ''); - const filterText = computed(() => getLocaleFilterText(props.filter)); + const filterText = computed(() => getLocaleFilterText(props.filterText)); const summaryConditions = ref([]); const shouldShowClearButton = computed(() => !currentSolution.value || currentSolution.value.mode !== '2'); const shouldShowSolutionList = ref(false); diff --git a/packages/ui-vue/components/query-solution/src/composition/use-solution.ts b/packages/ui-vue/components/query-solution/src/composition/use-solution.ts index c9faefccddecf051381c025928a62f45dd2815c0..6f855e787978a006771c07d42793ce7b3281a7c2 100644 --- a/packages/ui-vue/components/query-solution/src/composition/use-solution.ts +++ b/packages/ui-vue/components/query-solution/src/composition/use-solution.ts @@ -49,7 +49,7 @@ export function useSolution( // 是否将要设置默认值 let willSetDefaultValues = false; const queryData = ref([]); - const defaultSolutionName = getLocalePresetQuerySolutionName(props.defaultSolutionName); + const defaultSolutionName = getLocalePresetQuerySolutionName(props.presetQuerySolutionName); function getRandomId() { return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1); diff --git a/packages/ui-vue/components/query-solution/src/designer/query-solution.design.component.tsx b/packages/ui-vue/components/query-solution/src/designer/query-solution.design.component.tsx index fe400e32100e6e5b8e18abbcc543e3ec33894d4d..6439dffbd9dc337524f86dac72d2f61e56e1f932 100644 --- a/packages/ui-vue/components/query-solution/src/designer/query-solution.design.component.tsx +++ b/packages/ui-vue/components/query-solution/src/designer/query-solution.design.component.tsx @@ -50,7 +50,7 @@ export default defineComponent({ const title = computed(() => getLocalePresetQuerySolutionName(props.presetQuerySolutionName)); const filterText = computed(() => getLocaleFilterText(props.filterText)); - const isControlInline = computed(() => props.isControlInline); + const isControlInline = computed(() => !!props.isControlInline); watch(() => props.presetFields, (newPresetFields) => { const updatedFields = cloneDeep(newPresetFields); // 转换成设计时,真正的类型 diff --git a/packages/ui-vue/components/query-solution/src/locale/locale.ts b/packages/ui-vue/components/query-solution/src/locale/locale.ts index f762cc09a5c8a2ba8408893b38ef0dd3f292de64..1299212c5a8a9d9c34bc67bea58f7b70dfe99e02 100644 --- a/packages/ui-vue/components/query-solution/src/locale/locale.ts +++ b/packages/ui-vue/components/query-solution/src/locale/locale.ts @@ -43,7 +43,7 @@ export function useHeaderLocale() { }; const configDialogLocale = { // 筛选条件配置 - caption: t('querySolution.manageDialog.caption') + caption: t('querySolution.configDialog.caption') }; return { saveAsDialogLocale, manageDialogLocale, configDialogLocale }; } diff --git a/packages/ui-vue/components/query-solution/src/locales/ui/en.json b/packages/ui-vue/components/query-solution/src/locales/ui/en.json index 8219ea8aa3f26d6cb7df851b9b271144331b4668..3e968f22a2eb7fbd061ffe2efd9691a618e52d3f 100644 --- a/packages/ui-vue/components/query-solution/src/locales/ui/en.json +++ b/packages/ui-vue/components/query-solution/src/locales/ui/en.json @@ -2,10 +2,10 @@ "querySolution": { "saveAsDialog": { "queryPlanName": "Solution Name", - "setAsDefault": "Set as Default", - "confirm": "Confirm", + "setAsDefault": "Set as default", + "confirm": "OK", "cancel": "Cancel", - "caption": "Add New Solution", + "caption": "New", "personal": "Personal Solution", "system": "System Public Solution", "nameNotify": "Please enter solution name", @@ -23,9 +23,9 @@ "isDefault": "Default Solution", "code": "Name", "type": "Type", - "private": "Personal Solution", - "public": "System Public Solution", - "org": "Organization Public Solution", + "private": "Personal solution", + "public": "System public solution", + "org": "Organization public solution", "remove": "Delete" }, "configDialog": { diff --git a/packages/ui-vue/components/query-solution/src/locales/ui/zh-CHT.json b/packages/ui-vue/components/query-solution/src/locales/ui/zh-CHT.json index 6b1e42ef822da2aa9ea54de06d8f82dcd73b5ad9..3576070e0e1cf743c97e5ca43e36b2d4c6a6c80b 100644 --- a/packages/ui-vue/components/query-solution/src/locales/ui/zh-CHT.json +++ b/packages/ui-vue/components/query-solution/src/locales/ui/zh-CHT.json @@ -18,12 +18,12 @@ "default": "預設", "system": "系統公共", "saveAs": "另存為", - "save": "儲存", + "save": "保存", "manage": "管理", "isDefault": "預設方案", "code": "名稱", "type": "屬性", - "private": "使用者個人方案", + "private": "用戶個人方案", "public": "系統公共方案", "org": "組織公共方案", "remove": "刪除" @@ -33,7 +33,7 @@ }, "container": { "filter": "篩選", - "default": "預設篩選方案", + "default": "默認篩選方案", "clear": "清空", "require": "請填寫{fields}再進行篩選" } diff --git a/packages/ui-vue/components/query-solution/src/property-config/query-solution.property-config.ts b/packages/ui-vue/components/query-solution/src/property-config/query-solution.property-config.ts index 9813171b3154be0770501017622d1dbd9ad7cb38..59d55f0f73d7a690798e42a89b337179a41d7b8f 100644 --- a/packages/ui-vue/components/query-solution/src/property-config/query-solution.property-config.ts +++ b/packages/ui-vue/components/query-solution/src/property-config/query-solution.property-config.ts @@ -19,10 +19,26 @@ export class QuerySolutionPropertyConfig extends InputBaseProperty { title: "行为", properties: { isControlInline: { - description: "控件标签同行展示", - type: "boolean", + description: "控件标签是否同行展示:auto是跟随多语言自动展示,非英文时同行展示,英文时上下展示;true 同行展示;false 上下展示。", title: "控件标签同行展示", - refreshPanelAfterChanged: true + type: "select", + editor: { + type: "combo-list", + data: [ + { + "id": "auto", + "name": "自动" + }, + { + "id": true, + "name": "同行展示" + }, + { + "id": false, + "name": "上下展示" + } + ] + } }, presetQuerySolutionName: { description: "系统预置筛选方案名称", @@ -34,7 +50,7 @@ export class QuerySolutionPropertyConfig extends InputBaseProperty { type: "string", title: "筛选按钮文本" }, - itemClass:{ + itemClass: { description: "筛选项的公共样式。如果筛选项定义了单独的样式,该项按照单独的样式展示", type: "string", title: "筛选项样式" @@ -60,7 +76,7 @@ export class QuerySolutionPropertyConfig extends InputBaseProperty { private getQuerySolutionConfig(propertyData: any) { const allFields = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId); const self = this; - + this.propertyConfig.categories['control'] = { description: "Basic Infomation", title: "编辑器", @@ -78,10 +94,10 @@ export class QuerySolutionPropertyConfig extends InputBaseProperty { viewModelId: this.viewModelId, designViewModelUtils: this.designViewModelUtils, eventsEditorUtils: this.eventsEditorUtils, - presetFields:()=>{ - const presetFieldsIds=[] as any; - if(propertyData.presetFields){ - propertyData.presetFields.map((item)=>presetFieldsIds.push(item['id'])); + presetFields: () => { + const presetFieldsIds = [] as any; + if (propertyData.presetFields) { + propertyData.presetFields.map((item) => presetFieldsIds.push(item['id'])); } return presetFieldsIds; } @@ -95,7 +111,7 @@ export class QuerySolutionPropertyConfig extends InputBaseProperty { editor: { type: "solution-preset", dataSource: propertyData.fields.map(field => { - return {id:field.id, name:field.name + '(' + field.code + ')'}; + return { id: field.id, name: field.name + '(' + field.code + ')' }; }) }, $converter: solutionPresetConverter @@ -114,7 +130,7 @@ export class QuerySolutionPropertyConfig extends InputBaseProperty { description: "默认值绑定字段", type: "object", title: "默认值绑定字段", - editor: this.getPropertyEditorParams(propertyData, ['Variable'], '', {}, {newVariableType: 'Object'}) + editor: this.getPropertyEditorParams(propertyData, ['Variable'], '', {}, { newVariableType: 'Object' }) } }, setPropertyRelates(changeObject, prop) { @@ -133,7 +149,7 @@ export class QuerySolutionPropertyConfig extends InputBaseProperty { const self = this; const initialData = self.eventsEditorUtils['formProperties'](propertyData, self.viewModelId, events); const properties = self.createBaseEventProperty(initialData); - + this.propertyConfig.categories['eventsEditor'] = { title: '事件', hideTitle: true, diff --git a/packages/ui-vue/components/query-solution/src/query-solution.props.ts b/packages/ui-vue/components/query-solution/src/query-solution.props.ts index 7608818b24deb70f8ef3ede308a9f7798a0a1a5e..625255ab2b4d1c740713f04787f921a1589819a0 100644 --- a/packages/ui-vue/components/query-solution/src/query-solution.props.ts +++ b/packages/ui-vue/components/query-solution/src/query-solution.props.ts @@ -51,9 +51,13 @@ export const querySolutionProps = { */ defaultValues: { type: Array, default: { readonly: false, data: [], scope: SCOPE_OF_IMPACT.DEFAULT } }, /** - * 控间标签同行展示(标准模式下) + * 控间标签同行展示(标准模式下)true 同行展示 false 上下展示 auto 自动展示 */ - isControlInline: { type: Boolean, default: true }, + isControlInline: { + type: [Boolean, String], default: 'auto', validator: (value) => { + return [true, false, 'auto'].includes(value); + } + }, /** * 筛选按钮文案 */ @@ -86,7 +90,7 @@ export const querySolutionProps = { /** * 条件项统一的样式 */ - itemClass:{type:Boolean, default:'col-12 col-md-6 col-xl-3 col-el-2'} + itemClass: { type: Boolean, default: 'col-12 col-md-6 col-xl-3 col-el-2' } } as Record; export type QuerySolutionProps = ExtractPropTypes; diff --git a/packages/ui-vue/components/query-solution/src/schema/query-solution.schema.json b/packages/ui-vue/components/query-solution/src/schema/query-solution.schema.json index 57060fd91f837db3bf5ad8b9aa5bf67a8e6b3f08..262fbd8f013b9f3a6b61cd5bd9fb5d62fb7d6269 100644 --- a/packages/ui-vue/components/query-solution/src/schema/query-solution.schema.json +++ b/packages/ui-vue/components/query-solution/src/schema/query-solution.schema.json @@ -35,7 +35,7 @@ "isControlInline": { "description": "", "type": "boolean", - "default": true + "default":"auto" }, "expanded": { "description": "", diff --git a/packages/ui-vue/components/tabs/src/locales/ui/zh-CHT.json b/packages/ui-vue/components/tabs/src/locales/ui/zh-CHT.json index 30fd17f4bfd82c9f89776b5585bee7997b62b5f6..28b7a05a7c5ceadae9b8efbcf6f80f56bc18df3e 100644 --- a/packages/ui-vue/components/tabs/src/locales/ui/zh-CHT.json +++ b/packages/ui-vue/components/tabs/src/locales/ui/zh-CHT.json @@ -1,10 +1,8 @@ { "tabs": { - "more": { "more": "更多", "leftButton": "向左", "rightButton": "向左", "noData": "沒有相關數據" - } } } \ No newline at end of file diff --git a/packages/ui-vue/components/tabs/src/tabs.component.tsx b/packages/ui-vue/components/tabs/src/tabs.component.tsx index 9c4b6d90ae608a8caf09fa3a1473abeb74b7dd6d..52c4c1136350413d424a6ce6601fc57a8e27d5c8 100644 --- a/packages/ui-vue/components/tabs/src/tabs.component.tsx +++ b/packages/ui-vue/components/tabs/src/tabs.component.tsx @@ -186,7 +186,7 @@ export default defineComponent({ function renderPreviousButton() { return (