Authored by 张帅

页面优化

... ... @@ -223,12 +223,14 @@
// $("#content-count").text(count);
// });
/*字数限制*/
$("#content").on("keydown keyup mousedown change", function() {
$("#content").emojioneArea()[0].emojioneArea.on("keyup change",function (edite,event) {
debugger
var $this = $(this);
var count = $this.val().length;
var count = $this[0].getText().length;
var content = $this[0].getText();
if(count>500){
$.messager.alert("发布失败", "内容长度超过500,请重新输入", "error");
$this[0].setText(content.substring(0,500));
count = $this[0].getText().length;
}
$("#content-count").text(count);
});
... ...
... ... @@ -270,17 +270,27 @@
// });
/*字数限制*/
$("#content").on("keydown keyup mousedown change", function() {
// $("#content").emojioneArea().on("keypress", function() {
// debugger
// var $this = $(this);
// var count = $this.val().length;
// if(count>500){
// $.messager.alert("发布失败", "内容长度超过500,请重新输入", "error");
// }
// $("#content-count").text(count);
// });
$("#content").emojioneArea()[0].emojioneArea.on("keyup change",function (edite,event) {
debugger
var $this = $(this);
var count = $this.val().length;
var count = $this[0].getText().length;
var content = $this[0].getText();
if(count>500){
$.messager.alert("发布失败", "内容长度超过500,请重新输入", "error");
$this[0].setText(content.substring(0,500));
count = $this[0].getText().length;
}
$("#content-count").text(count);
});
$("#labelId").combobox({
prompt: "请选择标签",
required: false,
... ...