/* * @Author: 卜启缘 * @Date: 2021-06-01 13:22:14 * @LastEditTime: 2021-06-24 11:21:35 * @LastEditors: 卜启缘 * @Description: 属性编辑器 * @FilePath: \vite-vue3-lowcode\src\visual-editor\components\right-attribute-panel\index.tsx * RightAttributePanel */ import { defineComponent, reactive } from 'vue' import styles from './index.module.scss' import { ElTabPane, ElTabs } from 'element-plus' import MonacoEditor from '../common/monaco-editor/MonacoEditor' import { useVisualData } from '@/visual-editor/hooks/useVisualData' import { AttrEditor, Animate, PageSetting, EventAction } from './components' export default defineComponent({ name: 'RightAttributePanel', setup() { const { currentBlock } = useVisualData() const state = reactive({ activeName: 'attr', isOpen: true }) const handleSchemaChange = (val) => { try { const newObj = JSON.parse(val) Object.assign(currentBlock.value, newObj) } catch (e) { console.log('JSON格式有误:', e) } } return () => ( <>
(state.isOpen = !state.isOpen)}>
) } })