cnhis-design-vue 2.0.2 → 2.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/CHANGELOG.md +15 -8
  2. package/es/affix/index.js +8 -8
  3. package/es/age/index.js +10 -10
  4. package/es/alert/index.js +8 -8
  5. package/es/anchor/index.js +8 -8
  6. package/es/auto-complete/index.js +8 -8
  7. package/es/avatar/index.js +8 -8
  8. package/es/back-top/index.js +8 -8
  9. package/es/badge/index.js +8 -8
  10. package/es/base/index.js +8 -8
  11. package/es/big-table/index.js +311 -283
  12. package/es/big-table/style.css +1 -1
  13. package/es/breadcrumb/index.js +8 -8
  14. package/es/button/index.js +28 -28
  15. package/es/calendar/index.js +8 -8
  16. package/es/captcha/index.js +3 -3
  17. package/es/card/index.js +8 -8
  18. package/es/carousel/index.js +8 -8
  19. package/es/cascader/index.js +8 -8
  20. package/es/checkbox/index.js +9 -9
  21. package/es/col/index.js +8 -8
  22. package/es/collapse/index.js +8 -8
  23. package/es/color-picker/index.js +1 -1
  24. package/es/comment/index.js +8 -8
  25. package/es/config-provider/index.js +8 -8
  26. package/es/date-picker/index.js +8 -8
  27. package/es/descriptions/index.js +8 -8
  28. package/es/divider/index.js +8 -8
  29. package/es/drag-layout/index.js +3 -3
  30. package/es/drawer/index.js +8 -8
  31. package/es/dropdown/index.js +8 -8
  32. package/es/editor/index.js +37 -24
  33. package/es/editor/style.css +1 -1
  34. package/es/empty/index.js +8 -8
  35. package/es/fabric-chart/index.js +9 -9
  36. package/es/form/index.js +8 -8
  37. package/es/form-model/index.js +8 -8
  38. package/es/form-table/index.js +62 -62
  39. package/es/index/index.js +766 -723
  40. package/es/index/style.css +1 -1
  41. package/es/input/index.js +9 -9
  42. package/es/input-number/index.js +8 -8
  43. package/es/layout/index.js +8 -8
  44. package/es/list/index.js +8 -8
  45. package/es/locale-provider/index.js +8 -8
  46. package/es/map/index.js +9 -9
  47. package/es/mentions/index.js +8 -8
  48. package/es/menu/index.js +8 -8
  49. package/es/message/index.js +8 -8
  50. package/es/multi-chat/index.js +142 -126
  51. package/es/multi-chat/style.css +1 -1
  52. package/es/multi-chat-client/index.js +108 -92
  53. package/es/multi-chat-client/style.css +1 -1
  54. package/es/multi-chat-history/index.js +27 -27
  55. package/es/multi-chat-history/style.css +1 -1
  56. package/es/multi-chat-record/index.js +37 -37
  57. package/es/multi-chat-record/style.css +1 -1
  58. package/es/multi-chat-setting/index.js +61 -45
  59. package/es/multi-chat-setting/style.css +1 -1
  60. package/es/multi-chat-sip/index.js +1 -1
  61. package/es/notification/index.js +8 -8
  62. package/es/page-header/index.js +8 -8
  63. package/es/pagination/index.js +8 -8
  64. package/es/popconfirm/index.js +8 -8
  65. package/es/popover/index.js +8 -8
  66. package/es/progress/index.js +8 -8
  67. package/es/radio/index.js +9 -9
  68. package/es/rate/index.js +8 -8
  69. package/es/result/index.js +8 -8
  70. package/es/row/index.js +8 -8
  71. package/es/scale-view/index.js +24 -24
  72. package/es/select/index.js +11 -11
  73. package/es/select-label/index.js +11 -11
  74. package/es/select-person/index.js +2 -2
  75. package/es/skeleton/index.js +8 -8
  76. package/es/slider/index.js +8 -8
  77. package/es/space/index.js +8 -8
  78. package/es/spin/index.js +8 -8
  79. package/es/statistic/index.js +8 -8
  80. package/es/steps/index.js +8 -8
  81. package/es/switch/index.js +8 -8
  82. package/es/table-filter/index.js +53 -53
  83. package/es/tabs/index.js +8 -8
  84. package/es/tag/index.js +9 -9
  85. package/es/time-picker/index.js +8 -8
  86. package/es/timeline/index.js +8 -8
  87. package/es/tooltip/index.js +8 -8
  88. package/es/transfer/index.js +8 -8
  89. package/es/tree/index.js +8 -8
  90. package/es/tree-select/index.js +8 -8
  91. package/es/upload/index.js +8 -8
  92. package/es/verification-code/index.js +2 -2
  93. package/lib/cui.common.js +4825 -7064
  94. package/lib/cui.umd.js +4825 -7064
  95. package/lib/cui.umd.min.js +85 -85
  96. package/package.json +2 -1
  97. package/packages/big-table/index.js +2 -0
  98. package/packages/big-table/src/BigTable.vue +11 -1
  99. package/packages/editor/index.js +2 -0
  100. package/packages/editor/src/Editor.vue +1 -1
  101. package/packages/multi-chat/chat/chatHistory.vue +1 -1
  102. package/packages/multi-chat/chat/chatMain.vue +1 -1
  103. package/packages/multi-chat/chat/messageRecord.vue +1 -1
  104. package/packages/multi-chat/chat/mixins/base.js +5 -0
  105. package/packages/multi-chat/chat/scrollList.vue +1 -1
  106. package/packages/multi-chat/setting/sessionList/messageRecord.vue +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
