forked from github/dataease
Merge pull request #11624 from dataease/pr@dev-v2@refactor_chart
Pr@dev v2@refactor chart
This commit is contained in:
commit
a804535753
@ -74,6 +74,7 @@ const sort = (type?) => {
|
||||
</template>
|
||||
<style scoped>
|
||||
.sort-btn {
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
|
@ -219,7 +219,7 @@ onMounted(() => {
|
||||
<template #header>
|
||||
<div class="assist-line-cfg-header">
|
||||
<span class="ed-dialog__title">{{ t('chart.assist_line') }}</span>
|
||||
<el-tooltip class="item" effect="dark" placement="top">
|
||||
<el-tooltip class="item" effect="ndark" placement="top">
|
||||
<template #content>
|
||||
<span> {{ t('chart.assist_line_tip') }}</span>
|
||||
</template>
|
||||
@ -379,4 +379,13 @@ span {
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
.hint-icon {
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
color: #646a73;
|
||||
|
||||
&.hint-icon--dark {
|
||||
color: #a6a6a6;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -11,6 +11,8 @@ import { cloneDeep, defaultsDeep } from 'lodash-es'
|
||||
import { SERIES_NUMBER_FIELD } from '@antv/s2'
|
||||
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { isNumber } from 'mathjs'
|
||||
import { ElMessage } from 'element-plus-secondary'
|
||||
|
||||
const dvMainStore = dvMainStoreWithOut()
|
||||
const { batchOptStatus } = storeToRefs(dvMainStore)
|
||||
@ -167,9 +169,25 @@ const changeFieldColumn = () => {
|
||||
}
|
||||
const changeFieldColumnWidth = () => {
|
||||
const { basicStyleForm, fieldColumnWidth } = state
|
||||
let { width } = fieldColumnWidth
|
||||
let validate = true
|
||||
width = parseFloat(width)
|
||||
if (isNaN(width) || !isNumber(width)) {
|
||||
validate = false
|
||||
}
|
||||
if (width < 0 || width > 200) {
|
||||
validate = false
|
||||
}
|
||||
const fieldWidth = basicStyleForm.tableFieldWidth?.find(
|
||||
i => i.fieldId === fieldColumnWidth.fieldId
|
||||
)
|
||||
if (!validate) {
|
||||
ElMessage.warning('宽度需要在 0-200 之间')
|
||||
if (fieldWidth) {
|
||||
fieldColumnWidth.width = fieldWidth.width
|
||||
}
|
||||
return
|
||||
}
|
||||
if (fieldWidth) {
|
||||
fieldWidth.width = fieldColumnWidth.width
|
||||
changeBasicStyle('tableFieldWidth')
|
||||
@ -745,8 +763,6 @@ onMounted(() => {
|
||||
v-model.number="state.fieldColumnWidth.width"
|
||||
type="number"
|
||||
class="basic-input-number"
|
||||
:min="0"
|
||||
:max="100"
|
||||
:effect="themes"
|
||||
:disabled="batchOptStatus"
|
||||
@change="changeFieldColumnWidth()"
|
||||
|
Loading…
Reference in New Issue
Block a user