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.
- package/CHANGELOG.md +15 -8
- package/es/affix/index.js +8 -8
- package/es/age/index.js +10 -10
- package/es/alert/index.js +8 -8
- package/es/anchor/index.js +8 -8
- package/es/auto-complete/index.js +8 -8
- package/es/avatar/index.js +8 -8
- package/es/back-top/index.js +8 -8
- package/es/badge/index.js +8 -8
- package/es/base/index.js +8 -8
- package/es/big-table/index.js +311 -283
- package/es/big-table/style.css +1 -1
- package/es/breadcrumb/index.js +8 -8
- package/es/button/index.js +28 -28
- package/es/calendar/index.js +8 -8
- package/es/captcha/index.js +3 -3
- package/es/card/index.js +8 -8
- package/es/carousel/index.js +8 -8
- package/es/cascader/index.js +8 -8
- package/es/checkbox/index.js +9 -9
- package/es/col/index.js +8 -8
- package/es/collapse/index.js +8 -8
- package/es/color-picker/index.js +1 -1
- package/es/comment/index.js +8 -8
- package/es/config-provider/index.js +8 -8
- package/es/date-picker/index.js +8 -8
- package/es/descriptions/index.js +8 -8
- package/es/divider/index.js +8 -8
- package/es/drag-layout/index.js +3 -3
- package/es/drawer/index.js +8 -8
- package/es/dropdown/index.js +8 -8
- package/es/editor/index.js +37 -24
- package/es/editor/style.css +1 -1
- package/es/empty/index.js +8 -8
- package/es/fabric-chart/index.js +9 -9
- package/es/form/index.js +8 -8
- package/es/form-model/index.js +8 -8
- package/es/form-table/index.js +62 -62
- package/es/index/index.js +766 -723
- package/es/index/style.css +1 -1
- package/es/input/index.js +9 -9
- package/es/input-number/index.js +8 -8
- package/es/layout/index.js +8 -8
- package/es/list/index.js +8 -8
- package/es/locale-provider/index.js +8 -8
- package/es/map/index.js +9 -9
- package/es/mentions/index.js +8 -8
- package/es/menu/index.js +8 -8
- package/es/message/index.js +8 -8
- package/es/multi-chat/index.js +142 -126
- package/es/multi-chat/style.css +1 -1
- package/es/multi-chat-client/index.js +108 -92
- package/es/multi-chat-client/style.css +1 -1
- package/es/multi-chat-history/index.js +27 -27
- package/es/multi-chat-history/style.css +1 -1
- package/es/multi-chat-record/index.js +37 -37
- package/es/multi-chat-record/style.css +1 -1
- package/es/multi-chat-setting/index.js +61 -45
- package/es/multi-chat-setting/style.css +1 -1
- package/es/multi-chat-sip/index.js +1 -1
- package/es/notification/index.js +8 -8
- package/es/page-header/index.js +8 -8
- package/es/pagination/index.js +8 -8
- package/es/popconfirm/index.js +8 -8
- package/es/popover/index.js +8 -8
- package/es/progress/index.js +8 -8
- package/es/radio/index.js +9 -9
- package/es/rate/index.js +8 -8
- package/es/result/index.js +8 -8
- package/es/row/index.js +8 -8
- package/es/scale-view/index.js +24 -24
- package/es/select/index.js +11 -11
- package/es/select-label/index.js +11 -11
- package/es/select-person/index.js +2 -2
- package/es/skeleton/index.js +8 -8
- package/es/slider/index.js +8 -8
- package/es/space/index.js +8 -8
- package/es/spin/index.js +8 -8
- package/es/statistic/index.js +8 -8
- package/es/steps/index.js +8 -8
- package/es/switch/index.js +8 -8
- package/es/table-filter/index.js +53 -53
- package/es/tabs/index.js +8 -8
- package/es/tag/index.js +9 -9
- package/es/time-picker/index.js +8 -8
- package/es/timeline/index.js +8 -8
- package/es/tooltip/index.js +8 -8
- package/es/transfer/index.js +8 -8
- package/es/tree/index.js +8 -8
- package/es/tree-select/index.js +8 -8
- package/es/upload/index.js +8 -8
- package/es/verification-code/index.js +2 -2
- package/lib/cui.common.js +4825 -7064
- package/lib/cui.umd.js +4825 -7064
- package/lib/cui.umd.min.js +85 -85
- package/package.json +2 -1
- package/packages/big-table/index.js +2 -0
- package/packages/big-table/src/BigTable.vue +11 -1
- package/packages/editor/index.js +2 -0
- package/packages/editor/src/Editor.vue +1 -1
- package/packages/multi-chat/chat/chatHistory.vue +1 -1
- package/packages/multi-chat/chat/chatMain.vue +1 -1
- package/packages/multi-chat/chat/messageRecord.vue +1 -1
- package/packages/multi-chat/chat/mixins/base.js +5 -0
- package/packages/multi-chat/chat/scrollList.vue +1 -1
- 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.
|
|
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
|
-
|
|
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() {
|
package/packages/editor/index.js
CHANGED
|
@@ -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" />
|