123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151 |
- <template>
- <div class="question">
- <div class="question-container">
- <div class="question-content">
- <slot name="content"></slot>
- </div>
- <div class="property">
- <slot name="property"></slot>
- </div>
- </div>
- <slot name="question-footer">
- <slot name="footer"></slot>
- </slot>
- </div>
- </template>
- <script>
- export default {
- name: 'QuestionBase',
- };
- </script>
- <style lang="scss" scoped>
- .question {
- width: 100%;
- &-container {
- display: flex;
- width: 100%;
- padding: 24px;
- background-color: #fff;
- border: $border;
- border-radius: 0 0 8px 8px;
- .question-content {
- flex: 1;
- .stem {
- padding-bottom: 8px;
- margin-bottom: 8px;
- border-bottom: 1px solid $border-color;
- .el-textarea {
- margin-top: 8px;
- }
- }
- .content {
- > ul {
- display: flex;
- flex-direction: column;
- row-gap: 8px;
- width: 100%;
- .content-item {
- display: flex;
- column-gap: 4px;
- align-items: center;
- .question-number {
- min-width: 40px;
- height: 32px;
- padding: 4px 0;
- color: $text-color;
- text-align: center;
- cursor: default;
- background-color: $fill-color;
- border-radius: 2px;
- }
- .option-content {
- display: flex;
- flex: 1;
- align-items: center;
- padding-left: 16px;
- background-color: $fill-color;
- .rich-wrapper {
- flex: 1;
- min-height: 32px;
- :deep .rich-text {
- &.mce-content-body {
- padding-top: 4px;
- }
- &:not(.mce-edit-focus) {
- p {
- margin: 0;
- }
- }
- &.mce-content-body[data-mce-placeholder]:not(.mce-visualblocks)::before {
- top: 6px;
- }
- }
- }
- }
- .delete {
- margin-left: 12px;
- }
- }
- }
- }
- .footer {
- display: flex;
- justify-content: center;
- margin-top: 14px;
- color: $main-color;
- .add-option {
- display: flex;
- column-gap: 8px;
- align-items: center;
- font-size: 14px;
- cursor: pointer;
- }
- }
- .analysis {
- &-title {
- margin: 8px 0;
- font-size: 14px;
- color: $font-light-color;
- }
- }
- }
- .property {
- display: flex;
- &::before {
- display: inline-block;
- width: 2px;
- height: 100%;
- margin: 0 24px;
- content: '';
- background-color: $border-color;
- }
- .el-form {
- .el-input {
- width: 250px;
- }
- }
- }
- }
- }
- </style>
|