diff --git a/src/assets/svgs/custom-vue-now-time.svg b/src/assets/svgs/custom-vue-now-time.svg new file mode 100644 index 0000000..dd14242 --- /dev/null +++ b/src/assets/svgs/custom-vue-now-time.svg @@ -0,0 +1,9 @@ + + + + \ No newline at end of file diff --git a/src/components/webtopo-svg-edit/components/custom-vue/now-time/index.vue b/src/components/webtopo-svg-edit/components/custom-vue/now-time/index.vue new file mode 100644 index 0000000..e936cf3 --- /dev/null +++ b/src/components/webtopo-svg-edit/components/custom-vue/now-time/index.vue @@ -0,0 +1,53 @@ + + diff --git a/src/config-center/index.ts b/src/config-center/index.ts index ef25ccb..20c2223 100644 --- a/src/config-center/index.ts +++ b/src/config-center/index.ts @@ -5,6 +5,7 @@ import switchDemo from '@/components/webtopo-svg-edit/components/custom-svg/swit 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'; +import NowTime from '@/components/webtopo-svg-edit/components/custom-vue/now-time/index.vue'; import PieCharts from '@/components/webtopo-svg-edit/components/echarts/pie-charts/index.vue'; export const configCenter: IConfigCenter = { svg文件: svgfile_config_center, @@ -16,5 +17,6 @@ export const ComponentImport: IComponentImport = { 'el-tag': ElTag, 'custom-vue-common-table': CommonTable, 'pie-charts': PieCharts, - 'switch-demo': switchDemo + 'switch-demo': switchDemo, + 'custom-vue-now-time': NowTime }; diff --git a/src/config-center/vue/custom-vue/index.ts b/src/config-center/vue/custom-vue/index.ts index 7003f35..096be52 100644 --- a/src/config-center/vue/custom-vue/index.ts +++ b/src/config-center/vue/custom-vue/index.ts @@ -1,9 +1,10 @@ import { IConfigComponentGroup } from '@/config-center/types'; import { custom_vue_common_table } from './common-table'; +import { custom_vue_now_time } from './now-time'; export const custom_vue_group: IConfigComponentGroup = { groupType: 'custom-vue', title: '自定义', - list: [custom_vue_common_table] + list: [custom_vue_common_table, custom_vue_now_time] }; diff --git a/src/config-center/vue/custom-vue/now-time/index.ts b/src/config-center/vue/custom-vue/now-time/index.ts new file mode 100644 index 0000000..53da798 --- /dev/null +++ b/src/config-center/vue/custom-vue/now-time/index.ts @@ -0,0 +1,27 @@ +import { EConfigItemPropsType, EDoneJsonType, IConfigItem } from '@/config-center/types'; + +export const custom_vue_now_time: IConfigItem = { + name: 'custom-vue-now-time', + title: '当前时间', + tag: 'custom-vue-now-time', + type: EDoneJsonType.Vue, + config: { + can_zoom: true, + have_anchor: false, + actual_rect: true + }, + display: true, + props: { + fontColor: { + title: '文字颜色', + type: EConfigItemPropsType.Color, + val: '#000000' + } + }, + common_animations: { + val: '', + delay: 'delay-0s', + speed: 'slow', + repeat: 'infinite' + } +};