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