当前位置: 首页 > news >正文

网站摇奖活动怎么做百度网址提交入口平台

网站摇奖活动怎么做,百度网址提交入口平台,招聘网站如何做SEO,什么网站做简历模板首先我使用的富文本编辑器是vue-quill-editor 使用npm进行下载 npm install vue-quill-editor --save当然也可以按照官方的方法下载,到官方 因为我是在原有老项目上开发的使用的组件库是ant-design-vue 1x版,当然使用其他组件库也可以 然后还有重要的一…

首先我使用的富文本编辑器是vue-quill-editor
使用npm进行下载

npm install vue-quill-editor --save

当然也可以按照官方的方法下载,到官方
因为我是在原有老项目上开发的使用的组件库是ant-design-vue 1x版,当然使用其他组件库也可以
然后还有重要的一步需要引入jquery后面有地方需要用到
使用npm进行下载jquery

npm install jquery --save;

下面直接上代码

<template><div><quill-editor ref="myQuillEditor" v-model="content" :options="editorOption" /><a-upload list-type="picture-card" class="quill-upload" :show-upload-list="false" :multiple="true" v-show="false":data="headerdata" action="https://upload-cn-east-2.qiniup.com" :before-upload="beforeUploadlogin"@change="handleChangeloginbig" :on-success="quillSuccess"><i class="el-icon-upload"></i></a-upload></div>
</template><script>const toolbarOptions = [['bold', 'italic', 'underline', 'strike'], // toggled buttons['blockquote', 'code-block'],[{header: 1}, {header: 2}], // custom button values[{list: 'ordered'}, {list: 'bullet'}],[{script: 'sub'}, {script: 'super'}], // superscript/subscript[{indent: '-1'}, {indent: '+1'}], // outdent/indent[{direction: 'rtl'}], // text direction[{size: ['small', false, 'large', 'huge']}], // custom dropdown[{header: [1, 2, 3, 4, 5, 6, false]}],[{color: []}, {background: []}], // dropdown with defaults from theme[{font: []}],[{align: []}],['link', 'image', 'video'],['clean'] // remove formatting button];import API from "@/Api/index.js";import UNITY from "@/commont/user.js";export default {data() {return {content: "",headerdata: {token: "",key: "",},loginimageUrlbig: [],URL: "",cyloginimageUrlbig: [],editorOption: {modules: {toolbar: {container: toolbarOptions,handlers: {// 重写点击组件上的图片按钮要执行的代码这里用到了jquery'image': (value) => {document.querySelector('.quill-upload .el-icon-upload').click()}}}}},cyput: 0}},created() {},methods: {async beforeUploadlogin(file) {this.cyput++let that = this;let time = new Date().getTime();time = time + '' + that.cyput//这边是封装的接口await API.UPLOADUPLOADTOKEN().then(res => {that.headerdata.token = res.data.data.token;that.headerdata.key = "permanent/head/" + time + '.png';that.URL = UNITY.getSession("qiniu_cdnurl");})const sizeOk = file.size < 1024 * 1000;if (!sizeOk) {this.$message.error('照片大小超过100K!');return}},handleChangeloginbig(info) {if (info.file.status === "done") {if (this.loginimageUrlbig.length < 9) {if (this.loginimageUrlbig[0] != "") {this.loginimageUrlbig.unshift("")}} else {this.loginimageUrlbig.shift()}let loCbig = this.URL + '/' + info.file.response.key;this.loginimageUrlbig.push(loCbig)if (loCbig) {// 获取文本编辑器let quill = this.$refs.myQuillEditor.quill// 获取光标位置let pos = quill.getSelection().index// 插入图片到光标位置quill.insertEmbed(pos, 'image', loCbig)} else {this.$essage.error('图片插入失败')}}},}}
</script><style scoped></style>
http://www.hkea.cn/news/646164/

相关文章:

  • 西安机场商务宾馆百度做网站怎么在百度上做网站
  • ps网站建设seo网络公司
  • 网站建设步骤 教 程网站怎么做谷歌推广
  • 网站制作需要注意什么潍坊做网站哪家好
  • 专门做团购的网站有哪些色盲图
  • 百度做网站续费费用百度营业执照怎么办理
  • 深圳网站建设方维网络企业网站制作要求
  • 制作好网站黑帽seo教程
  • 云南 网站建设网站seo优化对网店的推广的作用为
  • 网站建设免费国外舆情服务公司
  • 怎么做网站banner查排名网站
  • 做网站好看的背景图片相关搜索优化软件
  • 怎么查网站是哪家制作公司做的百度收录查询
  • 企业年金交了有好处吗网络优化工程师吃香吗
  • python做网站开发百度6大核心部门
  • 自己做网站平台企业网站优化价格
  • 淘宝网网站建设的需求分析百度会员登录入口
  • 建网站的专业公司推广网站多少钱
  • 网站不去公安局备案自己怎么搭建网站
  • 外贸网站建设入门深圳网络推广哪家
  • 网站模板资源公司网站推广
  • 广东省建设教育协会官方网站首页html简单网页代码
  • 个人网站意义阿里指数官网最新版本
  • 网站开发方式有哪四种搜索引擎优化课程总结
  • 申请做网站、论坛版主app推广接单
  • 青海网站建设广州seo优化推广
  • 物流公司网站制作模板上海网站关键词排名
  • 广西建设人才网搜索引擎优化的目标
  • 比汉斯设计网站素材图片搜索识图入口
  • php网站架设教程英雄联盟韩国