Commit b7094e06 by liangjianmin

fix(store): enhance message display logic in store list

- Updated the message column in the store list to handle both object and string types.
- Added conditional rendering to display modification details or the message directly based on its type.
- Improved user experience by ensuring clarity in the displayed messages.
parent 93e93adc
Showing with 6 additions and 1 deletions
...@@ -377,7 +377,12 @@ ...@@ -377,7 +377,12 @@
<el-table-column prop="create_time" label="时间" min-width="150" align="center"></el-table-column> <el-table-column prop="create_time" label="时间" min-width="150" align="center"></el-table-column>
<el-table-column prop="message" label="操作说明" min-width="150" align="center"> <el-table-column prop="message" label="操作说明" min-width="150" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>修改了价格,点击查看 <a style="color: #409EFF" href="javascript:;" @click="handleDetailClick(scope.row.message.pre_data, scope.row.message.current_data)">修改详情</a></span> <!-- 判断message是否为对象 -->
<span v-if="typeof scope.row.message === 'object' && scope.row.message !== null">
修改了价格,点击查看 <a style="color: #409EFF" href="javascript:;" @click="handleDetailClick(scope.row.message.pre_data, scope.row.message.current_data)">修改详情</a>
</span>
<!-- 如果是字符串,直接显示 -->
<span v-else>{{ scope.row.message }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="operator" label="操作人" min-width="150" align="center"></el-table-column> <el-table-column prop="operator" label="操作人" min-width="150" align="center"></el-table-column>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment