Przeglądaj źródła

feat(profile radar): add configurable title prop for radar chart component

1. 为ProfileRadar组件新增title自定义属性,保留默认值为原有的"七维得分一览"
2. 在部门档案页面的ProfileRadar实例中传入自定义标题"五维得分一览"
huoyi 2 tygodni temu
rodzic
commit
5d958c3804

+ 5 - 1
src/views/portraitManagement/components/ProfileRadar.vue

@@ -1,5 +1,5 @@
1 1
 <template>
2
-  <InfoCard title="七维得分一览">
2
+  <InfoCard :title="title">
3 3
     <div class="radar-section">
4 4
       <div ref="radarChartRef" class="radar-chart"></div>
5 5
       <div class="radar-list">
@@ -26,6 +26,10 @@ import * as echarts from 'echarts'
26 26
 import InfoCard from './card.vue'
27 27
 
28 28
 const props = defineProps({
29
+  title: {
30
+    type: String,
31
+    default: '七维得分一览'
32
+  },
29 33
   chartData: {
30 34
     type: Array,
31 35
     default: () => []

+ 1 - 1
src/views/portraitManagement/deptProfile/component/profile.vue

@@ -2,7 +2,7 @@
2 2
   <div class="main-content-wrapper">
3 3
     <div class="main-content">
4 4
       <div class="content-row">
5
-        <ProfileRadar :chartData="radarData" />
5
+        <ProfileRadar :chartData="radarData" :title="'五维得分一览'" />
6 6
         <ProfileMembers :columns="teamColumns" :data="teamMembers" />
7 7
       </div>
8 8