diff --git a/src/packages/components/Charts/Bars/BarCommon/config.vue b/src/packages/components/Charts/Bars/BarCommon/config.vue
index 64f42591..a8b3a525 100644
--- a/src/packages/components/Charts/Bars/BarCommon/config.vue
+++ b/src/packages/components/Charts/Bars/BarCommon/config.vue
@@ -1,19 +1,10 @@
-
+
-
+
恢复默认
@@ -28,11 +19,7 @@
>
-
+
@@ -43,18 +30,10 @@
-
+
-
+
@@ -72,23 +51,18 @@
diff --git a/src/packages/components/Charts/Bars/BarCommon/index.vue b/src/packages/components/Charts/Bars/BarCommon/index.vue
index 54aaa27b..2c3b8d3c 100644
--- a/src/packages/components/Charts/Bars/BarCommon/index.vue
+++ b/src/packages/components/Charts/Bars/BarCommon/index.vue
@@ -54,7 +54,7 @@ watch(
() => props.chartConfig.option.dataset,
(newData: { dimensions: any }, oldData) => {
if (!isObject(newData) || !('dimensions' in newData)) return
- if (newData?.dimensions.length !== oldData?.dimensions.length) {
+ if (Array.isArray(newData?.dimensions)) {
const seriesArr = []
for (let i = 0; i < newData.dimensions.length - 1; i++) {
seriesArr.push(seriesItem)
diff --git a/src/packages/components/Charts/Bars/BarCrossrange/index.vue b/src/packages/components/Charts/Bars/BarCrossrange/index.vue
index d42ce328..cef123cf 100644
--- a/src/packages/components/Charts/Bars/BarCrossrange/index.vue
+++ b/src/packages/components/Charts/Bars/BarCrossrange/index.vue
@@ -53,7 +53,7 @@ watch(
() => props.chartConfig.option.dataset,
(newData: { dimensions: any }, oldData) => {
if (!isObject(newData) || !('dimensions' in newData)) return
- if (newData?.dimensions.length !== oldData?.dimensions.length) {
+ if (Array.isArray(newData?.dimensions)) {
const seriesArr = []
for (let i = 0; i < newData.dimensions.length - 1; i++) {
seriesArr.push(seriesItem)
diff --git a/src/packages/components/Charts/Lines/LineCommon/index.vue b/src/packages/components/Charts/Lines/LineCommon/index.vue
index 8a5c4f44..70955874 100644
--- a/src/packages/components/Charts/Lines/LineCommon/index.vue
+++ b/src/packages/components/Charts/Lines/LineCommon/index.vue
@@ -54,7 +54,7 @@ watch(
() => props.chartConfig.option.dataset,
(newData: { dimensions: any }, oldData) => {
if (!isObject(newData) || !('dimensions' in newData)) return
- if (newData?.dimensions.length !== oldData?.dimensions.length) {
+ if (Array.isArray(newData?.dimensions)) {
const seriesArr = []
for (let i = 0; i < newData.dimensions.length - 1; i++) {
seriesArr.push(seriesItem)
diff --git a/src/packages/components/Charts/Lines/LineGradientSingle/config.vue b/src/packages/components/Charts/Lines/LineGradientSingle/config.vue
index 95d08627..60250083 100644
--- a/src/packages/components/Charts/Lines/LineGradientSingle/config.vue
+++ b/src/packages/components/Charts/Lines/LineGradientSingle/config.vue
@@ -1,12 +1,7 @@
-
+
-
+
@@ -44,18 +35,10 @@
-
+
-
+
@@ -73,24 +56,19 @@
diff --git a/src/packages/components/Charts/Scatters/ScatterCommon/index.vue b/src/packages/components/Charts/Scatters/ScatterCommon/index.vue
index 945df53d..91eba114 100644
--- a/src/packages/components/Charts/Scatters/ScatterCommon/index.vue
+++ b/src/packages/components/Charts/Scatters/ScatterCommon/index.vue
@@ -70,7 +70,7 @@ watch(
() => props.chartConfig.option.dataset,
(newData, oldData) => {
if (!isArray(newData)) return
- if (newData?.length !== oldData?.length) {
+ if (Array.isArray(newData)) {
replaceMergeArr.value = ['series']
// eslint-disable-next-line vue/no-mutating-props
props.chartConfig.option.series = newData.map((item: { dimensions: any[] }, index: number) => ({
diff --git a/src/views/chart/ContentEdit/hooks/useDrag.hook.ts b/src/views/chart/ContentEdit/hooks/useDrag.hook.ts
index 74e006b9..39a67327 100644
--- a/src/views/chart/ContentEdit/hooks/useDrag.hook.ts
+++ b/src/views/chart/ContentEdit/hooks/useDrag.hook.ts
@@ -172,10 +172,7 @@ export const useMouseHandle = () => {
e.stopPropagation()
if (item.status.lock) return
// 若此时按下了 CTRL, 表示多选
- if (
- window.$KeyboardActive?.has(WinKeyboard.CTRL_SOURCE_KEY) ||
- window.$KeyboardActive?.has(MacKeyboard.CTRL_SOURCE_KEY)
- ) {
+ if (window.$KeyboardActive?.ctrl) {
// 若已选中,则去除
if (chartEditStore.targetChart.selectId.includes(item.id)) {
const exList = chartEditStore.targetChart.selectId.filter(e => e !== item.id)
@@ -193,11 +190,7 @@ export const useMouseHandle = () => {
if (item.status.lock) return
onClickOutSide()
// 按下左键 + CTRL
- if (
- e.buttons === MouseEventButton.LEFT &&
- (window.$KeyboardActive?.has(WinKeyboard.CTRL_SOURCE_KEY) ||
- window.$KeyboardActive?.has(MacKeyboard.CTRL_SOURCE_KEY))
- )
+ if (e.buttons === MouseEventButton.LEFT && window.$KeyboardActive?.ctrl)
return
// 按下右键 + 选中多个 + 目标元素是多选子元素
diff --git a/src/views/chart/ContentLayers/components/LayersGroupListItem/index.vue b/src/views/chart/ContentLayers/components/LayersGroupListItem/index.vue
index 587eb85b..ac9892ec 100644
--- a/src/views/chart/ContentLayers/components/LayersGroupListItem/index.vue
+++ b/src/views/chart/ContentLayers/components/LayersGroupListItem/index.vue
@@ -142,11 +142,7 @@ const optionsHandle = (
// 点击
const clickHandle = (e: MouseEvent) => {
// 按下左键 + CTRL
- if (
- window.$KeyboardActive?.has(WinKeyboard.CTRL_SOURCE_KEY) ||
- window.$KeyboardActive?.has(MacKeyboard.CTRL_SOURCE_KEY)
- )
- return
+ if (window.$KeyboardActive?.ctrl) return
// 判断左右键
expend.value = !expend.value
mousedownHandle(e, props.componentGroupData)
@@ -157,11 +153,7 @@ const groupMousedownHandle = (e: MouseEvent) => {
onClickOutSide()
// 若此时按下了 CTRL, 表示多选
const id = props.componentGroupData.id
- if (
- e.buttons === MouseEventButton.LEFT &&
- (window.$KeyboardActive?.has(WinKeyboard.CTRL_SOURCE_KEY) ||
- window.$KeyboardActive?.has(MacKeyboard.CTRL_SOURCE_KEY))
- ) {
+ if (e.buttons === MouseEventButton.LEFT && window.$KeyboardActive?.ctrl) {
// 若已选中,则去除
if (chartEditStore.targetChart.selectId.includes(id)) {
const exList = chartEditStore.targetChart.selectId.filter(e => e !== id)
diff --git a/src/views/chart/ContentLayers/index.vue b/src/views/chart/ContentLayers/index.vue
index ec1c4820..0576ab24 100644
--- a/src/views/chart/ContentLayers/index.vue
+++ b/src/views/chart/ContentLayers/index.vue
@@ -166,11 +166,7 @@ const mousedownHandle = (e: MouseEvent, item: CreateComponentType) => {
onClickOutSide()
// 若此时按下了 CTRL, 表示多选
const id = item.id
- if (
- e.buttons === MouseEventButton.LEFT &&
- (window.$KeyboardActive?.has(WinKeyboard.CTRL_SOURCE_KEY) ||
- window.$KeyboardActive?.has(MacKeyboard.CTRL_SOURCE_KEY))
- ) {
+ if (e.buttons === MouseEventButton.LEFT && window.$KeyboardActive?.ctrl) {
// 若已选中,则去除
if (chartEditStore.targetChart.selectId.includes(id)) {
const exList = chartEditStore.targetChart.selectId.filter(e => e !== id)
@@ -198,7 +194,6 @@ const changeLayerType = (value: LayerModeEnum) => {
layerMode.value = value
chartLayoutStore.setItem(ChartLayoutStoreEnum.LAYER_TYPE, value)
}
-