askbot-dragon 0.7.1 → 0.7.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "askbot-dragon",
3
- "version": "0.7.1",
3
+ "version": "0.7.2",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve",
6
6
  "build": "vue-cli-service build",
package/src/App.vue CHANGED
@@ -1,18 +1,14 @@
1
1
  <template>
2
2
  <div id="app">
3
3
  <ConversationContainer msg="Welcome to Your Vue.js App"/>
4
- <load-more-mess></load-more-mess>
5
4
  </div>
6
5
  </template>
7
6
 
8
7
  <script>
9
8
  import ConversationContainer from './components/ConversationContainer.vue'
10
-
11
- import LoadMoreMess from "./components/loadMoreMess";
12
9
  export default {
13
10
  name: 'App',
14
11
  components: {
15
- LoadMoreMess,
16
12
  ConversationContainer
17
13
  }
18
14
  }
@@ -1,8 +1,8 @@
1
1
  @font-face {
2
2
  font-family: 'iconfont'; /* Project id 2913049 */
3
- src: url('//at.alicdn.com/t/font_2913049_baxww6uvzup.woff2?t=1642737399832') format('woff2'),
4
- url('//at.alicdn.com/t/font_2913049_baxww6uvzup.woff?t=1642737399832') format('woff'),
5
- url('//at.alicdn.com/t/font_2913049_baxww6uvzup.ttf?t=1642737399832') format('truetype');
3
+ src: url('//at.alicdn.com/t/font_2913049_fhimnf31slu.woff2?t=1644465476099') format('woff2'),
4
+ url('//at.alicdn.com/t/font_2913049_fhimnf31slu.woff?t=1644465476099') format('woff'),
5
+ url('//at.alicdn.com/t/font_2913049_fhimnf31slu.ttf?t=1644465476099') format('truetype');
6
6
  }
7
7
 
8
8
  .iconfont {
@@ -12,6 +12,6 @@
12
12
  -webkit-font-smoothing: antialiased;
13
13
  -moz-osx-font-smoothing: grayscale;
14
14
  }
15
- .arsenalchess-pawn-solid:before {
16
- content: "\e718";
15
+ .guoran-arsenalchess-pawn-solid1:before {
16
+ content: "\e77f";
17
17
  }
@@ -19,6 +19,8 @@
19
19
  </div>
20
20
  </voice-component>-->
21
21
  <!-- 点选 -->
22
+ <div v-html="htmlContainer">
23
+ </div>
22
24
  <answer-radio :msg="answerRadios"></answer-radio>
23
25
  <action-send-to-bot :msg="answerRadios"></action-send-to-bot>
24
26
  <ticket-message :content="contents"></ticket-message>
@@ -33,6 +35,7 @@
33
35
  <answer-dissatisfaction :msg="answerDiss"></answer-dissatisfaction>
34
36
  <feed-back :feedBack="feedBack"></feed-back>
35
37
  <voice-compontent></voice-compontent>
38
+
36
39
  <!-- <FileType :urls="urls" :color="black"></FileType>-->
37
40
  <!-- <FileType :urls="urls" :color="black"></FileType>
38
41
  <chat-content :messageList="messageList"></chat-content>-->
@@ -1157,7 +1160,8 @@ export default {
1157
1160
  }
1158
1161
  },
1159
1162
  type:'answer_radio'
1160
- }
1163
+ },
1164
+ htmlContainer:'<input placeholder="请输入"></input>'
1161
1165
  };
1162
1166
  },
1163
1167
  methods: {
@@ -3,7 +3,7 @@
3
3
  <div id="voice-component-container">
4
4
  <div id="voice-component-c">
5
5
  <div class="voice-btn">
6
- <i class="iconfont arsenalchess-pawn-solid"></i>
6
+ <i class="iconfont guoran-arsenalchess-pawn-solid1"></i>
7
7
  </div>
8
8
  </div>
9
9
  <div class="close-voice" @click="closeVoice">
@@ -62,7 +62,7 @@ export default {
62
62
  justify-content: center;
63
63
  i{
64
64
  color: #366aff;
65
- font-size: 30px;
65
+ font-size: 38px;
66
66
  }
67
67
  }
68
68
  }
