🎨 优化富文本编辑器&新增图片水印
This commit is contained in:
@@ -56,6 +56,7 @@
|
||||
[富文本内容]
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="left" label="被查询次数" prop="search_count" width="120" />
|
||||
<el-table-column align="left" label="操作" fixed="right" :min-width="appStore.operateMinWith">
|
||||
<template #default="scope">
|
||||
<el-button type="primary" link class="table-button" @click="getDetails(scope.row)"><el-icon style="margin-right: 5px"><InfoFilled /></el-icon>查看</el-button>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<el-input v-model="formData.keyword" :clearable="true" placeholder="请输入关键词" />
|
||||
</el-form-item>
|
||||
<el-form-item label="内容:" prop="content">
|
||||
<RichEdit v-model="formData.content"/>
|
||||
<RichEdit v-model="formData.content" :useWatermark="true" :key="'rich-edit-' + useWatermark" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button :loading="btnLoading" type="primary" @click="save">保存</el-button>
|
||||
@@ -43,6 +43,7 @@ const router = useRouter()
|
||||
const btnLoading = ref(false)
|
||||
|
||||
const type = ref('')
|
||||
const useWatermark = ref(true) // 明确设置为 true
|
||||
const formData = ref({
|
||||
keyword: '',
|
||||
content: '',
|
||||
|
@@ -3,7 +3,6 @@ import GvaCard from './card.vue'
|
||||
import GvaChart from './charts.vue'
|
||||
import GvaTable from './table.vue'
|
||||
import GvaNotice from './notice.vue'
|
||||
import GvaQuickLink from './quickLinks.vue'
|
||||
import GvaWiki from './wiki.vue'
|
||||
import GvaPluginTable from './pluginTable.vue'
|
||||
|
||||
@@ -13,7 +12,6 @@ export {
|
||||
GvaChart,
|
||||
GvaTable,
|
||||
GvaNotice,
|
||||
GvaQuickLink,
|
||||
GvaWiki,
|
||||
GvaPluginTable
|
||||
}
|
||||
|
@@ -1,111 +0,0 @@
|
||||
<!--
|
||||
@auther: bypanghu<bypanghu@163.com>
|
||||
@date: 2024/5/8
|
||||
!-->
|
||||
<template>
|
||||
<div class="mt-8 w-full">
|
||||
<div class="grid grid-cols-2 md:grid-cols-3 3xl:grid-cols-4">
|
||||
<div
|
||||
v-for="(item, index) in shortcuts"
|
||||
:key="index"
|
||||
class="flex flex-col items-center mb-3 group cursor-pointer"
|
||||
@click="toPath(item)"
|
||||
>
|
||||
<div
|
||||
class="w-8 h-8 rounded bg-gray-200 dark:bg-slate-500 flex items-center justify-center group-hover:bg-blue-400 group-hover:text-white"
|
||||
>
|
||||
<el-icon><component :is="item.icon" /></el-icon>
|
||||
</div>
|
||||
<div class="text-xs mt-2 text-gray-700 dark:text-gray-300">
|
||||
{{ item.title }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid grid-cols-2 md:grid-cols-3 3xl:grid-cols-4 mt-8">
|
||||
<div
|
||||
v-for="(item, index) in recentVisits"
|
||||
:key="index"
|
||||
class="flex flex-col items-center mb-3 group cursor-pointer"
|
||||
@click="openLink(item)"
|
||||
>
|
||||
<div
|
||||
class="w-8 h-8 rounded bg-gray-200 dark:bg-slate-500 flex items-center justify-center group-hover:bg-blue-400 group-hover:text-white"
|
||||
>
|
||||
<el-icon><component :is="item.icon" /></el-icon>
|
||||
</div>
|
||||
<div class="text-xs mt-2 text-gray-700 dark:text-gray-300">
|
||||
{{ item.title }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import {
|
||||
Menu,
|
||||
Link,
|
||||
User,
|
||||
Service,
|
||||
Document,
|
||||
Reading,
|
||||
Files,
|
||||
Memo
|
||||
} from '@element-plus/icons-vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
const router = useRouter()
|
||||
|
||||
const toPath = (item) => {
|
||||
router.push({ name: item.path })
|
||||
}
|
||||
|
||||
const openLink = (item) => {
|
||||
window.open(item.path, '_blank')
|
||||
}
|
||||
const shortcuts = [
|
||||
{
|
||||
icon: Menu,
|
||||
title: '菜单管理',
|
||||
path: 'menu'
|
||||
},
|
||||
{
|
||||
icon: Link,
|
||||
title: 'API管理',
|
||||
path: 'api'
|
||||
},
|
||||
{
|
||||
icon: Service,
|
||||
title: '角色管理',
|
||||
path: 'authority'
|
||||
},
|
||||
{
|
||||
icon: User,
|
||||
title: '用户管理',
|
||||
path: 'user'
|
||||
},
|
||||
{
|
||||
icon: Files,
|
||||
title: '自动化包',
|
||||
path: 'autoPkg'
|
||||
},
|
||||
{
|
||||
icon: Memo,
|
||||
title: '自动代码',
|
||||
path: 'autoCode'
|
||||
}
|
||||
]
|
||||
|
||||
const recentVisits = [
|
||||
{
|
||||
icon: Reading,
|
||||
title: '授权购买',
|
||||
path: 'https://gin-vue-admin.com/empower/index.html'
|
||||
},
|
||||
{
|
||||
icon: Document,
|
||||
title: '插件市场',
|
||||
path: 'https://plugin.gin-vue-admin.com/#/layout/home'
|
||||
}
|
||||
]
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
@@ -11,50 +11,8 @@
|
||||
<gva-card custom-class="col-span-1 lg:col-span-2 ">
|
||||
<gva-chart :type="3" title="解决数量" />
|
||||
</gva-card>
|
||||
<gva-card
|
||||
title="快捷功能"
|
||||
show-action
|
||||
custom-class="col-start-1 md:col-start-3 lg:col-start-7 row-span-2 "
|
||||
>
|
||||
<gva-quick-link />
|
||||
</gva-card>
|
||||
<gva-card
|
||||
title="内容数据"
|
||||
custom-class="col-span-1 md:col-span-2 md:row-start-2 lg:col-span-6 col-start-1 row-span-2"
|
||||
>
|
||||
<gva-chart :type="4" />
|
||||
</gva-card>
|
||||
<gva-card
|
||||
title="文档"
|
||||
show-action
|
||||
custom-class="md:row-start-8 md:col-start-3 lg:row-start-3 lg:col-start-7"
|
||||
>
|
||||
<gva-wiki />
|
||||
</gva-card>
|
||||
|
||||
<gva-card
|
||||
title="最新更新"
|
||||
custom-class="col-span-1 md:col-span-3 row-span-2"
|
||||
>
|
||||
<gva-table />
|
||||
</gva-card>
|
||||
<gva-card
|
||||
title="最新插件"
|
||||
custom-class="col-span-1 md:col-span-3 row-span-2"
|
||||
>
|
||||
<gva-plugin-table />
|
||||
</gva-card>
|
||||
|
||||
<gva-card title="公告" show-action custom-class="col-span-1 lg:col-start-7">
|
||||
<gva-notice />
|
||||
</gva-card>
|
||||
|
||||
<gva-card
|
||||
without-padding
|
||||
custom-class="overflow-hidden lg:h-40 col-span-1 md:col-start-2 md:col-span-1 lg:col-start-7"
|
||||
>
|
||||
<gva-banner />
|
||||
</gva-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -65,7 +23,6 @@
|
||||
GvaChart,
|
||||
GvaWiki,
|
||||
GvaNotice,
|
||||
GvaQuickLink,
|
||||
GvaCard,
|
||||
GvaBanner
|
||||
} from './components'
|
||||
|
Reference in New Issue
Block a user