提交 fe2a159c authored 作者: lihuihui's avatar lihuihui
......@@ -134,7 +134,6 @@
"useDisplayMedia": true,
"useDocumentVisibility": true,
"useDraggable": true,
"useDropZone": true,
"useElementBounding": true,
"useElementByPoint": true,
"useElementHover": true,
......
......@@ -135,7 +135,6 @@ declare global {
const useDisplayMedia: typeof import('@vueuse/core')['useDisplayMedia']
const useDocumentVisibility: typeof import('@vueuse/core')['useDocumentVisibility']
const useDraggable: typeof import('@vueuse/core')['useDraggable']
const useDropZone: typeof import('@vueuse/core')['useDropZone']
const useElementBounding: typeof import('@vueuse/core')['useElementBounding']
const useElementByPoint: typeof import('@vueuse/core')['useElementByPoint']
const useElementHover: typeof import('@vueuse/core')['useElementHover']
......
<script setup lang="ts">
import { ElMessage, ElMessageBox } from 'element-plus'
import { Delete } from '@element-plus/icons-vue'
import { deleteComment } from '@/api/base'
const props = defineProps<{ info: Record<string, any>; comments: { total: number; list: Record<string, any>[] } }>()
const emit = defineEmits(['remove'])
const imageList = computed<string[]>(() => {
try {
return JSON.parse(props.info.picture)
} catch (error) {
return []
}
})
const onRemove = (data: any) => {
ElMessageBox.confirm('确定要删除吗?', '提示').then(() => {
deleteComment({ id: data.id }).then(() => {
ElMessage({ type: 'success', message: '删除成功' })
emit('remove', data)
})
})
}
</script>
<template>
<div class="publish-item">
<div class="publish-item-hd" v-if="info.user_info">
<img
:src="info.user_info.avatar || 'https://webapp-pub.ezijing.com/weapp/share/default.jpg'"
class="publish-avatar"
/>
<div class="publish-item-hd-info">
<h5>{{ info.user_info.name }}</h5>
</div>
</div>
<div class="publish-item-bd">
<div class="publish-content" v-html="info.content || info.desc"></div>
<ul class="publish-picture">
<li v-for="url in imageList" :key="url">
<el-image :src="url" :preview-src-list="imageList" fit="cover" />
</li>
</ul>
<div class="publish-tools">
<p class="t1">{{ info.created_time }}</p>
</div>
<!-- 评论 -->
<div class="publish-comments" v-if="comments.total">
<div class="comment-item" v-for="item in comments.list" :key="item.id">
<div class="comment-item-hd">
<span>{{ item.user_name }}</span> <el-icon><delete @click="onRemove(item)" /></el-icon>
</div>
<div class="comment-item-bd">{{ item.content }}</div>
</div>
</div>
</div>
</div>
</template>
<style lang="scss">
.publish-item {
margin-bottom: 20px;
}
.publish-item-hd {
display: flex;
align-items: center;
}
.publish-item-hd-info {
flex: 1;
margin-left: 10px;
h5 {
font-size: 16px;
font-weight: 400;
color: #333333;
}
}
.publish-avatar {
width: 50px;
height: 50px;
border-radius: 50%;
overflow: hidden;
object-fit: cover;
}
.publish-item-bd {
margin-left: 60px;
}
.publish-content {
font-weight: 400;
line-height: 30px;
color: #333333;
}
.publish-picture {
margin-top: 10px;
display: flex;
li {
margin: 0 10px 10px 0;
width: 200px;
height: 200px;
border: 1px solid #e4e7ed;
border-radius: 10px;
overflow: hidden;
.el-image {
width: 100%;
height: 100%;
}
&:hover {
box-shadow: rgba(0, 0, 0, 0.12) 0px 0px 12px 0px;
}
}
}
.publish-tools {
margin-top: 10px;
display: flex;
align-items: center;
justify-content: space-between;
color: #999;
.t2 {
display: flex;
align-items: center;
font-size: 14px;
cursor: pointer;
.el-icon {
margin-right: 5px;
}
}
}
.publish-comments {
margin: 10px 0;
padding: 10px 20px;
background-color: #f5f5f5;
border-radius: 10px;
}
.comment-item + .comment-item {
border-top: 1px solid #e4e7ed;
padding-top: 12px;
margin-top: 12px;
}
.comment-item {
&:hover {
.el-icon {
display: block;
}
}
}
.comment-item-hd {
display: flex;
align-items: center;
justify-content: space-between;
font-size: 16px;
color: #033974;
.el-icon {
display: none;
cursor: pointer;
}
}
.comment-item-bd {
margin-top: 5px;
font-size: 14px;
color: #4e4e4e;
line-height: 20px;
}
.comment-more {
padding: 0.16rem 0;
font-size: 24px;
color: #033974;
line-height: 0.36rem;
text-align: center;
border-top: 0.01rem solid #d3d3d3;
cursor: pointer;
}
</style>
<script setup lang="ts">
import Sortable from 'sortablejs'
import type { MoveEvent, SortableEvent } from 'sortablejs'
import AddDialog from '../component/AddDialog.vue'
import AddDialog from '../components/AddDialog.vue'
import { getCategoryList, delCategory, moveCategory } from '../api'
import { ElMessage, ElMessageBox } from 'element-plus'
import AppList from '@/components/base/AppList.vue'
......
<script setup lang="ts">
import { createTeacher } from '../api'
import VEditor from '@tinymce/tinymce-vue'
import VEditor from '@/components/tinymce/Index.vue'
import AppUpload from '@/components/base/AppUpload.vue'
import { ElMessage } from 'element-plus'
import type { FormInstance, FormRules } from 'element-plus'
......
......@@ -2,7 +2,7 @@
import { getTeacherDetail, updateTeacher } from '../api'
import { ElMessage } from 'element-plus'
import type { FormRules, FormInstance } from 'element-plus'
import VEditor from '@tinymce/tinymce-vue'
import VEditor from '@/components/tinymce/Index.vue'
import AppUpload from '@/components/base/AppUpload.vue'
const router = useRouter()
const route = useRoute()
......
<script setup lang="ts">
import { setDepartment, setPlatform, setStatus, getProjectList, setBelong } from '../api'
import { ElMessage, ElMessageBox } from 'element-plus'
import { useMapStore } from '@/stores/map'
const store = useMapStore()
......
......@@ -73,7 +73,13 @@ onMounted(() => {
})
</script>
<template>
<el-dialog :model-value="isShowDialog" draggable :before-close="handleCancel" width="30%">
<el-dialog
:model-value="isShowDialog"
draggable
:before-close="handleCancel"
width="30%"
:title="props.isEdit ? '修改预置封面信息' : ' 新增封面'"
>
<el-form :model="form" :rules="rules" ref="ruleFormRef">
<el-form-item label="封面类型:" prop="type">
<el-select v-model="form.type">
......
<script setup lang="ts">
import { getCoverList, deleteCover } from '../api'
import { ElMessage, ElMessageBox } from 'element-plus'
import AddDialog from '../component/AddDialog.vue'
import AddDialog from '../components/AddDialog.vue'
const appList = ref()
const isShowDialog = ref(false)
......@@ -55,7 +55,7 @@ const handleEdit = (row: any) => {
<template>
<AppCard title="封面管理">
<el-button type="primary" round @click="handleAdd">添加</el-button>
<el-button type="primary" round @click="handleAdd">新增封面</el-button>
<AppList v-bind="listOptions" ref="appList" border stripe>
<template #header-aside> </template>
<template #table-cover="{ row }">
......
......@@ -2,7 +2,7 @@
import { ElMessage, ElMessageBox } from 'element-plus'
import { useMapStore } from '@/stores/map'
import { getDictionaryList, delDictionary } from '../api'
import AddDialog from '../component/AddDialog.vue'
import AddDialog from '../components/AddDialog.vue'
const router = useRouter()
const appList = ref()
......
<script setup lang="ts">
import { getDictionaryItemList, delDictionaryItem } from '../api'
import { ElMessage, ElMessageBox } from 'element-plus'
import ListAddDialog from '../component/ListAddDialog.vue'
import ListAddDialog from '../components/ListAddDialog.vue'
const route = useRoute()
const appList = ref()
const editData = ref({})
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论