@@ -1,199 +0,0 @@
1
- <template>
2
- <div class="container" ref="container">
3
- <div class="item">{{loadText+"第"+pageNum+"页"}}</div>
4
- <div v-for="(item, index) in list" :key="index" class="item">{{item}}</div>
5
- </div>
6
- <!-- <div
7
- class="container"
8
- @touchstart="touchStart($event)"
9
- @touchmove="touchMove($event)"
10
- @touchend="touchEnd($event)"
11
- :style="{transform: 'translate3d(0,' + top + 'px, 0)'}"
12
- >
13
- <p class="drop" v-if="dropDownState == 2">松开立即刷新</p>
14
- <p class="drop" v-if="dropDownState == 3">正在刷新数据...</p>
15
- <div class="histroy" id="list">
16
- <li v-for="(item,index) in list" :key="index">第{{ item }}条数据</li>
17
- </div>
18
- </div>-->
19
- </template>
20
-
21
- <script>
22
- export default {
23
- name: "loadMoreMess",
24
- data() {
25
- return {
26
- scrollHeight: 0,
27
- list: [],
28
- loadText: "加载中...",
29
- pageSize: 20,
30
- pageNum: 1,
31
- index: 0,
32
- defaultOffset: 50,
33
- top: 0,
34
- scrollIsToTop: 0,
35
- startY: 0,
36
- isDropDown: false,
37
- isRefreshing: false,
38
- dropDownState: 1
39
- }
40
- },
41
- mounted() {
42
- this.initData();
43
- const container = this.$refs.container;
44
- //这里的定时是为了列表首次渲染后获取scrollHeight并滑动到底部。
45
- setTimeout(() => {
46
- this.scrollHeight = container.scrollHeight;
47
- container.scrollTo(0, this.scrollHeight);
48
- }, 10);
49
- container.addEventListener('scroll', (e) => {
50
- //这里的2秒钟定时是为了避免滑动频繁,节流
51
- setTimeout(() => {
52
- if (this.list.length >= 90) {
53
- this.loadText = "加载完成";
54
- return;
55
- }
56
- //滑到顶部时触发下次数据加载
57
- if (e.target.scrollTop == 0) {
58
- //将scrollTop置为10以便下次滑到顶部
59
- e.target.scrollTop = 10;
60
- //加载数据
61
- this.initData();
62
- //这里的定时是为了在列表渲染之后才使用scrollTo。
63
- setTimeout(() => {
64
- e.target.scrollTo(0, this.scrollHeight - 30);//-30是为了露出最新加载的一行数据
65
- }, 100);
66
- }
67
- }, 2000);
68
- });
69
- },
70
- methods: {
71
- //初始数据
72
- initData() {
73
- for (var i = 20; i > 0; i--) {
74
- this.list.unshift(i)
75
- }
76
- this.pageNum++;
77
- },
78
- // 加载历史记录
79
- getHistory() {
80
-
81
- setTimeout(() => {
82
- let result = new Array();
83
- for (var i = 0; i < 10; i++) {
84
- let value = this.index < 1 ? i : this.index + "" + i;
85
- result.unshift(value);
86
- }
87
- this.list = result.concat(this.list);
88
- this.isRefreshing = false;
89
- this.isDropDown = false;
90
- this.dropDownState = 1;
91
- this.top = 0;
92
- this.$nextTick(() => {
93
- var container = this.$el.querySelector("#list");
94
- container.scrollTop = container.scrollHeight - this.scrollHeight;
95
- });
96
- }, 1200);
97
- },
98
-
99
- // 开始
100
- touchStart(e) {
101
- this.startY = e.targetTouches[0].pageY;
102
- var container = this.$el.querySelector("#list");
103
- this.scrollHeight = container.scrollHeight;
104
- },
105
- // 滑动
106
- touchMove(e) {
107
- this.scrollIsToTop =
108
- document.documentElement.scrollTop ||
109
- window.pageYOffset ||
110
- document.body.scrollTop;
111
- var container = this.$el.querySelector("#list");
112
- if (e.targetTouches[0].pageY > this.startY && container.scrollTop === 0) {
113
- this.isDropDown = true;
114
- if (this.scrollIsToTop === 0 && !this.isRefreshing) {
115
- let diff =
116
- e.targetTouches[0].pageY - this.startY - this.scrollIsToTop;
117
- this.top =
118
- Math.pow(diff, 0.8) +
119
- (this.dropDownState === 3 ? this.defaultOffset : 0);
120
- if (this.top >= this.defaultOffset) {
121
- this.dropDownState = 2;
122
- e.preventDefault();
123
- } else {
124
- this.dropDownState = 1;
125
- e.preventDefault();
126
- }
127
- }
128
- } else {
129
- this.isDropDown = false;
130
- this.dropDownState = 1;
131
- }
132
- },
133
-
134
- // 触摸结束
135
- touchEnd() {
136
- if (this.isDropDown && !this.isRefreshing) {
137
- if (this.top >= this.defaultOffset) {
138
- this.refresh();
139
- this.isRefreshing = true;
140
- } else {
141
- this.isRefreshing = false;
142
- this.isDropDown = false;
143
- this.dropDownState = 1;
144
- this.top = 0;
145
- }
146
- }
147
- },
148
-
149
- // 刷新
150
- refresh() {
151
- this.dropDownState = 3;
152
- this.top = this.defaultOffset;
153
- this.index++;
154
- this.getHistory();
155
- }
156
- }
157
- }
158
- </script>
159
-
160
- <style scoped lang="less">
161
- .container {
162
- width: 300px;
163
- height: 300px;
164
- overflow: auto;
165
- border: 1px solid;
166
- margin: 100px auto;
167
- }
168
-
169
- .item {
170
- height: 29px;
171
- line-height: 30px;
172
- text-align: center;
173
- border-bottom: 1px solid #aaa;
174
- }
175
- .drop {
176
- height: 5rem;
177
- display: flex;
178
- align-items: center;
179
- justify-content: center;
180
- }
181
- /*.container {
182
- height: 100%;
183
- overflow: hidden;
184
- }
185
-
186
- .histroy {
187
- padding: 0 1rem;
188
- height: 100%;
189
- overflow-y: auto;
190
- }
191
- .histroy li {
192
- font-size: 1.4rem;
193
- height: 10vh;
194
- display: flex;
195
- align-items: center;
196
- justify-content: center;
197
- border-bottom: 1px dashed #dddddd;
198
- }*/
199
- </style>