diff --git a/src/assets/svgs/switch-demo.svg b/src/assets/svgs/switch-demo.svg new file mode 100644 index 0000000..d39eaf0 --- /dev/null +++ b/src/assets/svgs/switch-demo.svg @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/src/components/webtopo-svg-edit/components/custom-svg/switch-demo/index.vue b/src/components/webtopo-svg-edit/components/custom-svg/switch-demo/index.vue new file mode 100644 index 0000000..54e4d1c --- /dev/null +++ b/src/components/webtopo-svg-edit/components/custom-svg/switch-demo/index.vue @@ -0,0 +1,42 @@ + + + diff --git a/src/config-center/index.ts b/src/config-center/index.ts index 6c96685..ef25ccb 100644 --- a/src/config-center/index.ts +++ b/src/config-center/index.ts @@ -1,6 +1,7 @@ import { svgfile_config_center } from './svg-file'; import { IComponentImport, IConfigCenter } from './types'; import customSvgText from '@/components/webtopo-svg-edit/components/custom-svg/custom-svg-text/index.vue'; +import switchDemo from '@/components/webtopo-svg-edit/components/custom-svg/switch-demo/index.vue'; import { vue_config_center } from './vue'; import { ElButton, ElTag } from 'element-plus'; import CommonTable from '@/components/webtopo-svg-edit/components/custom-vue/common-table/index.vue'; @@ -14,5 +15,6 @@ export const ComponentImport: IComponentImport = { 'el-button': ElButton, 'el-tag': ElTag, 'custom-vue-common-table': CommonTable, - 'pie-charts': PieCharts + 'pie-charts': PieCharts, + 'switch-demo': switchDemo }; diff --git a/src/config-center/svg-file/custom-svg/index.ts b/src/config-center/svg-file/custom-svg/index.ts index f6c83fe..eea17f2 100644 --- a/src/config-center/svg-file/custom-svg/index.ts +++ b/src/config-center/svg-file/custom-svg/index.ts @@ -1,8 +1,8 @@ import { IConfigComponentGroup } from '../../types'; import { custom_svg_text } from './custom-svg-text'; - +import { switch_demo } from './switch-demo'; export const custom_svg_group: IConfigComponentGroup = { groupType: 'custom_svg_group', title: '自定义svg', - list: [custom_svg_text] + list: [custom_svg_text, switch_demo] }; diff --git a/src/config-center/svg-file/custom-svg/switch-demo/index.ts b/src/config-center/svg-file/custom-svg/switch-demo/index.ts new file mode 100644 index 0000000..48760c4 --- /dev/null +++ b/src/config-center/svg-file/custom-svg/switch-demo/index.ts @@ -0,0 +1,27 @@ +import { EConfigItemPropsType, EDoneJsonType, IConfigItem } from '@/config-center/types'; + +export const switch_demo: IConfigItem = { + name: 'switch-demo', + title: '开关演示', + tag: 'switch-demo', + type: EDoneJsonType.CustomSvg, + display: true, + config: { + can_zoom: true, + have_anchor: true, + actual_rect: true + }, + props: { + isOpen: { + title: '开关', + type: EConfigItemPropsType.Switch, + val: true + } + }, + common_animations: { + val: '', + delay: 'delay-0s', + speed: 'slow', + repeat: 'infinite' + } +};