提交 e56580e5 authored 作者: pengxiaohui's avatar pengxiaohui

内容管理模块

上级 87241788
<template>
<div>
<div :class="{ logo: true, 'logo-collapse': isCollapse }">
<img
<div class="logo">
<!-- <img
v-if="!isCollapse"
src="http://zws-imgs-pub.oss-cn-beijing.aliyuncs.com/static/ezijing/logo/ezijing-logo.png"
/>
<img
v-if="isCollapse"
src="http://zws-imgs-pub.oss-cn-beijing.aliyuncs.com/static/ezijing/logo/favicon.svg"
/>
/> -->
<img src="http://zws-imgs-pub.oss-cn-beijing.aliyuncs.com/static/ezijing/logo/favicon.svg" />
<span>内容维护系统</span>
</div>
<el-scrollbar wrap-class="scrollbar-wrapper sidebar-container-wrap">
<el-menu
:default-active="defaultActive"
class="sidebar-menu"
background-color="#EFF0F0"
text-color="#484848"
background-color="#333"
text-color="#fff"
active-text-color="#409EFF"
:collapse="isCollapse"
@select="handlleSelect"
......@@ -112,7 +110,7 @@ export default {
.logo {
height: 48px;
width: 166px;
background: #fff;
background: #333;
padding-top: 4px;
transition: width 0.295s ease-in-out;
padding-left:6px;
......@@ -120,14 +118,24 @@ export default {
.logo-collapse {
width: 48px;
}
.logo span{
display:inline-block;
font-size:16px;
line-height:48px;
color:#fff;
vertical-align: middle;
}
.logo img {
width: 140px;
width: 48px;
height: 46px;
}
.logo-collapse img {
width: 46px;
height: 46px;
}
::v-deep.el-submenu.is-active .el-submenu__title {
border-bottom-color: #409EFF;
}
</style>
<style>
.sidebar-container-wrap {
......
<template>
<div :class="{fullscreen:fullscreen}" class="tinymce-container" :style="{width:containerWidth}">
<textarea :id="tinymceId" class="tinymce-textarea" />
</div>
</template>
<script>
import plugins from './plugins'
import toolbar from './toolbar'
export default {
name: 'Tinymce',
props: {
id: {
type: String,
default: function() {
return 'vue-tinymce-' + +new Date() + ((Math.random() * 1000).toFixed(0) + '')
}
},
value: {
type: String,
default: ''
},
toolbar: {
type: Array,
required: false,
default() {
return []
}
},
menubar: {
type: String,
default: 'file edit insert view format table'
},
height: {
type: [Number, String],
required: false,
default: 360
},
width: {
type: [Number, String],
required: false,
default: 'auto'
},
readonly: {
type: Boolean,
default: false
}
},
data() {
return {
hasChange: false,
hasInit: false,
tinymceId: this.id,
fullscreen: false
}
},
computed: {
containerWidth() {
const width = this.width
if (/^[\d]+(\.[\d]+)?$/.test(width)) { // matches `100`, `'100'`
return `${width}px`
}
return width
}
},
watch: {
value(val) {
if (!this.hasChange && this.hasInit) {
this.$nextTick(() =>
window.tinymce.get(this.tinymceId).setContent(val || ''))
}
},
readonly(val) {
if (val) {
window.tinymce.editors[this.tinymceId].setMode('readonly')
} else {
window.tinymce.editors[this.tinymceId].setMode('design');
}
}
},
mounted() {
this.init()
},
activated() {
if (window.tinymce) {
this.initTinymce()
}
},
deactivated() {
this.destroyTinymce()
},
destroyed() {
this.destroyTinymce()
},
methods: {
init() {
this.initTinymce()
},
initTinymce() {
const _this = this
window.tinymce.init({
selector: `#${this.tinymceId}`,
language: 'zh_CN',
readonly: this.readonly,
fontsize_formats: '12px 14px 16px 18px 24px 36px 48px 56px 72px',
font_formats: '微软雅黑=Microsoft YaHei,Helvetica Neue,PingFang SC,sans-serif;苹果苹方=PingFang SC,Microsoft YaHei,sans-serif;宋体=simsun,serif;仿宋体=FangSong,serif;黑体=SimHei,sans-serif;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;',
height: this.height,
body_class: 'panel-body ',
object_resizing: false,
toolbar: this.toolbar.length > 0 ? this.toolbar : toolbar,
menubar: this.menubar,
plugins: plugins,
end_container_on_empty_block: true,
powerpaste_word_import: 'clean',
code_dialog_height: 450,
code_dialog_width: 1000,
advlist_bullet_styles: 'default,circle,disc,square',
advlist_number_styles: 'default,lower-alpha,lower-roman,upper-alpha,upper-roman',
imagetools_cors_hosts: ['www.tinymce.com', 'codepen.io'],
default_link_target: '_blank',
link_title: false,
nonbreaking_force_tab: true, // inserting nonbreaking space &nbsp; need Nonbreaking Space Plugin
init_instance_callback: editor => {
if (_this.value) {
editor.setContent(_this.value)
}
_this.hasInit = true
editor.on('NodeChange Change KeyUp SetContent', () => {
this.hasChange = true
this.$emit('input', editor.getContent())
})
},
setup(editor) {
editor.on('FullscreenStateChanged', (e) => {
_this.fullscreen = e.state
});
editor.on('blur', (e) => {
_this.$emit('blur', e)
})
},
// it will try to keep these URLs intact
// https://www.tiny.cloud/docs-3x/reference/configuration/Configuration3x@convert_urls/
// https://stackoverflow.com/questions/5196205/disable-tinymce-absolute-to-relative-url-conversions
convert_urls: false
// 整合七牛上传
// images_dataimg_filter(img) {
// setTimeout(() => {
// const $image = $(img);
// $image.removeAttr('width');
// $image.removeAttr('height');
// if ($image[0].height && $image[0].width) {
// $image.attr('data-wscntype', 'image');
// $image.attr('data-wscnh', $image[0].height);
// $image.attr('data-wscnw', $image[0].width);
// $image.addClass('wscnph');
// }
// }, 0);
// return img
// },
// images_upload_handler(blobInfo, success, failure, progress) {
// progress(0);
// const token = _this.$store.getters.token;
// getToken(token).then(response => {
// const url = response.data.qiniu_url;
// const formData = new FormData();
// formData.append('token', response.data.qiniu_token);
// formData.append('key', response.data.qiniu_key);
// formData.append('file', blobInfo.blob(), url);
// upload(formData).then(() => {
// success(url);
// progress(100);
// })
// }).catch(err => {
// failure('出现未知问题,刷新页面,或者联系程序员')
// console.log(err);
// });
// },
})
},
destroyTinymce() {
const tinymce = window.tinymce.get(this.tinymceId)
if (this.fullscreen) {
tinymce.execCommand('mceFullScreen')
}
if (tinymce) {
tinymce.destroy()
}
},
setContent(value) {
window.tinymce.get(this.tinymceId).setContent(value)
},
getContent() {
window.tinymce.get(this.tinymceId).getContent()
},
imageSuccessCBK(arr) {
arr.forEach(v => window.tinymce.get(this.tinymceId).insertContent(`<img class="wscnph" src="${v.url}" >`))
}
}
}
</script>
<style scoped>
.tinymce-container {
position: relative;
line-height: normal;
}
.tinymce-container ::v-deep .mce-fullscreen {
z-index: 10000;
}
.tinymce-textarea {
visibility: hidden;
z-index: -1;
}
.editor-custom-btn-container {
position: absolute;
right: 4px;
top: 4px;
/*z-index: 2005;*/
}
.fullscreen ::v-deep .editor-custom-btn-container {
z-index: 10000;
position: fixed;
}
.editor-upload-btn {
display: inline-block;
}
.tinymce-container ::v-deep .tox-statusbar{
display:none;
}
</style>
// Any plugins you want to use has to be imported
// Detail plugins list see https://www.tinymce.com/docs/plugins/
// Custom builds see https://www.tinymce.com/download/custom-builds/
const plugins = ['advlist anchor autolink autosave code codesample directionality emoticons fullscreen hr image imagetools insertdatetime link lists media nonbreaking noneditable pagebreak paste preview print save searchreplace spellchecker tabfocus table template textpattern visualblocks visualchars wordcount']
export default plugins
// Here is a list of the toolbar
// Detail list see https://www.tinymce.com/docs/advanced/editor-control-identifiers/#toolbarcontrols
const toolbar = ['fontsizeselect fontselect lineheight bold italic underline strikethrough forecolor backcolor alignleft aligncenter alignright outdent indent blockquote removeformat subscript superscript', 'hr bullist numlist link image charmap preview anchor pagebreak insertdatetime media table emoticons fullscreen code codesample searchreplace']
export default toolbar
......@@ -13,6 +13,7 @@
id="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, shrink-to-fit=no, viewport-fit=cover"
/>
<script src="/static/tinymce/tinymce.min.js"></script>
</head>
<body>
<div id="app"></div>
......
......@@ -2,7 +2,7 @@
<div class="ads">
<table-list v-bind="tableOptions" ref="tableList">
<template #header-aside>
<el-button type="primary" size="mini">新建广告</el-button>
<el-button type="primary" size="mini" @click="handleCreate">新建广告</el-button>
</template>
<el-tabs v-model="activeName" type="card" @tab-click="handleTabClick">
<el-tab-pane label="全部" name="0"></el-tab-pane>
......@@ -12,6 +12,7 @@
</el-tabs>
<!-- 图片 -->
<template v-slot:image="scope"><img :src="scope.row.image_url" height="40" /></template>
<template v-slot:adId="scope"><span class="details-handle" @click="handleDetails(scope.row)">{{scope.row.ad_id}}</span></template>
<!-- 审核状态 -->
<template v-slot:review-status="{ row }">
<el-switch v-model="row.review_status"></el-switch>
......@@ -25,15 +26,36 @@
<el-switch v-model="row.top_status"></el-switch>
</template>
</table-list>
<el-drawer :visible.sync="drawerVisible" size="1100px" :destroy-on-close="true">
<template slot="title">
<h5>
{{drawTitle}}
<el-button v-if="drawFormOptions.type !== 'create'" type="primary" @click="drawFormOptions.type = 'edit'" size="mini" style="float:right;margin-right:30px;">编辑</el-button>
</h5>
</template>
<drawer-form :options="drawFormOptions" @drawFormSubmit="HandleDrawFormSubmit" @drawFormClose="drawerVisible = false">
<template #form-item-review>
<el-form-item>
<el-button type="primary" @click="dialogVisible = true" size="small">审核</el-button>
</el-form-item>
</template>
</drawer-form>
<el-dialog title="审核广告" :visible.sync="dialogVisible" width="460px" append-to-body :destroy-on-close="true">
<review-form @dialogClose="dialogVisible = false" @reviewSubmit="handleReviewSubmit"/>
</el-dialog>
</el-drawer>
</div>
</template>
<script>
import TableList from '@/components/TableList'
import DrawerForm from '../components/DrawerForm.vue'
import ReviewForm from '../components/ReviewForm.vue'
export default {
components: { TableList },
components: { TableList, DrawerForm, ReviewForm },
data() {
return {
activeName: '0',
drawerVisible: false,
projectList: [
{ project_id: '111', project_name: '官网' },
{ project_id: '222', project_name: 'kellet' }
......@@ -42,10 +64,22 @@ export default {
{ id: '111', name: 'banner广告' },
{ id: '222', name: '侧边栏广告' },
{ id: '333', name: '正文区广告' }
]
],
drawFormOptions: {
type: '',
page: 'ads',
details: {}
},
drawItem: '',
dialogVisible: false
}
},
computed: {
drawTitle() {
if (this.drawFormOptions.type === 'create') return '新建广告'
else if (this.drawFormOptions.type === 'edit') return '编辑广告'
else return this.drawItem.title || '广告详情'
},
tableOptions() {
return {
remote: {
......@@ -73,7 +107,7 @@ export default {
],
columns: [
{ prop: 'image_url', label: '图片', slots: 'image' },
{ prop: 'ad_id', label: '广告ID' },
{ prop: 'ad_id', label: '广告ID', slots: 'adId' },
{ prop: 'title', label: '标题' },
{ prop: 'start_time', label: '开始时间' },
{ prop: 'end_time', label: '结束时间' },
......@@ -111,6 +145,40 @@ export default {
params.status = this.activeName
return params
},
handleCreate() {
this.drawFormOptions.type = 'create'
this.drawerVisible = true
},
handleDetails(val) {
this.drawItem = val
this.drawFormOptions.type = 'details'
this.drawFormOptions.details = {
project_id: '111',
type_id: '111',
title: '3232',
uri: 'https://www.baidu.com',
summary: '内容摘要',
remarks: '注意事项',
web_img_uri: 'https://zj-images.oss-cn-beijing.aliyuncs.com/00d78a3a999f4b10000f2cd422232221.JPG',
mobile_terminal_img_uri: 'https://zj-images.oss-cn-beijing.aliyuncs.com/00d78a3a999f4b10000f2cd422232221.JPG',
enclosure_uri: 'https://zj-images.oss-cn-beijing.aliyuncs.com/00d78a3a999f4b10000f2cd422232221.JPG',
video_uri: 'https://zj-images.oss-cn-beijing.aliyuncs.com/00d78a3a999f4b10000f2cd422232221.JPG',
start_time: '2021-01-01 08:33:22',
hasEndDate: 1,
end_time: '2021-01-05 08:33:22',
is_publish: 1,
is_top: 1,
weight: 10,
review_status: 1
}
this.drawerVisible = true
},
HandleDrawFormSubmit(val) {
console.log(val)
},
handleReviewSubmit(val) {
console.log(val)
},
handleTabClick() {
// true 强制刷新
this.$refs.tableList.refresh(true)
......@@ -126,7 +194,10 @@ export default {
background: #fff;
border-radius: 5px;
}
.btn-bar {
padding: 10px;
.details-handle{
cursor:pointer;
}
.details-handle:hover{
color:#409EFF;
}
</style>
<template>
<div>文章</div>
<div class="article">
<table-list v-bind="tableOptions" ref="tableList">
<template #header-aside>
<el-button type="primary" size="mini" @click="handleCreate">新建文章</el-button>
</template>
<el-tabs v-model="activeName" type="card" @tab-click="handleTabClick">
<el-tab-pane label="全部" name="0"></el-tab-pane>
<el-tab-pane label="待审核" name="1"></el-tab-pane>
<el-tab-pane label="已驳回" name="2"></el-tab-pane>
<el-tab-pane label="已通过" name="3"></el-tab-pane>
</el-tabs>
<!-- 图片 -->
<template v-slot:image="scope"><img :src="scope.row.image_url" height="40" /></template>
<template v-slot:adId="scope"><span class="details-handle" @click="handleDetails(scope.row)">{{scope.row.ad_id}}</span></template>
<!-- 审核状态 -->
<template v-slot:review-status="{ row }">
<el-switch v-model="row.review_status"></el-switch>
</template>
<!-- 发布状态 -->
<template v-slot:publish-status="{ row }">
<el-switch v-model="row.publish_status"></el-switch>
</template>
<!-- 置顶状态 -->
<template v-slot:top-status="{ row }">
<el-switch v-model="row.top_status"></el-switch>
</template>
</table-list>
<el-drawer :visible.sync="drawerVisible" size="1100px" :destroy-on-close="true">
<template slot="title">
<h5>
{{drawTitle}}
<el-button v-if="drawFormOptions.type !== 'create'" type="primary" @click="drawFormOptions.type = 'edit'" size="mini" style="float:right;margin-right:30px;">编辑</el-button>
</h5>
</template>
<drawer-form :options="drawFormOptions">
<template #form-item-review>
<el-form-item>
<el-button type="primary" @click="dialogVisible = true" size="small">审核</el-button>
</el-form-item>
</template>
</drawer-form>
<el-dialog title="审核文章" :visible.sync="dialogVisible" width="460px" append-to-body :destroy-on-close="true">
<review-form @dialogClose="dialogVisible = false" @reviewSubmit="handleReviewSubmit"/>
</el-dialog>
</el-drawer>
</div>
</template>
<script>
import DrawerForm from '../components/DrawerForm.vue'
import TableList from '@/components/TableList'
export default {
data() {
return {}
return {
activeName: '0',
drawerVisible: false,
projectList: [
{ project_id: '111', project_name: '官网' },
{ project_id: '222', project_name: 'kellet' }
],
typeList: [
{ id: '111', name: 'banner广告' },
{ id: '222', name: '侧边栏广告' },
{ id: '333', name: '正文区广告' }
],
drawFormOptions: {
type: '',
page: 'article'
},
drawItem: '',
dialogVisible: false
}
},
computed: {
drawTitle() {
if (this.drawFormOptions.type === 'create') return '新建文章'
else if (this.drawFormOptions.type === 'edit') return '编辑文章'
else return this.drawItem.title || '文章详情'
},
tableOptions() {
return {
remote: {
params: { id: '', type: '', project: '' },
beforeRequest: this.beforeRequest
},
filters: [
{
type: 'select',
placeholder: '项目',
prop: 'project',
options: this.projectList,
labelKey: 'project_name',
valueKey: 'project_id'
},
{ type: 'input', placeholder: 'ID', prop: 'id' },
{
type: 'select',
placeholder: '类型',
prop: 'type',
options: this.typeList,
labelKey: 'name',
valueKey: 'id'
}
],
columns: [
{ prop: 'image_url', label: '图片', slots: 'image' },
{ prop: 'ad_id', label: '广告ID', slots: 'adId' },
{ prop: 'title', label: '标题' },
{ prop: 'start_time', label: '开始时间' },
{ prop: 'end_time', label: '结束时间' },
{ prop: 'project_name', label: '项目' },
{ prop: 'type', label: '类型' },
{ prop: 'top', label: '权重' },
{ prop: 'author', label: '创建人' },
{ prop: 'review_status', label: '审核状态', slots: 'review-status' },
{ prop: 'publish_status', label: '发布状态', slots: 'publish-status' },
{ prop: 'top_status', label: '置顶状态/权重', slots: 'top-status' },
{ prop: 'create_time', label: '创建时间' }
],
data: [
{
image_url: 'https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png',
ad_id: '20210425001',
title: '专业化的紫荆',
start_time: '2020-01-23 14:23:34',
end_time: '2020-01-23 14:23:34',
project_name: 'sofia项目站',
type: 'banner广告',
top: '100',
author: '作者',
review_status: '1',
publish_status: '1',
top_status: '1',
create_time: '2020-01-23 14:23:34'
}
]
}
}
},
components: { TableList, DrawerForm },
methods: {
beforeRequest(params) {
params.status = this.activeName
return params
},
handleCreate() {
this.drawFormOptions.type = 'create'
this.drawerVisible = true
},
handleDetails(val) {
this.drawItem = val
this.drawFormOptions.type = 'details'
this.drawFormOptions.details = {
project_id: '111',
type_id: '111',
title: '3232',
uri: 'https://www.baidu.com',
summary: '内容摘要',
remarks: '注意事项',
web_img_uri: 'https://zj-images.oss-cn-beijing.aliyuncs.com/00d78a3a999f4b10000f2cd422232221.JPG',
mobile_terminal_img_uri: 'https://zj-images.oss-cn-beijing.aliyuncs.com/00d78a3a999f4b10000f2cd422232221.JPG',
enclosure_uri: 'https://zj-images.oss-cn-beijing.aliyuncs.com/00d78a3a999f4b10000f2cd422232221.JPG',
video_uri: 'https://zj-images.oss-cn-beijing.aliyuncs.com/00d78a3a999f4b10000f2cd422232221.JPG',
start_time: '2021-01-01 08:33:22',
hasEndDate: 1,
end_time: '2021-01-05 08:33:22',
is_publish: 1,
is_top: 1,
weight: 10
}
this.drawerVisible = true
},
handleReviewSubmit(val) {
console.log(val)
},
handleTabClick() {
// true 强制刷新
this.$refs.tableList.refresh(true)
}
}
}
</script>
<style scoped>
.article {
width: calc(100% - 20px);
height: calc(100% - 20px);
margin: 10px;
background: #fff;
border-radius: 5px;
}
.details-handle{
cursor:pointer;
}
.details-handle:hover{
color:#409EFF;
}
</style>
\ No newline at end of file
<template>
<el-form :model="reviewForm" :rules="rules" ref="ruleForm" label-width="90px">
<el-form-item label="审核结果" prop="result">
<el-select v-model="reviewForm.result" placeholder="请选择审核结果" size="small" style="width:100%;">
<el-option label="通过" :value="1"></el-option>
<el-option label="不通过" :value="0"></el-option>
</el-select>
</el-form-item>
<el-form-item label="审核评审" prop="text">
<el-input v-model="reviewForm.text" type="textarea" size="small" rows="4" placeholder="请输入审核评审"/>
</el-form-item>
<el-form-item>
<el-button size="mini" @click="$emit('dialogClose')">取消</el-button>
<el-button type="primary" @click="handleReviewSubmit" size="mini">提交</el-button>
</el-form-item>
</el-form>
</template>
<script>
export default {
data() {
return {
reviewForm: {
result: '',
text: ''
},
rules: {
result: [{ required: true, message: '请选择审核结果', trigger: 'change' }],
text: [{ required: true, message: '请输入审核评审', trigger: 'blur' }]
}
}
},
methods: {
handleReviewSubmit() {
this.$refs.ruleForm.validate((valid) => {
if (valid) {
this.$emit('reviewSubmit', this.reviewForm)
}
});
}
}
}
</script>
\ No newline at end of file
<template>
<div>图文列表</div>
<div class="article">
<table-list v-bind="tableOptions" ref="tableList">
<template #header-aside>
<el-button type="primary" size="mini" @click="handleCreate">新建文章</el-button>
</template>
<el-tabs v-model="activeName" type="card" @tab-click="handleTabClick">
<el-tab-pane label="全部" name="0"></el-tab-pane>
<el-tab-pane label="待审核" name="1"></el-tab-pane>
<el-tab-pane label="已驳回" name="2"></el-tab-pane>
<el-tab-pane label="已通过" name="3"></el-tab-pane>
</el-tabs>
<!-- 图片 -->
<template v-slot:image="scope"><img :src="scope.row.image_url" height="40" /></template>
<template v-slot:adId="scope"><span class="details-handle" @click="handleDetails(scope.row)">{{scope.row.ad_id}}</span></template>
<!-- 审核状态 -->
<template v-slot:review-status="{ row }">
<el-switch v-model="row.review_status"></el-switch>
</template>
<!-- 发布状态 -->
<template v-slot:publish-status="{ row }">
<el-switch v-model="row.publish_status"></el-switch>
</template>
<!-- 置顶状态 -->
<template v-slot:top-status="{ row }">
<el-switch v-model="row.top_status"></el-switch>
</template>
</table-list>
<el-drawer :visible.sync="drawerVisible" size="1100px" :destroy-on-close="true">
<template slot="title">
<h5>
{{drawTitle}}
<el-button v-if="drawFormOptions.type !== 'create'" type="primary" @click="drawFormOptions.type = 'edit'" size="mini" style="float:right;margin-right:30px;">编辑</el-button>
</h5>
</template>
<drawer-form :options="drawFormOptions">
<template #form-item-review>
<el-form-item>
<el-button type="primary" @click="dialogVisible = true" size="small">审核</el-button>
</el-form-item>
</template>
</drawer-form>
<el-dialog title="审核列表" :visible.sync="dialogVisible" width="460px" append-to-body :destroy-on-close="true">
<review-form @dialogClose="dialogVisible = false" @reviewSubmit="handleReviewSubmit"/>
</el-dialog>
</el-drawer>
</div>
</template>
<script>
import DrawerForm from '../components/DrawerForm.vue'
import TableList from '@/components/TableList'
export default {
data() {
return {}
return {
activeName: '0',
drawerVisible: false,
projectList: [
{ project_id: '111', project_name: '官网' },
{ project_id: '222', project_name: 'kellet' }
],
typeList: [
{ id: '111', name: 'banner广告' },
{ id: '222', name: '侧边栏广告' },
{ id: '333', name: '正文区广告' }
],
drawFormOptions: {
type: '',
page: 'image-text'
},
drawItem: '',
dialogVisible: false
}
},
computed: {
drawTitle() {
if (this.drawFormOptions.type === 'create') return '新建图文'
else if (this.drawFormOptions.type === 'edit') return '编辑图文'
else return this.drawItem.title || '图文详情'
},
tableOptions() {
return {
remote: {
params: { id: '', type: '', project: '' },
beforeRequest: this.beforeRequest
},
filters: [
{
type: 'select',
placeholder: '项目',
prop: 'project',
options: this.projectList,
labelKey: 'project_name',
valueKey: 'project_id'
},
{ type: 'input', placeholder: 'ID', prop: 'id' },
{
type: 'select',
placeholder: '类型',
prop: 'type',
options: this.typeList,
labelKey: 'name',
valueKey: 'id'
}
],
columns: [
{ prop: 'image_url', label: '图片', slots: 'image' },
{ prop: 'ad_id', label: '广告ID', slots: 'adId' },
{ prop: 'title', label: '标题' },
{ prop: 'start_time', label: '开始时间' },
{ prop: 'end_time', label: '结束时间' },
{ prop: 'project_name', label: '项目' },
{ prop: 'type', label: '类型' },
{ prop: 'top', label: '权重' },
{ prop: 'author', label: '创建人' },
{ prop: 'review_status', label: '审核状态', slots: 'review-status' },
{ prop: 'publish_status', label: '发布状态', slots: 'publish-status' },
{ prop: 'top_status', label: '置顶状态/权重', slots: 'top-status' },
{ prop: 'create_time', label: '创建时间' }
],
data: [
{
image_url: 'https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png',
ad_id: '20210425001',
title: '专业化的紫荆',
start_time: '2020-01-23 14:23:34',
end_time: '2020-01-23 14:23:34',
project_name: 'sofia项目站',
type: 'banner广告',
top: '100',
author: '作者',
review_status: '1',
publish_status: '1',
top_status: '1',
create_time: '2020-01-23 14:23:34'
}
]
}
}
},
components: { TableList, DrawerForm },
methods: {
beforeRequest(params) {
params.status = this.activeName
return params
},
handleCreate() {
this.drawFormOptions.type = 'create'
this.drawerVisible = true
},
handleDetails(val) {
this.drawItem = val
this.drawFormOptions.type = 'details'
this.drawFormOptions.details = {
project_id: '111',
type_id: '111',
title: '3232',
uri: 'https://www.baidu.com',
summary: '内容摘要',
remarks: '注意事项',
web_img_uri: 'https://zj-images.oss-cn-beijing.aliyuncs.com/00d78a3a999f4b10000f2cd422232221.JPG',
mobile_terminal_img_uri: 'https://zj-images.oss-cn-beijing.aliyuncs.com/00d78a3a999f4b10000f2cd422232221.JPG',
enclosure_uri: 'https://zj-images.oss-cn-beijing.aliyuncs.com/00d78a3a999f4b10000f2cd422232221.JPG',
video_uri: 'https://zj-images.oss-cn-beijing.aliyuncs.com/00d78a3a999f4b10000f2cd422232221.JPG',
start_time: '2021-01-01 08:33:22',
hasEndDate: 1,
end_time: '2021-01-05 08:33:22',
is_publish: 1,
is_top: 1,
weight: 10
}
this.drawerVisible = true
},
handleReviewSubmit(val) {
console.log(val)
},
handleTabClick() {
// true 强制刷新
this.$refs.tableList.refresh(true)
}
}
}
</script>
<style scoped>
.article {
width: calc(100% - 20px);
height: calc(100% - 20px);
margin: 10px;
background: #fff;
border-radius: 5px;
}
.details-handle{
cursor:pointer;
}
.details-handle:hover{
color:#409EFF;
}
</style>
\ No newline at end of file
......@@ -14,6 +14,9 @@
<el-button type="text" @click="changePhone(row)">更换手机号</el-button>
</template>
</table-list>
<el-drawer :visible.sync="drawerVisible" size="500px" :destroy-on-close="true">
<el-form></el-form>
</el-drawer>
</div>
</template>
<script>
......@@ -30,7 +33,8 @@ export default {
roleList: [
{ id: '111', name: '超级管理员' },
{ id: '222', name: '数据管理员' }
]
],
drawerVisible: false
}
},
computed: {
......
......@@ -108,8 +108,27 @@ body {
opacity: 0;
transform: translateX(30px);
}
/* element input,textarea font-family */
/* element input,textarea font-family reset */
.el-input__inner, .el-textarea__inner{
font-family: 'PingFang SC', 'PingFangSC-Regular', 'Source Han Sans CN', -apple-system, 'Microsoft YaHei', 'Helvetica', 'Arial', Verdana,
'Hiragino Sans GB', 'Wenquanyi Micro Hei', sans-serif;
}
/* element drawer reset */
.el-drawer__header{
padding:14px 16px;
margin:0;
border-bottom:1px solid #DCDFE6;
}
.el-drawer__header>h5{
font-size:16px;
color:#666;
font-weight:600;
}
.el-drawer__body{
height:calc(100% - 82px);
overflow-y: auto;
}
/* tinymce picker/popover z-index reset */
.tox-tinymce-aux{
z-index:999999 !important;
}
差异被折叠。
/**
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
* Licensed under the LGPL or a commercial license.
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*/
/**
* Jquery integration plugin.
*
* @class tinymce.core.JqueryIntegration
* @private
*/
!function(){var f,c,u,s=[],p="undefined"!=typeof global?global:window,d=p.jQuery,v=function(){
// Reference to tinymce needs to be lazily evaluated since tinymce
// might be loaded through the compressor or other means
return p.tinymce};d.fn.tinymce=function(o){var e,t,i,l=this,r="";
// No match then just ignore the call
if(!l.length)return l;
// Get editor instance
if(!o)return v()?v().get(l[0].id):null;l.css("visibility","hidden");// Hide textarea to avoid flicker
var n,a=function(){var a=[],c=0;
// Apply patches to the jQuery object, only once
u||(m(),u=!0),
// Create an editor instance for each matched node
l.each(function(e,t){var n,i=t.id,r=o.oninit;
// Generate unique id for target element if needed
i||(t.id=i=v().DOM.uniqueId()),
// Only init the editor once
v().get(i)||(
// Create editor instance and render it
n=v().createEditor(i,o),a.push(n),n.on("init",function(){var e,t=r;l.css("visibility",""),
// Run this if the oninit setting is defined
// this logic will fire the oninit callback ones each
// matched editor instance is initialized
r&&++c==a.length&&("string"==typeof t&&(e=-1===t.indexOf(".")?null:v().resolve(t.replace(/\.\w+$/,"")),t=v().resolve(t)),
// Call the oninit function with the object
t.apply(e||v(),a))}))}),
// Render the editor instances in a separate loop since we
// need to have the full editors array used in the onInit calls
d.each(a,function(e,t){t.render()})};
// Load TinyMCE on demand, if we need to
return p.tinymce||c||!(e=o.script_url)?
// Delay the init call until tinymce is loaded
1===c?s.push(a):a():(c=1,t=e.substring(0,e.lastIndexOf("/")),
// Check if it's a dev/src version they want to load then
// make sure that all plugins, themes etc are loaded in source mode as well
-1!=e.indexOf(".min")&&(r=".min"),
// Setup tinyMCEPreInit object this will later be used by the TinyMCE
// core script to locate other resources like CSS files, dialogs etc
// You can also predefined a tinyMCEPreInit object and then it will use that instead
p.tinymce=p.tinyMCEPreInit||{base:t,suffix:r},
// url contains gzip then we assume it's a compressor
-1!=e.indexOf("gzip")&&(i=o.language||"en",e=e+(/\?/.test(e)?"&":"?")+"js=true&core=true&suffix="+escape(r)+"&themes="+escape(o.theme||"modern")+"&plugins="+escape(o.plugins||"")+"&languages="+(i||""),
// Check if compressor script is already loaded otherwise setup a basic one
p.tinyMCE_GZ||(p.tinyMCE_GZ={start:function(){var n=function(e){v().ScriptLoader.markDone(v().baseURI.toAbsolute(e))};
// Add core languages
n("langs/"+i+".js"),
// Add themes with languages
n("themes/"+o.theme+"/theme"+r+".js"),n("themes/"+o.theme+"/langs/"+i+".js"),
// Add plugins with languages
d.each(o.plugins.split(","),function(e,t){t&&(n("plugins/"+t+"/plugin"+r+".js"),n("plugins/"+t+"/langs/"+i+".js"))})},end:function(){}})),(n=document.createElement("script")).type="text/javascript",n.onload=n.onreadystatechange=function(e){e=e||window.event,2===c||"load"!=e.type&&!/complete|loaded/.test(n.readyState)||(v().dom.Event.domLoaded=1,c=2,
// Execute callback after mainscript has been loaded and before the initialization occurs
o.script_loaded&&o.script_loaded(),a(),d.each(s,function(e,t){t()}))},n.src=e,document.body.appendChild(n)),l},
// Add :tinymce pseudo selector this will select elements that has been converted into editor instances
// it's now possible to use things like $('*:tinymce') to get all TinyMCE bound elements.
d.extend(d.expr[":"],{tinymce:function(e){var t;return!!(e.id&&"tinymce"in p&&(t=v().get(e.id))&&t.editorManager===v())}});
// This function patches internal jQuery functions so that if
// you for example remove an div element containing an editor it's
// automatically destroyed by the TinyMCE API
var m=function(){
// Removes any child editor instances by looking for editor wrapper elements
var r=function(e){
// If the function is remove
"remove"===e&&this.each(function(e,t){var n=l(t);n&&n.remove()}),this.find("span.mceEditor,div.mceEditor").each(function(e,t){var n=v().get(t.id.replace(/_parent$/,""));n&&n.remove()})},o=function(i){var e,t=this;
// Handle set value
/*jshint eqnull:true */if(null!=i)r.call(t),
// Saves the contents before get/set value of textarea/div
t.each(function(e,t){var n;(n=v().get(t.id))&&n.setContent(i)});else if(0<t.length&&(e=v().get(t[0].id)))return e.getContent()},l=function(e){var t=null;return e&&e.id&&p.tinymce&&(t=v().get(e.id)),t},u=function(e){return!!(e&&e.length&&p.tinymce&&e.is(":tinymce"))},s={};
// Loads or saves contents from/to textarea if the value
// argument is defined it will set the TinyMCE internal contents
// Patch some setter/getter functions these will
// now be able to set/get the contents of editor instances for
// example $('#editorid').html('Content'); will update the TinyMCE iframe instance
d.each(["text","html","val"],function(e,t){var a=s[t]=d.fn[t],c="text"===t;d.fn[t]=function(e){var t=this;if(!u(t))return a.apply(t,arguments);if(e!==f)return o.call(t.filter(":tinymce"),e),a.apply(t.not(":tinymce"),arguments),t;// return original set for chaining
var i="",r=arguments;return(c?t:t.eq(0)).each(function(e,t){var n=l(t);i+=n?c?n.getContent().replace(/<(?:"[^"]*"|'[^']*'|[^'">])*>/g,""):n.getContent({save:!0}):a.apply(d(t),r)}),i}}),
// Makes it possible to use $('#id').append("content"); to append contents to the TinyMCE editor iframe
d.each(["append","prepend"],function(e,t){var n=s[t]=d.fn[t],r="prepend"===t;d.fn[t]=function(i){var e=this;return u(e)?i!==f?("string"==typeof i&&e.filter(":tinymce").each(function(e,t){var n=l(t);n&&n.setContent(r?i+n.getContent():n.getContent()+i)}),n.apply(e.not(":tinymce"),arguments),e):void 0:n.apply(e,arguments)}}),
// Makes sure that the editor instance gets properly destroyed when the parent element is removed
d.each(["remove","replaceWith","replaceAll","empty"],function(e,t){var n=s[t]=d.fn[t];d.fn[t]=function(){return r.call(this,t),n.apply(this,arguments)}}),s.attr=d.fn.attr,
// Makes sure that $('#tinymce_id').attr('value') gets the editors current HTML contents
d.fn.attr=function(e,t){var n=this,i=arguments;if(!e||"value"!==e||!u(n))return s.attr.apply(n,i);if(t!==f)return o.call(n.filter(":tinymce"),t),s.attr.apply(n.not(":tinymce"),i),n;// return original set for chaining
var r=n[0],a=l(r);return a?a.getContent({save:!0}):s.attr.apply(d(r),i)}}}();
\ No newline at end of file
This is where language files should be placed.
Please DO NOT translate these directly use this service: https://www.transifex.com/projects/p/tinymce/
差异被折叠。
差异被折叠。
/**
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
* Licensed under the LGPL or a commercial license.
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.8.0 (2021-05-06)
*/
!function(){"use strict";var n,e,t,r=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=function(n,e,t){var r="UL"===e?"InsertUnorderedList":"InsertOrderedList";n.execCommand(r,!1,!1===t?null:{"list-style-type":t})},l=tinymce.util.Tools.resolve("tinymce.util.Tools"),i=function(n){return function(){return n}},s=i(!1),c=i(!0),o=function(){return a},a=(n=function(n){return n.isNone()},{fold:function(n,e){return n()},is:s,isSome:s,isNone:c,getOr:t=function(n){return n},getOrThunk:e=function(n){return n()},getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:i(null),getOrUndefined:i(undefined),or:t,orThunk:e,map:o,each:function(){},bind:o,exists:s,forall:c,filter:o,equals:n,equals_:n,toArray:function(){return[]},toString:i("none()")}),d=function(t){var n=i(t),e=function(){return o},r=function(n){return n(t)},o={fold:function(n,e){return e(t)},is:function(n){return t===n},isSome:c,isNone:s,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:e,orThunk:e,map:function(n){return d(n(t))},each:function(n){n(t)},bind:r,exists:r,forall:r,filter:function(n){return n(t)?o:a},toArray:function(){return[t]},toString:function(){return"some("+t+")"},equals:function(n){return n.is(t)},equals_:function(n,e){return n.fold(s,function(n){return e(t,n)})}};return o},f=function(n){return null===n||n===undefined?a:d(n)},g=function(n){return n&&/^(TH|TD)$/.test(n.nodeName)},m=function(r){return function(n){return n&&/^(OL|UL|DL)$/.test(n.nodeName)&&(t=n,(e=r).$.contains(e.getBody(),t));var e,t}},p=function(n,e,t){var r=function(n,e){for(var t=0;t<n.length;t++){if(e(n[t]))return t}return-1}(e.parents,g),o=-1!==r?e.parents.slice(0,r):e.parents,i=l.grep(o,m(n));return 0<i.length&&i[0].nodeName===t},y=function(o,n,e,t,r,i){o.ui.registry.addSplitButton(n,{tooltip:e,icon:"OL"===r?"ordered-list":"unordered-list",presets:"listpreview",columns:3,fetch:function(n){n(l.map(i,function(n){return{type:"choiceitem",value:"default"===n?"":n,icon:"list-"+("OL"===r?"num":"bull")+"-"+("disc"===n||"decimal"===n?"default":n),text:n.replace(/\-/g," ").replace(/\b\w/g,function(n){return n.toUpperCase()})}}))},onAction:function(){return o.execCommand(t)},onItemAction:function(n,e){u(o,r,e)},select:function(e){var n,t,r;return(t=(n=o).dom.getParent(n.selection.getNode(),"ol,ul"),r=n.dom.getStyle(t,"listStyleType"),f(r)).map(function(n){return e===n}).getOr(!1)},onSetup:function(e){var n=function(n){e.setActive(p(o,n,r))};return o.on("NodeChange",n),function(){return o.off("NodeChange",n)}}})},h=function(n,e,t,r,o,i){var u,l,s,c,a;1<i.length?y(n,e,t,r,o,i):(l=e,s=t,c=r,a=o,(u=n).ui.registry.addToggleButton(l,{active:!1,tooltip:s,icon:"OL"===a?"ordered-list":"unordered-list",onSetup:function(e){var n=function(n){e.setActive(p(u,n,a))};return u.on("NodeChange",n),function(){return u.off("NodeChange",n)}},onAction:function(){return u.execCommand(c)}}))};r.add("advlist",function(n){var t,e,r,o;n.hasPlugin("lists")?(h(e=n,"numlist","Numbered list","InsertOrderedList","OL",(r=e.getParam("advlist_number_styles","default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman"))?r.split(/[ ,]/):[]),h(e,"bullist","Bullet list","InsertUnorderedList","UL",(o=e.getParam("advlist_bullet_styles","default,circle,square"))?o.split(/[ ,]/):[]),(t=n).addCommand("ApplyUnorderedListStyle",function(n,e){u(t,"UL",e["list-style-type"])}),t.addCommand("ApplyOrderedListStyle",function(n,e){u(t,"OL",e["list-style-type"])})):console.error("Please use the Lists plugin together with the Advanced List plugin.")})}();
\ No newline at end of file
/**
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
* Licensed under the LGPL or a commercial license.
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.8.0 (2021-05-06)
*/
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),o=tinymce.util.Tools.resolve("tinymce.util.Tools"),a="a:not([href])",n=function(e){return e.getAttribute("id")||e.getAttribute("name")||""},r=function(e){return(t=e)&&"a"===t.nodeName.toLowerCase()&&!e.getAttribute("href")&&""!==n(e);var t},c=function(e){var n=e.dom;t(n).walk(e.selection.getRng(),function(e){o.each(e,function(e){var t;r(t=e)&&!t.firstChild&&n.remove(e,!1)})})},u=function(e){return e.dom.getParent(e.selection.getStart(),a)},i=function(e,t){var n,o,a,r,i,l=u(e);l?(a=e,r=t,(i=l).removeAttribute("name"),i.id=r,a.addVisual(),a.undoManager.add()):(o=t,(n=e).undoManager.transact(function(){n.getParam("allow_html_in_named_anchor",!1,"boolean")||n.selection.collapse(!0),n.selection.isCollapsed()?n.insertContent(n.dom.createHTML("a",{id:o})):(c(n),n.formatter.remove("namedAnchor",null,null,!0),n.formatter.apply("namedAnchor",{value:o}),n.addVisual())})),e.focus()},l=function(o){var e,t=(e=u(o))?n(e):"";o.windowManager.open({title:"Anchor",size:"normal",body:{type:"panel",items:[{name:"id",type:"input",label:"ID",placeholder:"example"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{id:t},onSubmit:function(e){var t,n;t=o,n=e.getData().id,(/^[A-Za-z][A-Za-z0-9\-:._]*$/.test(n)?(i(t,n),1):(t.windowManager.alert("Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores."),0))&&e.close()}})},d=function(r){return function(e){for(var t,n,o=0;o<e.length;o++){var a=e[o];n=void 0,!(n=t=a)||n.attr("href")||!n.attr("id")&&!n.attr("name")||t.firstChild||a.attr("contenteditable",r)}}};e.add("anchor",function(e){var t,n,o;(t=e).on("PreInit",function(){t.parser.addNodeFilter("a",d("false")),t.serializer.addNodeFilter("a",d(null))}),(n=e).addCommand("mceAnchor",function(){l(n)}),(o=e).ui.registry.addToggleButton("anchor",{icon:"bookmark",tooltip:"Anchor",onAction:function(){return o.execCommand("mceAnchor")},onSetup:function(e){return o.selection.selectorChangedWithUnbind("a:not([href])",e.setActive).unbind}}),o.ui.registry.addMenuItem("anchor",{icon:"bookmark",text:"Anchor...",onAction:function(){return o.execCommand("mceAnchor")}}),e.on("PreInit",function(){e.formatter.register("namedAnchor",{inline:"a",selector:a,remove:"all",split:!0,deep:!0,attributes:{id:"%value"},onmatch:function(e,t,n){return r(e)}})})})}();
\ No newline at end of file
/**
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
* Licensed under the LGPL or a commercial license.
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.8.0 (2021-05-06)
*/
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=tinymce.util.Tools.resolve("tinymce.Env"),i=function(e,t){var n;return t<0&&(t=0),3!==e.nodeType||(n=e.data.length)<t&&(t=n),t},y=function(e,t,n){1!==t.nodeType||t.hasChildNodes()?e.setStart(t,i(t,n)):e.setStartBefore(t)},k=function(e,t,n){1!==t.nodeType||t.hasChildNodes()?e.setEnd(t,i(t,n)):e.setEndAfter(t)},r=function(e,t,n){var o,i,r,a,s,d,f,l=e.getParam("autolink_pattern",/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+\-]+@(?!.*@))(.+)$/i),c=e.getParam("default_link_target",!1);if("A"!==e.selection.getNode().tagName){var g=e.selection.getRng().cloneRange();if(g.startOffset<5){if(!(s=g.endContainer.previousSibling)){if(!g.endContainer.firstChild||!g.endContainer.firstChild.nextSibling)return;s=g.endContainer.firstChild.nextSibling}if(d=s.length,y(g,s,d),k(g,s,d),g.endOffset<5)return;o=g.endOffset,i=s}else{if(3!==(i=g.endContainer).nodeType&&i.firstChild){for(;3!==i.nodeType&&i.firstChild;)i=i.firstChild;3===i.nodeType&&(y(g,i,0),k(g,i,i.nodeValue.length))}o=1===g.endOffset?2:g.endOffset-1-t}for(var u,h=o;y(g,i,2<=o?o-2:0),k(g,i,1<=o?o-1:0),--o," "!==(f=g.toString())&&""!==f&&160!==f.charCodeAt(0)&&0<=o-2&&f!==n;);(u=g.toString())===n||" "===u||160===u.charCodeAt(0)?(y(g,i,o),k(g,i,h),o+=1):(0===g.startOffset?y(g,i,0):y(g,i,o),k(g,i,h)),"."===(a=g.toString()).charAt(a.length-1)&&k(g,i,h-1);var m=(a=g.toString().trim()).match(l),C=e.getParam("link_default_protocol","http","string");m&&("www."===m[1]?m[1]=C+"://www.":/@$/.test(m[1])&&!/^mailto:/.test(m[1])&&(m[1]="mailto:"+m[1]),r=e.selection.getBookmark(),e.selection.setRng(g),e.execCommand("createlink",!1,m[1]+m[2]),!1!==c&&e.dom.setAttrib(e.selection.getNode(),"target",c),e.selection.moveToBookmark(r),e.nodeChanged())}},t=function(t){var n;t.on("keydown",function(e){13!==e.keyCode||r(t,-1,"")}),o.browser.isIE()?t.on("focus",function(){if(!n){n=!0;try{t.execCommand("AutoUrlDetect",!1,!0)}catch(e){}}}):(t.on("keypress",function(e){41!==e.keyCode||r(t,-1,"(")}),t.on("keyup",function(e){32!==e.keyCode||r(t,0,"")}))};e.add("autolink",function(e){t(e)})}();
\ No newline at end of file
/**
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
* Licensed under the LGPL or a commercial license.
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.8.0 (2021-05-06)
*/
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),h=tinymce.util.Tools.resolve("tinymce.Env"),r=tinymce.util.Tools.resolve("tinymce.util.Delay"),y=function(e){return e.getParam("min_height",e.getElement().offsetHeight,"number")},a=function(e,t,n,i,o){r.setEditorTimeout(e,function(){b(e,t),n--?a(e,t,n,i,o):o&&o()},i)},p=function(e,t){var n=e.getBody();n&&(n.style.overflowY=t?"":"hidden",t||(n.scrollTop=0))},v=function(e,t,n,i){var o=parseInt(e.getStyle(t,n,i),10);return isNaN(o)?0:o},b=function(e,t){var n,i,o,r,s,a,g,u,l,c,m,f=e.dom,d=e.getDoc();d&&((n=e).plugins.fullscreen&&n.plugins.fullscreen.isFullscreen()?p(e,!0):(i=d.documentElement,o=e.getParam("autoresize_bottom_margin",50,"number"),r=y(e),s=v(f,i,"margin-top",!0),a=v(f,i,"margin-bottom",!0),(g=i.offsetHeight+s+a+o)<0&&(g=0),g+(u=e.getContainer().offsetHeight-e.getContentAreaContainer().offsetHeight)>y(e)&&(r=g+u),(l=e.getParam("max_height",0,"number"))&&l<r?(r=l,p(e,!0)):p(e,!1),r!==t.get()&&(c=r-t.get(),f.setStyle(e.getContainer(),"height",r+"px"),t.set(r),e.fire("ResizeEditor"),h.browser.isSafari()&&h.mac&&(m=e.getWin()).scrollTo(m.pageXOffset,m.pageYOffset),e.hasFocus()&&e.selection.scrollIntoView(e.selection.getNode()),h.webkit&&c<0&&b(e,t))))};e.add("autoresize",function(e){var t,n,i,o,r,s;e.settings.hasOwnProperty("resize")||(e.settings.resize=!1),e.inline||(s=0,r=t={get:function(){return s},set:function(e){s=e}},(o=e).addCommand("mceAutoResize",function(){b(o,r)}),i=t,(n=e).on("init",function(){var e=n.getParam("autoresize_overflow_padding",1,"number"),t=n.dom;t.setStyles(n.getDoc().documentElement,{height:"auto"}),t.setStyles(n.getBody(),{paddingLeft:e,paddingRight:e,"min-height":0})}),n.on("NodeChange SetContent keyup FullscreenStateChanged ResizeContent",function(){b(n,i)}),n.getParam("autoresize_on_init",!0,"boolean")&&n.on("init",function(){a(n,i,20,100,function(){a(n,i,5,1e3)})}))})}();
\ No newline at end of file
/**
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
* Licensed under the LGPL or a commercial license.
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.8.0 (2021-05-06)
*/
!function(){"use strict";var e,t=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=(e=undefined,function(t){return e===t}),r=tinymce.util.Tools.resolve("tinymce.util.Delay"),n=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),o=tinymce.util.Tools.resolve("tinymce.util.Tools"),i=function(t,e){var r=t||e,n=/^(\d+)([ms]?)$/.exec(""+r);return(n[2]?{s:1e3,m:6e4}[n[2]]:1)*parseInt(r,10)},u=function(t){var e=document.location;return t.getParam("autosave_prefix","tinymce-autosave-{path}{query}{hash}-{id}-").replace(/{path}/g,e.pathname).replace(/{query}/g,e.search).replace(/{hash}/g,e.hash).replace(/{id}/g,t.id)},s=function(t,e){if(a(e))return t.dom.isEmpty(t.getBody());var r=o.trim(e);if(""===r)return!0;var n=(new DOMParser).parseFromString(r,"text/html");return t.dom.isEmpty(n)},f=function(t){var e=parseInt(n.getItem(u(t)+"time"),10)||0;return!((new Date).getTime()-e>i(t.getParam("autosave_retention"),"20m"))||(c(t,!1),!1)},c=function(t,e){var r=u(t);n.removeItem(r+"draft"),n.removeItem(r+"time"),!1!==e&&t.fire("RemoveDraft")},m=function(t){var e=u(t);!s(t)&&t.isDirty()&&(n.setItem(e+"draft",t.getContent({format:"raw",no_events:!0})),n.setItem(e+"time",(new Date).getTime().toString()),t.fire("StoreDraft"))},l=function(t){var e=u(t);f(t)&&(t.setContent(n.getItem(e+"draft"),{format:"raw"}),t.fire("RestoreDraft"))},v=function(t){var e=i(t.getParam("autosave_interval"),"30s");r.setEditorInterval(t,function(){m(t)},e)},d=function(t){t.undoManager.transact(function(){l(t),c(t)}),t.focus()},g=tinymce.util.Tools.resolve("tinymce.EditorManager"),y=function(r){return function(t){t.setDisabled(!f(r));var e=function(){return t.setDisabled(!f(r))};return r.on("StoreDraft RestoreDraft RemoveDraft",e),function(){return r.off("StoreDraft RestoreDraft RemoveDraft",e)}}};t.add("autosave",function(t){var e,r;return t.editorManager.on("BeforeUnload",function(t){var e;o.each(g.get(),function(t){t.plugins.autosave&&t.plugins.autosave.storeDraft(),!e&&t.isDirty()&&t.getParam("autosave_ask_before_unload",!0)&&(e=t.translate("You have unsaved changes are you sure you want to navigate away?"))}),e&&(t.preventDefault(),t.returnValue=e)}),v(e=t),e.ui.registry.addButton("restoredraft",{tooltip:"Restore last draft",icon:"restore-draft",onAction:function(){d(e)},onSetup:y(e)}),e.ui.registry.addMenuItem("restoredraft",{text:"Restore last draft",icon:"restore-draft",onAction:function(){d(e)},onSetup:y(e)}),t.on("init",function(){t.getParam("autosave_restore_when_empty",!1)&&t.dom.isEmpty(t.getBody())&&l(t)}),r=t,{hasDraft:function(){return f(r)},storeDraft:function(){return m(r)},restoreDraft:function(){return l(r)},removeDraft:function(t){return c(r,t)},isEmpty:function(t){return s(r,t)}}})}();
\ No newline at end of file
/**
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
* Licensed under the LGPL or a commercial license.
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.8.0 (2021-05-06)
*/
!function(){"use strict";var o=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=tinymce.util.Tools.resolve("tinymce.util.Tools"),t=function(t){t=e.trim(t);var o=function(o,e){t=t.replace(o,e)};return o(/\n/gi,"<br />"),o(/\[b\]/gi,"<strong>"),o(/\[\/b\]/gi,"</strong>"),o(/\[i\]/gi,"<em>"),o(/\[\/i\]/gi,"</em>"),o(/\[u\]/gi,"<u>"),o(/\[\/u\]/gi,"</u>"),o(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,'<a href="$1">$2</a>'),o(/\[url\](.*?)\[\/url\]/gi,'<a href="$1">$1</a>'),o(/\[img\](.*?)\[\/img\]/gi,'<img src="$1" />'),o(/\[color=(.*?)\](.*?)\[\/color\]/gi,'<font color="$1">$2</font>'),o(/\[code\](.*?)\[\/code\]/gi,'<span class="codeStyle">$1</span>&nbsp;'),o(/\[quote.*?\](.*?)\[\/quote\]/gi,'<span class="quoteStyle">$1</span>&nbsp;'),t};o.add("bbcode",function(o){o.on("BeforeSetContent",function(o){o.content=t(o.content)}),o.on("PostProcess",function(o){o.set&&(o.content=t(o.content)),o.get&&(o.content=function(t){t=e.trim(t);var o=function(o,e){t=t.replace(o,e)};return o(/<a.*?href=\"(.*?)\".*?>(.*?)<\/a>/gi,"[url=$1]$2[/url]"),o(/<font.*?color=\"(.*?)\".*?class=\"codeStyle\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),o(/<font.*?color=\"(.*?)\".*?class=\"quoteStyle\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),o(/<font.*?class=\"codeStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),o(/<font.*?class=\"quoteStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),o(/<span style=\"color: ?(.*?);\">(.*?)<\/span>/gi,"[color=$1]$2[/color]"),o(/<font.*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[color=$1]$2[/color]"),o(/<span style=\"font-size:(.*?);\">(.*?)<\/span>/gi,"[size=$1]$2[/size]"),o(/<font>(.*?)<\/font>/gi,"$1"),o(/<img.*?src=\"(.*?)\".*?\/>/gi,"[img]$1[/img]"),o(/<span class=\"codeStyle\">(.*?)<\/span>/gi,"[code]$1[/code]"),o(/<span class=\"quoteStyle\">(.*?)<\/span>/gi,"[quote]$1[/quote]"),o(/<strong class=\"codeStyle\">(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]"),o(/<strong class=\"quoteStyle\">(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]"),o(/<em class=\"codeStyle\">(.*?)<\/em>/gi,"[code][i]$1[/i][/code]"),o(/<em class=\"quoteStyle\">(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]"),o(/<u class=\"codeStyle\">(.*?)<\/u>/gi,"[code][u]$1[/u][/code]"),o(/<u class=\"quoteStyle\">(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]"),o(/<\/(strong|b)>/gi,"[/b]"),o(/<(strong|b)>/gi,"[b]"),o(/<\/(em|i)>/gi,"[/i]"),o(/<(em|i)>/gi,"[i]"),o(/<\/u>/gi,"[/u]"),o(/<span style=\"text-decoration: ?underline;\">(.*?)<\/span>/gi,"[u]$1[/u]"),o(/<u>/gi,"[u]"),o(/<blockquote[^>]*>/gi,"[quote]"),o(/<\/blockquote>/gi,"[/quote]"),o(/<br \/>/gi,"\n"),o(/<br\/>/gi,"\n"),o(/<br>/gi,"\n"),o(/<p>/gi,""),o(/<\/p>/gi,"\n"),o(/&nbsp;|\u00a0/gi," "),o(/&quot;/gi,'"'),o(/&lt;/gi,"<"),o(/&gt;/gi,">"),o(/&amp;/gi,"&"),t}(o.content))})})}();
\ No newline at end of file
差异被折叠。
/**
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
* Licensed under the LGPL or a commercial license.
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.8.0 (2021-05-06)
*/
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=function(o){var e=o.getContent({source_view:!0});o.windowManager.open({title:"Source Code",size:"large",body:{type:"panel",items:[{type:"textarea",name:"code"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{code:e},onSubmit:function(e){var t,n;t=o,n=e.getData().code,t.focus(),t.undoManager.transact(function(){t.setContent(n)}),t.selection.setCursorLocation(),t.nodeChanged(),e.close()}})};e.add("code",function(e){var t,n;return(t=e).addCommand("mceCodeEditor",function(){o(t)}),(n=e).ui.registry.addButton("code",{icon:"sourcecode",tooltip:"Source code",onAction:function(){return o(n)}}),n.ui.registry.addMenuItem("code",{icon:"sourcecode",text:"Source code",onAction:function(){return o(n)}}),{}})}();
\ No newline at end of file
/**
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
* Licensed under the LGPL or a commercial license.
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.8.0 (2021-05-06)
*/
!function(){"use strict";tinymce.util.Tools.resolve("tinymce.PluginManager").add("colorpicker",function(){console.warn("Color picker plugin is now built in to the core editor, please remove it from your editor configuration")})}();
\ No newline at end of file
/**
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
* Licensed under the LGPL or a commercial license.
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.8.0 (2021-05-06)
*/
!function(){"use strict";tinymce.util.Tools.resolve("tinymce.PluginManager").add("contextmenu",function(){console.warn("Context menu plugin is now built in to the core editor, please remove it from your editor configuration")})}();
\ No newline at end of file
/**
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
* Licensed under the LGPL or a commercial license.
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.8.0 (2021-05-06)
*/
!function(){"use strict";var t,n,e,o,r=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=tinymce.util.Tools.resolve("tinymce.util.Tools"),i=function(n,t){var e,o=n.dom,r=n.selection.getSelectedBlocks();r.length&&(e=o.getAttrib(r[0],"dir"),u.each(r,function(n){o.getParent(n.parentNode,'*[dir="'+t+'"]',o.getRoot())||o.setAttrib(n,"dir",e!==t?t:null)}),n.nodeChanged())},c=function(n){return!(null===(t=n)||t===undefined);var t},f=function(n){return typeof n===t},d=function(n){return function(){return n}},l=d(!(t="function")),m=d(!0),a=function(){return s},s=(n=function(n){return n.isNone()},{fold:function(n,t){return n()},is:l,isSome:l,isNone:m,getOr:o=function(n){return n},getOrThunk:e=function(n){return n()},getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:d(null),getOrUndefined:d(undefined),or:o,orThunk:e,map:a,each:function(){},bind:a,exists:l,forall:m,filter:a,equals:n,equals_:n,toArray:function(){return[]},toString:d("none()")}),g=function(e){var n=d(e),t=function(){return r},o=function(n){return n(e)},r={fold:function(n,t){return t(e)},is:function(n){return e===n},isSome:m,isNone:l,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:t,orThunk:t,map:function(n){return g(n(e))},each:function(n){n(e)},bind:o,exists:o,forall:o,filter:function(n){return n(e)?r:s},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(n){return n.is(e)},equals_:function(n,t){return n.fold(l,function(n){return t(e,n)})}};return r},h={some:g,none:a,from:function(n){return null===n||n===undefined?s:g(n)}},v=function(n){if(null===n||n===undefined)throw new Error("Node cannot be null or undefined");return{dom:n}},y={fromHtml:function(n,t){var e=(t||document).createElement("div");if(e.innerHTML=n,!e.hasChildNodes()||1<e.childNodes.length)throw console.error("HTML does not have a single root node",n),new Error("HTML must have a single root node");return v(e.childNodes[0])},fromTag:function(n,t){var e=(t||document).createElement(n);return v(e)},fromText:function(n,t){var e=(t||document).createTextNode(n);return v(e)},fromDom:v,fromPoint:function(n,t,e){return h.from(n.dom.elementFromPoint(t,e)).map(v)}},p=("undefined"!=typeof window||Function("return this;")(),function(t){return function(n){return n.dom.nodeType===t}}),T=p(3),N=p(9),D=p(11),w=f(Element.prototype.attachShadow)&&f(Node.prototype.getRootNode)?function(n){return y.fromDom(n.dom.getRootNode())}:function(n){return N(n)?n:(t=n,y.fromDom(t.dom.ownerDocument));var t},O=function(n){var t,e=w(n);return D(t=e)&&c(t.dom.host)?h.some(e):h.none()},C=function(n){return y.fromDom(n.dom.host)},S=function(n){var t=T(n)?n.dom.parentNode:n.dom;if(t===undefined||null===t||null===t.ownerDocument)return!1;var e,o,r=t.ownerDocument;return O(y.fromDom(t)).fold(function(){return r.body.contains(t)},(e=S,o=C,function(n){return e(o(n))}))},L=function(n,t){return(e=n).style!==undefined&&f(e.style.getPropertyValue)?n.style.getPropertyValue(t):"";var e},R=function(n){return"rtl"===(e="direction",o=(t=n).dom,""!==(r=window.getComputedStyle(o).getPropertyValue(e))||S(t)?r:L(o,e))?"rtl":"ltr";var t,e,o,r},A=function(t,o){return function(e){var n=function(n){var t=y.fromDom(n.element);e.setActive(R(t)===o)};return t.on("NodeChange",n),function(){return t.off("NodeChange",n)}}};r.add("directionality",function(n){var t,e;(t=n).addCommand("mceDirectionLTR",function(){i(t,"ltr")}),t.addCommand("mceDirectionRTL",function(){i(t,"rtl")}),(e=n).ui.registry.addToggleButton("ltr",{tooltip:"Left to right",icon:"ltr",onAction:function(){return e.execCommand("mceDirectionLTR")},onSetup:A(e,"ltr")}),e.ui.registry.addToggleButton("rtl",{tooltip:"Right to left",icon:"rtl",onAction:function(){return e.execCommand("mceDirectionRTL")},onSetup:A(e,"rtl")})})}();
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论