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

浙江杭州seo网站建设网站优化app推广好做吗

浙江杭州seo网站建设网站优化,app推广好做吗,国外网站模板网站建设,企业网站备案要多少钱首先我使用的富文本编辑器是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.rdtb.cn/news/14126.html

相关文章:

  • 创建公司网站需要注意什么河南郑州做网站的公司
  • 百度搜索引擎api北京百度推广seo
  • 昆明网站建设报价seo关键词优化提高网站排名
  • 做网站资料准备查排名网站
  • 网页模板哪个网站可以下载搜索引擎下载入口
  • wordpress副标题怎么写seo服务外包客服
  • 威海北京网站建设查收录网站
  • 小说网站怎么用html做如何建立自己的网络销售
  • 深圳网站建设加盟seo技术专员招聘
  • 网站竞价 英文电脑培训中心
  • 会网站开发 不会软件如何进行线上推广
  • 取名网站怎么做多层次网络营销合法吗
  • 自己做网站赚钱网络销售真恶心
  • 重庆快速网站建设北京推广
  • 卓越 网站2023年8月新冠又来了
  • 建设网站应该怎么做百度竞价托管代运营公司
  • 网站开发代码建个网站费用大概多少钱一年
  • 国外对旅游网站的建设搭建网站基本步骤
  • 网站开发个人简历word下载怀来网站seo
  • 江苏网站建设 博敏网站疫情放开最新消息今天
  • 开发网站公司12345浏览器网址大全
  • 绝对大气漂亮的响应式网站后台模板小红书软文案例
  • 怎么自己在百度上做网站重庆seo网络推广
  • 深圳网站建设定制百度认证官网申请
  • 商城网站建设基础设计汕头网站建设方案优化
  • 前端旅游网站行程怎么做河南品牌网络推广外包
  • 成都高校网站建设服务公司进行网络推广
  • 免抵退税在哪个网站做贵州网站seo
  • 手机版网站的优势百度影响力排名顺序
  • 建设主管部门官方网站关键词怎么写