這需要你自定義toolbar。
editorOption: {
modules: {
syntax: {
highlight: text => hljs.highlightAuto(text).value
},
toolbar: [
['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', 'formula']//去除video即可
]
},
placeholder: '編輯內(nèi)容...'
}
1.在html里
script type="text/javascript" src="%PUBLIC_URL%/taolin.js"></script>
2.在webpack里配置:
output: {
.....
publicPath: publicPath,
.....
},
3.引入HtmlWebpackPlugin插件
datazoom有start和end,分別指定最小和最大的初始值
通過babel轉(zhuǎn)義的代碼看出來應(yīng)該是原型繼承
class A {
constructor(a) {
this.a = a;
}
getA() {
console.log(a)
}
}
class B extends A {
constructor(b) {
super()
this.b = b;
}
}
轉(zhuǎn)義后
"use strict";
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var A = function () {
function A(a) {
_classCallCheck(this, A);
this.a = a;
}
_createClass(A, [{
key: "getA",
value: function getA() {
console.log(a);
}
}]);
return A;
}();
var B = function (_A) {
_inherits(B, _A);
function B(b) {
_classCallCheck(this, B);
var _this = _possibleConstructorReturn(this, (B.__proto__ || Object.getPrototypeOf(B)).call(this));
_this.b = b;
return _this;
}
return B;
}(A);
用cnpm安裝即可,問題解決
new Date()
是個(gè)對象startTime.setDate(startTime.getDate() + 1)
這一步操作會修改掉this.searchTime[0]
的值。
建議你打印一下response看一下:console.log(response);
你會發(fā)現(xiàn)兩者的區(qū)別,其實(shí)這也很好理解,每個(gè)插件或者每個(gè)框架都是自己封裝的接口,自己定義的返回體及返回內(nèi)容及其格式,就像自己定義變量似的,怎么定都是自己來定,能達(dá)到效果,不占用保留字就行。
自己找到了解決辦法,
document.forms[0].submit()
試一下
你已經(jīng)拿到了vue的包了,所以直接npm install, 等待安裝完成即可; vue init webpack name 是新建一個(gè)項(xiàng)目
禁止擴(kuò)展(不能添加新屬性):
Object.preventExtensions
密封對象(不能添加新屬性,不能刪除已有屬性):
Object.seal
凍結(jié)對象(不能添加新屬性,不能修改已有屬性,不能刪除已有屬性)
Object.freeze
提供一種思路:
{
width: 100%;
padding-top: 100%;
}
<input v-model=“scope.row.input”>
把 xhr 封裝進(jìn)去 proise 裡面
然後用 async / await
就可以讓你照著順序執(zhí)行
greasemonkey/gm/xhr.ts
然後可以額外偽裝成瀏覽器的 XMLHttpRequest 讓 jquery ajax 調(diào)用
前端可以先通過API接口獲取加密字符串,服務(wù)可以把當(dāng)前登錄的用戶信息緩存起來,后續(xù)前臺的API請求都必須攜帶此串。
當(dāng)websocket建立連接時(shí),發(fā)送加密串,服務(wù)端進(jìn)行鑒權(quán)!
我們也使用springboot, 怎么沒發(fā)現(xiàn)你的這個(gè)問題呀?
存成pickle文件再去讀取沒有你想像中的速度快
如果數(shù)據(jù)量不大,直接生成json對象放到代碼里
addCart
的邏輯有問題。。判斷是否有商品,有就更新數(shù)量,沒有就添加商品。代碼大概如下:
// cartList的結(jié)構(gòu)是這樣:
// [{
// name:"橙汁",
// count:1
// },{
// name:"雪碧",
// count:1
// }]
addCart(newFood) {
//判斷是否購物車中已經(jīng)有商品,如果有就增加數(shù)量,反之加入這個(gè)商品
let foodIndex = this.cartList.findIndex(food => food.name == newFood);
//foodIndex為-1表示不存在 ,要加入商品
if (foodIndex === -1) {
cartList.push({
name: newFood,
count: 1
})
//foodIndex存在 ,更新數(shù)據(jù)
} else {
cartList[foodIndex].count++
}
}
同樣你刪除商品時(shí),如果刪除后數(shù)量為0,就從購物車中移除。
ps: 命令規(guī)范點(diǎn)啊,carList
我改成cartList
了
樓主后來解決了嗎?和你遇到一樣的問題.
北大青鳥APTECH成立于1999年。依托北京大學(xué)優(yōu)質(zhì)雄厚的教育資源和背景,秉承“教育改變生活”的發(fā)展理念,致力于培養(yǎng)中國IT技能型緊缺人才,是大數(shù)據(jù)專業(yè)的國家
北大青鳥中博軟件學(xué)院創(chuàng)立于2003年,作為華東區(qū)著名互聯(lián)網(wǎng)學(xué)院和江蘇省首批服務(wù)外包人才培訓(xùn)基地,中博成功培育了近30000名軟件工程師走向高薪崗位,合作企業(yè)超4
中公教育集團(tuán)創(chuàng)建于1999年,經(jīng)過二十年潛心發(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),是中國一站式人才培養(yǎng)平臺、一站式人才輸送平臺。2014年4月3日在美國成功上市,融資1
曾工作于聯(lián)想擔(dān)任系統(tǒng)開發(fā)工程師,曾在博彥科技股份有限公司擔(dān)任項(xiàng)目經(jī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ù), 熟練的跨平臺面向?qū)ο箝_發(fā)經(jīng)驗(yàn),技術(shù)功底深厚。 授課風(fēng)格 授課風(fēng)格清新自然、條理清晰、主次分明、重點(diǎn)難點(diǎn)突出、引人入勝。
精通HTML5和CSS3;Javascript及主流js庫,具有快速界面開發(fā)的能力,對瀏覽器兼容性、前端性能優(yōu)化等有深入理解。精通網(wǎng)頁制作和網(wǎng)頁游戲開發(fā)。
具有10 年的Java 企業(yè)應(yīng)用開發(fā)經(jīng)驗(yàn)。曾經(jīng)歷任德國Software AG 技術(shù)顧問,美國Dachieve 系統(tǒng)架構(gòu)師,美國AngelEngineers Inc. 系統(tǒng)架構(gòu)師。