askbot-dragon 0.8.23 → 0.8.25
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
|
@@ -289,8 +289,8 @@
|
|
|
289
289
|
</p>
|
|
290
290
|
<p v-else class="explanation-p">
|
|
291
291
|
<span class="el-icon-info"></span>
|
|
292
|
-
<span v-if="item.formField.extInfo.url" class="explain-url"><a :href="item.formField.extInfo.url" target="_blank">{{item.
|
|
293
|
-
<span v-else>{{item.
|
|
292
|
+
<span v-if="item.formField.extInfo.url" class="explain-url"><a :href="item.formField.extInfo.url" target="_blank">{{item.formField.description?item.formField.description:item.formField.extInfo.placeholder}}</a></span>
|
|
293
|
+
<span v-else>{{item.formField.description?item.formField.description:item.formField.extInfo.placeholder}}</span>
|
|
294
294
|
</p>
|
|
295
295
|
</div>
|
|
296
296
|
</div>
|
|
@@ -920,11 +920,6 @@ export default {
|
|
|
920
920
|
item.value = item.formField.defaultValue
|
|
921
921
|
}
|
|
922
922
|
}
|
|
923
|
-
if (item.formField.type === 'EXPLAIN'){
|
|
924
|
-
if (!item.value){
|
|
925
|
-
item.value = item.formField.extInfo.placeholder?item.formField.extInfo.placeholder:''
|
|
926
|
-
}
|
|
927
|
-
}
|
|
928
923
|
if (!item.relationDisplay){
|
|
929
924
|
item.value = []
|
|
930
925
|
this.extInfoFieldValue[item.fieldId] = []
|
|
@@ -1315,7 +1310,14 @@ export default {
|
|
|
1315
1310
|
else {
|
|
1316
1311
|
let valueList=[]
|
|
1317
1312
|
let bool=false
|
|
1318
|
-
|
|
1313
|
+
|
|
1314
|
+
if (!Array.isArray(this.formList.form.formFieldRelation[i].value)){
|
|
1315
|
+
let obj = {
|
|
1316
|
+
url:this.formList.form.formFieldRelation[i].value
|
|
1317
|
+
}
|
|
1318
|
+
this.extInfoFieldValue[this.formList.form.formFieldRelation[i].fieldId] = [obj]
|
|
1319
|
+
}
|
|
1320
|
+
else if(this.formList.form.formFieldRelation[i].value.length > 0) {
|
|
1319
1321
|
for (let file=0;file<this.formList.form.formFieldRelation[i].value.length;file++) {
|
|
1320
1322
|
let type = typeof (this.formList.form.formFieldRelation[i].value[file])
|
|
1321
1323
|
if (type === "string") {
|
|
@@ -12,7 +12,11 @@ export default class ImageCommand extends Command {
|
|
|
12
12
|
refresh() {
|
|
13
13
|
this.isEnabled = true;
|
|
14
14
|
}
|
|
15
|
-
execute() {
|
|
15
|
+
execute(file) {
|
|
16
|
+
if (file){
|
|
17
|
+
this.forEachFiles(file.file)
|
|
18
|
+
return
|
|
19
|
+
}
|
|
16
20
|
var inputObj = document.createElement('input')
|
|
17
21
|
inputObj.setAttribute('id', '_ef');
|
|
18
22
|
inputObj.setAttribute('type', 'file');
|
|
@@ -39,7 +43,22 @@ export default class ImageCommand extends Command {
|
|
|
39
43
|
}
|
|
40
44
|
}
|
|
41
45
|
}
|
|
42
|
-
|
|
46
|
+
forEachFiles(files){
|
|
47
|
+
for (let index = 0; index < files.length; index++) {
|
|
48
|
+
const filed = files[index];
|
|
49
|
+
this.upload(filed).then(res =>{
|
|
50
|
+
let command = this.editor.commands.get("insertAskComponent");
|
|
51
|
+
command.execute({
|
|
52
|
+
tag: "img",
|
|
53
|
+
options: {
|
|
54
|
+
width:'100%',
|
|
55
|
+
name: res.default,
|
|
56
|
+
src: res.default
|
|
57
|
+
},
|
|
58
|
+
});
|
|
59
|
+
})
|
|
60
|
+
}
|
|
61
|
+
}
|
|
43
62
|
upload(file) {
|
|
44
63
|
return new Promise((resolve) => {
|
|
45
64
|
/* this._initRequest();
|