<template>
<div data-page="releaseNotice">
<vue-html5-editor :content="content" :height="500"></vue-html5-editor>
</div>
</template>
<script>
import Vue from 'vue'
import VueHtml5Editor from 'vue-html5-editor'
Vue.use(VueHtml5Editor,options);
export default {
data() {
return {}
},
methods : {
Vue.use(VueHtml5Editor, {
// 全局組件名稱(chēng),使用new VueHtml5Editor(options)時(shí)該選項(xiàng)無(wú)效
// global component name
name: "vue-html5-editor",
// 是否顯示模塊名稱(chēng),開(kāi)啟的話會(huì)在工具欄的圖標(biāo)后臺(tái)直接顯示名稱(chēng)
// if set true,will append module name to toolbar after icon
showModuleName: false,
// 自定義各個(gè)圖標(biāo)的class,默認(rèn)使用的是font-awesome提供的圖標(biāo)
// custom icon class of built-in modules,default using font-awesome
icons: {
text: "fa fa-pencil",
color: "fa fa-paint-brush",
font: "fa fa-font",
align: "fa fa-align-justify",
list: "fa fa-list",
link: "fa fa-chain",
unlink: "fa fa-chain-broken",
tabulation: "fa fa-table",
image: "fa fa-file-image-o",
hr: "fa fa-minus",
eraser: "fa fa-eraser",
undo: "fa-undo fa",
"full-screen": "fa fa-arrows-alt",
info: "fa fa-info",
},
// 配置圖片模塊
// config image module
image: {
// 文件最大體積,單位字節(jié) max file size
sizeLimit: 512 * 1024,
// 上傳參數(shù),默認(rèn)把圖片轉(zhuǎn)為base64而不上傳
// upload config,default null and convert image to base64
upload: {
url: null,
headers: {},
params: {},
fieldName: {}
},
// 壓縮參數(shù),默認(rèn)使用localResizeIMG進(jìn)行壓縮,設(shè)置為null禁止壓縮
// compression config,default resize image by localResizeIMG (https://github.com/think2011/localResizeIMG)
// set null to disable compression
compress: {
width: 1600,
height: 1600,
quality: 80
},
// 響應(yīng)數(shù)據(jù)處理,最終返回圖片鏈接
// handle response data,return image url
uploadHandler(responseText){
//default accept json data like {ok:false,msg:"unexpected"} or {ok:true,data:"image url"}
var json = JSON.parse(responseText)
if (!json.ok) {
alert(json.msg)
} else {
return json.data
}
}
},
// 語(yǔ)言,內(nèi)建的有英文(en-us)和中文(zh-cn)
//default en-us, en-us and zh-cn are built-in
language: "zh-cn",
// 自定義語(yǔ)言
i18n: {
//specify your language here
"zh-cn": {
"align": "對(duì)齊方式",
"image": "圖片",
"list": "列表",
"link": "鏈接",
"unlink": "去除鏈接",
"table": "表格",
"font": "文字",
"full screen": "全屏",
"text": "排版",
"eraser": "格式清除",
"info": "關(guān)于",
"color": "顏色",
"please enter a url": "請(qǐng)輸入地址",
"create link": "創(chuàng)建鏈接",
"bold": "加粗",
"italic": "傾斜",
"underline": "下劃線",
"strike through": "刪除線",
"subscript": "上標(biāo)",
"superscript": "下標(biāo)",
"heading": "標(biāo)題",
"font name": "字體",
"font size": "文字大小",
"left justify": "左對(duì)齊",
"center justify": "居中",
"right justify": "右對(duì)齊",
"ordered list": "有序列表",
"unordered list": "無(wú)序列表",
"fore color": "前景色",
"background color": "背景色",
"row count": "行數(shù)",
"column count": "列數(shù)",
"save": "確定",
"upload": "上傳",
"progress": "進(jìn)度",
"unknown": "未知",
"please wait": "請(qǐng)稍等",
"error": "錯(cuò)誤",
"abort": "中斷",
"reset": "重置"
}
},
// 隱藏不想要顯示出來(lái)的模塊
// the modules you don't want
hiddenModules: [],
// 自定義要顯示的模塊,并控制順序
// keep only the modules you want and customize the order.
// can be used with hiddenModules together
visibleModules: [
"text",
"color",
"font",
"align",
"list",
"link",
"unlink",
"tabulation",
"image",
"hr",
"eraser",
"undo",
"full-screen",
"info",
],
// 擴(kuò)展模塊,具體可以參考examples或查看源碼
// extended modules
modules: {
//omit,reference to source code of build-in modules
}
})
},
components: { VueHtml5Editor }
}
</script>
這樣寫(xiě)有錯(cuò),請(qǐng)誰(shuí)告訴我正確的使用方法
把methods里面的vue.use刪掉,放在外面`Vue.use(VueHtml5Editor, {
// 全局組件名稱(chēng),使用new VueHtml5Editor(options)時(shí)該選項(xiàng)無(wú)效
// global component name
name: "vue-html5-editor",
// 是否顯示模塊名稱(chēng),開(kāi)啟的話會(huì)在工具欄的圖標(biāo)后臺(tái)直接顯示名稱(chēng)
// if set true,will append module name to toolbar after icon
showModuleName: false,
// 自定義各個(gè)圖標(biāo)的class,默認(rèn)使用的是font-awesome提供的圖標(biāo)
// custom icon class of built-in modules,default using font-awesome
icons: {
text: "fa fa-pencil",
color: "fa fa-paint-brush",
font: "fa fa-font",
align: "fa fa-align-justify",
list: "fa fa-list",
link: "fa fa-chain",
unlink: "fa fa-chain-broken",
tabulation: "fa fa-table",
image: "fa fa-file-image-o",
hr: "fa fa-minus",
eraser: "fa fa-eraser",
undo: "fa-undo fa",
"full-screen": "fa fa-arrows-alt",
info: "fa fa-info",
},
// 配置圖片模塊
// config image module
image: {
// 文件最大體積,單位字節(jié) max file size
sizeLimit: 512 * 1024,
// 上傳參數(shù),默認(rèn)把圖片轉(zhuǎn)為base64而不上傳
// upload config,default null and convert image to base64
upload: {
url: null,
headers: {},
params: {},
fieldName: {}
},
// 壓縮參數(shù),默認(rèn)使用localResizeIMG進(jìn)行壓縮,設(shè)置為null禁止壓縮
// compression config,default resize image by localResizeIMG (https://github.com/think2011/localResizeIMG)
// set null to disable compression
compress: {
width: 1600,
height: 1600,
quality: 80
},
// 響應(yīng)數(shù)據(jù)處理,最終返回圖片鏈接
// handle response data,return image url
uploadHandler(responseText){
//default accept json data like {ok:false,msg:"unexpected"} or {ok:true,data:"image url"}
var json = JSON.parse(responseText)
if (!json.ok) {
alert(json.msg)
} else {
return json.data
}
}
},
// 語(yǔ)言,內(nèi)建的有英文(en-us)和中文(zh-cn)
//default en-us, en-us and zh-cn are built-in
language: "zh-cn",
// 自定義語(yǔ)言
i18n: {
//specify your language here
"zh-cn": {
"align": "對(duì)齊方式",
"image": "圖片",
"list": "列表",
"link": "鏈接",
"unlink": "去除鏈接",
"table": "表格",
"font": "文字",
"full screen": "全屏",
"text": "排版",
"eraser": "格式清除",
"info": "關(guān)于",
"color": "顏色",
"please enter a url": "請(qǐng)輸入地址",
"create link": "創(chuàng)建鏈接",
"bold": "加粗",
"italic": "傾斜",
"underline": "下劃線",
"strike through": "刪除線",
"subscript": "上標(biāo)",
"superscript": "下標(biāo)",
"heading": "標(biāo)題",
"font name": "字體",
"font size": "文字大小",
"left justify": "左對(duì)齊",
"center justify": "居中",
"right justify": "右對(duì)齊",
"ordered list": "有序列表",
"unordered list": "無(wú)序列表",
"fore color": "前景色",
"background color": "背景色",
"row count": "行數(shù)",
"column count": "列數(shù)",
"save": "確定",
"upload": "上傳",
"progress": "進(jìn)度",
"unknown": "未知",
"please wait": "請(qǐng)稍等",
"error": "錯(cuò)誤",
"abort": "中斷",
"reset": "重置"
}
},
// 隱藏不想要顯示出來(lái)的模塊
// the modules you don't want
hiddenModules: [],
// 自定義要顯示的模塊,并控制順序
// keep only the modules you want and customize the order.
// can be used with hiddenModules together
visibleModules: [
"text",
"color",
"font",
"align",
"list",
"link",
"unlink",
"tabulation",
"image",
"hr",
"eraser",
"undo",
"full-screen",
"info",
],
// 擴(kuò)展模塊,具體可以參考examples或查看源碼
// extended modules
modules: {
//omit,reference to source code of build-in modules
}
})`
北大青鳥(niǎo)APTECH成立于1999年。依托北京大學(xué)優(yōu)質(zhì)雄厚的教育資源和背景,秉承“教育改變生活”的發(fā)展理念,致力于培養(yǎng)中國(guó)IT技能型緊缺人才,是大數(shù)據(jù)專(zhuān)業(yè)的國(guó)家
北大青鳥(niǎo)中博軟件學(xué)院創(chuàng)立于2003年,作為華東區(qū)著名互聯(lián)網(wǎng)學(xué)院和江蘇省首批服務(wù)外包人才培訓(xùn)基地,中博成功培育了近30000名軟件工程師走向高薪崗位,合作企業(yè)超4
中公教育集團(tuán)創(chuàng)建于1999年,經(jīng)過(guò)二十年潛心發(fā)展,已由一家北大畢業(yè)生自主創(chuàng)業(yè)的信息技術(shù)與教育服務(wù)機(jī)構(gòu),發(fā)展為教育服務(wù)業(yè)的綜合性企業(yè)集團(tuán),成為集合面授教學(xué)培訓(xùn)、網(wǎng)
達(dá)內(nèi)教育集團(tuán)成立于2002年,是一家由留學(xué)海歸創(chuàng)辦的高端職業(yè)教育培訓(xùn)機(jī)構(gòu),是中國(guó)一站式人才培養(yǎng)平臺(tái)、一站式人才輸送平臺(tái)。2014年4月3日在美國(guó)成功上市,融資1
曾工作于聯(lián)想擔(dān)任系統(tǒng)開(kāi)發(fā)工程師,曾在博彥科技股份有限公司擔(dān)任項(xiàng)目經(jīng)理從事移動(dòng)互聯(lián)網(wǎng)管理及研發(fā)工作,曾創(chuàng)辦藍(lán)懿科技有限責(zé)任公司從事總經(jīng)理職務(wù)負(fù)責(zé)iOS教學(xué)及管理工作。
浪潮集團(tuán)項(xiàng)目經(jīng)理。精通Java與.NET 技術(shù), 熟練的跨平臺(tái)面向?qū)ο箝_(kāi)發(fā)經(jīng)驗(yàn),技術(shù)功底深厚。 授課風(fēng)格 授課風(fēng)格清新自然、條理清晰、主次分明、重點(diǎn)難點(diǎn)突出、引人入勝。
精通HTML5和CSS3;Javascript及主流js庫(kù),具有快速界面開(kāi)發(fā)的能力,對(duì)瀏覽器兼容性、前端性能優(yōu)化等有深入理解。精通網(wǎng)頁(yè)制作和網(wǎng)頁(yè)游戲開(kāi)發(fā)。
具有10 年的Java 企業(yè)應(yīng)用開(kāi)發(fā)經(jīng)驗(yàn)。曾經(jīng)歷任德國(guó)Software AG 技術(shù)顧問(wèn),美國(guó)Dachieve 系統(tǒng)架構(gòu)師,美國(guó)AngelEngineers Inc. 系統(tǒng)架構(gòu)師。