{"version":3,"file":"KrRemark.cjs","sources":["../../../../../packages/src/kr-remark/KrRemark.vue"],"sourcesContent":["<template>\n    <!-- 单选题 -->\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> -->\n        <div class=\"question-item-content\">\n            <div class=\"title\">\n                <rich-text-editor ref=\"titileInput\" class=\"titile-input\" v-model:valueData=\"dataList.title\" />\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                ></action-bar>\n            </div>\n        </div>\n    </div>\n</template>\n<script setup name=\"kr-remark\">\n// js\nimport { ref, watch, provide } from \"vue\";\n// components\nimport RichTextEditor from \"@/components/editor/RichTextEditor.vue\";\nimport ActionBar from \"@/components/action/ActionBar.vue\";\nimport QuestionTitle from \"@/components/question/QuestionNumber.vue\";\n\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});\n// 复制题目，删除题目, 数据改变, 单题预览;\nconst emits = defineEmits([\"copyQuestion\", \"deleteQuestion\", \"change\", \"singlePreview\", \"numberChange\"]);\nconst titileInput = ref(null);\n\nwatch(\n    () => props.dataList,\n    (curr, old) => {\n        emits(\"change\", curr);\n    },\n    { deep: true }\n);\n\nprovide(\"data\", props.dataList);\ndefineExpose({ titileInput });\n</script>\n<style lang=\"scss\" scoped>\n@use \"@/css/common.scss\" as *;\n</style>\n"],"names":["titileInput","ref","watch","props","curr","old","emits","provide","expose"],"mappings":"4zBAiDAA,EAAAC,EAAAA,IAAA,IAAA,EAEAC,OAAAA,EAAA,MACA,IAAAC,EAAA,SACA,CAAAC,EAAAC,IAAA,CACAC,EAAA,SAAAF,CAAA,CACA,EACA,CAAA,KAAA,EAAA,CACA,EAEAG,EAAAA,QAAA,OAAAJ,EAAA,QAAA,EACAK,EAAA,CAAA,YAAAR,CAAA,CAAA"}