This commit is contained in:
dataeaseShu
2025-08-05 14:23:12 +08:00
3 changed files with 4 additions and 7 deletions
@@ -117,7 +117,9 @@ const chartObject = computed<{
return {}
})
const currentChartType = ref<ChartTypes | undefined>(undefined)
const currentChartType = ref<ChartTypes | undefined>(
props.chatType ?? chartObject.value.type ?? 'table'
)
const chartType = computed<ChartTypes>({
get() {
@@ -251,9 +251,7 @@ function removeItemFromPositionBox(item: CanvasItem) {
*/
function recomputeCellWidth() {
if (!containerRef.value) return
maxCell.value = isMainCanvas(props.canvasId)
? Math.floor(containerRef.value.offsetWidth / cellWidth.value)
: Math.round(containerRef.value.offsetWidth / cellWidth.value)
maxCell.value = Math.floor(containerRef.value.offsetWidth / cellWidth.value)
}
function sizeInit() {
@@ -93,7 +93,6 @@ const baseParams = computed(() => {
<style scoped lang="less">
.editor-content {
padding: 8px;
width: 100vw;
height: 100vh;
background: #fff;
@@ -104,10 +103,8 @@ const baseParams = computed(() => {
padding: 0 !important;
}
.editor-main {
border-radius: 12px;
position: relative;
background: #f5f6f7;
box-shadow: 4px 4px 8px 4px rgba(31, 35, 41, 0.2);
overflow: hidden;
width: 100%;
height: 100%;