askbot-dragon 1.6.22-beta → 1.6.23-beta

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 (90) hide show
  1. package/README.md +27 -27
  2. package/babel.config.js +6 -6
  3. package/dragon.iml +7 -7
  4. package/package.json +58 -59
  5. package/public/index.html +74 -74
  6. package/src/App.vue +31 -31
  7. package/src/api/index.js +1 -1
  8. package/src/api/mock.http +2 -2
  9. package/src/api/requestUrl.js +185 -185
  10. package/src/assets/js/AliyunlssUtil.js +92 -92
  11. package/src/assets/js/Base64Util.js +22 -22
  12. package/src/assets/js/common.js +75 -11
  13. package/src/assets/js/hammer.js +100 -89
  14. package/src/assets/js/script.js +36 -36
  15. package/src/assets/less/common.css +6773 -6773
  16. package/src/assets/less/converSationContainer/common.less +199 -192
  17. package/src/assets/less/converSationContainer/converSatonContainer.less +493 -493
  18. package/src/assets/less/iconfont.css +37 -37
  19. package/src/assets/less/ticketMessage.less +294 -294
  20. package/src/components/ActionAlertIframe.vue +177 -154
  21. package/src/components/AiGuide.vue +466 -468
  22. package/src/components/AnswerDocknowledge.vue +597 -556
  23. package/src/components/AnswerVoice.vue +285 -285
  24. package/src/components/AskIFrame.vue +15 -15
  25. package/src/components/ConversationContainer.vue +4969 -4820
  26. package/src/components/FileType.vue +86 -86
  27. package/src/components/Message.vue +27 -27
  28. package/src/components/actionSatisfaction.vue +107 -107
  29. package/src/components/actionSendToBot.vue +62 -62
  30. package/src/components/answerDissatisfaction.vue +62 -62
  31. package/src/components/answerRadio.vue +132 -132
  32. package/src/components/ask-components/DissatisfactionOptions.vue +57 -57
  33. package/src/components/ask-components/Msgloading.vue +37 -37
  34. package/src/components/ask-components/SatisfactionV2.vue +15 -15
  35. package/src/components/askVideo.vue +162 -142
  36. package/src/components/assetDetails.vue +370 -370
  37. package/src/components/assetMessage.vue +228 -228
  38. package/src/components/associationIntention.vue +355 -349
  39. package/src/components/attachmentPreview.vue +90 -90
  40. package/src/components/botActionSatisfactor.vue +68 -68
  41. package/src/components/chatContent.vue +513 -513
  42. package/src/components/feedBack.vue +136 -136
  43. package/src/components/fielListView.vue +351 -351
  44. package/src/components/file/AliyunOssComponents.vue +108 -108
  45. package/src/components/formTemplate.vue +3576 -3581
  46. package/src/components/kkview.vue +1138 -1138
  47. package/src/components/loadingProcess.vue +164 -164
  48. package/src/components/message/ActionAlertIframe.vue +112 -112
  49. package/src/components/message/ShopMessage.vue +164 -164
  50. package/src/components/message/TextMessage.vue +924 -924
  51. package/src/components/message/TicketMessage.vue +201 -201
  52. package/src/components/message/swiper/index.js +4 -4
  53. package/src/components/message/swiper/ticketSwiper.vue +503 -503
  54. package/src/components/message/swiper/ticketSwiperItem.vue +61 -61
  55. package/src/components/msgLoading.vue +231 -231
  56. package/src/components/myPopup.vue +70 -70
  57. package/src/components/newPdfPosition.vue +878 -0
  58. package/src/components/pdfPosition.vue +1508 -1328
  59. package/src/components/popup.vue +227 -227
  60. package/src/components/previewDoc.vue +242 -242
  61. package/src/components/previewPdf.vue +315 -302
  62. package/src/components/receiverMessagePlatform.vue +65 -65
  63. package/src/components/recommend.vue +80 -80
  64. package/src/components/selector/hOption.vue +20 -20
  65. package/src/components/selector/hSelector.vue +199 -199
  66. package/src/components/selector/hWrapper.vue +216 -216
  67. package/src/components/senderMessagePlatform.vue +50 -50
  68. package/src/components/source/BotMessage.vue +24 -24
  69. package/src/components/source/CustomMessage.vue +24 -24
  70. package/src/components/test.vue +260 -260
  71. package/src/components/tree.vue +294 -294
  72. package/src/components/utils/AliyunIssUtil.js +81 -81
  73. package/src/components/utils/ckeditor.js +174 -177
  74. package/src/components/utils/ckeditorImageUpload/command.js +109 -111
  75. package/src/components/utils/ckeditorImageUpload/editing.js +11 -11
  76. package/src/components/utils/ckeditorImageUpload/plugin-image.js +11 -11
  77. package/src/components/utils/ckeditorImageUpload/toolbar-ui.js +40 -40
  78. package/src/components/utils/ckeditorfileUpload/common.js +181 -174
  79. package/src/components/utils/ckeditorfileUpload/editing.js +11 -11
  80. package/src/components/utils/ckeditorfileUpload/plugin_file.js +11 -11
  81. package/src/components/utils/ckeditorfileUpload/toolbar_ui.js +35 -35
  82. package/src/components/utils/format_date.js +25 -25
  83. package/src/components/utils/index.js +6 -6
  84. package/src/components/utils/math_utils.js +29 -29
  85. package/src/components/voiceComponent.vue +119 -119
  86. package/src/components/welcomeKnowledgeFile.vue +167 -0
  87. package/src/components/welcomeLlmCard.vue +139 -0
  88. package/src/main.js +60 -60
  89. package/vue.config.js +55 -55
  90. package/src/assets/js/obsBrowser.js +0 -63
