@qxs-bns/components-wc 0.0.30 → 0.0.32
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/es/editor/blocksuite-editor.mjs +166 -357
- package/es/editor/blocksuite-editor.mjs.map +1 -1
- package/es/editor/toolbar.mjs +2 -0
- package/es/editor/toolbar.mjs.map +1 -0
- package/es/subject/action.mjs +7 -8
- package/es/subject/action.mjs.map +1 -1
- package/es/subject/blank-fill.mjs +243 -132
- package/es/subject/blank-fill.mjs.map +1 -1
- package/es/subject/layout.mjs +5 -5
- package/es/subject/layout.mjs.map +1 -1
- package/es/subject/page-end.mjs +1 -1
- package/es/subject/page-end.mjs.map +1 -1
- package/es/subject/scale.mjs +165 -126
- package/es/subject/scale.mjs.map +1 -1
- package/es/subject/shared-methods.mjs +2 -0
- package/es/subject/shared-methods.mjs.map +1 -0
- package/es/subject/shared-styles.mjs +75 -0
- package/es/subject/shared-styles.mjs.map +1 -0
- package/es/subject/single.mjs +243 -187
- package/es/subject/single.mjs.map +1 -1
- package/es/subject/sortable.mjs +7 -7
- package/es/subject/sortable.mjs.map +1 -1
- package/es/subject/text-fill.mjs +273 -138
- package/es/subject/text-fill.mjs.map +1 -1
- package/lib/editor/blocksuite-editor.cjs +166 -357
- package/lib/editor/blocksuite-editor.cjs.map +1 -1
- package/lib/editor/toolbar.cjs +2 -0
- package/lib/editor/toolbar.cjs.map +1 -0
- package/lib/subject/action.cjs +33 -34
- package/lib/subject/action.cjs.map +1 -1
- package/lib/subject/blank-fill.cjs +247 -136
- package/lib/subject/blank-fill.cjs.map +1 -1
- package/lib/subject/layout.cjs +3 -3
- package/lib/subject/layout.cjs.map +1 -1
- package/lib/subject/page-end.cjs +2 -2
- package/lib/subject/page-end.cjs.map +1 -1
- package/lib/subject/scale.cjs +165 -126
- package/lib/subject/scale.cjs.map +1 -1
- package/lib/subject/shared-methods.cjs +2 -0
- package/lib/subject/shared-methods.cjs.map +1 -0
- package/lib/subject/shared-styles.cjs +75 -0
- package/lib/subject/shared-styles.cjs.map +1 -0
- package/lib/subject/single.cjs +243 -187
- package/lib/subject/single.cjs.map +1 -1
- package/lib/subject/sortable.cjs +1 -1
- package/lib/subject/sortable.cjs.map +1 -1
- package/lib/subject/text-fill.cjs +273 -138
- package/lib/subject/text-fill.cjs.map +1 -1
- package/package.json +1 -1
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import{html as t,css as e,LitElement as i}from"lit";import{property as s,state as r}from"lit/decorators.js";import{safeCustomElement as a}from"../base/define.mjs";import{
|
|
1
|
+
import{html as t,css as e,LitElement as i}from"lit";import{property as s,state as r}from"lit/decorators.js";import{safeCustomElement as a}from"../base/define.mjs";import{SUB_TEXT_EDITOR_TOOLBAR as o}from"../editor/toolbar.mjs";import{emitSubjectEvent as n,emitSubjectModelValue as l,getSubjectImageResources as h,getSubjectVideoResource as d,resolveSubjectCategoryLabel as c,showSubjectToast as p,buildSubjectSortingTitle as g}from"./shared-methods.mjs";import{subjectHostStyles as x,subjectControlResetStyles as u,subjectPreviewBaseStyles as w,subjectFormBaseStyles as y,subjectTextareaStyles as _}from"./shared-styles.mjs";import{trimCommaSeparatedText as m,trimText as f,SubjectError as v}from"./single.mjs";import{sortingCardStyles as b,renderSortingCard as $}from"./sorting-card.mjs";import{resolveSubjectPrefix as I}from"./title-prefix.mjs";import{SubjectType as k,SubjectTypeLabel as T}from"./types.mjs";var A=Object.defineProperty,B=Object.getOwnPropertyDescriptor,C=(t,e,i,s)=>{for(var r,a=s>1?void 0:s?B(e,i):e,o=t.length-1;o>=0;o--)(r=t[o])&&(a=(s?r(e,i,a):r(a))||a);return s&&a&&A(e,i,a),a};const j=" ______",L=t`
|
|
2
2
|
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none"
|
|
3
3
|
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
4
4
|
<line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/>
|
|
5
|
-
</svg>`;let
|
|
5
|
+
</svg>`;let S=class extends i{constructor(){super(...arguments),this["order-index"]=0,this.title="",this["custom-id"]="",this["is-edit"]=!1,this["is-save"]=!1,this["is-set"]=!1,this["is-key"]=!1,this["show-action"]=!0,this["show-add"]=!0,this["hide-add-rich-text"]=!1,this["show-rich-text"]=!1,this["show-delete-action"]=!0,this["show-save-action"]=!0,this.sorting=!1,this["show-answer-setting"]=!1,this["show-analysis"]=!1,this["rich-text-content"]="",this.analysis="",this["exam-answer-relation-type"]=0,this["exam-expand"]="",this["exam-id"]=0,this["category-id"]="",this["exam-answer-setting"]={isInOrder:!1,isIgnoreCase:!0},this["upload-image"]=async t=>new Promise((e,i)=>{const s=new FileReader;s.onload=t=>e(t.target?.result),s.onerror=i,s.readAsDataURL(t)}),this["answer-list"]=[],this["tag-list"]=[],this["category-list"]=[],this["resource-list"]=[],this["show-tag"]=!1,this["show-category"]=!1,this["show-resource"]=!1,this["model-value"]="",this["use-model"]=!1,this._title="",this._analysis="",this._answers=[{title:"",tag:"",showInput:!1}],this._isInOrder=!1,this._isIgnoreCase=!0,this._showRichText=!1,this._richText="",this._selectedTagList=[],this._categoryId="",this.TITLE_MAX=400}willUpdate(t){t.has("is-edit")&&this["is-edit"]&&this._syncProps(),!this["is-edit"]&&(t.has("title")||t.has("answer-list")||t.has("analysis")||t.has("exam-answer-setting")||t.has("rich-text-content")||t.has("tag-list")||t.has("category-id"))&&this._syncProps(),t.has("model-value")&&this["use-model"]&&(this._title=this["model-value"].replaceAll(/<filter><\/filter>/g," ______")),t.has("tag-list")&&(this._selectedTagList=Array.isArray(this["tag-list"])?this["tag-list"].map(t=>({...t})):[]),t.has("category-id")&&(this._categoryId=this["category-id"]?String(this["category-id"]):"")}_normalizeAnswerTitle(t){return m(t?.title??t?.answer??"")}_blankCount(t){return(t.match(/ ______/g)||[]).length}_syncAnswersToBlankCount(t){t!==this._answers.length&&(t>this._answers.length?this._answers=[...this._answers,...Array.from({length:t-this._answers.length},()=>({title:"",tag:"",showInput:!1}))]:this._answers=this._answers.slice(0,t))}_syncProps(){if(this._title=(this.title||"").replaceAll(/<filter><\/filter>/g," ______"),this._analysis=this.analysis||"",this["answer-list"]?.length)this._answers=this["answer-list"].map(t=>({title:this._normalizeAnswerTitle(t),tag:"",showInput:!1,answerId:t?.answerId??t?.examAnswerId}));else{const t=this._blankCount(this._title);this._answers=Array.from({length:t},()=>({title:"",tag:"",showInput:!1}))}this["exam-answer-setting"]&&(this._isInOrder=!!this["exam-answer-setting"].isInOrder,this._isIgnoreCase=!!this["exam-answer-setting"].isIgnoreCase),this._richText=this["rich-text-content"]||"",this._showRichText=!!this["rich-text-content"],this._selectedTagList=Array.isArray(this["tag-list"])?this["tag-list"].map(t=>({...t})):[],this._categoryId=this["category-id"]?String(this["category-id"]):""}_emit(t,e){n(this,t,e)}_addBlank(){const t=this.shadowRoot?.querySelector(".title-textarea"),e=t?.selectionStart??this._title.length,i=t?.selectionEnd??this._title.length,s=`${this._title.slice(0,e)}${j}${this._title.slice(i)}`;s.length>this.TITLE_MAX||(this._title=s,this._syncAnswersToBlankCount(this._blankCount(this._title)),this.requestUpdate(),this._emitModelUpdate(),this.updateComplete.then(()=>{const t=this.shadowRoot?.querySelector(".title-textarea");if(!t)return;const i=e+7;t.focus(),t.setSelectionRange(i,i)}))}_onTitleInput(t){const e=t.target;e.value.length>this.TITLE_MAX&&(e.value=e.value.slice(0,this.TITLE_MAX)),this._title=e.value,this._syncAnswersToBlankCount(this._blankCount(this._title)),this._emitModelUpdate()}_emitModelUpdate(){if(this["use-model"]){const t=this._title.replaceAll(/ ______/g,"<filter></filter>");l(this,t)}}_handleAddTag(t){t.showInput=!1,t.tag&&(t.title=t.title?[t.title,t.tag].join(","):t.tag,t.tag=""),this.requestUpdate()}_closeTag(t,e){if(!t)return;const i=e.title.split(","),s=i.findIndex(e=>e===t);s>-1&&(i.splice(s,1),e.title=i.join(",")),this.requestUpdate()}_onCategoryChange(t){this._categoryId=t,this._emit("category-change",{value:t,customId:this["custom-id"]||"",examId:this["exam-id"]||0})}_imageResources(){return h(this["resource-list"]||[])}_videoResource(){return d(this["resource-list"]||[])}_categoryLabel(){return c(this["category-list"],this._categoryId)}_previewAnswerText(t){const e=(t?.title||"").split(",").map(t=>t.trim()).filter(Boolean);return e.length?e.join(" / "):""}_renderInlineBlankTitle(e){const i=this.title.replaceAll(/<filter><\/filter>/g," ______"),s=I(this["subject-prefix"],`${this["order-index"]+1}.`),r=i.split(" ______");return t`<span class="title preview-filled-title">${s?`${s} `:""}${r[0]??""}${r.slice(1).map((i,s)=>{const r=this._previewAnswerText(e[s]);return t`<span class="inline-blank ${r?"":"empty"}">${r||"填空"}</span>${i}`})}</span>`}async toJSON(){return new Promise((t,e)=>{const i={customId:this["custom-id"]||void 0,answerType:"blank_fill",orderIndex:this["order-index"]},s=f(this["is-edit"]?this._title:this.title?.replaceAll(/<filter><\/filter>/g," ______")||""),r=this["is-edit"]?this._answers:(this["answer-list"]||[]).map(t=>({...t,title:this._normalizeAnswerTitle(t),answerId:t?.answerId??t?.examAnswerId})),a=f(this["is-edit"]?this._analysis:this.analysis||""),o=this["is-edit"]?this._isInOrder:this["exam-answer-setting"]?.isInOrder??!1,n=this["is-edit"]?this._isIgnoreCase:this["exam-answer-setting"]?.isIgnoreCase??!0,l=this["is-edit"]?this._showRichText:!!this["rich-text-content"],h=this["is-edit"]?this._richText:this["rich-text-content"]||"",d=r.filter(t=>this._normalizeAnswerTitle(t));if(!s)return void e(new v("题目标题不能为空!","EMPTY_TITLE","title",i));if(r.length<1)return void e(new v("至少添加一个填空符!","NO_BLANK","answers",i));const c={answerType:k.BLANK_FILL,examTypeEnum:k.BLANK_FILL,title:s.replaceAll(/ ______/g,"<filter></filter>"),answers:d.map((t,e)=>{const i=this._normalizeAnswerTitle(t),s={title:i,answer:i,isCorrect:!0,orderIndex:e+1};return t.answerId&&(s.answerId=t.answerId,s.examAnswerId=t.answerId),s}),analysis:a,isSetCorrectAnswer:d.length>0,isKey:this["is-key"],examAnswerSettingBO:{isIgnoreCase:n,isInOrder:o},examAnswerSettingVO:{isIgnoreCase:n,isInOrder:o},examRichTextContent:l?h:""};this["custom-id"]&&(c.customId=this["custom-id"]),t(c)})}async _save(t){t?.stopImmediatePropagation();try{const t=await this.toJSON();this._emit("save",t)}catch(t){p(t.message)}}validate(){const t=[],e={customId:this["custom-id"]||void 0,answerType:"blank_fill",orderIndex:this["order-index"]},i=f(this["is-edit"]?this._title:this.title?.replaceAll(/<filter><\/filter>/g," ______")||""),s=this["is-edit"]?this._answers:(this["answer-list"]||[]).map(t=>({...t,title:this._normalizeAnswerTitle(t)}));return i||t.push(new v("题目标题不能为空!","EMPTY_TITLE","title",e)),s.length<1&&t.push(new v("至少添加一个填空符!","NO_BLANK","answers",e)),t}_renderPreview(){const e=this["is-edit"]?this._answers:(this["answer-list"]||[]).map(t=>({...t,title:this._normalizeAnswerTitle(t)}));return t`
|
|
6
6
|
<div class="preview">
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
<span>正确答案:</span>
|
|
12
|
-
${i.map((e,i)=>e.title?t`<span style="margin-right:10px">填空${i+1}: ${e.title}</span>`:"")}
|
|
7
|
+
<div class="preview-header">
|
|
8
|
+
<div class="preview-title-row">
|
|
9
|
+
${this._renderInlineBlankTitle(e)}
|
|
10
|
+
<span class="preview-type">填空题</span>
|
|
13
11
|
</div>
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
${this["show-rich-text"]&&this["rich-text-content"]?t`<div class="rich-text" .innerHTML=${this["rich-text-content"]}></div>`:""}
|
|
13
|
+
</div>
|
|
14
|
+
${this.analysis?t`<div class="preview-note">${this.analysis}</div>`:""}
|
|
16
15
|
${this["show-category"]&&this._categoryId?t`<div class="section-row"><span class="value-text">分类:${this._categoryLabel()}</span></div>`:""}
|
|
17
16
|
${this._renderResourceSection()}
|
|
18
17
|
</div>
|
|
@@ -45,104 +44,116 @@ import{html as t,css as e,LitElement as i}from"lit";import{property as s,state a
|
|
|
45
44
|
${e.length||i?.url?"":t`<div class="tag-hint">暂无资源</div>`}
|
|
46
45
|
</div>
|
|
47
46
|
</div>
|
|
48
|
-
`}_renderSorting(){const t=
|
|
49
|
-
<div class="
|
|
50
|
-
<div class="
|
|
51
|
-
|
|
52
|
-
<div class="
|
|
53
|
-
<
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
47
|
+
`}_renderSorting(){const t=f(this["is-edit"]?this._title:this.title||"")||"未命名题目",e=g(this["subject-prefix"],this["order-index"],t);return $(e,T[k.BLANK_FILL]||k.BLANK_FILL)}_renderEdit(){return t`
|
|
48
|
+
<div class="edit-form">
|
|
49
|
+
<div class="edit-row">
|
|
50
|
+
<div class="label"><span>题目:</span></div>
|
|
51
|
+
<div class="row-body">
|
|
52
|
+
<div class="el-input title-input">
|
|
53
|
+
<textarea class="title-textarea" rows="3" .value=${this._title}
|
|
54
|
+
maxlength=${this.TITLE_MAX}
|
|
55
|
+
@input=${t=>this._onTitleInput(t)}
|
|
56
|
+
placeholder="【填空题】请输入问题"></textarea>
|
|
57
|
+
<div class="title-input-actions">
|
|
58
|
+
<span class="char-counter">${this._title.length}/${this.TITLE_MAX}</span>
|
|
59
|
+
<button type="button" class="title-input-insert" @click=${()=>this._addBlank()}>插入填空符</button>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
58
62
|
</div>
|
|
59
63
|
</div>
|
|
60
|
-
</div>
|
|
61
64
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
</label>
|
|
78
|
-
</div>
|
|
65
|
+
<div class="edit-row section-row">
|
|
66
|
+
<div class="label"><span>答题设置:</span></div>
|
|
67
|
+
<div class="row-body edit-inline">
|
|
68
|
+
<label class="el-checkbox">
|
|
69
|
+
<input type="checkbox" .checked=${this._isInOrder}
|
|
70
|
+
@change=${t=>{this._isInOrder=t.target.checked}} />
|
|
71
|
+
答案不分顺序
|
|
72
|
+
</label>
|
|
73
|
+
<label class="el-checkbox">
|
|
74
|
+
<input type="checkbox" .checked=${this._isIgnoreCase}
|
|
75
|
+
@change=${t=>{this._isIgnoreCase=t.target.checked}} />
|
|
76
|
+
忽略大小写
|
|
77
|
+
</label>
|
|
78
|
+
</div>
|
|
79
|
+
</div>
|
|
79
80
|
|
|
80
|
-
|
|
81
|
+
<slot name="business-tag"></slot>
|
|
81
82
|
|
|
82
|
-
|
|
83
|
+
${this._renderCategorySection()}
|
|
83
84
|
|
|
84
|
-
|
|
85
|
+
${this._renderResourceSection()}
|
|
85
86
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
<div class="
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
87
|
+
<div class="edit-row section-row answer-section-row">
|
|
88
|
+
<div class="label"><span>参考答案:</span></div>
|
|
89
|
+
<div class="row-body">
|
|
90
|
+
<div class="answer-section">
|
|
91
|
+
<div class="edit-note">每个填空支持多个同义词,录入后会按逗号序列化。</div>
|
|
92
|
+
${this._answers.map((e,i)=>t`
|
|
93
|
+
<div class="answer-item">
|
|
94
|
+
<div class="answer-item-label"><span>第${i+1}空:</span></div>
|
|
95
|
+
<div class="answer-tags">
|
|
96
|
+
${e.title.split(",").filter(Boolean).map(i=>t`
|
|
97
|
+
<span class="el-tag">
|
|
98
|
+
${i}
|
|
99
|
+
<span class="el-tag__close" @click=${()=>this._closeTag(i,e)}>×</span>
|
|
100
|
+
</span>
|
|
101
|
+
`)}
|
|
102
|
+
${t`
|
|
103
|
+
${e.showInput?t`
|
|
104
|
+
<input type="text" class="el-input--small"
|
|
105
|
+
@keydown=${t=>{"Enter"===t.key&&this._handleAddTag(e)}}
|
|
106
|
+
@input=${t=>{e.tag=t.target.value}}
|
|
107
|
+
@blur=${()=>this._handleAddTag(e)} />
|
|
108
|
+
`:t`
|
|
109
|
+
<span class="el-button--small" @click=${()=>{e.showInput=!0,this.requestUpdate(),this.updateComplete.then(()=>{this.shadowRoot?.querySelector(".el-input--small")?.focus()})}}>
|
|
110
|
+
${L}
|
|
111
|
+
<span>${e.title?"添加同义词":"添加答案"}</span>
|
|
112
|
+
</span>
|
|
113
|
+
`}
|
|
114
|
+
`}
|
|
115
|
+
</div>
|
|
116
|
+
</div>
|
|
117
|
+
`)}
|
|
118
|
+
</div>
|
|
109
119
|
</div>
|
|
110
120
|
</div>
|
|
111
|
-
`)}
|
|
112
121
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
<
|
|
128
|
-
|
|
129
|
-
|
|
122
|
+
${this["show-rich-text"]&&this._showRichText?t`
|
|
123
|
+
<div class="edit-row section-row">
|
|
124
|
+
<div class="label"><span>副文本:</span></div>
|
|
125
|
+
<div class="row-body">
|
|
126
|
+
<slot name="sub-text">
|
|
127
|
+
<qxs-blocksuite-editor
|
|
128
|
+
.content=${this._richText}
|
|
129
|
+
.toolbar=${o}
|
|
130
|
+
.upload-image=${this["upload-image"]}
|
|
131
|
+
?is-edit=${!0}
|
|
132
|
+
@input=${t=>{this._richText=t.target.getContent()}}
|
|
133
|
+
></qxs-blocksuite-editor>
|
|
134
|
+
</slot>
|
|
135
|
+
${this["show-action"]?"":t`
|
|
136
|
+
<div class="flex flex-justify-end" style="margin-top:8px">
|
|
137
|
+
<span class="el-link" style="color:#f56c6c" @click=${()=>{this._showRichText=!1,this._richText=""}}>删除富文本</span>
|
|
138
|
+
</div>
|
|
139
|
+
`}
|
|
140
|
+
</div>
|
|
130
141
|
</div>
|
|
131
|
-
|
|
132
|
-
`:""}
|
|
142
|
+
`:""}
|
|
133
143
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
144
|
+
${this["show-analysis"]?t`
|
|
145
|
+
<div class="edit-row section-row">
|
|
146
|
+
<div class="label"><span>解析:</span></div>
|
|
147
|
+
<div class="row-body">
|
|
148
|
+
<div class="el-input">
|
|
149
|
+
<textarea rows="2" .value=${this._analysis}
|
|
150
|
+
@input=${t=>{this._analysis=t.target.value}}
|
|
151
|
+
placeholder="请输入题目解析"></textarea>
|
|
152
|
+
</div>
|
|
142
153
|
</div>
|
|
143
154
|
</div>
|
|
144
|
-
|
|
145
|
-
|
|
155
|
+
`:""}
|
|
156
|
+
</div>
|
|
146
157
|
`}render(){if(this.sorting)return this._renderSorting();const e=this["is-edit"]?t`<div slot="edit">${this._renderEdit()}</div>`:t`<div slot="preview">${this._renderPreview()}</div>`;return t`
|
|
147
158
|
<qxs-subject-layout .show-edit=${this["is-edit"]}>
|
|
148
159
|
${e}
|
|
@@ -166,38 +177,60 @@ import{html as t,css as e,LitElement as i}from"lit";import{property as s,state a
|
|
|
166
177
|
`:""}
|
|
167
178
|
<slot name="action"></slot>
|
|
168
179
|
</qxs-subject-layout>
|
|
169
|
-
`}};
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
.preview
|
|
179
|
-
|
|
180
|
-
|
|
180
|
+
`}};S.styles=[b,x,u,w,y,_,e`
|
|
181
|
+
.preview-note {
|
|
182
|
+
margin-top: 18px;
|
|
183
|
+
padding-left: 10px;
|
|
184
|
+
border-left: 2px solid #e5eaf3;
|
|
185
|
+
font-size: 13px;
|
|
186
|
+
line-height: 1.8;
|
|
187
|
+
color: #6b7280;
|
|
188
|
+
}
|
|
189
|
+
.preview-filled-title {
|
|
190
|
+
display: inline;
|
|
191
|
+
font-size: 16px;
|
|
192
|
+
line-height: 1.9;
|
|
193
|
+
font-weight: 600;
|
|
194
|
+
color: #303133;
|
|
195
|
+
}
|
|
196
|
+
.inline-blank {
|
|
197
|
+
display: inline-flex;
|
|
198
|
+
align-items: center;
|
|
199
|
+
min-width: 64px;
|
|
200
|
+
margin: 0 4px;
|
|
201
|
+
padding: 0 4px 1px;
|
|
202
|
+
border-bottom: 1px solid #d6deea;
|
|
203
|
+
font-size: 14px;
|
|
204
|
+
line-height: 1.6;
|
|
205
|
+
font-weight: 500;
|
|
206
|
+
color: #8b95a7;
|
|
207
|
+
vertical-align: baseline;
|
|
208
|
+
}
|
|
209
|
+
.inline-blank.empty {
|
|
210
|
+
color: transparent;
|
|
211
|
+
}
|
|
181
212
|
|
|
182
213
|
.flex { display: flex; }
|
|
183
214
|
.flex-wrap { flex-wrap: wrap; }
|
|
184
215
|
.flex-items-center { display: flex; align-items: center; }
|
|
185
216
|
.flex-items-start { display: flex; align-items: flex-start; }
|
|
186
217
|
.flex-justify-end { display: flex; justify-content: flex-end; }
|
|
187
|
-
.
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
218
|
+
.edit-actions {
|
|
219
|
+
display: flex;
|
|
220
|
+
justify-content: flex-end;
|
|
221
|
+
padding-left: 88px;
|
|
222
|
+
}
|
|
223
|
+
.edit-inline {
|
|
224
|
+
display: flex;
|
|
225
|
+
align-items: center;
|
|
226
|
+
flex-wrap: wrap;
|
|
227
|
+
gap: 8px 14px;
|
|
228
|
+
min-height: 32px;
|
|
193
229
|
}
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
.el-input .char-counter {
|
|
199
|
-
position: absolute; right: 12px; bottom: 8px;
|
|
200
|
-
font-size: 12px; color: #909399; line-height: 1; pointer-events: none;
|
|
230
|
+
.edit-note {
|
|
231
|
+
font-size: 12px;
|
|
232
|
+
line-height: 1.6;
|
|
233
|
+
color: #909399;
|
|
201
234
|
}
|
|
202
235
|
|
|
203
236
|
.el-tag {
|
|
@@ -214,8 +247,8 @@ import{html as t,css as e,LitElement as i}from"lit";import{property as s,state a
|
|
|
214
247
|
|
|
215
248
|
.el-button--small {
|
|
216
249
|
display: inline-flex; align-items: center; gap: 4px;
|
|
217
|
-
height:
|
|
218
|
-
border: 1px solid #dcdfe6; border-radius:
|
|
250
|
+
height: 28px; padding: 0 10px; font-size: 12px; line-height: 1;
|
|
251
|
+
border: 1px solid #dcdfe6; border-radius: 6px; background: #fff; color: #606266;
|
|
219
252
|
cursor: pointer; transition: all .2s; white-space: nowrap;
|
|
220
253
|
}
|
|
221
254
|
.el-button--small:hover { color: #3D61E3; border-color: #c6e2ff; background-color: #ecf5ff; }
|
|
@@ -224,12 +257,49 @@ import{html as t,css as e,LitElement as i}from"lit";import{property as s,state a
|
|
|
224
257
|
.el-link:hover { color: #2D4CB8; }
|
|
225
258
|
.el-link.is-disabled { color: #c0c4cc; cursor: not-allowed; }
|
|
226
259
|
|
|
227
|
-
.el-input--small {
|
|
228
|
-
|
|
229
|
-
height:
|
|
230
|
-
|
|
260
|
+
.el-input--small {
|
|
261
|
+
width: 80px;
|
|
262
|
+
height: 28px;
|
|
263
|
+
padding: 0 8px;
|
|
264
|
+
font-size: 12px;
|
|
265
|
+
line-height: 24px;
|
|
266
|
+
color: #606266;
|
|
267
|
+
background: #fff;
|
|
268
|
+
border: 1px solid #dcdfe6;
|
|
269
|
+
border-radius: 6px;
|
|
270
|
+
box-sizing: border-box;
|
|
271
|
+
font-family: inherit;
|
|
272
|
+
}
|
|
273
|
+
.el-input--small:focus { border-color: #3D61E3; outline: none; }
|
|
274
|
+
|
|
275
|
+
.title-input textarea {
|
|
276
|
+
padding-bottom: 38px;
|
|
277
|
+
}
|
|
278
|
+
.title-input-actions {
|
|
279
|
+
position: absolute;
|
|
280
|
+
right: 12px;
|
|
281
|
+
bottom: 8px;
|
|
282
|
+
display: inline-flex;
|
|
283
|
+
align-items: center;
|
|
284
|
+
gap: 12px;
|
|
231
285
|
}
|
|
232
|
-
.
|
|
286
|
+
.title-input .char-counter {
|
|
287
|
+
position: static;
|
|
288
|
+
color: #909399;
|
|
289
|
+
}
|
|
290
|
+
.title-input-insert {
|
|
291
|
+
border: none;
|
|
292
|
+
background: none;
|
|
293
|
+
padding: 0;
|
|
294
|
+
margin: 0;
|
|
295
|
+
color: #3D61E3;
|
|
296
|
+
cursor: pointer;
|
|
297
|
+
font-size: 12px;
|
|
298
|
+
font-family: inherit;
|
|
299
|
+
line-height: 1;
|
|
300
|
+
white-space: nowrap;
|
|
301
|
+
}
|
|
302
|
+
.title-input-insert:hover { color: #2D4CB8; }
|
|
233
303
|
|
|
234
304
|
.el-checkbox {
|
|
235
305
|
display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
|
|
@@ -239,11 +309,25 @@ import{html as t,css as e,LitElement as i}from"lit";import{property as s,state a
|
|
|
239
309
|
width: 14px; height: 14px; cursor: pointer; accent-color: #3D61E3;
|
|
240
310
|
}
|
|
241
311
|
|
|
242
|
-
.answer-item {
|
|
243
|
-
|
|
244
|
-
|
|
312
|
+
.answer-item {
|
|
313
|
+
display: grid;
|
|
314
|
+
grid-template-columns: 70px minmax(0, 1fr);
|
|
315
|
+
gap: 8px 12px;
|
|
316
|
+
align-items: start;
|
|
317
|
+
}
|
|
318
|
+
.answer-item-label {
|
|
319
|
+
min-width: 0;
|
|
320
|
+
align-self: center;
|
|
321
|
+
font-size: 13px;
|
|
322
|
+
line-height: 1.5;
|
|
323
|
+
font-weight: 600;
|
|
324
|
+
color: #6b7280;
|
|
325
|
+
letter-spacing: 0;
|
|
326
|
+
}
|
|
327
|
+
.answer-tags { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; flex: 1; min-height: 28px; }
|
|
328
|
+
.answer-section { display: flex; flex-direction: column; gap: 10px; }
|
|
329
|
+
.answer-section-row > .label { padding-top: 0; }
|
|
245
330
|
|
|
246
|
-
.section-row { margin-top: 12px; }
|
|
247
331
|
.value-text { font-size: 13px; color: #606266; white-space: pre-wrap; }
|
|
248
332
|
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 32px; }
|
|
249
333
|
.tag-item {
|
|
@@ -256,7 +340,7 @@ import{html as t,css as e,LitElement as i}from"lit";import{property as s,state a
|
|
|
256
340
|
.tag-hint { font-size: 12px; color: #909399; }
|
|
257
341
|
|
|
258
342
|
.el-select {
|
|
259
|
-
width: 150px; height:
|
|
343
|
+
width: 150px; height: 34px; border: 1px solid #dcdfe6; border-radius: 6px;
|
|
260
344
|
padding: 0 8px; font-size: 13px; background: #fff; appearance: none;
|
|
261
345
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23c0c4cc' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
|
|
262
346
|
background-repeat: no-repeat; background-position: right 8px center;
|
|
@@ -270,5 +354,32 @@ import{html as t,css as e,LitElement as i}from"lit";import{property as s,state a
|
|
|
270
354
|
width: 72px; height: 72px; object-fit: cover; border-radius: 6px;
|
|
271
355
|
border: 1px solid #e4e7ed; background: #f5f7fa;
|
|
272
356
|
}
|
|
273
|
-
|
|
357
|
+
|
|
358
|
+
@media (max-width: 720px) {
|
|
359
|
+
.edit-row,
|
|
360
|
+
.section-row {
|
|
361
|
+
flex-direction: column;
|
|
362
|
+
gap: 8px;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
.edit-row > .label,
|
|
366
|
+
.section-row > .label {
|
|
367
|
+
min-width: 0;
|
|
368
|
+
padding-top: 0;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
.edit-actions {
|
|
372
|
+
padding-left: 0;
|
|
373
|
+
justify-content: flex-start;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
.answer-item {
|
|
377
|
+
flex-direction: column;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
.answer-item-label {
|
|
381
|
+
min-width: 0;
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
`],C([s({type:Number,attribute:"order-index"})],S.prototype,"order-index",2),C([s({type:String,attribute:"subject-prefix"})],S.prototype,"subject-prefix",2),C([s({type:String})],S.prototype,"title",2),C([s({type:String,attribute:"custom-id"})],S.prototype,"custom-id",2),C([s({type:Boolean,attribute:"is-edit"})],S.prototype,"is-edit",2),C([s({type:Boolean,attribute:"is-save"})],S.prototype,"is-save",2),C([s({type:Boolean,attribute:"is-set"})],S.prototype,"is-set",2),C([s({type:Boolean,attribute:"is-key"})],S.prototype,"is-key",2),C([s({type:Boolean,attribute:"show-action"})],S.prototype,"show-action",2),C([s({type:Boolean,attribute:"show-add"})],S.prototype,"show-add",2),C([s({type:Boolean,attribute:"hide-add-rich-text"})],S.prototype,"hide-add-rich-text",2),C([s({type:Boolean,attribute:"show-rich-text"})],S.prototype,"show-rich-text",2),C([s({type:Boolean,attribute:"show-delete-action"})],S.prototype,"show-delete-action",2),C([s({type:Boolean,attribute:"show-save-action"})],S.prototype,"show-save-action",2),C([s({type:Boolean,reflect:!0})],S.prototype,"sorting",2),C([s({type:Boolean,attribute:"show-answer-setting"})],S.prototype,"show-answer-setting",2),C([s({type:Boolean,attribute:"show-analysis"})],S.prototype,"show-analysis",2),C([s({type:String,attribute:"rich-text-content"})],S.prototype,"rich-text-content",2),C([s({type:String})],S.prototype,"analysis",2),C([s({type:Number,attribute:"exam-answer-relation-type"})],S.prototype,"exam-answer-relation-type",2),C([s({type:String,attribute:"exam-expand"})],S.prototype,"exam-expand",2),C([s({type:Number,attribute:"exam-id"})],S.prototype,"exam-id",2),C([s({type:String,attribute:"category-id"})],S.prototype,"category-id",2),C([s({type:Object,attribute:"exam-answer-setting"})],S.prototype,"exam-answer-setting",2),C([s({type:Object,attribute:"upload-image"})],S.prototype,"upload-image",2),C([s({type:Array,attribute:"answer-list"})],S.prototype,"answer-list",2),C([s({type:Array,attribute:"tag-list"})],S.prototype,"tag-list",2),C([s({type:Array,attribute:"category-list"})],S.prototype,"category-list",2),C([s({type:Array,attribute:"resource-list"})],S.prototype,"resource-list",2),C([s({type:Boolean,attribute:"show-tag"})],S.prototype,"show-tag",2),C([s({type:Boolean,attribute:"show-category"})],S.prototype,"show-category",2),C([s({type:Boolean,attribute:"show-resource"})],S.prototype,"show-resource",2),C([s({type:String,attribute:"model-value"})],S.prototype,"model-value",2),C([s({type:Boolean,attribute:"use-model"})],S.prototype,"use-model",2),C([r()],S.prototype,"_title",2),C([r()],S.prototype,"_analysis",2),C([r()],S.prototype,"_answers",2),C([r()],S.prototype,"_isInOrder",2),C([r()],S.prototype,"_isIgnoreCase",2),C([r()],S.prototype,"_showRichText",2),C([r()],S.prototype,"_richText",2),C([r()],S.prototype,"_selectedTagList",2),C([r()],S.prototype,"_categoryId",2),S=C([a("qxs-blank-fill")],S);export{S as QxsBlankFill};
|
|
274
385
|
//# sourceMappingURL=blank-fill.mjs.map
|