|
@@ -6,7 +6,7 @@
|
|
<uni-card v-for="item of formLIst" :key="item.id" :id="item.id">
|
|
<uni-card v-for="item of formLIst" :key="item.id" :id="item.id">
|
|
<uni-section :title="item.text" type="line">
|
|
<uni-section :title="item.text" type="line">
|
|
<template v-slot:right>
|
|
<template v-slot:right>
|
|
- <view style="color: #e64340;" @click="null">删除</view>
|
|
|
|
|
|
+ <view v-if="item.path !== 'baseInfoEdit'" style="color: #e64340;" @click="del(item)">删除</view>
|
|
</template>
|
|
</template>
|
|
<avatarEdit v-if="item.path === 'avatarEdit'" ref="componentRef" :id="item.id" :data="item.data" />
|
|
<avatarEdit v-if="item.path === 'avatarEdit'" ref="componentRef" :id="item.id" :data="item.data" />
|
|
<baseInfoEdit v-if="item.path === 'baseInfoEdit'" ref="componentRef" :id="item.id" :data="item.data" />
|
|
<baseInfoEdit v-if="item.path === 'baseInfoEdit'" ref="componentRef" :id="item.id" :data="item.data" />
|
|
@@ -17,6 +17,18 @@
|
|
<view v-if="loading">加载中...</view>
|
|
<view v-if="loading">加载中...</view>
|
|
<view v-else>加载失败</view>
|
|
<view v-else>加载失败</view>
|
|
</view>
|
|
</view>
|
|
|
|
+ <!-- 确认框 -->
|
|
|
|
+ <uni-popup ref="confirmRef" type="dialog">
|
|
|
|
+ <uni-popup-dialog
|
|
|
|
+ type="warn"
|
|
|
|
+ cancelText="取消"
|
|
|
|
+ confirmText="确认"
|
|
|
|
+ title="系统提示"
|
|
|
|
+ :content="dialogContent"
|
|
|
|
+ @confirm="handleConfirm"
|
|
|
|
+ @close="null"
|
|
|
|
+ ></uni-popup-dialog>
|
|
|
|
+ </uni-popup>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -50,12 +62,6 @@ const exampleList = {
|
|
trainList: { text: '培训经历', id: 'trainList', path: '' },
|
|
trainList: { text: '培训经历', id: 'trainList', path: '' },
|
|
}
|
|
}
|
|
|
|
|
|
-// const del = (item) => {
|
|
|
|
-// Confirm('系统提示', `是否确认删除${item.text}?`).then(async () => {
|
|
|
|
-// formLIst.value = formLIst.value.filter(e => e.id !== item.id)
|
|
|
|
-// })
|
|
|
|
-// }
|
|
|
|
-
|
|
|
|
const resumeTxt = ref([]) // 查看文本信息
|
|
const resumeTxt = ref([]) // 查看文本信息
|
|
const formLIst = shallowRef([])
|
|
const formLIst = shallowRef([])
|
|
const transformToLIst = async (result) => {
|
|
const transformToLIst = async (result) => {
|
|
@@ -87,7 +93,19 @@ const transformToLIst = async (result) => {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
- console.log('formLIst:', formLIst.value)
|
|
|
|
|
|
+ // console.log('formLIst:', formLIst.value)
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+const confirmRef = ref()
|
|
|
|
+const dialogContent = ref('')
|
|
|
|
+let delId = null
|
|
|
|
+const del = (item) => {
|
|
|
|
+ dialogContent.value = `是否确认删除${item.text}?`
|
|
|
|
+ delId = item.id
|
|
|
|
+ confirmRef.value.open()
|
|
|
|
+}
|
|
|
|
+const handleConfirm = () => {
|
|
|
|
+ formLIst.value = formLIst.value.filter(e => e.id !== delId)
|
|
}
|
|
}
|
|
|
|
|
|
const result = ref(JSON.parse(JSON.stringify(data)))
|
|
const result = ref(JSON.parse(JSON.stringify(data)))
|