Browse Source

复制粘贴去除引号

laiguoran 3 years ago
parent
commit
286fb1c258
1 changed files with 2 additions and 1 deletions
  1. 2 1
      app/public/js/change_information_set.js

+ 2 - 1
app/public/js/change_information_set.js

@@ -1165,7 +1165,8 @@ $(document).ready(() => {
     $('#list-input').on('blur', function () {
     $('#list-input').on('blur', function () {
         const select = parseInt($('#select-list').val());
         const select = parseInt($('#select-list').val());
         const value = _.trim($(this).val());
         const value = _.trim($(this).val());
-        const valueList = _.slice(_.without(_.uniq(_.replace(value, /\t/g, ' ').split(' ')), ''), 0, 10);
+        console.log(value);
+        const valueList = _.slice(_.without(_.uniq(_.replace(_.replace(value, /\'|\"/g, ''), /\t/g, ' ').split(' ')), ''), 0, 10);
         console.log(valueList);
         console.log(valueList);
         // 判断是否存在多个分词,以换行或空格分隔,多个则显示左侧菜单
         // 判断是否存在多个分词,以换行或空格分隔,多个则显示左侧菜单
         if (value !== '' && valueList.length > 1) {
         if (value !== '' && valueList.length > 1) {