@@ -1,120 +1,120 @@
1
- <template>
2
- <div id="voice-component">
3
- <div id="voice-component-container">
4
- <div id="voice-component-c">
5
- <div class="voice-btn">
6
- <i class="iconfont arsenalchess-pawn-solid"></i>
7
- </div>
8
- </div>
9
- <div class="close-voice" @click="closeVoice">
10
- <div class="voice-style">
11
- <i class="arsenal_icon arsenalcuo1"></i>
12
- </div>
13
- </div>
14
- <div class="voice-tip">
15
- <slot name="voiceTip"></slot>
16
- </div>
17
- </div>
18
-
19
- </div>
20
- </template>
21
-
22
- <script>
23
- export default {
24
- name: "voice_component",
25
- data(){
26
- return{
27
-
28
- }
29
- },
30
- methods:{
31
- closeVoice(){
32
- this.$emit('closeVoice')
33
- }
34
- }
35
- }
36
- </script>
37
-
38
- <style scoped lang="less">
39
- #voice-component{
40
- position: fixed;
41
- bottom: 0;
42
- width: 100%;
43
- z-index: 9999;
44
- left: 0;
45
- #voice-component-container{
46
- position: relative;
47
- /* .half-top-ovals{
48
- width: 130%;
49
- position: relative;
50
- left: -15%;
51
- height: 80px;
52
- padding-bottom: 40px;
53
- padding-right: 20px;
54
- padding-left: 20px;
55
- !* width: 200px;*!
56
- background: lightcoral;
57
- border-radius: 50% 50% 0 0;
58
- }*/
59
- #voice-component-c{
60
- height: 200px;
61
- width: 130%;
62
- position: relative;
63
- left: -15%;
64
- bottom: -80px;
65
- background: linear-gradient(180deg, #EEF1F7, #FFFFFF);
66
- border: 2px solid white;
67
- border-radius: 100% 100% 0 0;
68
- border-bottom: none;
69
- display: flex;
70
- align-items: center;
71
- justify-content: center;
72
- .voice-btn{
73
- display: flex;
74
- align-items: center;
75
- justify-content: center;
76
- position: absolute;
77
- top: 50px;
78
- i{
79
- color: #366aff;
80
- font-size: 30px;
81
- }
82
- }
83
- }
84
- .voice-tip{
85
- width: 100%;
86
- position: absolute;
87
- top: -40px;
88
- display: flex;
89
- align-items: center;
90
- justify-content: center;
91
- color: #FFFFFF;
92
- font-size: 13px;
93
- }
94
- .close-voice{
95
- width: 100%;
96
- position: absolute;
97
- top: -35px;
98
- display: flex;
99
- align-items: center;
100
- justify-content: center;
101
- .voice-style{
102
- width: 60px;
103
- height: 60px;
104
- background: #EEF1F7;
105
- border-radius: 50%;
106
- display: flex;
107
- align-items: center;
108
- justify-content: center;
109
- transition: all 0.3s;
110
- i{
111
- font-size: 24px;
112
- color: #999999;
113
- transition: all 0.3s;
114
- }
115
- }
116
- }
117
- }
118
-
119
- }
1
+ <template>
2
+ <div id="voice-component">
3
+ <div id="voice-component-container">
4
+ <div id="voice-component-c">
5
+ <div class="voice-btn">
6
+ <i class="iconfont arsenalchess-pawn-solid"></i>
7
+ </div>
8
+ </div>
9
+ <div class="close-voice" @click="closeVoice">
10
+ <div class="voice-style">
11
+ <i class="arsenal_icon arsenalcuo1"></i>
12
+ </div>
13
+ </div>
14
+ <div class="voice-tip">
15
+ <slot name="voiceTip"></slot>
16
+ </div>
17
+ </div>
18
+
19
+ </div>
20
+ </template>
21
+
22
+ <script>
23
+ export default {
24
+ name: "voice_component",
25
+ data(){
26
+ return{
27
+
28
+ }
29
+ },
30
+ methods:{
31
+ closeVoice(){
32
+ this.$emit('closeVoice')
33
+ }
34
+ }
35
+ }
36
+ </script>
37
+
38
+ <style scoped lang="less">
39
+ #voice-component{
40
+ position: fixed;
41
+ bottom: 0;
42
+ width: 100%;
43
+ z-index: 9999;
44
+ left: 0;
45
+ #voice-component-container{
46
+ position: relative;
47
+ /* .half-top-ovals{
48
+ width: 130%;
49
+ position: relative;
50
+ left: -15%;
51
+ height: 80px;
52
+ padding-bottom: 40px;
53
+ padding-right: 20px;
54
+ padding-left: 20px;
55
+ !* width: 200px;*!
56
+ background: lightcoral;
57
+ border-radius: 50% 50% 0 0;
58
+ }*/
59
+ #voice-component-c{
60
+ height: 200px;
61
+ width: 130%;
62
+ position: relative;
63
+ left: -15%;
64
+ bottom: -80px;
65
+ background: linear-gradient(180deg, #EEF1F7, #FFFFFF);
66
+ border: 2px solid white;
67
+ border-radius: 100% 100% 0 0;
68
+ border-bottom: none;
69
+ display: flex;
70
+ align-items: center;
71
+ justify-content: center;
72
+ .voice-btn{
73
+ display: flex;
74
+ align-items: center;
75
+ justify-content: center;
76
+ position: absolute;
77
+ top: 50px;
78
+ i{
79
+ color: #366aff;
80
+ font-size: 30px;
81
+ }
82
+ }
83
+ }
84
+ .voice-tip{
85
+ width: 100%;
86
+ position: absolute;
87
+ top: -40px;
88
+ display: flex;
89
+ align-items: center;
90
+ justify-content: center;
91
+ color: #FFFFFF;
92
+ font-size: 13px;
93
+ }
94
+ .close-voice{
95
+ width: 100%;
96
+ position: absolute;
97
+ top: -35px;
98
+ display: flex;
99
+ align-items: center;
100
+ justify-content: center;
101
+ .voice-style{
102
+ width: 60px;
103
+ height: 60px;
104
+ background: #EEF1F7;
105
+ border-radius: 50%;
106
+ display: flex;
107
+ align-items: center;
108
+ justify-content: center;
109
+ transition: all 0.3s;
110
+ i{
111
+ font-size: 24px;
112
+ color: #999999;
113
+ transition: all 0.3s;
114
+ }
115
+ }
116
+ }
117
+ }
118
+
119
+ }
120
120
  </style>
