123456789101112131415161718192021222324252627 |
- <template>
- <CusForm :columns="formItems" @change="handleChange"/>
- </template>
- <script setup lang="ts">
- import { CusForm, IFormItem } from '@/components/CusForm';
- import { useProjectStore } from '@/store/modules/project';
- const projectStore = useProjectStore();
- const formItems: IFormItem[] = [
- {
- label: '页面背景',
- prop: 'background',
- type: 'backgroundSelect',
- defaultValue: projectStore.currentPage.background
- }
- ];
- const handleChange = (value: Record<string, any>) => {
- projectStore.setCurrentPageBackground(value.background);
- };
- </script>
- <style scoped>
- </style>
|