import{n as l}from"./index-8fa791df.js";import{r as u}from"./vendor-39c32a1b.js";const r={__name:"TestQuestions",props:{padding:{type:String,default:null},margin:{type:String,default:null}},setup(a){return{__sfc:!0}}};var p=function(){var e=this,t=e._self._c;return e._self._setupProxy,t("div",{style:{padding:e.padding,margin:e.margin}},[e._t("default")],2)},c=[],_=l(r,p,c,!1,null,null,null,null);const h=_.exports;const d={__name:"TestQuestionTitle",props:{type:{type:String,default:"ce"},index:{type:Number,default:0},value:{type:[Number,String,Boolean],default:null},score:{type:Number,default:0},scoreBg:{type:String,default:"#F1F5FF"},scoreColor:{type:String,default:"#4284F4"},scorePadding:{type:String,default:"4px 1.5em"},scoreFontSize:{type:String,default:"12px"}},emits:["input","del"],setup(a,{emit:e}){const t=a,s=u(t.value);return{__sfc:!0,emits:e,props:t,modelValue:s,updateValue:()=>e("input",s.value),handleDel:()=>e("del",t.index)}}};var v=function(){var e=this,t=e._self._c,s=e._self._setupProxy;return t("div",{staticClass:"test-question-title",class:{examination:e.type==="examination",details:e.type==="details"},style:{"--test-question-title-score-bg":e.scoreBg,"--test-question-title-score-color":e.scoreColor,"--test-question-title-score-padding":e.scorePadding,"--test-question-title-score-font-size":e.scoreFontSize}},[t("div",{staticClass:"question-no"},[e.type==="examination"?t("span",{staticClass:"question-required"},[e._v("*")]):e._e(),e._v(e._s(e.index+1)+". ")]),e.type==="ce"?t("el-input",{staticClass:"question-title-value",attrs:{type:"textarea",autosize:{minRows:1,maxRows:5},placeholder:"\u8BF7\u8F93\u5165\u9879\u76EE\u5185\u5BB9"},on:{input:s.updateValue},model:{value:s.modelValue,callback:function(n){s.modelValue=n},expression:"modelValue"}}):t("div",{staticClass:"question-title-value-text"},[e._v(" "+e._s(s.modelValue)+" ")]),t("div",{staticClass:"question-score"},[e._v("\u5206\u503C"+e._s(e.score)+"\u5206")]),e.type==="ce"?t("div",{staticClass:"question-delete-icon",on:{click:function(n){return n.stopPropagation(),s.handleDel.apply(null,arguments)}}},[t("i",{staticClass:"el-icon-delete"})]):e._e()],1)},f=[],m=l(d,v,f,!1,null,"7d543419",null,null);const q=m.exports;const y={__name:"TestQuestionOptions",props:{i:{type:Number,default:-1},type:{type:String,default:"ce"},value:{type:String,default:null},padding:{type:String,default:"16px 0"},options:{type:Array,default:()=>[]},answerStatus:{type:String,default:null},showAnswer:{type:Boolean,default:!0}},emits:["input","changeAnswer","upContent"],setup(a,{emit:e}){const t=a;return{__sfc:!0,emits:e,props:t,updateValue:o=>{e("input",o),e("changeAnswer",o)},handleContentInput:(o,i)=>{t.i<0||e("upContent",t.i,o,i)}}}};var g=function(){var e=this,t=e._self._c,s=e._self._setupProxy;return t("div",{staticClass:"lj-test-question-options",class:{examination:e.type==="examination",details:e.type==="details"},style:{padding:e.padding}},e._l(e.options,function(n,o){return t("div",{key:o,staticClass:"test-question-option-item",class:{"answer-active":n.optionName===e.value,"answer-submit-error":e.answerStatus==="error","answer-submit-success":e.answerStatus==="success"}},[e.answerStatus!=="loading"||n.optionName!==e.value?t("i",{staticClass:"iconfont option-item-icon",class:{"icon-danxuan":n.optionName!==e.value,"icon-danxuan-on":n.optionName===e.value},on:{click:function(i){return s.updateValue(n.optionName)}}}):n.optionName===e.value&&e.answerStatus==="loading"?t("i",{staticClass:"el-icon-loading option-item-icon"}):e._e(),e.type==="ce"?t("div",[e._v(e._s(n.optionName))]):e._e(),e.type==="ce"?t("el-input",{staticClass:"option-item-input",attrs:{placeholder:"\u8BF7\u8F93\u5165\u9879\u76EE\u5185\u5BB9"},on:{input:()=>s.handleContentInput(o,n.optionContent)},model:{value:n.optionContent,callback:function(i){e.$set(n,"optionContent",i)},expression:"item.optionContent"}}):t("div",{staticClass:"option-item-content",on:{click:function(i){return s.updateValue(n.optionName)}}},[e._v(" "+e._s(n.optionName)+"\u3001"+e._s(n.optionContent)+" ")]),e.showAnswer&&n.optionName===e.value?t("div",{staticClass:"option-item-answer"},[e._v(" \uFF08\u6B63\u786E\u7B54\u6848\uFF09 ")]):e._e()],1)}),0)},x=[],C=l(y,g,x,!1,null,"07d7101d",null,null);const N=C.exports;export{h as T,q as a,N as b};
