askbot-dragon 1.6.40 → 1.6.41

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": "1.6.40",
3
+ "version": "1.6.41",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve",
6
6
  "build": "vue-cli-service build",
@@ -12,8 +12,18 @@
12
12
  <el-image
13
13
  style="width: 120px!important; height: 120px!important;"
14
14
  :src="item.url"
15
- :preview-src-list="previewList(msg.content.options)"
15
+ @click="onImageClick(item.url)"
16
16
  fit="cover">
17
+ <template #placeholder>
18
+ <div class="custom-loading">
19
+ <i class="el-icon-loading"></i>
20
+ </div>
21
+ </template>
22
+ <template #error>
23
+ <div class="custom-error">
24
+ <i class="el-icon-picture-outline"></i>
25
+ </div>
26
+ </template>
17
27
  </el-image>
18
28
  <div class="checkIcon"
19
29
  :class="checkImage && checkImage.url === item.url ? 'activeCheckIcon' : 'noCheckIcon'"
@@ -81,7 +91,10 @@ export default {
81
91
  }
82
92
  this.isDisabled = true;
83
93
  this.$emit('imageSelectionConfirm',item,this.checkImage,this.msg)
84
- }
94
+ },
95
+ onImageClick(url){
96
+ this.$emit('onImageClick',url)
97
+ },
85
98
  }
86
99
  };
87
100
  </script>
@@ -152,6 +165,33 @@ export default {
152
165
  background: #366aff!important;
153
166
  }
154
167
  }
168
+ .custom-loading,
169
+ .custom-error {
170
+ width: 100%;
171
+ height: 100%;
172
+ display: flex;
173
+ align-items: center;
174
+ justify-content: center;
175
+ background: #f5f7fa;
176
+ }
177
+
178
+ .custom-loading {
179
+ color: #366aff;
180
+ }
181
+
182
+ .custom-error {
183
+ color: red;
184
+ }
185
+
186
+ .el-icon-loading {
187
+ font-size: 24px;
188
+ animation: rotating 2s linear infinite;
189
+ }
190
+
191
+ @keyframes rotating {
192
+ from { transform: rotate(0deg); }
193
+ to { transform: rotate(360deg); }
194
+ }
155
195
  }
156
196
  .disabledButton{
157
197
  .buttonText{
@@ -15,7 +15,7 @@
15
15
  style="width: 32px!important; height: 32px!important;margin-right: 4px;flex: none"
16
16
  :src="item.url"
17
17
  v-if="item.url"
18
- :preview-src-list="previewList(msg.content.options)"
18
+ @click.stop="onImageClick(item.url)"
19
19
  fit="cover"></el-image>
20
20
  {{ item.text }}
21
21
  </el-checkbox>
@@ -66,7 +66,10 @@ export default {
66
66
  }
67
67
  this.isDisabled = true;
68
68
  this.$emit('multipleChoiceConfirm',item,this.checkList,this.msg)
69
- }
69
+ },
70
+ onImageClick(url){
71
+ this.$emit('onImageClick',url)
72
+ },
70
73
  }
71
74
  };
72
75
  </script>