Kaynağa Gözat

简历管理显示多个求职岗位和薪资

corn 6 ay önce
ebeveyn
işleme
b1d64a6b7f
1 değiştirilmiş dosya ile 5 ekleme ve 5 silme
  1. 5 5
      src/views/universalMission/carBrandList.vue

+ 5 - 5
src/views/universalMission/carBrandList.vue

@@ -179,9 +179,9 @@
 			<el-table-column prop="industryName" label="期望行业">
 			</el-table-column>
 			<el-table-column prop="resumesPost" label="求职岗位" width="150">
-				<!-- 核心:通过slot-scope获取行数据,用v-html解析HTML -->
 				<template slot-scope="scope">
-					<div v-html="scope.row.resumesPost"></div>
+					<!-- 先判空,再替换换行符,空值时显示“-”(可自定义) -->
+					<div v-html="scope.row.resumesPost ? scope.row.resumesPost.replace(/\/n/g, '<br/>') : ''"></div>
 				</template>
 			</el-table-column>
 			<!-- <el-table-column prop="resumesImageName" label="资格证书" width="150">
@@ -202,10 +202,10 @@
 			</el-table-column>
 			<!-- <el-table-column prop="address" label="简历" width="160">
 			</el-table-column> -->
-			<el-table-column prop="resumesCompensation" label="期望薪资" width="120">
-				<!-- 核心:通过slot-scope获取行数据,用v-html解析HTML -->
+			<el-table-column prop="resumesCompensation" label="期望薪资" width="150">
 				<template slot-scope="scope">
-					<div v-html="scope.row.resumesCompensation"></div>
+					<!-- 先判空,再替换换行符,空值时显示“-”(可自定义) -->
+					<div v-html="scope.row.resumesCompensation ? scope.row.resumesCompensation.replace(/\/n/g, '<br/>') : ''"></div>
 				</template>
 			</el-table-column>
 			<!-- <el-table-column prop="money" label="核定薪资" width="160">