feat 添加手机可以加数据,优化手机端
This commit is contained in:
parent
93f79476d6
commit
daab96ca7e
BIN
.output.zip
Normal file
BIN
.output.zip
Normal file
Binary file not shown.
@ -9,6 +9,9 @@
|
||||
.Carousel-container{
|
||||
height: 40vw!important;
|
||||
}
|
||||
.Carousel-container{
|
||||
margin-top: 63px !important;
|
||||
}
|
||||
.carousel-items{
|
||||
height: 40vw!important;
|
||||
}
|
||||
|
@ -23,7 +23,7 @@
|
||||
/*小于*/
|
||||
@media screen and (max-width: 1037px) {
|
||||
.Header-container {
|
||||
height: 50px !important;
|
||||
height: 111px !important;
|
||||
}
|
||||
|
||||
.HeaderSearch-Icon {
|
||||
|
@ -67,7 +67,7 @@ a {
|
||||
height: 3px;
|
||||
width: 30px;
|
||||
margin: 4px 0;
|
||||
background: #ffffff;
|
||||
background: black;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -130,3 +130,70 @@
|
||||
color: black;
|
||||
}
|
||||
|
||||
|
||||
.btn-box {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
|
||||
.btn-box{
|
||||
position: relative;
|
||||
}
|
||||
%test {
|
||||
position: absolute;
|
||||
content: '';
|
||||
transition: all .5s;
|
||||
}
|
||||
|
||||
.press-button {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
padding: 20px 40px;
|
||||
color: white;
|
||||
transform: translate(0, 0);
|
||||
vertical-align: middle;
|
||||
font-family: 'Rubik One', sans-serif;
|
||||
text-decoration: none;
|
||||
font-size: 20px;
|
||||
transition: all .5s;
|
||||
background-color: #3498db;
|
||||
|
||||
&::before {
|
||||
@extend %test;
|
||||
bottom: -15px;
|
||||
height: 15px;
|
||||
width: 100%;
|
||||
left: 8px;
|
||||
transform: skewX(45deg);
|
||||
background-color: darken(#3498db, 20%);
|
||||
}
|
||||
|
||||
&::after {
|
||||
@extend %test;
|
||||
right: -15px;
|
||||
height: 100%;
|
||||
width: 15px;
|
||||
bottom: -8px;
|
||||
transform: skewY(45deg);
|
||||
background-color: darken(#3498db, 30%);
|
||||
}
|
||||
|
||||
&:active {
|
||||
margin-left: 10px;
|
||||
margin-top: 10px;
|
||||
|
||||
&::before {
|
||||
bottom: -5px;
|
||||
height: 5px;
|
||||
left: 3px;
|
||||
}
|
||||
|
||||
&::after {
|
||||
right: -5px;
|
||||
width: 5px;
|
||||
bottom: -3px;
|
||||
}
|
||||
}
|
||||
}
|
@ -56,4 +56,68 @@
|
||||
|
||||
.todo-list-text {
|
||||
font-size: 25px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.btn-box{
|
||||
position: relative;
|
||||
}
|
||||
%test {
|
||||
position: absolute;
|
||||
content: '';
|
||||
transition: all .5s;
|
||||
}
|
||||
|
||||
.press-button {
|
||||
position: absolute;
|
||||
right: 10%;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
padding: 20px 40px;
|
||||
color: white;
|
||||
transform: translate(0, 0);
|
||||
vertical-align: middle;
|
||||
font-family: 'Rubik One', sans-serif;
|
||||
text-decoration: none;
|
||||
font-size: 20px;
|
||||
transition: all .5s;
|
||||
background-color: #3498db;
|
||||
|
||||
&::before {
|
||||
@extend %test;
|
||||
bottom: -15px;
|
||||
height: 15px;
|
||||
width: 100%;
|
||||
left: 8px;
|
||||
transform: skewX(45deg);
|
||||
background-color: darken(#3498db, 20%);
|
||||
}
|
||||
|
||||
&::after {
|
||||
@extend %test;
|
||||
right: -15px;
|
||||
height: 100%;
|
||||
width: 15px;
|
||||
bottom: -8px;
|
||||
transform: skewY(45deg);
|
||||
background-color: darken(#3498db, 30%);
|
||||
}
|
||||
|
||||
&:active {
|
||||
margin-left: 10px;
|
||||
margin-top: 10px;
|
||||
|
||||
&::before {
|
||||
bottom: -5px;
|
||||
height: 5px;
|
||||
left: 3px;
|
||||
}
|
||||
|
||||
&::after {
|
||||
right: -5px;
|
||||
width: 5px;
|
||||
bottom: -3px;
|
||||
}
|
||||
}
|
||||
}
|
@ -36,6 +36,10 @@
|
||||
}
|
||||
/*小于*/
|
||||
@media screen and (max-width: 480px) {
|
||||
.Poster-container{
|
||||
height: 35vw !important;
|
||||
margin-top: 63px !important;
|
||||
}
|
||||
.Poster-text{
|
||||
display: none !important;
|
||||
}
|
||||
|
@ -1,23 +1,22 @@
|
||||
<template>
|
||||
<div class="HeaderIcon" :style="[HeaderIcon]">
|
||||
<div class="HeaderIcon-container">
|
||||
<nuxt-link to="/" >
|
||||
<div class="HeaderIcon-box">
|
||||
<img class="pc_top_logo" id="top_logo" src="/img/icon/logo.png" alt="">
|
||||
</div>
|
||||
</nuxt-link>
|
||||
<div class="HeaderIcon" :style="[HeaderIcon]">
|
||||
<div class="HeaderIcon-container">
|
||||
<nuxt-link to="/">
|
||||
<div class="HeaderIcon-box">
|
||||
<img class="pc_top_logo" id="top_logo" src="/img/icon/logo.png" alt="">
|
||||
</div>
|
||||
</nuxt-link>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "HeaderIcon",
|
||||
props:{
|
||||
HeaderIcon:Object
|
||||
props: {
|
||||
HeaderIcon: Object
|
||||
},
|
||||
setup(prop){
|
||||
setup(prop) {
|
||||
return {
|
||||
...prop
|
||||
}
|
||||
|
@ -78,12 +78,12 @@ let navList = [
|
||||
href: '/todo-list',
|
||||
alias: 'todo-list'
|
||||
},
|
||||
{
|
||||
name: '留言',
|
||||
children: [],
|
||||
href: '/',
|
||||
alias: ''
|
||||
},
|
||||
// {
|
||||
// name: '留言',
|
||||
// children: [],
|
||||
// href: '/',
|
||||
// alias: ''
|
||||
// },
|
||||
// {
|
||||
// name: '关于我们',
|
||||
// children: [],
|
||||
|
139
components/RichText/index.vue
Normal file
139
components/RichText/index.vue
Normal file
@ -0,0 +1,139 @@
|
||||
<template>
|
||||
<div style="border: 1px solid #ccc;width: 100%;z-index: 999;">
|
||||
<Toolbar style="border-bottom: 1px solid #ccc" :editor="editorRef" :defaultConfig="toolbarConfig" :mode="mode" />
|
||||
<Editor style="height: 500px; overflow-y: hidden" v-model="valueHtml" :defaultConfig="editorConfig" :mode="mode"
|
||||
@onCreated="handleCreated" @onChange="handleChange" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import '@wangeditor/editor/dist/css/style.css' // 引入 css
|
||||
import { onBeforeUnmount, ref, shallowRef, watch } from 'vue'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: () => '请输入内容',
|
||||
},
|
||||
modelValue: String,
|
||||
editorConfig: {
|
||||
type: Object,
|
||||
default: {},
|
||||
}
|
||||
},
|
||||
setup(props, { emit }) {
|
||||
// const store = useLoginStore();
|
||||
// const headers = {
|
||||
// ...store.headers,
|
||||
// };
|
||||
|
||||
const editorRef = shallowRef()
|
||||
const valueHtml = ref(props.modelValue)
|
||||
const toolbarConfig = {}
|
||||
const editorConfig = {
|
||||
MENU_CONF: {},
|
||||
placeholder: props.placeholder,
|
||||
...props.editorConfig
|
||||
}
|
||||
//上传图片
|
||||
editorConfig.MENU_CONF['uploadImage'] = {
|
||||
server: "http://localhost:3003/api-v" + '/CommonApi.CommonApi/uploadImg',
|
||||
// form-data fieldName ,默认值 'wangeditor-uploaded-image'
|
||||
fieldName: 'file',
|
||||
// 单个文件的最大体积限制,默认为 2M
|
||||
maxFileSize: 5 * 1024 * 1024, // 5M
|
||||
// 最多可上传几个文件,默认为 100
|
||||
maxNumberOfFiles: 10,
|
||||
// 选择文件时的类型限制,默认为 ['image/*'] 。如不想限制,则设置为 []
|
||||
allowedFileTypes: ['image/*'],
|
||||
// 将 meta 拼接到 url 参数中,默认 false
|
||||
metaWithUrl: false,
|
||||
// 自定义增加 http header
|
||||
headers: {
|
||||
// token: headers.token // 设置请求头
|
||||
},
|
||||
data: {
|
||||
dirName: "RichText"
|
||||
},
|
||||
// 跨域是否传递 cookie ,默认为 false
|
||||
withCredentials: true,
|
||||
// 超时时间,默认为 10 秒
|
||||
timeout: 5 * 1000, // 5 秒
|
||||
// 自定义插入图片
|
||||
customInsert(res, insertFn) {
|
||||
; -(
|
||||
console.log(res,'asdasdasdsas'),
|
||||
// 从 res 中找到 url alt href ,然后插图图片
|
||||
insertFn(res.data.url)
|
||||
)
|
||||
},
|
||||
}
|
||||
//上传视频
|
||||
editorConfig.MENU_CONF['uploadVideo'] = {
|
||||
server: "http://localhost:3003/api-v" + '/CommonApi.CommonApi/uploadFile',
|
||||
// form-data fieldName ,默认值 'wangeditor-uploaded-video'
|
||||
fieldName: 'file',
|
||||
|
||||
// 单个文件的最大体积限制,默认为 10M
|
||||
maxFileSize: 100 * 1024 * 1024, // 5M
|
||||
|
||||
// 最多可上传几个文件,默认为 5
|
||||
maxNumberOfFiles: 3,
|
||||
|
||||
// 选择文件时的类型限制,默认为 ['video/*'] 。如不想限制,则设置为 []
|
||||
allowedFileTypes: ['video/*'],
|
||||
|
||||
// 将 meta 拼接到 url 参数中,默认 false
|
||||
metaWithUrl: false,
|
||||
|
||||
// 自定义增加 http header
|
||||
headers: {
|
||||
// token: headers.token // 设置请求头
|
||||
},
|
||||
|
||||
// 跨域是否传递 cookie ,默认为 false
|
||||
withCredentials: true,
|
||||
// 超时时间,默认为 30 秒
|
||||
timeout: 15 * 1000, // 15 秒
|
||||
// 自定义插入视频
|
||||
customInsert(res, insertFn) {
|
||||
; -(
|
||||
// 从 res 中找到 url alt href ,然后插图图片
|
||||
insertFn(res.data.url)
|
||||
)
|
||||
},
|
||||
}
|
||||
onBeforeUnmount(() => {
|
||||
const editor = editorRef.value
|
||||
if (editor == null) return
|
||||
editor.destroy()
|
||||
})
|
||||
const handleCreated = (editor) => {
|
||||
editorRef.value = editor
|
||||
}
|
||||
const handleChange = (editor) => {
|
||||
emit('update:modelValue', editor.getHtml())
|
||||
}
|
||||
watch(
|
||||
() => props.modelValue,
|
||||
(value) => {
|
||||
const editor = editorRef.value
|
||||
if (value == undefined) {
|
||||
editor.clear()
|
||||
return
|
||||
}
|
||||
valueHtml.value = value;
|
||||
},
|
||||
)
|
||||
return {
|
||||
editorRef,
|
||||
valueHtml,
|
||||
mode: 'default',
|
||||
toolbarConfig,
|
||||
editorConfig,
|
||||
handleCreated,
|
||||
handleChange,
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
262
components/UploadFile/FileUpload.vue
Normal file
262
components/UploadFile/FileUpload.vue
Normal file
@ -0,0 +1,262 @@
|
||||
<template>
|
||||
<div class="upload-file">
|
||||
<el-upload
|
||||
multiple
|
||||
:action="fileUpload"
|
||||
:before-upload="handleBeforeUpload"
|
||||
:file-list="fileList"
|
||||
:limit="limit"
|
||||
:on-error="handleUploadError"
|
||||
:on-exceed="handleExceed"
|
||||
:on-success="handleUploadSuccess"
|
||||
:show-file-list="false"
|
||||
:data="data"
|
||||
:drag="drag"
|
||||
:headers="headers"
|
||||
:auto-upload="autoUpload"
|
||||
class="upload-file-uploader"
|
||||
ref="upload"
|
||||
>
|
||||
<!-- 拖拽上传 -->
|
||||
<template v-if="drag">
|
||||
+
|
||||
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
||||
</template>
|
||||
<!-- 上传按钮 -->
|
||||
<el-button type="primary" v-if="!drag">选取文件</el-button>
|
||||
<!-- 上传提示 -->
|
||||
<template #tip>
|
||||
<div class="el-upload__tip" v-if="showTip">
|
||||
请上传
|
||||
<template v-if="fileSize">
|
||||
大小不超过 <b style="color: #f56c6c">{{ fileSize }}MB</b>
|
||||
</template>
|
||||
<template v-if="fileType">
|
||||
格式为 <b style="color: #f56c6c">{{ fileType.join('/') }}</b>
|
||||
</template>
|
||||
的文件
|
||||
</div>
|
||||
</template>
|
||||
</el-upload>
|
||||
<!-- 文件列表 -->
|
||||
<transition-group class="upload-file-list el-upload-list el-upload-list--text" name="el-fade-in-linear" tag="ul">
|
||||
<li :key="file.uid" class="el-upload-list__item ele-upload-list__item-content" v-for="(file, index) in fileList">
|
||||
<el-link :href="`${file.url}`" :underline="false" target="_blank">
|
||||
<svg-icon class-name="doc-icon" name="documentation" />
|
||||
{{ file.name }}
|
||||
</el-link>
|
||||
<div class="ele-upload-list__item-content-action" v-if="isDetail == false">
|
||||
<el-link :underline="false" @click="handleDelete(index)" type="danger" style="margin-left: 10px">删除</el-link>
|
||||
</div>
|
||||
</li>
|
||||
</transition-group>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref,reactive,watch,computed } from "vue";
|
||||
import { fileUpload } from "~/server/api/common/common";
|
||||
|
||||
const props = defineProps({
|
||||
modelValue: [String, Object, Array],
|
||||
// 数量限制
|
||||
limit: {
|
||||
type: Number,
|
||||
default: 5,
|
||||
},
|
||||
// 大小限制(MB)
|
||||
fileSize: {
|
||||
type: Number,
|
||||
default: 10,
|
||||
},
|
||||
// 文件类型, 例如['png', 'jpg', 'jpeg']
|
||||
fileType: {
|
||||
type: Array,
|
||||
default: () => ['doc', 'xls', 'ppt', 'txt', 'pdf'],
|
||||
},
|
||||
// 是否显示提示
|
||||
isShowTip: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
// 是否拖拽
|
||||
drag: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
// 自动上传
|
||||
autoUpload: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
// 是否为详情
|
||||
isDetail: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
// 上传携带的参数
|
||||
data: {
|
||||
type: Object,
|
||||
},
|
||||
})
|
||||
|
||||
// const store = useLoginStore();
|
||||
|
||||
const headers = {
|
||||
// Accept: "application/json",
|
||||
// ...store.headers,
|
||||
};
|
||||
|
||||
|
||||
const emit = defineEmits()
|
||||
const number = ref(0)
|
||||
const uploadList = ref([])
|
||||
// const baseUrl = import.meta.env.VITE_APP_BASE_API
|
||||
// const uploadFileUrl = ref(baseUrl + import.meta.env.VITE_APP_UPLOAD_URL) // 上传的图片服务器地址
|
||||
// const headers = ref({ Authorization: 'Bearer ' + getToken() })
|
||||
const fileList = ref([])
|
||||
const showTip = computed(() => props.isShowTip && (props.fileType || props.fileSize))
|
||||
|
||||
watch(
|
||||
() => props.modelValue,
|
||||
(val) => {
|
||||
if (val) {
|
||||
let temp = 1
|
||||
// 首先将值转为数组
|
||||
const list = Array.isArray(val) ? val : props.modelValue.split(',')
|
||||
console.log(list,'bbbbbbbbbbbbbbbbbbbb');
|
||||
// 然后将数组转为对象数组
|
||||
fileList.value = list.map((item) => {
|
||||
var fileName = item.slice(item.lastIndexOf('/') + 1)
|
||||
if (typeof item === 'string') {
|
||||
item = { name: fileName, url: item }
|
||||
}
|
||||
item.uid = item.uid || new Date().getTime() + temp++
|
||||
return item
|
||||
})
|
||||
// uploadList.value = fileList
|
||||
} else {
|
||||
fileList.value = []
|
||||
return []
|
||||
}
|
||||
},
|
||||
{ deep: true, immediate: true },
|
||||
)
|
||||
|
||||
// 上传前校检格式和大小
|
||||
function handleBeforeUpload(file) {
|
||||
// 校检文件类型
|
||||
if (props.fileType.length) {
|
||||
let fileExtension = ''
|
||||
if (file.name.lastIndexOf('.') > -1) {
|
||||
fileExtension = file.name.slice(file.name.lastIndexOf('.') + 1)
|
||||
}
|
||||
const isTypeOk = props.fileType.some((type) => {
|
||||
if (file.type.indexOf(type) > -1) return true
|
||||
if (fileExtension && fileExtension.indexOf(type) > -1) return true
|
||||
return false
|
||||
})
|
||||
if (!isTypeOk) {
|
||||
ElMessage.error(`文件格式不正确, 请上传${props.fileType.join('/')}格式文件!`)
|
||||
return false
|
||||
}
|
||||
}
|
||||
// 校检文件大小
|
||||
if (props.fileSize) {
|
||||
const isLt = file.size / 1024 / 1024 < props.fileSize
|
||||
if (!isLt) {
|
||||
ElMessage.error(`上传文件大小不能超过 ${props.fileSize} MB!`)
|
||||
return false
|
||||
}
|
||||
}
|
||||
number.value++
|
||||
return true
|
||||
}
|
||||
|
||||
// 文件个数超出
|
||||
function handleExceed() {
|
||||
ElMessage.error(`上传文件数量不能超过 ${props.limit} 个!`)
|
||||
}
|
||||
|
||||
// 上传失败
|
||||
function handleUploadError(err) {
|
||||
ElMessage.error('上传失败')
|
||||
}
|
||||
|
||||
// 上传成功回调
|
||||
function handleUploadSuccess(response, uploadFile) {
|
||||
if (response.code != 0) {
|
||||
fileList.value = []
|
||||
ElMessage.error(`上传失败,原因:${response.msg}!`)
|
||||
return
|
||||
}
|
||||
const { fileName, url, fileId } = response.data
|
||||
const tempFile = { name: fileName, url: url }
|
||||
uploadList.value.push(tempFile)
|
||||
if (uploadList.value.length === number.value) {
|
||||
fileList.value = fileList.value.filter((f) => f.url !== undefined).concat(uploadList.value)
|
||||
console.log(fileList.value,'asdasdasd');
|
||||
uploadList.value = []
|
||||
number.value = 0
|
||||
emit('update:modelValue', listToString(fileList.value))
|
||||
emit('success', listToString(fileList.value))
|
||||
}
|
||||
}
|
||||
|
||||
// 删除文件
|
||||
function handleDelete(index) {
|
||||
fileList.value.splice(index, 1)
|
||||
emit('update:modelValue', listToString(fileList.value))
|
||||
}
|
||||
|
||||
// 获取文件名称
|
||||
function getFileName(name) {
|
||||
if (name.lastIndexOf('/') > -1) {
|
||||
return name.slice(name.lastIndexOf('/') + 1).toLowerCase()
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
|
||||
// 对象转成指定字符串分隔
|
||||
function listToString(list, separator) {
|
||||
let strs = ''
|
||||
separator = separator || ','
|
||||
for (let i in list) {
|
||||
strs += list[i].url + separator
|
||||
}
|
||||
return strs != '' ? strs.substr(0, strs.length - 1) : ''
|
||||
}
|
||||
// 手动提交上传
|
||||
function submitUpload() {
|
||||
proxy.$refs.upload.submit()
|
||||
}
|
||||
defineExpose({
|
||||
submitUpload,
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.upload-file-uploader {
|
||||
margin-bottom: 5px;
|
||||
width: 100%;
|
||||
}
|
||||
.upload-file-list .el-upload-list__item {
|
||||
border: 1px solid #e4e7ed;
|
||||
line-height: 2;
|
||||
margin-bottom: 10px;
|
||||
position: relative;
|
||||
}
|
||||
.upload-file-list .ele-upload-list__item-content {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
color: inherit;
|
||||
}
|
||||
.ele-upload-list__item-content-action .el-link {
|
||||
padding-left: 10px;
|
||||
}
|
||||
.doc-icon {
|
||||
margin: 0 10px;
|
||||
}
|
||||
</style>
|
198
components/UploadImage/index.vue
Normal file
198
components/UploadImage/index.vue
Normal file
@ -0,0 +1,198 @@
|
||||
<template>
|
||||
<div class="component-upload-image">
|
||||
<el-upload multiple :action="imageUpload" list-type="picture-card" :on-success="handleUploadSuccess"
|
||||
:before-upload="handleBeforeUpload" :limit="limit" :on-error="handleUploadError" :on-exceed="handleExceed"
|
||||
name="file" :drag="true" :data="data" :disabled="isDisabled" :on-remove="handleRemove" :show-file-list="true"
|
||||
:headers="headers" :file-list="fileList" :on-preview="handlePictureCardPreview" :style="style"
|
||||
:class="{ hide: fileList.length >= limit || isDisabled }">
|
||||
<el-icon class="avatar-uploader-icon">
|
||||
+
|
||||
</el-icon>
|
||||
</el-upload>
|
||||
<!-- 上传提示 -->
|
||||
<div class="el-upload__tip" v-if="showTip">
|
||||
请上传
|
||||
<template v-if="fileSize">
|
||||
大小不超过 <b style="color: #f56c6c">{{ fileSize }}MB</b>
|
||||
</template>
|
||||
<template v-if="fileType">
|
||||
格式为 <b style="color: #f56c6c">{{ fileType.join('/') }}</b>
|
||||
</template>
|
||||
的文件
|
||||
</div>
|
||||
|
||||
<el-dialog v-model="dialogVisible" title="预览" width="800px" append-to-body>
|
||||
<img :src="dialogImageUrl" style="display: block; max-width: 100%; margin: 0 auto" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, watch, computed } from "vue";
|
||||
import { imageUpload } from "~/server/api/common/common";
|
||||
|
||||
const props = defineProps({
|
||||
modelValue: [String, Object, Array],
|
||||
// 图片数量限制
|
||||
limit: {
|
||||
type: Number,
|
||||
default: 5,
|
||||
},
|
||||
// 大小限制(MB)
|
||||
fileSize: {
|
||||
type: Number,
|
||||
default: 5,
|
||||
},
|
||||
// 文件类型, 例如['png', 'jpg', 'jpeg']
|
||||
fileType: {
|
||||
type: Array,
|
||||
default: () => ['png', 'jpg', 'jpeg'],
|
||||
},
|
||||
// 是否显示提示
|
||||
isShowTip: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
// 是否禁用
|
||||
isDisabled: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
// 上传携带的参数
|
||||
data: {
|
||||
type: Object,
|
||||
},
|
||||
})
|
||||
|
||||
// const store = useLoginStore();
|
||||
|
||||
const headers = {
|
||||
// Accept: "application/json",
|
||||
// ...store.headers,
|
||||
};
|
||||
|
||||
const emit = defineEmits()
|
||||
const number = ref(0)
|
||||
const uploadList = ref([])
|
||||
const dialogImageUrl = ref('')
|
||||
const dialogVisible = ref(false)
|
||||
const fileList = ref([])
|
||||
const showTip = computed(() => props.isShowTip && (props.fileType || props.fileSize))
|
||||
|
||||
watch(
|
||||
() => props.modelValue,
|
||||
(val) => {
|
||||
if (val) {
|
||||
// 首先将值转为数组
|
||||
const list = Array.isArray(val) ? val : props.modelValue.split(',')
|
||||
// 然后将数组转为对象数组
|
||||
fileList.value = list.map((item) => {
|
||||
if (typeof item === 'string') {
|
||||
// if (item.indexOf(baseUrl) === -1) {
|
||||
// item = { name: baseUrl + item, url: baseUrl + item }
|
||||
// } else {
|
||||
item = { name: item, url: item }
|
||||
// }
|
||||
}
|
||||
return item
|
||||
})
|
||||
} else {
|
||||
fileList.value = []
|
||||
return []
|
||||
}
|
||||
},
|
||||
{ deep: true, immediate: true },
|
||||
)
|
||||
|
||||
// 删除图片
|
||||
function handleRemove(file, files) {
|
||||
emit('update:modelValue', listToString(fileList.value))
|
||||
}
|
||||
|
||||
// 上传成功回调
|
||||
function handleUploadSuccess(res) {
|
||||
if (res.code != 0) {
|
||||
ElMessage.error(`上传失败,原因:${res.msg}!`);
|
||||
fileList.value = fileList.value.slice(0, fileList.value.length - 1)
|
||||
return
|
||||
}
|
||||
uploadList.value.push({ name: res.data.fileName, url: res.data.url })
|
||||
if (uploadList.value.length === number.value) {
|
||||
fileList.value = fileList.value.filter((f) => f.url !== undefined).concat(uploadList.value)
|
||||
uploadList.value = []
|
||||
number.value = 0
|
||||
emit('update:modelValue', listToString(fileList.value))
|
||||
}
|
||||
}
|
||||
|
||||
// 上传前loading加载
|
||||
function handleBeforeUpload(file) {
|
||||
let isImg = false
|
||||
if (props.fileType.length) {
|
||||
let fileExtension = ''
|
||||
if (file.name.lastIndexOf('.') > -1) {
|
||||
fileExtension = file.name.slice(file.name.lastIndexOf('.') + 1)
|
||||
}
|
||||
isImg = props.fileType.some((type) => {
|
||||
if (file.type.indexOf(type) > -1) return true
|
||||
if (fileExtension && fileExtension.indexOf(type) > -1) return true
|
||||
return false
|
||||
})
|
||||
} else {
|
||||
isImg = file.type.indexOf('image') > -1
|
||||
}
|
||||
if (!isImg) {
|
||||
ElMessage.error(`文件格式不正确, 请上传${props.fileType.join('/')}图片格式文件!`);
|
||||
return false
|
||||
}
|
||||
if (props.fileSize) {
|
||||
const isLt = file.size / 1024 / 1024 < props.fileSize
|
||||
if (!isLt) {
|
||||
ElMessage.error(`上传头像图片大小不能超过 ${props.fileSize} MB!`);
|
||||
return false
|
||||
}
|
||||
}
|
||||
number.value++
|
||||
}
|
||||
|
||||
// 文件个数超出
|
||||
function handleExceed() {
|
||||
ElMessage.error(`上传文件数量不能超过 ${props.limit} 个!`)
|
||||
}
|
||||
|
||||
// 上传失败
|
||||
function handleUploadError() {
|
||||
ElMessage.error('上传图片失败')
|
||||
}
|
||||
|
||||
// 预览
|
||||
function handlePictureCardPreview(file) {
|
||||
dialogImageUrl.value = file.url
|
||||
dialogVisible.value = true
|
||||
}
|
||||
|
||||
// 对象转成指定字符串分隔
|
||||
function listToString(list, separator) {
|
||||
let strs = ''
|
||||
separator = separator || ','
|
||||
for (let i in list) {
|
||||
if (undefined !== list[i].url && list[i].url.indexOf('blob:') !== 0) {
|
||||
strs += list[i].url + separator
|
||||
}
|
||||
}
|
||||
return strs != '' ? strs.substr(0, strs.length - 1) : ''
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
:deep(.hide .el-upload--picture-card) {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
:deep(.el-upload-dragger) {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
@ -25,6 +25,10 @@ export default defineNuxtConfig({
|
||||
},
|
||||
plugins: [
|
||||
// '~/middleware/auth.ts'
|
||||
{
|
||||
src: '~/plugins/wang-editor',
|
||||
mode: 'client',
|
||||
}
|
||||
],
|
||||
css: [
|
||||
"bootstrap/dist/css/bootstrap.min.css",
|
||||
|
551
package-lock.json
generated
551
package-lock.json
generated
@ -7,7 +7,10 @@
|
||||
"hasInstallScript": true,
|
||||
"dependencies": {
|
||||
"@amap/amap-jsapi-loader": "^1.0.1",
|
||||
"@wangeditor/editor": "^5.1.23",
|
||||
"@wangeditor/editor-for-vue": "^5.1.12",
|
||||
"animate.css": "^4.1.1",
|
||||
"axios": "^1.4.0",
|
||||
"bootstrap": "^5.3.0-alpha1",
|
||||
"element-plus": "^2.2.32",
|
||||
"hyw-load": "^1.0.1",
|
||||
@ -523,6 +526,17 @@
|
||||
"@babel/core": "^7.0.0-0"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/runtime": {
|
||||
"version": "7.22.11",
|
||||
"resolved": "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.22.11.tgz",
|
||||
"integrity": "sha512-ee7jVNlWN09+KftVOu9n7S8gQzD/Z6hN/I8VBRXW4P1+Xe7kJGXMwu8vds4aGIMHZnNbdpSWCfZZtinytpcAvA==",
|
||||
"dependencies": {
|
||||
"regenerator-runtime": "^0.14.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/standalone": {
|
||||
"version": "7.21.2",
|
||||
"resolved": "https://registry.npmmirror.com/@babel/standalone/-/standalone-7.21.2.tgz",
|
||||
@ -1628,6 +1642,11 @@
|
||||
"node": ">= 10"
|
||||
}
|
||||
},
|
||||
"node_modules/@transloadit/prettier-bytes": {
|
||||
"version": "0.0.7",
|
||||
"resolved": "https://registry.npmmirror.com/@transloadit/prettier-bytes/-/prettier-bytes-0.0.7.tgz",
|
||||
"integrity": "sha512-VeJbUb0wEKbcwaSlj5n+LscBl9IPgLPkHVGBkh00cztv6X4L/TJXK58LzFuBKX7/GAfiGhIwH67YTLTlzvIzBA=="
|
||||
},
|
||||
"node_modules/@trysound/sax": {
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmmirror.com/@trysound/sax/-/sax-0.2.0.tgz",
|
||||
@ -1662,6 +1681,11 @@
|
||||
"resolved": "https://registry.npmmirror.com/@types/estree/-/estree-1.0.0.tgz",
|
||||
"integrity": "sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ=="
|
||||
},
|
||||
"node_modules/@types/event-emitter": {
|
||||
"version": "0.3.3",
|
||||
"resolved": "https://registry.npmmirror.com/@types/event-emitter/-/event-emitter-0.3.3.tgz",
|
||||
"integrity": "sha512-UfnOK1pIxO7P+EgPRZXD9jMpimd8QEFcEZ5R67R1UhGbv4zghU5+NE7U8M8G9H5Jc8FI51rqDWQs6FtUfq2e/Q=="
|
||||
},
|
||||
"node_modules/@types/json-schema": {
|
||||
"version": "7.0.11",
|
||||
"resolved": "https://registry.npmmirror.com/@types/json-schema/-/json-schema-7.0.11.tgz",
|
||||
@ -1764,6 +1788,78 @@
|
||||
"vue": ">=2.7 || >=3"
|
||||
}
|
||||
},
|
||||
"node_modules/@uppy/companion-client": {
|
||||
"version": "2.2.2",
|
||||
"resolved": "https://registry.npmmirror.com/@uppy/companion-client/-/companion-client-2.2.2.tgz",
|
||||
"integrity": "sha512-5mTp2iq97/mYSisMaBtFRry6PTgZA6SIL7LePteOV5x0/DxKfrZW3DEiQERJmYpHzy7k8johpm2gHnEKto56Og==",
|
||||
"dependencies": {
|
||||
"@uppy/utils": "^4.1.2",
|
||||
"namespace-emitter": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@uppy/core": {
|
||||
"version": "2.3.4",
|
||||
"resolved": "https://registry.npmmirror.com/@uppy/core/-/core-2.3.4.tgz",
|
||||
"integrity": "sha512-iWAqppC8FD8mMVqewavCz+TNaet6HPXitmGXpGGREGrakZ4FeuWytVdrelydzTdXx6vVKkOmI2FLztGg73sENQ==",
|
||||
"dependencies": {
|
||||
"@transloadit/prettier-bytes": "0.0.7",
|
||||
"@uppy/store-default": "^2.1.1",
|
||||
"@uppy/utils": "^4.1.3",
|
||||
"lodash.throttle": "^4.1.1",
|
||||
"mime-match": "^1.0.2",
|
||||
"namespace-emitter": "^2.0.1",
|
||||
"nanoid": "^3.1.25",
|
||||
"preact": "^10.5.13"
|
||||
}
|
||||
},
|
||||
"node_modules/@uppy/core/node_modules/nanoid": {
|
||||
"version": "3.3.6",
|
||||
"resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.6.tgz",
|
||||
"integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==",
|
||||
"bin": {
|
||||
"nanoid": "bin/nanoid.cjs"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@uppy/store-default": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmmirror.com/@uppy/store-default/-/store-default-2.1.1.tgz",
|
||||
"integrity": "sha512-xnpTxvot2SeAwGwbvmJ899ASk5tYXhmZzD/aCFsXePh/v8rNvR2pKlcQUH7cF/y4baUGq3FHO/daKCok/mpKqQ=="
|
||||
},
|
||||
"node_modules/@uppy/utils": {
|
||||
"version": "4.1.3",
|
||||
"resolved": "https://registry.npmmirror.com/@uppy/utils/-/utils-4.1.3.tgz",
|
||||
"integrity": "sha512-nTuMvwWYobnJcytDO3t+D6IkVq/Qs4Xv3vyoEZ+Iaf8gegZP+rEyoaFT2CK5XLRMienPyqRqNbIfRuFaOWSIFw==",
|
||||
"dependencies": {
|
||||
"lodash.throttle": "^4.1.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@uppy/xhr-upload": {
|
||||
"version": "2.1.3",
|
||||
"resolved": "https://registry.npmmirror.com/@uppy/xhr-upload/-/xhr-upload-2.1.3.tgz",
|
||||
"integrity": "sha512-YWOQ6myBVPs+mhNjfdWsQyMRWUlrDLMoaG7nvf/G6Y3GKZf8AyjFDjvvJ49XWQ+DaZOftGkHmF1uh/DBeGivJQ==",
|
||||
"dependencies": {
|
||||
"@uppy/companion-client": "^2.2.2",
|
||||
"@uppy/utils": "^4.1.2",
|
||||
"nanoid": "^3.1.25"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@uppy/core": "^2.3.3"
|
||||
}
|
||||
},
|
||||
"node_modules/@uppy/xhr-upload/node_modules/nanoid": {
|
||||
"version": "3.3.6",
|
||||
"resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.6.tgz",
|
||||
"integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==",
|
||||
"bin": {
|
||||
"nanoid": "bin/nanoid.cjs"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@vercel/nft": {
|
||||
"version": "0.22.6",
|
||||
"resolved": "https://registry.npmmirror.com/@vercel/nft/-/nft-0.22.6.tgz",
|
||||
@ -2069,6 +2165,180 @@
|
||||
"vue-demi": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@wangeditor/editor": {
|
||||
"version": "5.1.23",
|
||||
"resolved": "https://registry.npmmirror.com/@wangeditor/editor/-/editor-5.1.23.tgz",
|
||||
"integrity": "sha512-0RxfeVTuK1tktUaPROnCoFfaHVJpRAIE2zdS0mpP+vq1axVQpLjM8+fCvKzqYIkH0Pg+C+44hJpe3VVroSkEuQ==",
|
||||
"dependencies": {
|
||||
"@uppy/core": "^2.1.1",
|
||||
"@uppy/xhr-upload": "^2.0.3",
|
||||
"@wangeditor/basic-modules": "^1.1.7",
|
||||
"@wangeditor/code-highlight": "^1.0.3",
|
||||
"@wangeditor/core": "^1.1.19",
|
||||
"@wangeditor/list-module": "^1.0.5",
|
||||
"@wangeditor/table-module": "^1.1.4",
|
||||
"@wangeditor/upload-image-module": "^1.0.2",
|
||||
"@wangeditor/video-module": "^1.1.4",
|
||||
"dom7": "^3.0.0",
|
||||
"is-hotkey": "^0.2.0",
|
||||
"lodash.camelcase": "^4.3.0",
|
||||
"lodash.clonedeep": "^4.5.0",
|
||||
"lodash.debounce": "^4.0.8",
|
||||
"lodash.foreach": "^4.5.0",
|
||||
"lodash.isequal": "^4.5.0",
|
||||
"lodash.throttle": "^4.1.1",
|
||||
"lodash.toarray": "^4.4.0",
|
||||
"nanoid": "^3.2.0",
|
||||
"slate": "^0.72.0",
|
||||
"snabbdom": "^3.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@wangeditor/editor-for-vue": {
|
||||
"version": "5.1.12",
|
||||
"resolved": "https://registry.npmmirror.com/@wangeditor/editor-for-vue/-/editor-for-vue-5.1.12.tgz",
|
||||
"integrity": "sha512-0Ds3D8I+xnpNWezAeO7HmPRgTfUxHLMd9JKcIw+QzvSmhC5xUHbpCcLU+KLmeBKTR/zffnS5GQo6qi3GhTMJWQ==",
|
||||
"peerDependencies": {
|
||||
"@wangeditor/editor": ">=5.1.0",
|
||||
"vue": "^3.0.5"
|
||||
}
|
||||
},
|
||||
"node_modules/@wangeditor/editor/node_modules/@wangeditor/basic-modules": {
|
||||
"version": "1.1.7",
|
||||
"resolved": "https://registry.npmmirror.com/@wangeditor/basic-modules/-/basic-modules-1.1.7.tgz",
|
||||
"integrity": "sha512-cY9CPkLJaqF05STqfpZKWG4LpxTMeGSIIF1fHvfm/mz+JXatCagjdkbxdikOuKYlxDdeqvOeBmsUBItufDLXZg==",
|
||||
"dependencies": {
|
||||
"is-url": "^1.2.4"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@wangeditor/core": "1.x",
|
||||
"dom7": "^3.0.0",
|
||||
"lodash.throttle": "^4.1.1",
|
||||
"nanoid": "^3.2.0",
|
||||
"slate": "^0.72.0",
|
||||
"snabbdom": "^3.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@wangeditor/editor/node_modules/@wangeditor/code-highlight": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmmirror.com/@wangeditor/code-highlight/-/code-highlight-1.0.3.tgz",
|
||||
"integrity": "sha512-iazHwO14XpCuIWJNTQTikqUhGKyqj+dUNWJ9288Oym9M2xMVHvnsOmDU2sgUDWVy+pOLojReMPgXCsvvNlOOhw==",
|
||||
"dependencies": {
|
||||
"prismjs": "^1.23.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@wangeditor/core": "1.x",
|
||||
"dom7": "^3.0.0",
|
||||
"slate": "^0.72.0",
|
||||
"snabbdom": "^3.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@wangeditor/editor/node_modules/@wangeditor/core": {
|
||||
"version": "1.1.19",
|
||||
"resolved": "https://registry.npmmirror.com/@wangeditor/core/-/core-1.1.19.tgz",
|
||||
"integrity": "sha512-KevkB47+7GhVszyYF2pKGKtCSj/YzmClsD03C3zTt+9SR2XWT5T0e3yQqg8baZpcMvkjs1D8Dv4fk8ok/UaS2Q==",
|
||||
"dependencies": {
|
||||
"@types/event-emitter": "^0.3.3",
|
||||
"event-emitter": "^0.3.5",
|
||||
"html-void-elements": "^2.0.0",
|
||||
"i18next": "^20.4.0",
|
||||
"scroll-into-view-if-needed": "^2.2.28",
|
||||
"slate-history": "^0.66.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@uppy/core": "^2.1.1",
|
||||
"@uppy/xhr-upload": "^2.0.3",
|
||||
"dom7": "^3.0.0",
|
||||
"is-hotkey": "^0.2.0",
|
||||
"lodash.camelcase": "^4.3.0",
|
||||
"lodash.clonedeep": "^4.5.0",
|
||||
"lodash.debounce": "^4.0.8",
|
||||
"lodash.foreach": "^4.5.0",
|
||||
"lodash.isequal": "^4.5.0",
|
||||
"lodash.throttle": "^4.1.1",
|
||||
"lodash.toarray": "^4.4.0",
|
||||
"nanoid": "^3.2.0",
|
||||
"slate": "^0.72.0",
|
||||
"snabbdom": "^3.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@wangeditor/editor/node_modules/@wangeditor/list-module": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmmirror.com/@wangeditor/list-module/-/list-module-1.0.5.tgz",
|
||||
"integrity": "sha512-uDuYTP6DVhcYf7mF1pTlmNn5jOb4QtcVhYwSSAkyg09zqxI1qBqsfUnveeDeDqIuptSJhkh81cyxi+MF8sEPOQ==",
|
||||
"peerDependencies": {
|
||||
"@wangeditor/core": "1.x",
|
||||
"dom7": "^3.0.0",
|
||||
"slate": "^0.72.0",
|
||||
"snabbdom": "^3.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@wangeditor/editor/node_modules/@wangeditor/table-module": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmmirror.com/@wangeditor/table-module/-/table-module-1.1.4.tgz",
|
||||
"integrity": "sha512-5saanU9xuEocxaemGdNi9t8MCDSucnykEC6jtuiT72kt+/Hhh4nERYx1J20OPsTCCdVr7hIyQenFD1iSRkIQ6w==",
|
||||
"peerDependencies": {
|
||||
"@wangeditor/core": "1.x",
|
||||
"dom7": "^3.0.0",
|
||||
"lodash.isequal": "^4.5.0",
|
||||
"lodash.throttle": "^4.1.1",
|
||||
"nanoid": "^3.2.0",
|
||||
"slate": "^0.72.0",
|
||||
"snabbdom": "^3.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@wangeditor/editor/node_modules/@wangeditor/upload-image-module": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmmirror.com/@wangeditor/upload-image-module/-/upload-image-module-1.0.2.tgz",
|
||||
"integrity": "sha512-z81lk/v71OwPDYeQDxj6cVr81aDP90aFuywb8nPD6eQeECtOymrqRODjpO6VGvCVxVck8nUxBHtbxKtjgcwyiA==",
|
||||
"peerDependencies": {
|
||||
"@uppy/core": "^2.0.3",
|
||||
"@uppy/xhr-upload": "^2.0.3",
|
||||
"@wangeditor/basic-modules": "1.x",
|
||||
"@wangeditor/core": "1.x",
|
||||
"dom7": "^3.0.0",
|
||||
"lodash.foreach": "^4.5.0",
|
||||
"slate": "^0.72.0",
|
||||
"snabbdom": "^3.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@wangeditor/editor/node_modules/@wangeditor/video-module": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmmirror.com/@wangeditor/video-module/-/video-module-1.1.4.tgz",
|
||||
"integrity": "sha512-ZdodDPqKQrgx3IwWu4ZiQmXI8EXZ3hm2/fM6E3t5dB8tCaIGWQZhmqd6P5knfkRAd3z2+YRSRbxOGfoRSp/rLg==",
|
||||
"peerDependencies": {
|
||||
"@uppy/core": "^2.1.4",
|
||||
"@uppy/xhr-upload": "^2.0.7",
|
||||
"@wangeditor/core": "1.x",
|
||||
"dom7": "^3.0.0",
|
||||
"nanoid": "^3.2.0",
|
||||
"slate": "^0.72.0",
|
||||
"snabbdom": "^3.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@wangeditor/editor/node_modules/dom7": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/dom7/-/dom7-3.0.0.tgz",
|
||||
"integrity": "sha512-oNlcUdHsC4zb7Msx7JN3K0Nro1dzJ48knvBOnDPKJ2GV9wl1i5vydJZUSyOfrkKFDZEud/jBsTk92S/VGSAe/g==",
|
||||
"dependencies": {
|
||||
"ssr-window": "^3.0.0-alpha.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@wangeditor/editor/node_modules/nanoid": {
|
||||
"version": "3.3.6",
|
||||
"resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.6.tgz",
|
||||
"integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==",
|
||||
"bin": {
|
||||
"nanoid": "bin/nanoid.cjs"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@wangeditor/editor/node_modules/ssr-window": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/ssr-window/-/ssr-window-3.0.0.tgz",
|
||||
"integrity": "sha512-q+8UfWDg9Itrg0yWK7oe5p/XRCJpJF9OBtXfOPgSJl+u3Xd5KI328RUEvUqSMVM9CiQUEf1QdBzJMkYGErj9QA=="
|
||||
},
|
||||
"node_modules/@webassemblyjs/ast": {
|
||||
"version": "1.11.6",
|
||||
"resolved": "https://registry.npmmirror.com/@webassemblyjs/ast/-/ast-1.11.6.tgz",
|
||||
@ -2528,6 +2798,11 @@
|
||||
"resolved": "https://registry.npmmirror.com/async-validator/-/async-validator-4.2.5.tgz",
|
||||
"integrity": "sha512-7HhHjtERjqlNbZtqNqy2rckN/SpOOlmDliet+lP7k+eKZEjPk3DgyeU9lIXLdeLz0uBbbVp+9Qdow9wJWgwwfg=="
|
||||
},
|
||||
"node_modules/asynckit": {
|
||||
"version": "0.4.0",
|
||||
"resolved": "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz",
|
||||
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
|
||||
},
|
||||
"node_modules/autoprefixer": {
|
||||
"version": "10.4.13",
|
||||
"resolved": "https://registry.npmmirror.com/autoprefixer/-/autoprefixer-10.4.13.tgz",
|
||||
@ -2551,6 +2826,16 @@
|
||||
"postcss": "^8.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/axios": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmmirror.com/axios/-/axios-1.4.0.tgz",
|
||||
"integrity": "sha512-S4XCWMEmzvo64T9GfvQDOXgYRDJ/wsSZc7Jvdgx5u1sd0JwsuPLqb3SYmusag+edF6ziyMensPVqLTSc1PiSEA==",
|
||||
"dependencies": {
|
||||
"follow-redirects": "^1.15.0",
|
||||
"form-data": "^4.0.0",
|
||||
"proxy-from-env": "^1.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/balanced-match": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmmirror.com/balanced-match/-/balanced-match-1.0.2.tgz",
|
||||
@ -3102,6 +3387,17 @@
|
||||
"integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/combined-stream": {
|
||||
"version": "1.0.8",
|
||||
"resolved": "https://registry.npmmirror.com/combined-stream/-/combined-stream-1.0.8.tgz",
|
||||
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
|
||||
"dependencies": {
|
||||
"delayed-stream": "~1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/commander": {
|
||||
"version": "7.2.0",
|
||||
"resolved": "https://registry.npmmirror.com/commander/-/commander-7.2.0.tgz",
|
||||
@ -3146,6 +3442,11 @@
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/compute-scroll-into-view": {
|
||||
"version": "1.0.20",
|
||||
"resolved": "https://registry.npmmirror.com/compute-scroll-into-view/-/compute-scroll-into-view-1.0.20.tgz",
|
||||
"integrity": "sha512-UCB0ioiyj8CRjtrvaceBLqqhZCVP+1B8+NWQhmdsm0VXOJtobBCf1dBQmebCCo34qZmUwZfIH2MZLqNHazrfjg=="
|
||||
},
|
||||
"node_modules/concat-map": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmmirror.com/concat-map/-/concat-map-0.0.1.tgz",
|
||||
@ -3394,6 +3695,15 @@
|
||||
"integrity": "sha512-d4ZVpCW31eWwCMe1YT3ur7mUDnTXbgwyzaL320DrcRT45rfjYxkt5QWLrmOJ+/UEAI2+fQgKe/fCjR8l4TpRgw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/d": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmmirror.com/d/-/d-1.0.1.tgz",
|
||||
"integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==",
|
||||
"dependencies": {
|
||||
"es5-ext": "^0.10.50",
|
||||
"type": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/data-uri-to-buffer": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmmirror.com/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz",
|
||||
@ -3489,6 +3799,14 @@
|
||||
"integrity": "sha512-+uO4+qr7msjNNWKYPHqN/3+Dx3NFkmIzayk2L1MyZQlvgZb/J1A0fo410dpKrN2SnqFjt8n4JL8fDJE0wIgjFQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/delayed-stream": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/delayed-stream/-/delayed-stream-1.0.0.tgz",
|
||||
"integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
|
||||
"engines": {
|
||||
"node": ">=0.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/delegates": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/delegates/-/delegates-1.0.0.tgz",
|
||||
@ -3793,6 +4111,39 @@
|
||||
"integrity": "sha512-9978wrXM50Y4rTMmW5kXIC09ZdXQZqkE4mxhwkd8VbzsGkXGPgV4zWuqQJgCEzYngdo2dYDa0l8xhX4fkSwJSg==",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/es5-ext": {
|
||||
"version": "0.10.62",
|
||||
"resolved": "https://registry.npmmirror.com/es5-ext/-/es5-ext-0.10.62.tgz",
|
||||
"integrity": "sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==",
|
||||
"hasInstallScript": true,
|
||||
"dependencies": {
|
||||
"es6-iterator": "^2.0.3",
|
||||
"es6-symbol": "^3.1.3",
|
||||
"next-tick": "^1.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10"
|
||||
}
|
||||
},
|
||||
"node_modules/es6-iterator": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmmirror.com/es6-iterator/-/es6-iterator-2.0.3.tgz",
|
||||
"integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==",
|
||||
"dependencies": {
|
||||
"d": "1",
|
||||
"es5-ext": "^0.10.35",
|
||||
"es6-symbol": "^3.1.1"
|
||||
}
|
||||
},
|
||||
"node_modules/es6-symbol": {
|
||||
"version": "3.1.3",
|
||||
"resolved": "https://registry.npmmirror.com/es6-symbol/-/es6-symbol-3.1.3.tgz",
|
||||
"integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==",
|
||||
"dependencies": {
|
||||
"d": "^1.0.1",
|
||||
"ext": "^1.1.2"
|
||||
}
|
||||
},
|
||||
"node_modules/esbuild": {
|
||||
"version": "0.17.10",
|
||||
"resolved": "https://registry.npmmirror.com/esbuild/-/esbuild-0.17.10.tgz",
|
||||
@ -4673,6 +5024,15 @@
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/event-emitter": {
|
||||
"version": "0.3.5",
|
||||
"resolved": "https://registry.npmmirror.com/event-emitter/-/event-emitter-0.3.5.tgz",
|
||||
"integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==",
|
||||
"dependencies": {
|
||||
"d": "1",
|
||||
"es5-ext": "~0.10.14"
|
||||
}
|
||||
},
|
||||
"node_modules/eventemitter3": {
|
||||
"version": "4.0.7",
|
||||
"resolved": "https://registry.npmmirror.com/eventemitter3/-/eventemitter3-4.0.7.tgz",
|
||||
@ -4708,6 +5068,19 @@
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/ext": {
|
||||
"version": "1.7.0",
|
||||
"resolved": "https://registry.npmmirror.com/ext/-/ext-1.7.0.tgz",
|
||||
"integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==",
|
||||
"dependencies": {
|
||||
"type": "^2.7.2"
|
||||
}
|
||||
},
|
||||
"node_modules/ext/node_modules/type": {
|
||||
"version": "2.7.2",
|
||||
"resolved": "https://registry.npmmirror.com/type/-/type-2.7.2.tgz",
|
||||
"integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw=="
|
||||
},
|
||||
"node_modules/external-editor": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmmirror.com/external-editor/-/external-editor-3.1.0.tgz",
|
||||
@ -4862,7 +5235,6 @@
|
||||
"version": "1.15.2",
|
||||
"resolved": "https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.15.2.tgz",
|
||||
"integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=4.0"
|
||||
},
|
||||
@ -4872,6 +5244,19 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/form-data": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/form-data/-/form-data-4.0.0.tgz",
|
||||
"integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
|
||||
"dependencies": {
|
||||
"asynckit": "^0.4.0",
|
||||
"combined-stream": "^1.0.8",
|
||||
"mime-types": "^2.1.12"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/formdata-polyfill": {
|
||||
"version": "4.0.10",
|
||||
"resolved": "https://registry.npmmirror.com/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz",
|
||||
@ -5542,6 +5927,11 @@
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/html-void-elements": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmmirror.com/html-void-elements/-/html-void-elements-2.0.1.tgz",
|
||||
"integrity": "sha512-0quDb7s97CfemeJAnW9wC0hw78MtW7NU3hqtCD75g2vFlDLt36llsYD7uB7SUzojLMP24N5IatXf7ylGXiGG9A=="
|
||||
},
|
||||
"node_modules/http-cache-semantics": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmmirror.com/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz",
|
||||
@ -5638,6 +6028,14 @@
|
||||
"resolved": "https://registry.npmmirror.com/hyw-load/-/hyw-load-1.0.2.tgz",
|
||||
"integrity": "sha512-mMdjoEVDXcnUQSxiwBggonFAzJGrASVQeScLSszRd1hJToy9tTBzLjJHJF/byqWLlWsy7yZshLZdkjAhSnzoZA=="
|
||||
},
|
||||
"node_modules/i18next": {
|
||||
"version": "20.6.1",
|
||||
"resolved": "https://registry.npmmirror.com/i18next/-/i18next-20.6.1.tgz",
|
||||
"integrity": "sha512-yCMYTMEJ9ihCwEQQ3phLo7I/Pwycf8uAx+sRHwwk5U9Aui/IZYgQRyMqXafQOw5QQ7DM1Z+WyEXWIqSuJHhG2A==",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.12.0"
|
||||
}
|
||||
},
|
||||
"node_modules/iconv-lite": {
|
||||
"version": "0.4.24",
|
||||
"resolved": "https://registry.npmmirror.com/iconv-lite/-/iconv-lite-0.4.24.tgz",
|
||||
@ -5665,6 +6063,11 @@
|
||||
"node": ">= 4"
|
||||
}
|
||||
},
|
||||
"node_modules/immer": {
|
||||
"version": "9.0.21",
|
||||
"resolved": "https://registry.npmmirror.com/immer/-/immer-9.0.21.tgz",
|
||||
"integrity": "sha512-bc4NBHqOqSfRW7POMkHd51LvClaeMXpm8dx0e8oE2GORbq5aRK7Bxl4FyzVLdGtLmvLKL7BTDBG5ACQm4HWjTA=="
|
||||
},
|
||||
"node_modules/immutable": {
|
||||
"version": "4.2.4",
|
||||
"resolved": "https://registry.npmmirror.com/immutable/-/immutable-4.2.4.tgz",
|
||||
@ -5868,6 +6271,11 @@
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/is-hotkey": {
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmmirror.com/is-hotkey/-/is-hotkey-0.2.0.tgz",
|
||||
"integrity": "sha512-UknnZK4RakDmTgz4PI1wIph5yxSs/mvChWs9ifnlXsKuXgWmOkY/hAE0H/k2MIqH0RlRye0i1oC07MCRSD28Mw=="
|
||||
},
|
||||
"node_modules/is-interactive": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/is-interactive/-/is-interactive-2.0.0.tgz",
|
||||
@ -5906,6 +6314,14 @@
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/is-plain-object": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/is-plain-object/-/is-plain-object-5.0.0.tgz",
|
||||
"integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/is-primitive": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmmirror.com/is-primitive/-/is-primitive-3.0.1.tgz",
|
||||
@ -5957,6 +6373,11 @@
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/is-url": {
|
||||
"version": "1.2.4",
|
||||
"resolved": "https://registry.npmmirror.com/is-url/-/is-url-1.2.4.tgz",
|
||||
"integrity": "sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww=="
|
||||
},
|
||||
"node_modules/is-wsl": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmmirror.com/is-wsl/-/is-wsl-2.2.0.tgz",
|
||||
@ -6256,11 +6677,20 @@
|
||||
"integrity": "sha512-xYHt68QRoYGjeeM/XOE1uJtvXQAgvszfBhjV4yvsQH0u2i9I6cI6c6/eG4Hh3UAOVn0y/xAXwmTzEay49Q//HA==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/lodash.camelcase": {
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmmirror.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz",
|
||||
"integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA=="
|
||||
},
|
||||
"node_modules/lodash.clonedeep": {
|
||||
"version": "4.5.0",
|
||||
"resolved": "https://registry.npmmirror.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz",
|
||||
"integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ=="
|
||||
},
|
||||
"node_modules/lodash.debounce": {
|
||||
"version": "4.0.8",
|
||||
"resolved": "https://registry.npmmirror.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz",
|
||||
"integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==",
|
||||
"dev": true
|
||||
"integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow=="
|
||||
},
|
||||
"node_modules/lodash.defaults": {
|
||||
"version": "4.2.0",
|
||||
@ -6280,12 +6710,22 @@
|
||||
"integrity": "sha512-C5N2Z3DgnnKr0LOpv/hKCgKdb7ZZwafIrsesve6lmzvZIRZRGaZ/l6Q8+2W7NaT+ZwO3fFlSCzCzrDCFdJfZ4g==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/lodash.foreach": {
|
||||
"version": "4.5.0",
|
||||
"resolved": "https://registry.npmmirror.com/lodash.foreach/-/lodash.foreach-4.5.0.tgz",
|
||||
"integrity": "sha512-aEXTF4d+m05rVOAUG3z4vZZ4xVexLKZGF0lIxuHZ1Hplpk/3B6Z1+/ICICYRLm7c41Z2xiejbkCkJoTlypoXhQ=="
|
||||
},
|
||||
"node_modules/lodash.isarguments": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmmirror.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz",
|
||||
"integrity": "sha512-chi4NHZlZqZD18a0imDHnZPrDeBbTtVN7GXMwuGdRH9qotxAjYs3aVLKc7zNOG9eddR5Ksd8rvFEBc9SsggPpg==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/lodash.isequal": {
|
||||
"version": "4.5.0",
|
||||
"resolved": "https://registry.npmmirror.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz",
|
||||
"integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ=="
|
||||
},
|
||||
"node_modules/lodash.isplainobject": {
|
||||
"version": "4.0.6",
|
||||
"resolved": "https://registry.npmmirror.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz",
|
||||
@ -6323,6 +6763,16 @@
|
||||
"lodash._reinterpolate": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/lodash.throttle": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmmirror.com/lodash.throttle/-/lodash.throttle-4.1.1.tgz",
|
||||
"integrity": "sha512-wIkUCfVKpVsWo3JSZlc+8MB5it+2AN5W8J7YVMST30UrvcQNZ1Okbj+rbVniijTWE6FGYy4XJq/rHkas8qJMLQ=="
|
||||
},
|
||||
"node_modules/lodash.toarray": {
|
||||
"version": "4.4.0",
|
||||
"resolved": "https://registry.npmmirror.com/lodash.toarray/-/lodash.toarray-4.4.0.tgz",
|
||||
"integrity": "sha512-QyffEA3i5dma5q2490+SgCvDN0pXLmRGSyAANuVi0HQ01Pkfr9fuoKQW8wm1wGBnJITs/mS7wQvS6VshUEBFCw=="
|
||||
},
|
||||
"node_modules/lodash.union": {
|
||||
"version": "4.6.0",
|
||||
"resolved": "https://registry.npmmirror.com/lodash.union/-/lodash.union-4.6.0.tgz",
|
||||
@ -6570,16 +7020,22 @@
|
||||
"version": "1.52.0",
|
||||
"resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz",
|
||||
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/mime-match": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmmirror.com/mime-match/-/mime-match-1.0.2.tgz",
|
||||
"integrity": "sha512-VXp/ugGDVh3eCLOBCiHZMYWQaTNUHv2IJrut+yXA6+JbLPXHglHwfS/5A5L0ll+jkCY7fIzRJcH6OIunF+c6Cg==",
|
||||
"dependencies": {
|
||||
"wildcard": "^1.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/mime-types": {
|
||||
"version": "2.1.35",
|
||||
"resolved": "https://registry.npmmirror.com/mime-types/-/mime-types-2.1.35.tgz",
|
||||
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"mime-db": "1.52.0"
|
||||
},
|
||||
@ -6844,6 +7300,11 @@
|
||||
"integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/namespace-emitter": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmmirror.com/namespace-emitter/-/namespace-emitter-2.0.1.tgz",
|
||||
"integrity": "sha512-N/sMKHniSDJBjfrkbS/tpkPj4RAbvW3mr8UAzvlMHyun93XEm83IAvhWtJVHo+RHn/oO8Job5YN4b+wRjSVp5g=="
|
||||
},
|
||||
"node_modules/nan": {
|
||||
"version": "2.17.0",
|
||||
"resolved": "https://registry.npmmirror.com/nan/-/nan-2.17.0.tgz",
|
||||
@ -6876,6 +7337,11 @@
|
||||
"resolved": "https://registry.npmmirror.com/neo-async/-/neo-async-2.6.2.tgz",
|
||||
"integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw=="
|
||||
},
|
||||
"node_modules/next-tick": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmmirror.com/next-tick/-/next-tick-1.1.0.tgz",
|
||||
"integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ=="
|
||||
},
|
||||
"node_modules/nitropack": {
|
||||
"version": "2.2.3",
|
||||
"resolved": "https://registry.npmmirror.com/nitropack/-/nitropack-2.2.3.tgz",
|
||||
@ -8491,6 +8957,11 @@
|
||||
"node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/preact": {
|
||||
"version": "10.17.1",
|
||||
"resolved": "https://registry.npmmirror.com/preact/-/preact-10.17.1.tgz",
|
||||
"integrity": "sha512-X9BODrvQ4Ekwv9GURm9AKAGaomqXmip7NQTZgY7gcNmr7XE83adOMJvd3N42id1tMFU7ojiynRsYnY6/BRFxLA=="
|
||||
},
|
||||
"node_modules/pretty-bytes": {
|
||||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmmirror.com/pretty-bytes/-/pretty-bytes-6.1.0.tgz",
|
||||
@ -8500,6 +8971,14 @@
|
||||
"node": "^14.13.1 || >=16.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/prismjs": {
|
||||
"version": "1.29.0",
|
||||
"resolved": "https://registry.npmmirror.com/prismjs/-/prismjs-1.29.0.tgz",
|
||||
"integrity": "sha512-Kx/1w86q/epKcmte75LNrEoT+lX8pBpavuAbvJWRXar7Hz8jrtF+e3vY751p0R8H9HdArwaCTNDDzHg/ScJK1Q==",
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/process": {
|
||||
"version": "0.11.10",
|
||||
"resolved": "https://registry.npmmirror.com/process/-/process-0.11.10.tgz",
|
||||
@ -8539,6 +9018,11 @@
|
||||
"integrity": "sha512-/XJ368cyBJ7fzLMwLKv1e4vLxOju2MNAIokcr7meSaNcVbWz/CPcW22cP04mwxOErdA5mwjA8Q6w/cdAQxVn7Q==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/proxy-from-env": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmmirror.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
|
||||
"integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg=="
|
||||
},
|
||||
"node_modules/prr": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmmirror.com/prr/-/prr-1.0.1.tgz",
|
||||
@ -8776,6 +9260,11 @@
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/regenerator-runtime": {
|
||||
"version": "0.14.0",
|
||||
"resolved": "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz",
|
||||
"integrity": "sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA=="
|
||||
},
|
||||
"node_modules/require-directory": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmmirror.com/require-directory/-/require-directory-2.1.1.tgz",
|
||||
@ -9195,6 +9684,14 @@
|
||||
"node": ">= 10.13.0"
|
||||
}
|
||||
},
|
||||
"node_modules/scroll-into-view-if-needed": {
|
||||
"version": "2.2.31",
|
||||
"resolved": "https://registry.npmmirror.com/scroll-into-view-if-needed/-/scroll-into-view-if-needed-2.2.31.tgz",
|
||||
"integrity": "sha512-dGCXy99wZQivjmjIqihaBQNjryrz5rueJY7eHfTdyWEiR4ttYpsajb14rn9s5d4DY4EcY6+4+U/maARBXJedkA==",
|
||||
"dependencies": {
|
||||
"compute-scroll-into-view": "^1.0.20"
|
||||
}
|
||||
},
|
||||
"node_modules/scss-tokenizer": {
|
||||
"version": "0.4.3",
|
||||
"resolved": "https://registry.npmmirror.com/scss-tokenizer/-/scss-tokenizer-0.4.3.tgz",
|
||||
@ -9382,6 +9879,27 @@
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/slate": {
|
||||
"version": "0.72.8",
|
||||
"resolved": "https://registry.npmmirror.com/slate/-/slate-0.72.8.tgz",
|
||||
"integrity": "sha512-/nJwTswQgnRurpK+bGJFH1oM7naD5qDmHd89JyiKNT2oOKD8marW0QSBtuFnwEbL5aGCS8AmrhXQgNOsn4osAw==",
|
||||
"dependencies": {
|
||||
"immer": "^9.0.6",
|
||||
"is-plain-object": "^5.0.0",
|
||||
"tiny-warning": "^1.0.3"
|
||||
}
|
||||
},
|
||||
"node_modules/slate-history": {
|
||||
"version": "0.66.0",
|
||||
"resolved": "https://registry.npmmirror.com/slate-history/-/slate-history-0.66.0.tgz",
|
||||
"integrity": "sha512-6MWpxGQZiMvSINlCbMW43E2YBSVMCMCIwQfBzGssjWw4kb0qfvj0pIdblWNRQZD0hR6WHP+dHHgGSeVdMWzfng==",
|
||||
"dependencies": {
|
||||
"is-plain-object": "^5.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"slate": ">=0.65.3"
|
||||
}
|
||||
},
|
||||
"node_modules/smart-buffer": {
|
||||
"version": "4.2.0",
|
||||
"resolved": "https://registry.npmmirror.com/smart-buffer/-/smart-buffer-4.2.0.tgz",
|
||||
@ -9398,6 +9916,14 @@
|
||||
"integrity": "sha512-V21+XeNni+tTyiST1MHsa84AQhT1aFZipzPpOFAVB8DkHzwJyjjAmt9bgwnuZiZWnIbMo2duE29wybxv/7HWUw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/snabbdom": {
|
||||
"version": "3.5.1",
|
||||
"resolved": "https://registry.npmmirror.com/snabbdom/-/snabbdom-3.5.1.tgz",
|
||||
"integrity": "sha512-wHMNIOjkm/YNE5EM3RCbr/+DVgPg6AqQAX1eOxO46zYNvCXjKP5Y865tqQj3EXnaMBjkxmQA5jFuDpDK/dbfiA==",
|
||||
"engines": {
|
||||
"node": ">=8.3.0"
|
||||
}
|
||||
},
|
||||
"node_modules/socks": {
|
||||
"version": "2.7.1",
|
||||
"resolved": "https://registry.npmmirror.com/socks/-/socks-2.7.1.tgz",
|
||||
@ -9915,6 +10441,11 @@
|
||||
"integrity": "sha512-AD5ih2NlSssTCwsMznbvwMZpJ1cbhkGd2uueNxzv2jDlEeZdU04JQfRnggJQ8DrcVBGjAsCKwFBbDlVNtEMlzw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/tiny-warning": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmmirror.com/tiny-warning/-/tiny-warning-1.0.3.tgz",
|
||||
"integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA=="
|
||||
},
|
||||
"node_modules/tmp": {
|
||||
"version": "0.0.33",
|
||||
"resolved": "https://registry.npmmirror.com/tmp/-/tmp-0.0.33.tgz",
|
||||
@ -9983,6 +10514,11 @@
|
||||
"integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/type": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmmirror.com/type/-/type-1.2.0.tgz",
|
||||
"integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg=="
|
||||
},
|
||||
"node_modules/type-fest": {
|
||||
"version": "3.6.0",
|
||||
"resolved": "https://registry.npmmirror.com/type-fest/-/type-fest-3.6.0.tgz",
|
||||
@ -11798,6 +12334,11 @@
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/wildcard": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmmirror.com/wildcard/-/wildcard-1.1.2.tgz",
|
||||
"integrity": "sha512-DXukZJxpHA8LuotRwL0pP1+rS6CS7FF2qStDDE1C7DDg2rLud2PXRMuEDYIPhgEezwnlHNL4c+N6MfMTjCGTng=="
|
||||
},
|
||||
"node_modules/wrap-ansi": {
|
||||
"version": "8.1.0",
|
||||
"resolved": "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz",
|
||||
|
@ -18,7 +18,10 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@amap/amap-jsapi-loader": "^1.0.1",
|
||||
"@wangeditor/editor": "^5.1.23",
|
||||
"@wangeditor/editor-for-vue": "^5.1.12",
|
||||
"animate.css": "^4.1.1",
|
||||
"axios": "^1.4.0",
|
||||
"bootstrap": "^5.3.0-alpha1",
|
||||
"element-plus": "^2.2.32",
|
||||
"hyw-load": "^1.0.1",
|
||||
|
@ -10,6 +10,13 @@
|
||||
<div class="background_box">
|
||||
|
||||
<main class="container ">
|
||||
|
||||
<div class="btn-box">
|
||||
<nuxt-link to="/love-story/add-love-story">
|
||||
<a class="press-button">添加故事</a>
|
||||
</nuxt-link>
|
||||
</div>
|
||||
|
||||
<!-- 爱情故事展示 -->
|
||||
<div class="card-pos-box">
|
||||
|
||||
@ -25,7 +32,7 @@
|
||||
<div class="pic-wrapper">
|
||||
<img :src=item.love_story_cover />
|
||||
</div>
|
||||
<h2 class="title">{{item.love_story_title}}</h2>
|
||||
<h2 class="title">{{ item.love_story_title }}</h2>
|
||||
<div class="show-info">
|
||||
<div class="show-info-item">
|
||||
<svg t="1690023375234" class="icon love-icon" viewBox="0 0 1024 1024" version="1.1"
|
||||
@ -40,7 +47,7 @@
|
||||
d="M308.032 641.984a15.872 15.872 0 0 1-10.112-3.648 757.12 757.12 0 0 1-53.504-48.896 875.968 875.968 0 0 0-25.856-24.64C141.376 495.488 145.344 423.616 145.536 420.544 143.808 318.976 237.376 264.64 241.344 262.4a16 16 0 0 1 15.808 27.84c-0.832 0.448-81.088 47.488-79.744 131.2-0.064 3.648-2.368 61.248 62.528 119.552 8.704 7.808 17.536 16.448 26.816 25.536 15.616 15.36 31.808 31.168 51.328 47.104a15.936 15.936 0 1 1-10.048 28.352zM422.656 751.36a15.872 15.872 0 0 1-11.2-4.544l-61.312-60.032a16 16 0 1 1 22.4-22.912l61.312 60.032a16 16 0 0 1-11.2 27.456z"
|
||||
fill="#FFFFFF" p-id="1645"></path>
|
||||
</svg>
|
||||
{{item.love_story_date}}
|
||||
{{ item.love_story_date }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -48,8 +55,8 @@
|
||||
<div class="hover-info">
|
||||
<div class="info-item">
|
||||
<!-- 地点 -->
|
||||
<span>{{item.love_story_place}}</span>
|
||||
<span class="info-item-title">{{item.love_story_date}}</span>
|
||||
<span>{{ item.love_story_place }}</span>
|
||||
<span class="info-item-title">{{ item.love_story_date }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<nuxt-link :to="getLink(item)" class="btn">
|
||||
|
305
pages/love-story/add-love-story/index.vue
Normal file
305
pages/love-story/add-love-story/index.vue
Normal file
@ -0,0 +1,305 @@
|
||||
<template>
|
||||
<div class="container">
|
||||
<div class="title">添加爱情故事</div>
|
||||
<el-form ref="formRef" :model="formData" :rules="rules">
|
||||
<el-row>
|
||||
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item :label-width="labelWidth" label="标题" prop="love_story_title">
|
||||
<el-input v-model='formData.love_story_title' type="text" placeholder='请输入标题'></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label-width="labelWidth" label="作者" prop="love_story_author">
|
||||
<el-input v-model='formData.love_story_author' type="text" placeholder='请输入作者'></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label-width="labelWidth" label="地点" prop="love_story_place">
|
||||
<el-input v-model='formData.love_story_place' type="text" placeholder='请输入地点'></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label-width="labelWidth" label="日期" prop="love_story_date">
|
||||
<el-date-picker v-model="formData.love_story_date" type="date" value-format="YYYY-MM-DD"
|
||||
placeholder="日期" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='12'>
|
||||
<el-form-item :label-width='labelWidth' label='封面' prop='love_story_cover'>
|
||||
<input ref="love_story_cover" type="file" accept=".jpg,.png,.jpeg">
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span='12'>
|
||||
<el-form-item :label-width='labelWidth' label='音乐' prop='love_story_music'>
|
||||
<input ref="love_story_music" type="file" accept=".mp3,.m4a,.flac">
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<client-only>
|
||||
<el-col :span="24">
|
||||
<el-form-item :label-width="labelWidth" label="内容" prop="love_story_content">
|
||||
<RichText v-model='formData.love_story_content' :min-height='196'></RichText>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</client-only>
|
||||
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<div class="btn-box">
|
||||
<button class="liuguang-btn" @click="router.back()">
|
||||
返回
|
||||
</button>
|
||||
<button class="liuguang-btn" @click="handleAddClick(formRef)">
|
||||
提交
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ElMessage } from 'element-plus'
|
||||
|
||||
// --业务参数
|
||||
const router = useRouter()
|
||||
const love_story_music = ref(null)
|
||||
const love_story_cover = ref(null)
|
||||
|
||||
|
||||
// --业务方法
|
||||
|
||||
|
||||
|
||||
// --基础参数
|
||||
const isBtnLod = ref(false);
|
||||
const formRef = ref();
|
||||
const labelWidth = 90;
|
||||
const formData = reactive({});
|
||||
|
||||
const uoloadData = ref({
|
||||
dirName: "LoveStory"
|
||||
})
|
||||
|
||||
const rules = reactive({
|
||||
love_story_title: [
|
||||
{
|
||||
required: true,
|
||||
message: '标题不能为空'
|
||||
}
|
||||
],
|
||||
love_story_place: [
|
||||
{
|
||||
required: true,
|
||||
message: '地点不能为空'
|
||||
}
|
||||
],
|
||||
love_story_date: [
|
||||
{
|
||||
required: true,
|
||||
message: '日期不能为空'
|
||||
}
|
||||
],
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
// --基础方法
|
||||
|
||||
// 打开弹窗时执行
|
||||
|
||||
const handleAddClick = async (formEl) => {
|
||||
if (!formEl) return;
|
||||
formEl.validate(async (valid) => {
|
||||
if (!valid) {
|
||||
return;
|
||||
}
|
||||
if (!love_story_cover.value.value) {
|
||||
ElMessage({
|
||||
message: "请上传封面",
|
||||
type: 'error',
|
||||
})
|
||||
}
|
||||
|
||||
useFetch('/api/loveStory/addLoveStory', {
|
||||
method: "post", body: {
|
||||
love_story_title: formData.love_story_title,
|
||||
love_story_author: formData.love_story_author,
|
||||
love_story_place: formData.love_story_place,
|
||||
love_story_date: formData.love_story_date,
|
||||
love_story_cover: love_story_cover.value.value,
|
||||
love_story_music: love_story_music.value.value,
|
||||
love_story_content: formData.love_story_content,
|
||||
}
|
||||
}).then(res => {
|
||||
let resvalue = res.data.value
|
||||
if (resvalue.code == 0) {
|
||||
ElMessage({
|
||||
message: "提交成功",
|
||||
type: 'success',
|
||||
})
|
||||
formData.value = {}
|
||||
setTimeout(() => {
|
||||
router.push("/love-story/1")
|
||||
}, 2000);
|
||||
} else {
|
||||
ElMessage({
|
||||
message: resvalue.msg,
|
||||
type: 'error',
|
||||
})
|
||||
};
|
||||
})
|
||||
});
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.title {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
font-size: 25px;
|
||||
font-weight: bold;
|
||||
margin: 50px 0;
|
||||
}
|
||||
|
||||
.btn-box {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin: 50px 0;
|
||||
}
|
||||
|
||||
.btn-box button:nth-child(1) {
|
||||
margin-right: 30px;
|
||||
}
|
||||
|
||||
.liuguang-btn {
|
||||
width: 200px;
|
||||
height: 70px;
|
||||
background: linear-gradient(to left top, pink 50%, rgb(247, 189, 201) 50%);
|
||||
border-style: none;
|
||||
color: #fff;
|
||||
font-size: 23px;
|
||||
letter-spacing: 3px;
|
||||
font-family: 'Lato';
|
||||
font-weight: 600;
|
||||
outline: none;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
padding: 0px;
|
||||
overflow: hidden;
|
||||
transition: all .5s;
|
||||
box-shadow: 0px 1px 2px rgba(0, 0, 0, .2);
|
||||
}
|
||||
|
||||
.liuguang-btn span {
|
||||
position: absolute;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.liuguang-btn span:nth-child(1) {
|
||||
height: 3px;
|
||||
width: 200px;
|
||||
top: 0px;
|
||||
left: -200px;
|
||||
background: linear-gradient(to right, rgba(0, 0, 0, 0), #f6e58d);
|
||||
border-top-right-radius: 1px;
|
||||
border-bottom-right-radius: 1px;
|
||||
animation: span1 2s linear infinite;
|
||||
animation-delay: 1s;
|
||||
}
|
||||
|
||||
@keyframes span1 {
|
||||
0% {
|
||||
left: -200px
|
||||
}
|
||||
|
||||
100% {
|
||||
left: 200px;
|
||||
}
|
||||
}
|
||||
|
||||
.liuguang-btn span:nth-child(2) {
|
||||
height: 70px;
|
||||
width: 3px;
|
||||
top: -70px;
|
||||
right: 0px;
|
||||
background: linear-gradient(to bottom, rgba(0, 0, 0, 0), #f6e58d);
|
||||
border-bottom-left-radius: 1px;
|
||||
border-bottom-right-radius: 1px;
|
||||
animation: span2 2s linear infinite;
|
||||
animation-delay: 2s;
|
||||
}
|
||||
|
||||
@keyframes span2 {
|
||||
0% {
|
||||
top: -70px;
|
||||
}
|
||||
|
||||
100% {
|
||||
top: 70px;
|
||||
}
|
||||
}
|
||||
|
||||
.liuguang-btn span:nth-child(3) {
|
||||
height: 3px;
|
||||
width: 200px;
|
||||
right: -200px;
|
||||
bottom: 0px;
|
||||
background: linear-gradient(to left, rgba(0, 0, 0, 0), #f6e58d);
|
||||
border-top-left-radius: 1px;
|
||||
border-bottom-left-radius: 1px;
|
||||
animation: span3 2s linear infinite;
|
||||
animation-delay: 3s;
|
||||
}
|
||||
|
||||
@keyframes span3 {
|
||||
0% {
|
||||
right: -200px;
|
||||
}
|
||||
|
||||
100% {
|
||||
right: 200px;
|
||||
}
|
||||
}
|
||||
|
||||
.liuguang-btn span:nth-child(4) {
|
||||
height: 70px;
|
||||
width: 3px;
|
||||
bottom: -70px;
|
||||
left: 0px;
|
||||
background: linear-gradient(to top, rgba(0, 0, 0, 0), #f6e58d);
|
||||
border-top-right-radius: 1px;
|
||||
border-top-left-radius: 1px;
|
||||
animation: span4 2s linear infinite;
|
||||
animation-delay: 4s;
|
||||
}
|
||||
|
||||
@keyframes span4 {
|
||||
0% {
|
||||
bottom: -70px;
|
||||
}
|
||||
|
||||
100% {
|
||||
bottom: 70px;
|
||||
}
|
||||
}
|
||||
|
||||
.liuguang-btn:hover {
|
||||
transition: all .5s;
|
||||
transform: rotate(-3deg) scale(1.1);
|
||||
box-shadow: 0px 3px 5px rgba(0, 0, 0, .4);
|
||||
}
|
||||
|
||||
.liuguang-btn:hover span {
|
||||
animation-play-state: paused;
|
||||
}
|
||||
</style>
|
||||
|
@ -83,8 +83,15 @@ useFetch('/api/loveStory/getLoveStoryInfo', { params: { love_story_id: route.par
|
||||
[...document.querySelectorAll('.joint-details-content-box img')].map(item => {
|
||||
item.style.maxWidth = 100 + '%'
|
||||
item.style.height = 0 + '%'
|
||||
}),
|
||||
|
||||
|
||||
[...document.querySelectorAll('.joint-details-content-box video')].map(item => {
|
||||
item.style.maxWidth = 100 + '%'
|
||||
item.style.height = 0 + '%'
|
||||
})
|
||||
|
||||
|
||||
htmlAddAnimations()
|
||||
});
|
||||
|
||||
|
@ -1,89 +0,0 @@
|
||||
|
||||
<template>
|
||||
<Head>
|
||||
<Title>{{ tdkNewType }}{{ tdk.tdk_title }}</Title>
|
||||
<Meta :content=tdk.tdk_keyword name="keywords" />
|
||||
<Meta :content=tdk.tdk_description name="description" />
|
||||
</Head>
|
||||
<Header></Header>
|
||||
<Poster :type=2></Poster>
|
||||
|
||||
|
||||
<div class="--box-- todo-list-pos-box">
|
||||
|
||||
<div class="todo-list-title-box">
|
||||
<h2>心愿清单</h2>
|
||||
<h4>听我许下与你有关的心愿</h4>
|
||||
</div>
|
||||
|
||||
<div class="todo-list-big-box">
|
||||
<div class="todo-list-box" v-for="(item) in wishListList" :key="item.wish_list_id">
|
||||
<div class="todo-list-check-box">
|
||||
<img v-if="item.wish_list_status === 1" alt="" class="todo-list-check-img"
|
||||
src="https://www.mitangguan.cn/img/mitangguan/imcomplete.png">
|
||||
<img v-else alt="" class="todo-list-check-img"
|
||||
src="https://www.mitangguan.cn/img/mitangguan/complete.png">
|
||||
</div>
|
||||
<div class="todo-list-text-box">
|
||||
<div class="todo-list-text">{{ item.wish_list_name }}</div>
|
||||
<div class="todo-list-time">{{ item.wish_list_create_time }}</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<Final></Final>
|
||||
</template>
|
||||
|
||||
|
||||
<script setup >
|
||||
|
||||
/** 业务参数 */
|
||||
const wishListList = ref([
|
||||
{
|
||||
"wish_list_id": 2,
|
||||
"wish_list_guid": "bd6483b4-8b7e-6b86-56da-abcd5da42c57",
|
||||
"wish_list_name": "一起去一次海边海岛!",
|
||||
"wish_list_author": "lwh",
|
||||
"wish_list_status": 1,
|
||||
"wish_list_create_time": "2023-08-24",
|
||||
"wish_list_sort": 2
|
||||
}
|
||||
])
|
||||
|
||||
|
||||
|
||||
/** 接口对接 */
|
||||
|
||||
// 获取Tdk
|
||||
let tdk = ref({})
|
||||
useFetch('/api/tdk/getTdk', { params: { tdk_type: 4 } }).then(res => {
|
||||
tdk.value = JSON.parse(res.data.value).data
|
||||
})
|
||||
|
||||
// 心愿单列表
|
||||
useFetch('/api/wishList/getWishListList').then(res => {
|
||||
wishListList.value = JSON.parse(res.data.value).data || []
|
||||
})
|
||||
|
||||
// // 添加流量访问
|
||||
// useFetch('/api/flow/addFlowRecord', { params: { flow_target: route.name } })
|
||||
|
||||
|
||||
// fontSizeReactive({
|
||||
// 880: 1,
|
||||
// 480: 3,
|
||||
// })
|
||||
onMounted(() => {
|
||||
htmlAddAnimations()
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped src="~/assets/css/business/todo_list/index.scss"></style>
|
||||
<style scoped src="~/assets/css/business/todo_list/media.scss"></style>
|
||||
|
251
pages/todo-list/add-wish/index.vue
Normal file
251
pages/todo-list/add-wish/index.vue
Normal file
@ -0,0 +1,251 @@
|
||||
<template>
|
||||
<div class="container">
|
||||
<div class="title">添加心愿</div>
|
||||
<el-form ref="formRef" :model="formData" :rules="rules">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label-width="labelWidth" label="心愿名称" prop="wish_list_name">
|
||||
<el-input v-model='formData.wish_list_name' type="text" placeholder='请输入心愿名称'></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label-width="labelWidth" label="作者" prop="wish_list_author">
|
||||
<el-input v-model='formData.wish_list_author' type="text" placeholder='请输入作者'></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<div class="btn-box">
|
||||
<button class="liuguang-btn" @click="router.back()">
|
||||
返回
|
||||
</button>
|
||||
<button class="liuguang-btn" @click="handleAddClick(formRef)">
|
||||
提交
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ElMessage } from 'element-plus'
|
||||
|
||||
// --业务参数
|
||||
const router = useRouter()
|
||||
|
||||
|
||||
|
||||
// --业务方法
|
||||
|
||||
|
||||
|
||||
// --基础参数
|
||||
const isBtnLod = ref(false);
|
||||
const formRef = ref();
|
||||
const labelWidth = 90;
|
||||
const formData = reactive({});
|
||||
|
||||
|
||||
|
||||
const rules = reactive({
|
||||
wish_list_name: [
|
||||
{
|
||||
required: true,
|
||||
message: '心愿名称不能为空'
|
||||
}
|
||||
],
|
||||
});
|
||||
|
||||
|
||||
// --基础方法
|
||||
|
||||
// 打开弹窗时执行
|
||||
|
||||
const handleAddClick = async (formEl) => {
|
||||
if (!formEl) return;
|
||||
formEl.validate(async (valid) => {
|
||||
if (!valid) {
|
||||
return;
|
||||
}
|
||||
|
||||
useFetch('/api/wishList/addWishList', {
|
||||
method: "post", body: {
|
||||
wish_list_name: formData.wish_list_name,
|
||||
wish_list_author: formData.wish_list_author,
|
||||
}
|
||||
}).then(res => {
|
||||
let resvalue = res.data.value
|
||||
if (resvalue.code == 0) {
|
||||
ElMessage({
|
||||
message: "提交成功",
|
||||
type: 'success',
|
||||
})
|
||||
formData.value = {}
|
||||
setTimeout(() => {
|
||||
router.push("/todo-list")
|
||||
}, 2000);
|
||||
} else {
|
||||
ElMessage({
|
||||
message: resvalue.msg,
|
||||
type: 'error',
|
||||
})
|
||||
};
|
||||
})
|
||||
// const { code } = await addWishList(formData);
|
||||
// if (code == 0) {
|
||||
// closeDialog();
|
||||
// props.done();
|
||||
// }
|
||||
});
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.title {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
font-size: 25px;
|
||||
font-weight: bold;
|
||||
margin: 50px 0;
|
||||
}
|
||||
|
||||
.btn-box {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin: 50px 0;
|
||||
}
|
||||
|
||||
.btn-box button:nth-child(1) {
|
||||
margin-right: 30px;
|
||||
}
|
||||
|
||||
.liuguang-btn {
|
||||
width: 200px;
|
||||
height: 70px;
|
||||
background: linear-gradient(to left top, pink 50%, rgb(247, 189, 201) 50%);
|
||||
border-style: none;
|
||||
color: #fff;
|
||||
font-size: 23px;
|
||||
letter-spacing: 3px;
|
||||
font-family: 'Lato';
|
||||
font-weight: 600;
|
||||
outline: none;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
padding: 0px;
|
||||
overflow: hidden;
|
||||
transition: all .5s;
|
||||
box-shadow: 0px 1px 2px rgba(0, 0, 0, .2);
|
||||
}
|
||||
|
||||
.liuguang-btn span {
|
||||
position: absolute;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.liuguang-btn span:nth-child(1) {
|
||||
height: 3px;
|
||||
width: 200px;
|
||||
top: 0px;
|
||||
left: -200px;
|
||||
background: linear-gradient(to right, rgba(0, 0, 0, 0), #f6e58d);
|
||||
border-top-right-radius: 1px;
|
||||
border-bottom-right-radius: 1px;
|
||||
animation: span1 2s linear infinite;
|
||||
animation-delay: 1s;
|
||||
}
|
||||
|
||||
@keyframes span1 {
|
||||
0% {
|
||||
left: -200px
|
||||
}
|
||||
|
||||
100% {
|
||||
left: 200px;
|
||||
}
|
||||
}
|
||||
|
||||
.liuguang-btn span:nth-child(2) {
|
||||
height: 70px;
|
||||
width: 3px;
|
||||
top: -70px;
|
||||
right: 0px;
|
||||
background: linear-gradient(to bottom, rgba(0, 0, 0, 0), #f6e58d);
|
||||
border-bottom-left-radius: 1px;
|
||||
border-bottom-right-radius: 1px;
|
||||
animation: span2 2s linear infinite;
|
||||
animation-delay: 2s;
|
||||
}
|
||||
|
||||
@keyframes span2 {
|
||||
0% {
|
||||
top: -70px;
|
||||
}
|
||||
|
||||
100% {
|
||||
top: 70px;
|
||||
}
|
||||
}
|
||||
|
||||
.liuguang-btn span:nth-child(3) {
|
||||
height: 3px;
|
||||
width: 200px;
|
||||
right: -200px;
|
||||
bottom: 0px;
|
||||
background: linear-gradient(to left, rgba(0, 0, 0, 0), #f6e58d);
|
||||
border-top-left-radius: 1px;
|
||||
border-bottom-left-radius: 1px;
|
||||
animation: span3 2s linear infinite;
|
||||
animation-delay: 3s;
|
||||
}
|
||||
|
||||
@keyframes span3 {
|
||||
0% {
|
||||
right: -200px;
|
||||
}
|
||||
|
||||
100% {
|
||||
right: 200px;
|
||||
}
|
||||
}
|
||||
|
||||
.liuguang-btn span:nth-child(4) {
|
||||
height: 70px;
|
||||
width: 3px;
|
||||
bottom: -70px;
|
||||
left: 0px;
|
||||
background: linear-gradient(to top, rgba(0, 0, 0, 0), #f6e58d);
|
||||
border-top-right-radius: 1px;
|
||||
border-top-left-radius: 1px;
|
||||
animation: span4 2s linear infinite;
|
||||
animation-delay: 4s;
|
||||
}
|
||||
|
||||
@keyframes span4 {
|
||||
0% {
|
||||
bottom: -70px;
|
||||
}
|
||||
|
||||
100% {
|
||||
bottom: 70px;
|
||||
}
|
||||
}
|
||||
|
||||
.liuguang-btn:hover {
|
||||
transition: all .5s;
|
||||
transform: rotate(-3deg) scale(1.1);
|
||||
box-shadow: 0px 3px 5px rgba(0, 0, 0, .4);
|
||||
}
|
||||
|
||||
.liuguang-btn:hover span {
|
||||
animation-play-state: paused;
|
||||
}
|
||||
</style>
|
||||
|
101
pages/todo-list/index.vue
Normal file
101
pages/todo-list/index.vue
Normal file
@ -0,0 +1,101 @@
|
||||
|
||||
<template>
|
||||
<Head>
|
||||
<Title>{{ tdk.tdk_title }}</Title>
|
||||
<Meta :content=tdk.tdk_keyword name="keywords" />
|
||||
<Meta :content=tdk.tdk_description name="description" />
|
||||
</Head>
|
||||
<Header></Header>
|
||||
<Poster :type=2></Poster>
|
||||
|
||||
<div class="--box-- ">
|
||||
<div class="btn-box">
|
||||
<nuxt-link to="/todo-list/add-wish">
|
||||
<a class="press-button">添加心愿</a>
|
||||
</nuxt-link>
|
||||
</div>
|
||||
<div class="todo-list-pos-box">
|
||||
|
||||
<div class="todo-list-title-box">
|
||||
<h2>心愿清单</h2>
|
||||
<h4>听我许下与你有关的心愿</h4>
|
||||
</div>
|
||||
|
||||
<div class="todo-list-big-box">
|
||||
<div class="todo-list-box" v-for="(item) in wishListList" :key="item.wish_list_id">
|
||||
<div class="todo-list-check-box">
|
||||
<img v-if="item.wish_list_status === 1" alt="" class="todo-list-check-img"
|
||||
src="https://www.mitangguan.cn/img/mitangguan/imcomplete.png">
|
||||
<img v-else alt="" class="todo-list-check-img"
|
||||
src="https://www.mitangguan.cn/img/mitangguan/complete.png">
|
||||
</div>
|
||||
<div class="todo-list-text-box">
|
||||
<div class="todo-list-text">{{ item.wish_list_name }}</div>
|
||||
<div class="todo-list-time">{{ item.wish_list_create_time }}</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<Final></Final>
|
||||
</template>
|
||||
|
||||
|
||||
<script setup >
|
||||
|
||||
/** 业务参数 */
|
||||
const wishListList = ref([
|
||||
// {
|
||||
// "wish_list_id": 2,
|
||||
// "wish_list_guid": "bd6483b4-8b7e-6b86-56da-abcd5da42c57",
|
||||
// "wish_list_name": "一起去一次海边海岛!",
|
||||
// "wish_list_author": "lwh",
|
||||
// "wish_list_status": 1,
|
||||
// "wish_list_create_time": "2023-08-24",
|
||||
// "wish_list_sort": 2
|
||||
// }
|
||||
])
|
||||
const router = useRouter()
|
||||
|
||||
const addWishListDialogVisible = ref(false);
|
||||
function reload() {
|
||||
router.push("/todo-list");
|
||||
}
|
||||
|
||||
/** 接口对接 */
|
||||
|
||||
// 获取Tdk
|
||||
let tdk = ref({})
|
||||
useFetch('/api/tdk/getTdk', { params: { tdk_type: 4 } }).then(res => {
|
||||
tdk.value = JSON.parse(res.data.value).data
|
||||
})
|
||||
|
||||
// 心愿单列表
|
||||
useFetch('/api/wishList/getWishListList').then(res => {
|
||||
wishListList.value = JSON.parse(res.data.value).data || []
|
||||
})
|
||||
|
||||
// // 添加流量访问
|
||||
// useFetch('/api/flow/addFlowRecord', { params: { flow_target: route.name } })
|
||||
|
||||
|
||||
// fontSizeReactive({
|
||||
// 880: 1,
|
||||
// 480: 3,
|
||||
// })
|
||||
onMounted(() => {
|
||||
htmlAddAnimations()
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped src="~/assets/css/business/todo_list/index.scss"></style>
|
||||
<style scoped src="~/assets/css/business/todo_list/media.scss"></style>
|
||||
|
8
plugins/wang-editor.ts
Normal file
8
plugins/wang-editor.ts
Normal file
@ -0,0 +1,8 @@
|
||||
import { Editor, Toolbar } from '@wangeditor/editor-for-vue'
|
||||
import { defineNuxtPlugin } from '#app'
|
||||
|
||||
export default defineNuxtPlugin((nuxt) => {
|
||||
nuxt.vueApp.component('Editor', Editor)
|
||||
nuxt.vueApp.component('Toolbar', Toolbar)
|
||||
})
|
||||
|
44
server/api/axios/request.ts
Normal file
44
server/api/axios/request.ts
Normal file
@ -0,0 +1,44 @@
|
||||
// @ts-ignore
|
||||
import axios from 'axios'
|
||||
// 创建axios实例
|
||||
const requester = axios.create({
|
||||
//设置基础路径
|
||||
baseURL: 'https://localhost:3000/api-v',
|
||||
// 请求超时时间
|
||||
timeout: 15000
|
||||
})
|
||||
|
||||
// http request 拦截器
|
||||
requester.interceptors.request.use(
|
||||
config => {
|
||||
// 发送请求前的处理
|
||||
// 这里可以处理 token
|
||||
return config
|
||||
},
|
||||
err => {
|
||||
// 请求错误的处理
|
||||
return Promise.reject(err)
|
||||
}
|
||||
)
|
||||
|
||||
// http response 拦截器
|
||||
requester.interceptors.response.use(
|
||||
//处理响应数据
|
||||
response => {
|
||||
// //判断请求是否正常
|
||||
// if (response.data.code !== 200) {
|
||||
// //出现错误,错误处理,提示错误信息
|
||||
// return Promise.reject(response.data)
|
||||
// } else {
|
||||
// //成功返回数据
|
||||
// return response.data
|
||||
// }
|
||||
return response.data
|
||||
},
|
||||
// 抛出错误
|
||||
error => {
|
||||
return Promise.reject(error.response)
|
||||
}
|
||||
)
|
||||
|
||||
export default requester
|
15
server/api/common/common.js
Normal file
15
server/api/common/common.js
Normal file
@ -0,0 +1,15 @@
|
||||
|
||||
/**
|
||||
* 上传图片
|
||||
*/
|
||||
export const imageUpload = '/common/uploadImg';
|
||||
|
||||
/**
|
||||
* 上传文件
|
||||
*/
|
||||
export const fileUpload = '/common/uploadFile';
|
||||
|
||||
/**
|
||||
* 上传视频
|
||||
*/
|
||||
export const videoUpload = '/common/uploadVideo';
|
21
server/api/loveStory/addLoveStory.js
Normal file
21
server/api/loveStory/addLoveStory.js
Normal file
@ -0,0 +1,21 @@
|
||||
import {
|
||||
readRawBody,
|
||||
getQuery,
|
||||
getMethod
|
||||
} from 'h3'
|
||||
// 添加爱情故事
|
||||
export default defineEventHandler(async (event) => {
|
||||
// 基础url
|
||||
const baseURL = process.env.NUXT_PROXY_WEB_API
|
||||
const method = getMethod(event).toUpperCase()
|
||||
let body
|
||||
if (method !== 'GET') body = await readRawBody(event)
|
||||
const res = await $fetch(baseURL + "/LoveStory.LoveStory/addLoveStory", {
|
||||
method,
|
||||
baseURL: event.context.baseUrl,
|
||||
headers: event.context.headers,
|
||||
params: getQuery(event),
|
||||
body
|
||||
})
|
||||
return res
|
||||
})
|
21
server/api/wishList/addWishList.js
Normal file
21
server/api/wishList/addWishList.js
Normal file
@ -0,0 +1,21 @@
|
||||
import {
|
||||
readRawBody,
|
||||
getQuery,
|
||||
getMethod
|
||||
} from 'h3'
|
||||
// 添加愿望单
|
||||
export default defineEventHandler(async (event) => {
|
||||
// 基础url
|
||||
const baseURL = process.env.NUXT_PROXY_WEB_API
|
||||
const method = getMethod(event).toUpperCase()
|
||||
let body
|
||||
if (method !== 'GET') body = await readRawBody(event)
|
||||
const res = await $fetch(baseURL + "/WishList.WishList/addWishList", {
|
||||
method,
|
||||
baseURL: event.context.baseUrl,
|
||||
headers: event.context.headers,
|
||||
params: getQuery(event),
|
||||
body
|
||||
})
|
||||
return res
|
||||
})
|
@ -14,3 +14,5 @@
|
||||
@use "element-plus/theme-chalk/src/input.scss" as *;
|
||||
@use "element-plus/theme-chalk/src/button.scss" as *;
|
||||
@use "element-plus/theme-chalk/src/pagination.scss" as *;
|
||||
@use "element-plus/theme-chalk/src/date-picker.scss" as *;
|
||||
@use "element-plus/theme-chalk/src/upload.scss" as *;
|
||||
|
Loading…
Reference in New Issue
Block a user