4
4
  "description": "前端业务UI库",
5
5
  "keyword": "cnhis-design-vue vue cnhis",
6
6
  "homepage": "http://dv.cnhis.com/",
@@ -52,6 +52,7 @@
52
52
  "vue-infinite-scroll": "^2.0.2",
53
53
  "vue-resize-directive": "^1.2.0",
54
54
  "vue-simple-uploader": "^0.7.6",
55
+ "vue-xss": "^1.0.4",
55
56
  "vuedraggable": "^2.24.3",
56
57
  "vxe-table": "^3.4.1",
57
58
  "vxe-table-plugin-antd": "^1.11.3",
@@ -1,11 +1,13 @@
1
1
  // 导入组件
2
2
  import BigTable from './src/BigTable.vue';
3
3
  import Fieldset from './src/Fieldset.vue';
4
+ import VueXss from "vue-xss";
4
5
 
5
6
  // 为组件提供 install 安装方法,供按需引入
6
7
  BigTable.install = function(Vue) {
7
8
  Vue.component(BigTable.name, BigTable);
8
9
  Vue.component(Fieldset.name, Fieldset);
10
+ Vue.use(VueXss);
9
11
  };
10
12
 
11
13
  Object.assign(BigTable, {
@@ -375,7 +375,17 @@ export default create({
375
375
  this.loadColumn(config);
376
376
  },
377
377
  data(value) {
378
- this.loadData(value);
378
+ const list = value.map(v => {
379
+ const newV = {};
380
+ for (let i in v) {
381
+ newV[i] = JSON.parse(JSON.stringify(v[i] || ""));
382
+ if (newV[i] && typeof v[i] === "string") {
383
+ newV[i] = this.$xss(v[i]);
384
+ }
385
+ }
386
+ return newV;
387
+ });
388
+ this.loadData(list);
379
389
  },
380
390
  quickSearchConfig: {
381
391
  handler: function() {
@@ -1,9 +1,11 @@
1
1
  // 导入组件
2
2
  import Editor from './src/Editor.vue';
3
+ import VueXss from "vue-xss";
3
4
 
4
5
  // 为组件提供 install 安装方法,供按需引入
5
6
  Editor.install = function(Vue) {
6
7
  Vue.component(Editor.name, Editor);
8
+ Vue.use(VueXss);
7
9
  };
8
10
 
9
11
  // 默认导出组件
@@ -126,7 +126,7 @@ export default create({
126
126
  this.$emit('input', res);
127
127
  },
128
128
  setContent(content) {
129
- this.editor.txt.html(content);
129
+ this.editor.txt.html((content && this.$xss(content)) || '');
130
130
  },
131
131
  appendContent(content) {
132
132
  this.editor.txt.append(content);
@@ -21,7 +21,7 @@
21
21
  <span class="right-time">
22
22
  {{ formatDate(item.createdTime || item.sendTime, true) }}
23
23
  </span>
24
- <p class="content" v-html="item.content.content"></p>
24
+ <p class="content" v-html="$xss(item.content.content)"></p>
25
25
  </div>
26
26
  <div v-else-if="item.content.type === 1" style="margin-bottom: 20px;" class="upload-image content-wrap">
27
27
  <span class="right-time">
@@ -93,7 +93,7 @@
93
93
  'has-intention': item.intentionList && item.intentionList.length
94
94
  }"
95
95
  >
96
- <p v-html="item.content.content"></p>
96
+ <p v-html="$xss(item.content.content)"></p>
97
97
  <template v-if="item.content.attachments && item.content.attachments.length > 0">
98
98
  <div v-for="(v, index) in item.content.attachments" :key="index" class="robot-item">
99
99
  <a v-if="v.type == 1" :href="v.url" target="_blank"> {{ v.desc }}(超链) </a>
@@ -26,7 +26,7 @@
26
26
  <span class="name">{{ getName(item) }}</span>
27
27
  <span class="time">{{ formatDate(item.sendTime || item.createdTime, true) }}</span>
28
28
  </div>
29
- <div class="content" v-if="item.content.type === 0" v-html="item.content.content"></div>
29
+ <div class="content" v-if="item.content.type === 0" v-html="$xss(item.content.content)"></div>
30
30
  <MsgPicture v-if="item.content.type === 1" :image="item.content.content" style="width:160px;" @click="show(item.content.content)" />
31
31
  <template v-else-if="item.content.type === 4">
32
32
  <div v-if="isSystemMsg(item)" class="system-msg">
@@ -1,5 +1,7 @@
1
1
  import ChatStore from '../../store';
2
2
  import { mapMutations } from '../../store/helper';
3
+ import VueXss from "vue-xss";
4
+ import Vue from 'vue'
3
5
 
4
6
  export default {
5
7
  provide() {
@@ -12,6 +14,9 @@ export default {
12
14
  i18nText: this.i18nText
13
15
  };
14
16
  },
17
+ beforeCreate() {
18
+ !this.$xss && Vue.use(VueXss);
19
+ },
15
20
  props: {
16
21
  getI18nText: {
17
22
  type: Function
@@ -951,7 +951,7 @@ export default {
951
951
  </div>
952
952
  <div class="chat-scroll-session__remark">{item.remarkSetting}</div>
953
953
  <div class="chat-scroll-session__brief-count">
954
- <div class="chat-scroll-session__brief" domPropsInnerHTML={item.contentSetting}></div>
954
+ <div class="chat-scroll-session__brief" domPropsInnerHTML={this.$xss(item.contentSetting)}></div>
955
955
  {msgCount ? <span class="chat-scroll-session__count">{msgCount > 99 ? <a-tooltip title={msgCount}>99+</a-tooltip> : formatCount(item)}</span> : null}
956
956
  {statusSetting ? <span class="chat-scroll-session__level" domPropsInnerHTML={statusSetting}></span> : null}
957
957
  </div>
@@ -17,7 +17,7 @@
17
17
  {{ formatDate(item.sendTime || item.createdTime, true) }}
18
18
  </span>
19
19
  </div>
20
- <div class="content" v-if="item.content.type === 0" v-html="item.content.content"></div>
20
+ <div class="content" v-if="item.content.type === 0" v-html="$xss(item.content.content)"></div>
21
21
  <MsgPicture v-if="item.content.type === 1" :image="item.content.content" style="width:160px;" @click="show(item.content.content)" />
22
22
  <p class="content" v-else-if="item.content.type === 2">
23
23
  <img style="width:16px;" src="../../img/video_consult.png" />