{"version":3,"file":"KrCes.cjs","sources":["../../../../../packages/src/kr-ces/KrCes.vue"],"sourcesContent":["<template>\n    <div class=\"question-item\">\n        <div class=\"question-item-num\">\n            <question-title v-if=\"titleIsEdit\" :dataList=\"dataList\" @numberBlur=\"(e) => emits('numberChange', e)\" />\n            <div v-else style=\"margin-top: 8px\">{{ dataList.questionNumber }}</div>\n        </div>\n        <div class=\"question-item-content\">\n            <div class=\"title\">\n                <rich-text-editor\n                    ref=\"titileInput\"\n                    class=\"titile-input\"\n                    v-model:valueData=\"dataList.title\"\n                    @focus=\"() => (tipsShow = true)\"\n                    @blur=\"() => (tipsShow = false)\"\n                />\n            </div>\n            <div class=\"content\">\n                <div class=\"score-box\">\n                    <div class=\"score-icon\" v-for=\"(item, index) in 7\" :key=\"index\">\n                        <div :class=\"dataList.icon == '1' ? 'score-icon_number score-icon_circular' : 'score-icon_number score-icon_square'\">\n                            {{ item }}\n                        </div>\n                        <div v-if=\"dataList.showScoreExplain\" class=\"score-explain\">\n                            <span>{{ dataList[`score${index + 1}`] }}</span>\n                        </div>\n                    </div>\n                </div>\n                <!-- 题目聚焦时，出现提示框 -->\n                <div v-show=\"tipsShow\" class=\"title-tips\">\n                    此题是客户评价使用某产品/服务来解决问题的困难程度的重要题目，修改题干请勿偏离“费力程度”原意。\n                </div>\n                <!-- 底部操作栏 -->\n                <div class=\"footer-operation\" v-if=\"footerShow\">\n                    <action-bar\n                        class=\"action-bar\"\n                        @addCopy=\"() => emits('copyQuestion', dataList)\"\n                        @deleteQuestion=\"() => emits('deleteQuestion')\"\n                        @view=\"(e) => emits('singlePreview', e)\"\n                    />\n                </div>\n            </div>\n        </div>\n    </div>\n</template>\n<script setup name=\"kr-ces\">\n// js\nimport { ref, watch, provide } from \"vue\";\n\n// components\nimport RichTextEditor from \"@/components/editor/RichTextEditor.vue\";\nimport ActionBar from \"@/components/action/ActionBar.vue\";\nimport QuestionTitle from \"@/components/question/QuestionNumber.vue\";\n\n// props\nconst props = defineProps({\n    // 是否展示底部操作栏\n    footerShow: {\n        type: Boolean,\n        default: true,\n    },\n    // 题号是否可编辑\n    titleIsEdit: {\n        type: Boolean,\n        default: true,\n    },\n    // 数据渲染\n    dataList: {\n        type: Object,\n        default: () => ({}),\n    },\n});\nconst emits = defineEmits([\"copyQuestion\", \"deleteQuestion\", \"change\", \"singlePreview\", \"numberChange\"]); // 复制题目，删除题目, 数据改变, 单题预览;\nconst titileInput = ref(null);\n// 提示信息是否展示\nlet tipsShow = ref(false);\nwatch(\n    () => props.dataList,\n    (curr, old) => {\n        // 绑定数据改变时调change方法\n        emits(\"change\", curr);\n    },\n    { deep: true }\n);\n\n// 可能会在外面改变内部输入框的聚焦情况\ndefineExpose({ titileInput });\nprovide(\"data\", props.dataList);\n</script>\n<style lang=\"scss\" scoped>\n@use \"@/css/common.scss\" as *;\n.content {\n    .score-box {\n        display: flex;\n        .score-icon {\n            width: 60px;\n            min-height: 27px;\n            margin-right: 25px;\n            display: flex;\n            flex-direction: column;\n            white-space: nowrap;\n            align-items: center;\n            font-size: 14px;\n            color: rgba(112, 120, 134, 1);\n\n            .score-icon_number {\n                width: 27px;\n                height: 27px;\n                border: 1px solid rgba(112, 120, 134, 1);\n                color: rgba(102, 102, 102, 1);\n                line-height: 25px;\n                text-align: center;\n            }\n            .score-icon_circular {\n                border-radius: 50%;\n            }\n            .score-icon_square {\n                border-radius: 4px;\n            }\n\n            .score-explain {\n                height: 18px;\n                margin-top: 10px;\n                color: rgba(112, 120, 134, 1);\n                font-size: 12px;\n                white-space: pre-wrap;\n                text-align: center;\n            }\n        }\n    }\n}\n</style>\n"],"names":["titileInput","ref","tipsShow","watch","props","curr","old","emits","expose","provide"],"mappings":"67BAwEAA,EAAAC,EAAAA,IAAA,IAAA,EAEA,IAAAC,EAAAD,EAAAA,IAAA,EAAA,EACAE,OAAAA,EAAA,MACA,IAAAC,EAAA,SACA,CAAAC,EAAAC,IAAA,CAEAC,EAAA,SAAAF,CAAA,CACA,EACA,CAAA,KAAA,EAAA,CACA,EAGAG,EAAA,CAAA,YAAAR,CAAA,CAAA,EACAS,EAAAA,QAAA,OAAAL,EAAA,QAAA"}