|
@@ -50,12 +50,12 @@
|
|
|
</div>
|
|
|
|
|
|
</ul>
|
|
|
- <div class="info-description">
|
|
|
+ <div class="info-remark">
|
|
|
<div style="display: flex; align-items: center;">
|
|
|
<Icon icon="ep:picture" />
|
|
|
<div class="div-label" style="margin-left: 8px;">简介:</div>
|
|
|
</div>
|
|
|
- <div class="description-content">{{ cleanedDescription }}</div>
|
|
|
+ <div class="remark-content">{{ cleanedremark }}</div>
|
|
|
<div class="image-container">
|
|
|
<div v-for="(url, index) in extractedImageUrls" :key="index" class="image-item">
|
|
|
<img :src="url" />
|
|
@@ -94,6 +94,19 @@ export default defineComponent({
|
|
|
const loading = ref(true) // 列表的加载中
|
|
|
const formRef = ref();
|
|
|
|
|
|
+ const form = reactive({
|
|
|
+ mobile: '',
|
|
|
+ email: '',
|
|
|
+ nickname: '',
|
|
|
+ password: '',
|
|
|
+ sex: undefined,
|
|
|
+ remark: '',
|
|
|
+ userType: undefined,
|
|
|
+ userNumber: '',
|
|
|
+ dept: undefined,
|
|
|
+ deptId: undefined,
|
|
|
+ });
|
|
|
+
|
|
|
// 将 userInfo 定义放入 setup 中
|
|
|
const userInfo = ref({} as ProfileVO)
|
|
|
const getUserInfo = async () => {
|
|
@@ -129,7 +142,7 @@ const fetchImageUrls = async () => {
|
|
|
try {
|
|
|
loading.value = true; // 开始加载
|
|
|
const res = await getUserProfile();
|
|
|
- const urls = res.description.match(/<img.*?src="(.*?)"/g);
|
|
|
+ const urls = res.remark.match(/<img.*?src="(.*?)"/g);
|
|
|
if (urls) {
|
|
|
extractedImageUrls.value = urls.map(url => {
|
|
|
const match = url.match(/src="(.*?)"/);
|
|
@@ -145,12 +158,12 @@ const fetchImageUrls = async () => {
|
|
|
}
|
|
|
};
|
|
|
// 创建一个 computed 属性来处理并去掉 <p> 标签
|
|
|
- const cleanedDescription = computed(() => {
|
|
|
- return userInfo.value.description ? userInfo.value.description.replace(/<\/?[^>]+(>|$)/g, '') : '';
|
|
|
+ const cleanedremark = computed(() => {
|
|
|
+ return userInfo.value.remark ? userInfo.value.remark.replace(/<\/?[^>]+(>|$)/g, '') : '';
|
|
|
});
|
|
|
|
|
|
|
|
|
- // 表单提交
|
|
|
+ // // 表单提交
|
|
|
// const submit = async () => {
|
|
|
// try {
|
|
|
// await formRef.value?.validate();
|
|
@@ -166,7 +179,7 @@ const fetchImageUrls = async () => {
|
|
|
// };
|
|
|
|
|
|
|
|
|
- // 表单重置
|
|
|
+ // // 表单重置
|
|
|
// const init = async () => {
|
|
|
// const res = await getUserProfile();
|
|
|
// console.log('获取的数据:', res);
|
|
@@ -177,7 +190,7 @@ const fetchImageUrls = async () => {
|
|
|
// form.email = res.email;
|
|
|
// form.name = res.name;
|
|
|
// form.leaderUserId = res.user.id;
|
|
|
- // form.description = res.description;
|
|
|
+ // form.remark = res.remark;
|
|
|
// userInfo.value = res.user;
|
|
|
// };
|
|
|
|
|
@@ -200,7 +213,7 @@ const fetchImageUrls = async () => {
|
|
|
openDialog,
|
|
|
handleSuccess,
|
|
|
extractedImageUrls,
|
|
|
- cleanedDescription,
|
|
|
+ cleanedremark,
|
|
|
userTypeMapping,
|
|
|
};
|
|
|
}
|
|
@@ -244,7 +257,7 @@ const fetchImageUrls = async () => {
|
|
|
border-bottom: 1px solid #e7eaec;
|
|
|
}
|
|
|
|
|
|
-.info-description {
|
|
|
+.info-remark {
|
|
|
margin-top: 30px; /* 与上面的信息分隔 */
|
|
|
margin-left: 5%; /* 左侧与上面列表保持一致 */
|
|
|
margin-right: 5%; /* 右侧与上面列表保持一致 */
|
|
@@ -264,7 +277,7 @@ const fetchImageUrls = async () => {
|
|
|
|
|
|
}
|
|
|
|
|
|
-.description-content {
|
|
|
+.remark-content {
|
|
|
white-space: pre-wrap; /* 保持换行 */
|
|
|
overflow-wrap: break-word; /* 自动断行 */
|
|
|
margin-right: 5%;
|