|
@@ -13,6 +13,7 @@
|
|
|
<t-select
|
|
|
v-model="item.name"
|
|
|
style="width: 40%"
|
|
|
+ @change="eventNameChange"
|
|
|
:options="options"
|
|
|
autoWidth
|
|
|
/>
|
|
@@ -78,6 +79,7 @@ import { onBeforeMount, onUnmounted, ref, computed } from 'vue';
|
|
|
import Actions from './Actions.vue';
|
|
|
import Conditions from './Conditions.vue';
|
|
|
import { DeleteIcon } from 'tdesign-icons-vue-next';
|
|
|
+import { initEvent } from '@meta2d/chart-diagram';
|
|
|
|
|
|
const props = defineProps<{
|
|
|
pen: any;
|
|
@@ -239,8 +241,17 @@ const addEvent = (e: any) => {
|
|
|
props.pen.events = [];
|
|
|
}
|
|
|
props.pen.events.push({ name: e.value });
|
|
|
+ if(props.pen.name === 'echarts'){
|
|
|
+ initEvent(props.pen);
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
+const eventNameChange = ()=>{
|
|
|
+ if(props.pen.name === 'echarts'){
|
|
|
+ initEvent(props.pen);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
onUnmounted(() => {});
|
|
|
</script>
|
|
|
<style lang="postcss" scoped>
|