@@ -0,0 +1,167 @@
1
+ <template>
2
+ <div class="message_list_welcome_knowledge_file">
3
+ <div class="mlwm-title">{{ msgContent.title }}</div>
4
+ <div class="mlwm-des">
5
+ <span class="mlwm-des-pre">{{ msgContent.description }}</span>
6
+ </div>
7
+ <div class="mlwm-msg-type">
8
+ <div v-for="(item, itemIndex) in msgContent.knowledgeFileInfos"
9
+ :key="item.id"
10
+ :class="['mmt-cell', 'mmt-cell-' + itemIndex]"
11
+ @click="clickFun(item)"
12
+ >
13
+ <div class="mmt-cell-img">
14
+ <img :src="fileIcon(item.type)" alt="" srcset="">
15
+ </div>
16
+ <div class="mmt-cell-des">
17
+ <span class="mmt-cell-des-title">{{item.name}}</span>
18
+ <span class="mmt-cell-des-detail">
19
+ <div class="mmt-cell-avatar">
20
+ <img :src="item.creatorAvatar" alt="" srcset="">
21
+ </div>
22
+ <div class="mmt-creator-name">{{ item.creatorName }}</div>
23
+ <div class="mmt-border"></div>
24
+ <div class="mmt-update-time">{{ new Date(item.updateTime).Format('yyyy-MM-dd hh:mm') }}</div>
25
+ </span>
26
+ </div>
27
+ </div>
28
+ <div class="load_moreKnowledge" v-if="msgContent.totalCount - (msgContent.pageSize * msgContent.page) > 0">
29
+ <span>查看更多</span>
30
+ </div>
31
+ </div>
32
+ </div>
33
+ </template>
34
+
35
+ <script>
36
+ import { imageTypeObj } from "../assets/js/common";
37
+ export default {
38
+ name: "welcomeKnowledgeFile",
39
+ props:{
40
+ msgContent:{
41
+ type:Object,
42
+ default(){
43
+ return {}
44
+ }
45
+ }
46
+ },
47
+ computed:{
48
+
49
+ },
50
+ methods:{
51
+ fileIcon(type){
52
+ return 'https://static.guoranbot.com/cdn-office-website/askbot_doc/' + imageTypeObj[type] + '.png'
53
+ },
54
+ clickFun(item){
55
+ this.$emit('knowledgeClickFun',item)
56
+ }
57
+ }
58
+ };
59
+ </script>
60
+
61
+ <style scoped lang="less">
62
+ .message_list_welcome_knowledge_file{
63
+ .mlwm-title {
64
+ font-size: 18px;
65
+ font-weight: 600;
66
+ color: #333333;
67
+ }
68
+ .mlwm-des{
69
+ color: #666666;
70
+ margin-top: 9px;
71
+ font-size: 14px;
72
+ font-weight: 500;
73
+ .mlwm-des-after {
74
+ display: flex;
75
+ align-items: center;
76
+ height: 28px;
77
+ line-height: 28px;
78
+ .mlwm-des-after-cir {
79
+ flex: none;
80
+ width: 6px;
81
+ height: 6px;
82
+ background: #366AFF;
83
+ border-radius: 50%;
84
+ margin-right: 6px;
85
+ }
86
+ }
87
+ }
88
+
89
+ .mlwm-msg-type{
90
+ margin-top: 9px;
91
+ .mmt-cell{
92
+ flex: 1;
93
+ padding: 10px;
94
+ background: #F0F4FF;
95
+ border-radius: 8px;
96
+ margin: 8px 0;
97
+ display: flex;
98
+ justify-content: space-between;
99
+ align-items: center;
100
+ cursor: pointer;
101
+ .mmt-cell-img{
102
+ flex: none;
103
+ width: 20px;
104
+ margin-right: 8px;
105
+ img {
106
+ height: 20px;
107
+ width: 20px;
108
+ }
109
+ }
110
+ .mmt-cell-des{
111
+ flex: auto;
112
+ text-align: left;
113
+ display: flex;
114
+ flex-direction: column;
115
+ padding-right: 12px;
116
+ .mmt-cell-des-title {
117
+ font-size: 14px;
118
+ color: #333333;
119
+ font-weight: 600;
120
+ margin-bottom: 6px;
121
+ }
122
+ .mmt-cell-des-detail{
123
+ font-size: 12px;
124
+ display: flex;
125
+ align-items: center;
126
+ .mmt-cell-avatar{
127
+ flex: none;
128
+ width: 16px;
129
+ margin-right: 8px;
130
+ display: flex;
131
+ align-items: center;
132
+ img {
133
+ height: 16px;
134
+ width: 16px;
135
+ border-radius: 50%;
136
+ }
137
+ }
138
+ .mmt-creator-name{
139
+ padding-right: 6px;
140
+ color: #666666;
141
+ }
142
+ .mmt-update-time{
143
+ color: #666666;
144
+ padding-left: 6px;
145
+ }
146
+ .mmt-border{
147
+ height: 12px;
148
+ width: 1px;
149
+ background-color: #666666;
150
+ }
151
+ }
152
+ }
153
+ }
154
+ .load_moreKnowledge{
155
+ display: flex;
156
+ align-items: center;
157
+ justify-content: center;
158
+ height: 60px;
159
+ background: #F0F4FF;
160
+ color: #000000;
161
+ font-size: 14px;
162
+ cursor: pointer;
163
+ margin: 8px 0;
164
+ }
165
+ }
166
+ }
167
+ </style>
@@ -0,0 +1,139 @@
1
+ <template>
2
+ <div class="message_list-welcome-m">
3
+ <div class="mlwm-title">{{ msgContent.title }}</div>
4
+ <div class="mlwm-des">
5
+ <span class="mlwm-des-pre">{{ msgContent.description }}</span>
6
+ <div class="mlwm-des-after" v-if="false">
7
+ <span class="mlwm-des-after-cir"></span>
8
+ <span class="mlwm-des-after-text">可以试着这样问我:</span>
9
+ </div>
10
+ </div>
11
+ <div class="mlwm-msg-type">
12
+ <div v-for="(item, itemIndex) in msgContent.items"
13
+ :key="item.id"
14
+ :class="['mmt-cell', 'mmt-cell-' + itemIndex]"
15
+ @click="clickFun(item)"
16
+ >
17
+ <div class="mmt-cell-img">
18
+ <img :src="item.icon" alt="" srcset="">
19
+ </div>
20
+ <div class="mmt-cell-des">
21
+ <span class="mmt-cell-des-title">{{item.title}}</span>
22
+ <span class="mmt-cell-des-detail">{{item.description}}</span>
23
+ </div>
24
+ </div>
25
+ </div>
26
+ </div>
27
+ </template>
28
+
29
+ <script>
30
+ export default {
31
+ name: "welcomeLlmCard",
32
+ props:{
33
+ msgContent:{
34
+ type:Object,
35
+ default(){
36
+ return {}
37
+ }
38
+ }
39
+ },
40
+ methods:{
41
+ clickFun(item){
42
+ this.$emit('llmCardClickFun',item)
43
+ }
44
+ }
45
+ };
46
+ </script>
47
+
48
+ <style scoped lang="less">
49
+ .message_list-welcome-m{
50
+ .mlwm-title {
51
+ font-size: 18px;
52
+ font-weight: 600;
53
+ color: #333333;
54
+ }
55
+ .mlwm-des{
56
+ color: #666666;
57
+ margin-top: 9px;
58
+ font-size: 14px;
59
+ font-weight: 500;
60
+ .mlwm-des-after {
61
+ display: flex;
62
+ align-items: center;
63
+ height: 28px;
64
+ line-height: 28px;
65
+ .mlwm-des-after-cir {
66
+ flex: none;
67
+ width: 6px;
68
+ height: 6px;
69
+ background: #366AFF;
70
+ border-radius: 50%;
71
+ margin-right: 6px;
72
+ }
73
+ }
74
+ }
75
+
76
+ .mlwm-msg-type{
77
+ margin-top: 9px;
78
+ .mmt-cell{
79
+ flex: 1;
80
+ padding: 10px;
81
+ background: #F0F4FF;
82
+ border-radius: 8px;
83
+ margin: 8px 0;
84
+ display: flex;
85
+ justify-content: space-between;
86
+ align-items: center;
87
+ cursor: pointer;
88
+ .mmt-cell-img{
89
+ flex: none;
90
+ width: 46px;
91
+ margin-right: 8px;
92
+ img {
93
+ height: 46px;
94
+ width: 46px;
95
+ }
96
+ }
97
+ .mmt-cell-des{
98
+ flex: auto;
99
+ text-align: left;
100
+ display: flex;
101
+ flex-direction: column;
102
+ padding-right: 12px;
103
+ .mmt-cell-des-title {
104
+ font-size: 14px;
105
+ color: #000000;
106
+ font-weight: 600;
107
+ margin-bottom: 6px;
108
+ }
109
+ .mmt-cell-des-detail{
110
+ font-size: 12px;
111
+ display: flex;
112
+ align-items: center;
113
+ .mmt-cell-avatar{
114
+ flex: none;
115
+ width: 20px;
116
+ margin-right: 8px;
117
+ display: flex;
118
+ align-items: center;
119
+ img {
120
+ height: 20px;
121
+ width: 20px;
122
+ border-radius: 50%;
123
+ }
124
+ }
125
+ .mmt-creator-name{
126
+ padding-right: 6px;
127
+ border-right: 1px solid #666666;
128
+ color: #666666;
129
+ }
130
+ .mmt-update-time{
131
+ color: #666666;
132
+ padding-left: 6px;
133
+ }
134
+ }
135
+ }
136
+ }
137
+ }
138
+ }
139
+ </style>
package/src/main.js CHANGED
@@ -1,60 +1,60 @@
1
- import Vue from 'vue'
2
- import App from './App.vue'
3
- import VueResource from 'vue-resource'
4
- import ElementUI from 'element-ui';
5
- import { requestUrl } from './api/index';
6
- import { utils } from '../src/components/utils/index';
7
- // /*import 'element-ui/lib/theme-chalk/index.css';*/
8
- import './assets/theme/index.css'
9
- import 'video.js/dist/video-js.css'
10
- import Vant from 'vant';
11
- import 'vant/lib/index.css';
12
-
13
- import CKEditor from '@ckeditor/ckeditor5-vue2';
14
- Vue.use(CKEditor);
15
-
16
- /*import VConsole from 'vconsole'
17
- const vConsole = new VConsole();
18
- Vue.use(vConsole);*/
19
- import $ from 'jquery'
20
- Vue.prototype._$ = $;
21
- Vue.use(Vant);
22
- Date.prototype.Format = function (fmt) { //author: meizz
23
- var o = {
24
- "M+": this.getMonth() + 1, //月份
25
- "d+": this.getDate(), //日
26
- "h+": this.getHours(), //小时
27
- "m+": this.getMinutes(), //分
28
- "s+": this.getSeconds(), //秒
29
- "q+": Math.floor((this.getMonth() + 3) / 3), //季度
30
- "S": this.getMilliseconds() //毫秒
31
- };
32
- if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
33
- for (var k in o)
34
- if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
35
- return fmt;
36
- }
37
- Vue.config.productionTip = false
38
- Vue.use(VueResource)
39
- Vue.use(ElementUI)
40
- //导入图片预览viewer组件以及css
41
- import Viewer from 'v-viewer'
42
- import 'viewerjs/dist/viewer.css'
43
- Vue.use(Viewer, {
44
- defaultOptions: {
45
- zIndex: 9999,//解决图片放大的层级问题
46
- }
47
- });
48
- // setDeafaults配置
49
- Viewer.setDefaults({
50
- Options: { "inline": true, "button": true, "navbar": true, "title": true, "toolbar": true, "tooltip": true, "movable": true, "zoomable": true, "rotatable": true, "scalable": true, "transition": true, "fullscreen": true, "keyboard": true, "url": "data-source" }
51
- })
52
-
53
-
54
-
55
- Vue.prototype.requestUrl = requestUrl;
56
- Vue.prototype.utils = utils;
57
-
58
- new Vue({
59
- render: h => h(App),
60
- }).$mount('#app')
1
+ import Vue from 'vue'
2
+ import App from './App.vue'
3
+ import VueResource from 'vue-resource'
4
+ import ElementUI from 'element-ui';
5
+ import { requestUrl } from './api/index';
6
+ import { utils } from '../src/components/utils/index';
7
+ // /*import 'element-ui/lib/theme-chalk/index.css';*/
8
+ import './assets/theme/index.css'
9
+ import 'video.js/dist/video-js.css'
10
+ import Vant from 'vant';
11
+ import 'vant/lib/index.css';
12
+
13
+ import CKEditor from '@ckeditor/ckeditor5-vue2';
14
+ Vue.use(CKEditor);
15
+
16
+ /*import VConsole from 'vconsole'
17
+ const vConsole = new VConsole();
18
+ Vue.use(vConsole);*/
19
+ import $ from 'jquery'
20
+ Vue.prototype._$ = $;
21
+ Vue.use(Vant);
22
+ Date.prototype.Format = function (fmt) { //author: meizz
23
+ var o = {
24
+ "M+": this.getMonth() + 1, //月份
25
+ "d+": this.getDate(), //日
26
+ "h+": this.getHours(), //小时
27
+ "m+": this.getMinutes(), //分
28
+ "s+": this.getSeconds(), //秒
29
+ "q+": Math.floor((this.getMonth() + 3) / 3), //季度
30
+ "S": this.getMilliseconds() //毫秒
31
+ };
32
+ if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
33
+ for (var k in o)
34
+ if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
35
+ return fmt;
36
+ }
37
+ Vue.config.productionTip = false
38
+ Vue.use(VueResource)
39
+ Vue.use(ElementUI)
40
+ //导入图片预览viewer组件以及css
41
+ import Viewer from 'v-viewer'
42
+ import 'viewerjs/dist/viewer.css'
43
+ Vue.use(Viewer, {
44
+ defaultOptions: {
45
+ zIndex: 9999,//解决图片放大的层级问题
46
+ }
47
+ });
48
+ // setDeafaults配置
49
+ Viewer.setDefaults({
50
+ Options: { "inline": true, "button": true, "navbar": true, "title": true, "toolbar": true, "tooltip": true, "movable": true, "zoomable": true, "rotatable": true, "scalable": true, "transition": true, "fullscreen": true, "keyboard": true, "url": "data-source" }
51
+ })
52
+
53
+
54
+
55
+ Vue.prototype.requestUrl = requestUrl;
56
+ Vue.prototype.utils = utils;
57
+
58
+ new Vue({
59
+ render: h => h(App),
60
+ }).$mount('#app')