diff --git a/core/core-frontend/package.json b/core/core-frontend/package.json
index 52c84a2245..b70396c3a4 100644
--- a/core/core-frontend/package.json
+++ b/core/core-frontend/package.json
@@ -27,7 +27,7 @@
"axios": "^1.3.3",
"crypto-js": "^4.1.1",
"dayjs": "^1.11.9",
- "element-plus-secondary": "^0.5.9",
+ "element-plus-secondary": "^0.5.11",
"element-resize-detector": "^1.2.4",
"file-saver": "^2.0.5",
"flv.js": "^1.6.2",
diff --git a/core/core-frontend/src/custom-component/v-query/Component.vue b/core/core-frontend/src/custom-component/v-query/Component.vue
index e660c25c6d..752f4c532c 100644
--- a/core/core-frontend/src/custom-component/v-query/Component.vue
+++ b/core/core-frontend/src/custom-component/v-query/Component.vue
@@ -69,15 +69,46 @@ const defaultStyle = {
titleShow: false,
titleColor: '',
textColorShow: false,
- labelColor: '',
bgColorShow: false,
borderShow: false,
- labelColorShow: false,
- title: ''
+ labelShow: true,
+ title: '',
+ labelColor: '#1f2329',
+ fontSize: '14',
+ fontWeight: '',
+ fontStyle: '',
+ fontSizeBtn: '14',
+ fontWeightBtn: '',
+ fontStyleBtn: '',
+ queryConditionWidth: 227,
+ nameboxSpacing: 8,
+ queryConditionSpacing: 16,
+ btnColor: '#3370ff',
+ labelColorBtn: '#ffffff'
}
const customStyle = reactive({ ...defaultStyle })
const snapshotStore = snapshotStoreWithOut()
+const btnStyle = computed(() => {
+ const style = {
+ backgroundColor: customStyle.btnColor,
+ borderColor: customStyle.btnColor,
+ color: customStyle.labelColorBtn
+ } as CSSProperties
+ if (customStyle.fontSizeBtn) {
+ style.fontSize = customStyle.fontSizeBtn + 'px'
+ }
+
+ if (customStyle.fontWeightBtn) {
+ style.fontWeight = customStyle.fontWeightBtn
+ }
+
+ if (customStyle.fontStyleBtn) {
+ style.fontStyle = customStyle.fontStyleBtn
+ }
+
+ return style
+})
const curComponentView = computed(() => {
return (canvasViewInfo.value[element.value.id] || {}).customStyle
})
@@ -92,14 +123,25 @@ const setCustomStyle = val => {
btnList,
titleLayout,
labelColor,
- labelColorShow,
text,
bgColor,
layout,
titleShow,
titleColor,
textColorShow,
- title
+ title,
+ fontSize,
+ fontWeight,
+ fontStyle,
+ fontSizeBtn,
+ fontWeightBtn,
+ fontStyleBtn,
+ queryConditionWidth,
+ nameboxSpacing,
+ queryConditionSpacing,
+ labelColorBtn,
+ btnColor,
+ labelShow
} = val
customStyle.background = bgColorShow ? bgColor || '' : ''
customStyle.border = borderShow ? borderColor || '' : ''
@@ -107,10 +149,22 @@ const setCustomStyle = val => {
customStyle.layout = layout
customStyle.titleShow = titleShow
customStyle.titleColor = titleColor
- customStyle.labelColor = labelColorShow ? labelColor || '' : ''
+ customStyle.labelColor = labelShow ? labelColor || '' : ''
+ customStyle.fontSize = labelShow ? fontSize || '14' : '14'
+ customStyle.fontWeight = labelShow ? fontWeight || '' : ''
+ customStyle.fontStyle = labelShow ? fontStyle || '' : ''
customStyle.title = title
customStyle.text = textColorShow ? text || '' : ''
customStyle.titleLayout = titleLayout
+ customStyle.fontSizeBtn = fontSizeBtn || '14'
+ customStyle.fontWeightBtn = fontWeightBtn
+ customStyle.fontStyleBtn = fontStyleBtn
+ customStyle.queryConditionWidth = queryConditionWidth ?? 227
+ customStyle.nameboxSpacing = nameboxSpacing ?? 8
+ customStyle.queryConditionSpacing = queryConditionSpacing ?? 16
+ customStyle.labelColorBtn = labelColorBtn || '#ffffff'
+ customStyle.labelShow = labelShow ?? true
+ customStyle.btnColor = btnColor || '#3370ff'
}
watch(
@@ -196,10 +250,14 @@ const queryDataForId = id => {
emitter.emit(`query-data-${ele}`)
})
}
-
+const getQueryConditionWidth = () => {
+ return customStyle.queryConditionWidth
+}
provide('unmount-select', unMountSelect)
provide('release-unmount-select', releaseSelect)
provide('query-data-for-id', queryDataForId)
+provide('com-width', getQueryConditionWidth)
+
onBeforeUnmount(() => {
emitter.off(`addQueryCriteria${element.value.id}`)
emitter.off(`editQueryCriteria${element.value.id}`)
@@ -384,9 +442,21 @@ const titleStyle = computed(() => {
})
const labelStyle = computed(() => {
- return {
- color: customStyle.labelColor || '#1f2329'
+ const style = {
+ fontSize: customStyle.fontSize + 'px'
} as CSSProperties
+ if (customStyle.fontWeight) {
+ style.fontWeight = customStyle.fontWeight
+ }
+
+ if (customStyle.fontStyle) {
+ style.fontStyle = customStyle.fontStyle
+ }
+
+ if (customStyle.labelColor) {
+ style.color = customStyle.labelColor
+ }
+ return style
})
const autoStyle = computed(() => {
return {
@@ -428,10 +498,15 @@ const autoStyle = computed(() => {
-
+
-
-
+
+
{{ ele.name }}
@@ -470,6 +545,7 @@ const autoStyle = computed(() => {
@@ -614,15 +690,10 @@ const autoStyle = computed(() => {
position: relative;
:deep(.ed-date-editor) {
- width: 227px;
.ed-input__wrapper {
width: 100%;
}
}
-
- :deep(.ed-select-v2) {
- min-width: 170px;
- }
}
}
}
diff --git a/core/core-frontend/src/custom-component/v-query/Select.vue b/core/core-frontend/src/custom-component/v-query/Select.vue
index 4cea917edd..e36e79f6ad 100644
--- a/core/core-frontend/src/custom-component/v-query/Select.vue
+++ b/core/core-frontend/src/custom-component/v-query/Select.vue
@@ -69,6 +69,8 @@ const options = shallowRef([])
const unMountSelect: Ref = inject('unmount-select')
const releaseSelect = inject('release-unmount-select', Function, true)
const queryDataForId = inject('query-data-for-id', Function, true)
+const queryConditionWidth = inject('com-width', Function, true)
+
const setDefaultMapValue = arr => {
const { displayId, field } = config.value
if (!displayId) {
@@ -444,7 +446,7 @@ const init = () => {
}
const selectStyle = computed(() => {
- return props.isConfig ? {} : { width: '227px' }
+ return props.isConfig ? {} : { width: queryConditionWidth() + 'px' }
})
const mult = ref()
diff --git a/core/core-frontend/src/custom-component/v-query/TextSearch.vue b/core/core-frontend/src/custom-component/v-query/TextSearch.vue
index ac3b69fd8d..fc21e05582 100644
--- a/core/core-frontend/src/custom-component/v-query/TextSearch.vue
+++ b/core/core-frontend/src/custom-component/v-query/TextSearch.vue
@@ -1,5 +1,7 @@
@@ -65,27 +76,37 @@ const customStyle = inject<{ background: string }>('$custom-style-filter')
{{ config.conditionType === 1 ? '与' : '或' }}
-
-
+
+
@@ -145,12 +166,7 @@ const customStyle = inject<{ background: string }>('$custom-style-filter')
position: absolute;
right: 5px;
bottom: 3px;
- width: 195px;
z-index: 10;
-
- &.next-line {
- width: 195px;
- }
}
}
}
diff --git a/core/core-frontend/src/custom-component/v-query/Time.vue b/core/core-frontend/src/custom-component/v-query/Time.vue
index f3003a3eb1..7d6c764299 100644
--- a/core/core-frontend/src/custom-component/v-query/Time.vue
+++ b/core/core-frontend/src/custom-component/v-query/Time.vue
@@ -1,5 +1,5 @@
-
+
-
-
- 标签颜色
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 上侧
+ 左侧
+
+
+
+
+
+
+
+
+
+
+ {{ t('chart.bolder') }}
+
+
+
+
+
+
+
-
+
+
+ {{ t('chart.italic') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
- {{ t('chart.text_pos_top') }}
-
-
-
-
-
-
-
-
+ is-custom
+ v-model="chart.customStyle.component.labelColorBtn"
+ :predefine="predefineColors"
+ />
+
+
+
+
+
+
+ {{ t('chart.bolder') }}
+
+
+
+
+
+
+
-
-
-
- {{ t('chart.text_pos_left') }}
-
-
-
-
-
-
-
-
-
+
+
+ {{ t('chart.italic') }}
+
+
+
+
+
+
+
diff --git a/core/core-frontend/src/views/chart/components/views/components/ChartComponentS2.vue b/core/core-frontend/src/views/chart/components/views/components/ChartComponentS2.vue
index 5b265206d0..a2a2d321aa 100644
--- a/core/core-frontend/src/views/chart/components/views/components/ChartComponentS2.vue
+++ b/core/core-frontend/src/views/chart/components/views/components/ChartComponentS2.vue
@@ -200,8 +200,8 @@ const setupPage = (chart: ChartObj, resetPageInfo?: boolean) => {
const initScroll = () => {
// 首先回到最顶部,然后计算行高*行数作为top,最后判断:如果top<数据量*行高,继续滚动,否则回到顶部
- const customAttr = actualChart.customAttr
- const senior = actualChart.senior
+ const customAttr = actualChart?.customAttr
+ const senior = actualChart?.senior
if (
senior?.scrollCfg?.open &&
chartData.value.tableRow?.length &&
diff --git a/core/core-frontend/src/views/visualized/data/datasource/form/ApiHttpRequestDraw.vue b/core/core-frontend/src/views/visualized/data/datasource/form/ApiHttpRequestDraw.vue
index de0a804dc9..b4af5ee9bc 100644
--- a/core/core-frontend/src/views/visualized/data/datasource/form/ApiHttpRequestDraw.vue
+++ b/core/core-frontend/src/views/visualized/data/datasource/form/ApiHttpRequestDraw.vue
@@ -167,9 +167,13 @@ const showApiData = () => {
const data = Base64.encode(JSON.stringify(apiItem))
loading.value = true
cancelMap['/datasource/checkApiDatasource']?.()
- checkApiItem({ data: data, type: 'apiStructure' }).then(response => {
- originFieldItem.jsonFields = response.data.jsonFields
- })
+ checkApiItem({ data: data, type: 'apiStructure' })
+ .then(response => {
+ originFieldItem.jsonFields = response.data.jsonFields
+ })
+ .catch(error => {
+ console.log(error?.message)
+ })
loading.value = false
} else {
return false
@@ -232,13 +236,18 @@ const next = () => {
}
}
cancelMap['/datasource/checkApiDatasource']?.()
- checkApiItem({ data: Base64.encode(JSON.stringify(apiItem)) }).then(response => {
- apiItem.jsonFields = response.data.jsonFields
- apiItem.fields = []
- handleFiledChange(apiItem)
- previewData()
- active.value += 1
- })
+
+ checkApiItem({ data: Base64.encode(JSON.stringify(apiItem)) })
+ .then(response => {
+ apiItem.jsonFields = response.data.jsonFields
+ apiItem.fields = []
+ handleFiledChange(apiItem)
+ previewData()
+ active.value += 1
+ })
+ .catch(error => {
+ console.log(error?.message)
+ })
}
})
}