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

检测网站安全办公室装修合同范本

检测网站安全,办公室装修合同范本,出名的网站有哪些,网站建设客户分析调查表背景 开发中我们需要填写图文内容#xff0c;就是含有图片和文字#xff0c;html标准组件中是没有的。都是第三方来实现#xff0c;就需要我们去集成。 有早期的fckEditor、ckEditor等#xff0c;新的我们使用了vue框架#xff0c;市场又推出了quillEditor。下面我们就在…背景 开发中我们需要填写图文内容就是含有图片和文字html标准组件中是没有的。都是第三方来实现就需要我们去集成。 有早期的fckEditor、ckEditor等新的我们使用了vue框架市场又推出了quillEditor。下面我们就在vitevue项目中集成了这个组件。 效果图 1、安装组件 安装Quill cnpm install vueup/vue-quilllatest --save 安装拖放组件 cnpm install quill-image-drop-module --save 安装图片缩放组件 cnpm install quill-blot-formatter --save 2、创建子组件 封装子组件src/components/QuillEditor/index.vue templateQuillEditorrefmyQuillEditorclassquill-editor:style{ height: height px }contentTypehtmlv-model:contentinnerContent:modulesmodules:optionsoptionsupdate:contenthandleUpdate/QuillEditor /templatescript setup /*** 官方文档 https://vueup.github.io/vue-quill/*/ import { Quill, QuillEditor } from vueup/vue-quill; import vueup/vue-quill/dist/vue-quill.snow.css; //snow主题使用次样式 // import vueup/vue-quill/dist/vue-quill.bubble.css; //bubble主题使用次样式 // import ImageUploader from quill-image-uploader;import { computed, getCurrentInstance, reactive } from vue; // import { customerUpload, DownloadBaseUrl } from /utils;// Quill.register(modules/imageUploader, ImageUploader);//引入并注册图片改变尺寸插件 // cnpm install quill-image-drop-module --save import { ImageDrop } from quill-image-drop-module; Quill.register(modules/imageDrop, ImageDrop)// cnpm install quill-blot-formatter --save import BlotFormatter from quill-blot-formatter Quill.register(modules/blotFormatter, BlotFormatter)const modules {module: BlotFormatter, }const props defineProps({height: {type: Number,default: 500},content: {type: String,default: },toolbar: {type: Array,default() {return [[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 }],[{ size: [small, false, large, huge] }], // text direction // custom dropdown[{ header: [1, 2, 3, 4, 5, 6, false] }],[{ color: [] }, { background: [] }], // dropdown with defaults from theme[{ font: [] }],[{ align: [] }],[link, video, image],[clean] // remove formatting button];}} }); const emit defineEmits([update:content]); const innerContent computed({get() {return props.content;},set(value) {emit(update:content, value);} });const { proxy } getCurrentInstance(); const options reactive({modules: {imageResize: {displayStyles: {backgroundColor: black,border: none,color: white},modules: [Resize, DisplaySize, Toolbar]},toolbar: props.toolbar,imageUploader: {upload: (file) {return new Promise((resolve, reject) {customerUpload(file).then((res) {console.log(res:, res);resolve(${DownloadBaseUrl}pk${res.data[0].pk});}).catch((err) {proxy.$message.error(err);reject(err);});});}}},placeholder: 请输入内容,readOnly: false,theme: snow }); const handleUpdate (content) {console.log(content, innerContent.value); }; /scriptstyle/style 3、页面调用 templateQuillEditor refquillRef v-model:contentcontent :contentcontent :optionseditorOption/{{content}} /templatescript setup import { ref } from vue import QuillEditor from ../components/QuillEditor/index.vuelet content ref(p 请填写内容.../p); let editorOption {modules: {toolbar: [[bold, italic, underline, strike], // 加粗 斜体 下划线 删除线[{ list: ordered }, { list: bullet }], // 有序、无序列表[{ script: sub }, { script: super }], // 上标/下标[blockquote, code-block], // 引用 代码块[{ color: [] }, { background: [] }], // 字体颜色、字体背景颜色[{ align: [] }], // 对齐方式[{ size: [small, false, large, huge] }], // 字体大小[{ font: [] }], // 字体种类[{ header: [1, 2, 3, 4, 5, 6, false] }], // 标题[{ direction: rtl }], // 文本方向[{ indent: -1 }, { indent: 1 }], // 缩进[clean], // 清除文本格式[link, image], // 链接、图片、视频],}, };function editorBlur(val) {console.log(当前的文本框的内容 val); }/scriptstyle/style
http://www.zqtcl.cn/news/158094/

相关文章:

  • 工信部备案网站网站空间服务商
  • 深圳市企业网站seo营销工具桂林百姓网
  • 网站建设所需材料wordpress nginx配置文件
  • 给企业做网站运营广州制作网站公司
  • 一个网站可以有几个关键词网页游戏制作过程
  • 网站可视化后台桥西区网站建设
  • 个人怎么建设网站北京朝阳区最好的小区
  • 企业应该如何建设网站江苏润祥建设集团网站
  • 沈阳网站建设价格wordpress h1标签
  • 找别人做网站一般注意什么三亚专业做网站
  • 企业营销网站的建设罗湖做网站
  • 百度蜘蛛抓取新网站WordPress20w文章
  • 国际贸易网站有哪些可植入代码网站开发
  • 信息服务平台有哪些网站东莞网站关键词
  • 青岛网站定制手机软件开发和网站开发
  • 网站数据库地址是什么看企业网站怎么做到百度秒收
  • 南昌网站建设资讯wordpress dynamo
  • 网站建设招标样本南宁培训网站建设
  • 找回网站备案密码wordpress 2015主题
  • 网站电子商务平台建设域名查询系统
  • 设计制造中国第一架飞机的人是南宁百度快速优化
  • 淘宝联盟网站模板上海做企业网站
  • 繁体中文网站 怎么做wordpress禁止压缩图片
  • 怎么做图片网站百度云做.net网站
  • 长沙网上商城网站建设方案wordpress兼容mip
  • 横向网站模板上海 建筑
  • 手机wap网站程序上海网站制作库榆
  • 深圳网站建设 骏域网站建设推广软文范例大全500
  • 深圳广东网站建设套餐最近新闻事件
  • 电子商务网站建设与管理 pdf“设计网站”