mirror of
https://github.com/dataease/dataease.git
synced 2026-05-18 17:58:11 +08:00
refactor(本地化): 统一内边距相关翻译键名并优化内边距逻辑
将内边距模式相关的翻译键名统一添加前缀"inner_padding_" 优化BackgroundOverallCommon.vue中内边距的undefined检查 在Shape.vue中重命名padding变量为innerPaddingStyle以提高可读性
This commit is contained in:
@@ -934,16 +934,16 @@ const componentBackgroundStyle = computed(() => {
|
||||
} = element.value.commonBackground
|
||||
const commonBackground = element.value.commonBackground as CommonBackground
|
||||
const innerPaddingTarget = ['Group'].includes(element.value.component) ? 0 : innerPadding
|
||||
let padding = innerPaddingTarget * scale.value + 'px'
|
||||
let innerPaddingStyle = innerPaddingTarget * scale.value + 'px'
|
||||
const paddingMode = commonBackground.innerPadding2?.mode
|
||||
if (paddingMode === ShorthandMode.Uniform) {
|
||||
padding = `${commonBackground.innerPadding2?.top * scale.value}px`
|
||||
innerPaddingStyle = `${commonBackground.innerPadding2?.top * scale.value}px`
|
||||
} else if (paddingMode === ShorthandMode.Axis) {
|
||||
padding = `${commonBackground.innerPadding2?.top * scale.value}px ${
|
||||
innerPaddingStyle = `${commonBackground.innerPadding2?.top * scale.value}px ${
|
||||
commonBackground.innerPadding2?.left * scale.value
|
||||
}px`
|
||||
} else if (paddingMode === ShorthandMode.PerEdge) {
|
||||
padding = `${commonBackground.innerPadding2?.top * scale.value}px ${
|
||||
innerPaddingStyle = `${commonBackground.innerPadding2?.top * scale.value}px ${
|
||||
commonBackground.innerPadding2?.right * scale.value
|
||||
}px ${commonBackground.innerPadding2?.bottom * scale.value}px ${
|
||||
commonBackground.innerPadding2?.left * scale.value
|
||||
@@ -951,7 +951,7 @@ const componentBackgroundStyle = computed(() => {
|
||||
}
|
||||
|
||||
let style = {
|
||||
padding: padding,
|
||||
padding: innerPaddingStyle,
|
||||
borderRadius: borderRadius + 'px'
|
||||
}
|
||||
let colorRGBA = ''
|
||||
|
||||
@@ -388,7 +388,7 @@ const queryBackground = () => {
|
||||
const init = () => {
|
||||
const commonBackgroundPop = deepCopy(props.commonBackgroundPop)
|
||||
const innerPadding = commonBackgroundPop.innerPadding
|
||||
if (innerPadding) {
|
||||
if (typeof innerPadding !== 'undefined') {
|
||||
commonBackgroundPop.innerPadding2 = {
|
||||
mode: ShorthandMode.Uniform,
|
||||
top: innerPadding,
|
||||
|
||||
@@ -3385,9 +3385,9 @@ export default {
|
||||
stream_mobile_tips: 'May not be displayed on IOS devices',
|
||||
json_params_error: 'Failed to parse third-party parameters. Please check the parameter format.',
|
||||
inner_padding: 'Inner Padding',
|
||||
shorthand_mode_uniform: 'Uniform',
|
||||
shorthand_mode_axis: 'Axis',
|
||||
shorthand_mode_per_edge: 'Per Edge',
|
||||
inner_padding_shorthand_mode_uniform: 'Uniform',
|
||||
inner_padding_shorthand_mode_axis: 'Axis',
|
||||
inner_padding_shorthand_mode_per_edge: 'Per Edge',
|
||||
board_radio: 'Corners',
|
||||
web_set_tips: 'Some websites may not allow embedding and will not display.',
|
||||
repeat_params: 'Duplicate parameter names exist.',
|
||||
|
||||
@@ -3289,9 +3289,9 @@ export default {
|
||||
stream_mobile_tips: 'IOS終端可能無法顯示',
|
||||
json_params_error: '第三方參數解析失敗,請檢查參數格式是否正確',
|
||||
inner_padding: '內邊距',
|
||||
shorthand_mode_uniform: '統一值',
|
||||
shorthand_mode_axis: '軸向',
|
||||
shorthand_mode_per_edge: '逐邊',
|
||||
inner_padding_shorthand_mode_uniform: '統一值',
|
||||
inner_padding_shorthand_mode_axis: '軸向',
|
||||
inner_padding_shorthand_mode_per_edge: '逐邊',
|
||||
board_radio: '圓角',
|
||||
web_set_tips: '部分網站可能設置不允許嵌入而無法顯示',
|
||||
repeat_params: '存在名稱重複的參數',
|
||||
|
||||
@@ -3298,9 +3298,9 @@ export default {
|
||||
stream_mobile_tips: 'IOS终端可能无法显示',
|
||||
json_params_error: '第三方参数解析失败,请检查参数格式是否正确',
|
||||
inner_padding: '内边距',
|
||||
shorthand_mode_uniform: '统一值',
|
||||
shorthand_mode_axis: '轴向',
|
||||
shorthand_mode_per_edge: '逐边',
|
||||
inner_padding_shorthand_mode_uniform: '统一值',
|
||||
inner_padding_shorthand_mode_axis: '轴向',
|
||||
inner_padding_shorthand_mode_per_edge: '逐边',
|
||||
board_radio: '圆角',
|
||||
web_set_tips: '部分网站可能设置不允许嵌入而无法显示',
|
||||
repeat_params: '存在名称重复的参数',
|
||||
|
||||
Reference in New Issue
Block a user