【修改】头部修改间距

This commit is contained in:
zhoulingpo
2023-08-03 11:25:06 +08:00
parent 4805b6acde
commit 31e3f020c8
33 changed files with 236 additions and 135 deletions
+76 -1
View File
@@ -73,7 +73,7 @@ export default {
formData.append('file', blobInfo.blob(), blobInfo.filename())
formData.append('biz', 'jeditor')
formData.append('jeditor', '1')
uploadAction(window._CONFIG.domianURL + '/sys/common/upload', formData).then((res) => {
uploadAction('/sys/common/upload', formData).then((res) => {
if (res.success) {
if (res.message === 'local') {
const img = 'data:image/jpeg;base64,' + blobInfo.base64()
@@ -84,6 +84,28 @@ export default {
}
}
})
},
paste_postprocess: function(plugin, args) {
console.log(args.node,"kkkkkk");
args.node.setAttribute('id', 'hello');
},
init_instance_callback: editor => {
if (this.value) {
editor.setContent(this.value)
}
this.hasInit = true
editor.on('NodeChange Change KeyUp SetContent', () => {
this.hasChange = true
// const val = editor.getContent().replace(/<p><img\s?src="data.*?<\/p>/g, '')
this.$emit('input', editor.getContent())
})
editor.on('paste', evt => {
// 监听粘贴事件
console.log('监听粘贴事件', evt)
this.onPaste(evt)
})
}
},
myValue: this.value,
@@ -94,7 +116,60 @@ export default {
this.initATabsChangeAutoReload()
},
methods: {
onPaste(event, success, failure) {
// let _this = this
let self = this
// 实现图⽚粘贴上传
const items = (event.clipboardData || window.clipboardData).items
// items为伪数组微信/QQ截图以及此富⽂本区域内复制粘贴的length为1,⿏标右键复制粘贴图⽚以及⽂本的复制粘贴的length为2
let len = items.length
for (let i = 0; i < len; i++) {
if (items[i].kind == "file" && items[i].type.indexOf("image") != -1) {
// 判断是否为图⽚类型
event.preventDefault() // 如果是图⽚阻⽌⾃动粘贴到富⽂本编辑器
let file = items[i].getAsFile() // 获取⽂件数据
let blob = new Blob([file], { type: file.type }) //实例化⼀个blob 将图⽚⼤⼩以及类型初始化到blob⾥
// let index = file.name.lastIndexOf(".")
// let fileName =
// Date.now() + file.name.substring(index, file.name.length)
// fileName --- 图⽚名称可⾃⾏处理
console.log("粘贴的是图⽚类型", blob, file)
// let file = blobInfo.blob()
const isLt2M = file.size / 1024 < 500
if (!isLt2M) {
this.$message.warning("上传失败,图片不可超过500KB!")
return false
}
const formdate = new FormData()
formdate.append("file", file) //imageFile文件名和后端统一
uploadAction('/sys/common/upload', formdate).then((res) => {
debugger
if (res.success) {
if (res.message === 'local') {
const img = 'data:image/jpeg;base64,' + blob.base64()
success(img)
} else {
const img = getFileAccessHttpUrl(res.message)
editor.execCommand(
"mceReplaceContent",
false,
`<img class="wscnph" src="${img}" >`
);
}
}
})
.catch(function(err) {
// 上传错误可⾃⾏给出提⽰
self.$message.error(err)
})
} else {
// 不是图⽚类型直接粘贴, 跳过oss上传处理
console.log("粘贴的不是图")
}
}
},
reload () {
this.reloading = true
this.$nextTick(() => {
+1 -1
View File
@@ -19,7 +19,7 @@
<a-button v-if="izMobile" type="primary" icon="delete" @click="handleReset"/>
</a-button-group>
</a-tooltip>
<a-button v-else type="primary" icon="filter" @click="handleOpen">高级查询</a-button>
<a-button v-else type="default" icon="filter" @click="handleOpen">高级查询</a-button>
</slot>
<j-modal
@@ -28,12 +28,13 @@
<a-col :md="8" :sm="8">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchByquery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
<a @click="handleToggleSearch" style="margin-left: 8px">
<a @click="handleToggleSearch" style="margin-right: 28px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
<a-button type="primary" @click="searchByquery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
</span>
</a-col>
@@ -20,12 +20,12 @@
<!-- 动态生成的查询条件 -->
<j-select-biz-query-item v-if="queryConfig.length>0" v-show="showMoreQueryItems" :queryParam="queryParam" :queryConfig="queryConfig" @pressEnter="searchQuery"/>
<!-- 按钮 -->
<a @click="handleToggleSearch" style="margin-right: 28px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
<a-button :style="{marginBottom:'12px'}" type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button :style="{marginBottom:'12px'}" type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
<a v-if="queryConfig.length>0" @click="showMoreQueryItems=!showMoreQueryItems" style="margin-left: 8px">
{{ showMoreQueryItems ? '收起' : '展开' }}
<a-icon :type="showMoreQueryItems ? 'up' : 'down'"/>
</a>
</a-form>
<a-table
@@ -29406,7 +29406,7 @@
"margin-left": "8px"
},
attrs: {
type: "primary",
type: "default",
icon: "reload"
},
on: {
@@ -29425,7 +29425,7 @@
staticClass: "table-operator"
}, [e.buttonSwitch.add ? n("a-button", {
attrs: {
type: "primary",
type: "default",
icon: "plus"
},
on: {
@@ -31710,7 +31710,7 @@
}
}, [e._v("查询")]), n("a-button", {
attrs: {
type: "primary",
type: "default",
icon: "reload"
},
on: {
@@ -37656,7 +37656,7 @@
"margin-left": "8px"
},
attrs: {
type: "primary",
type: "default",
icon: "reload"
},
on: {
@@ -39018,7 +39018,7 @@
"margin-left": "8px"
},
attrs: {
type: "primary",
type: "default",
icon: "reload"
},
on: {
@@ -43922,7 +43922,7 @@
"margin-left": "8px"
},
attrs: {
type: "primary",
type: "default",
icon: "reload"
},
on: {
@@ -45162,7 +45162,7 @@
"margin-left": "8px"
},
attrs: {
type: "primary",
type: "default",
icon: "reload"
},
on: {
@@ -45172,7 +45172,7 @@
staticClass: "table-operator"
}, [n("a-button", {
attrs: {
type: "primary",
type: "default",
icon: "plus"
},
on: {
@@ -66840,7 +66840,7 @@
"margin-left": "8px"
},
attrs: {
type: "primary",
type: "default",
icon: "reload"
},
on: {
@@ -67912,7 +67912,7 @@
"margin-left": "8px"
},
attrs: {
type: "primary",
type: "default",
icon: "reload"
},
on: {
@@ -72474,7 +72474,7 @@
"margin-left": "8px"
},
attrs: {
type: "primary",
type: "default",
icon: "reload"
},
on: {
@@ -72495,7 +72495,7 @@
staticClass: "table-operator"
}, [n("a-button", {
attrs: {
type: "primary",
type: "default",
icon: "plus"
},
on: {
@@ -72503,7 +72503,7 @@
}
}, [e._v("新增")]), n("a-button", {
attrs: {
type: "primary",
type: "default",
icon: "highlight"
},
on: {
@@ -72511,7 +72511,7 @@
}
}, [e._v("自定义按钮")]), n("a-button", {
attrs: {
type: "primary",
type: "default",
icon: "strikethrough"
},
on: {
@@ -72519,7 +72519,7 @@
}
}, [e._v("JS增强")]), n("a-button", {
attrs: {
type: "primary",
type: "default",
icon: "filter"
},
on: {
@@ -72527,7 +72527,7 @@
}
}, [e._v("SQL增强")]), n("a-button", {
attrs: {
type: "primary",
type: "default",
icon: "tool"
},
on: {
@@ -72535,7 +72535,7 @@
}
}, [e._v("JAVA增强")]), n("a-button", {
attrs: {
type: "primary",
type: "default",
icon: "database"
},
on: {
@@ -72543,7 +72543,7 @@
}
}, [e._v("导入数据库表")]), n("a-button", {
attrs: {
type: "primary",
type: "default",
icon: "database"
},
on: {
+18 -3
View File
@@ -7,11 +7,14 @@
<!-- </span>-->
<!-- update-begin author:sunjianlei date:20200219 for: 菜单搜索改为动态组件,在手机端呈现出弹出框 -->
<!-- <component :is="searchMenuComp" v-show="searchMenuVisible || isMobile()" class="borders" :visible="searchMenuVisible" title="搜索菜单" :footer="null" @cancel="searchMenuVisible=false">-->
<a-select
<span class='search-box'>
<a-icon type='search' />
</span>
<a-select
class="search-input"
showSearch
:showArrow="false"
placeholder="搜索菜单"
placeholder="请输入搜索内容"
optionFilterProp="children"
:filterOption="filterOption"
:open="isMobile()?true:null"
@@ -20,7 +23,7 @@
@change="searchMethods"
@blur="hiddenClick"
>
<a-icon slot="suffixIcon" type="search" />
<a-select-option v-for="(site,index) in searchMenuOptions" :key="index" :value="site.id">{{site.meta.title}}</a-select-option>
</a-select>
<!-- </component>-->
@@ -272,6 +275,18 @@ export default {
</script>
<style lang="less" scoped>
.search-box {
display: inline-block;
transition: all 0.3s;
height: 30px;
width: 25px;
margin-top: 0px;
line-height: 28px;
background: #F7F8FA;
text-align: right;
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
}
/* update_begin author:zhaoxin date:20191129 for: 让搜索框颜色能随主题颜色变换*/
/* update-begin author:sunjianlei date:20191220 for: 解决全局样式冲突问题 */
.user-wrapper .search-input {