@zykjcommon/questions 0.0.66 → 0.0.67
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
package/readme
CHANGED
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
1.watch用这种
|
|
2
|
-
watch(() => props.questionList, (nv) => {
|
|
3
|
-
if(nv && nv.length){
|
|
4
|
-
responsiveObj.value.questionList = nv
|
|
5
|
-
}
|
|
6
|
-
},{immediate:true,deep:true})
|
|
7
1
|
|
|
8
2
|
发布:
|
|
9
3
|
package.json版本号version需要变更
|
|
@@ -11,5 +5,10 @@ npm run build:lib
|
|
|
11
5
|
npm run publishLib
|
|
12
6
|
下载包的时候需要npm run @zykjcommon/questions --save --force
|
|
13
7
|
如果源是cnpm需要cnpm sync手动同步
|
|
8
|
+
发布的时候"vue"
|
|
9
|
+
"vue-router"
|
|
10
|
+
"vuex"
|
|
11
|
+
"vuex-composition-helpers"
|
|
12
|
+
这四个包要放在dev依赖里面
|
|
14
13
|
|
|
15
14
|
|
|
@@ -13,6 +13,7 @@ import Question_Classify from './Question_Classify.vue'
|
|
|
13
13
|
import {questionMapper} from "./const";
|
|
14
14
|
import fun from "../../assets/js/fun";
|
|
15
15
|
import storeOptions from './store'
|
|
16
|
+
import {json2html} from "../../assets/js/json2html";
|
|
16
17
|
let parseQuestionListItem = function(mode,question_list,answer_map,parentIndex = undefined){
|
|
17
18
|
function parseContent(arr,contentWidth){
|
|
18
19
|
arr.forEach((item)=>{
|
|
@@ -90,14 +91,14 @@ let parseQuestionListItem = function(mode,question_list,answer_map,parentIndex =
|
|
|
90
91
|
let contentWidth = jQuery('.question-list').width() - 30
|
|
91
92
|
//图片宽度超出框架的时候把宽度设置成框架大小
|
|
92
93
|
parseContent(contentArr,contentWidth)
|
|
93
|
-
item.htmlContent =
|
|
94
|
+
item.htmlContent = json2html.transform({}, contentArr);
|
|
94
95
|
}catch(e){
|
|
95
96
|
item.htmlContent = item.content
|
|
96
97
|
}
|
|
97
98
|
//转化analysis富文本
|
|
98
99
|
try{
|
|
99
100
|
if(item.analysis){
|
|
100
|
-
item.analysisHtmlContent =
|
|
101
|
+
item.analysisHtmlContent = json2html.transform({}, JSON.parse(item.analysis));
|
|
101
102
|
}else{
|
|
102
103
|
item.analysisHtmlContent = ''
|
|
103
104
|
}
|