feat[preview]: 抽离矩阵的验证内容
- 抽离 preview 矩阵的验证内容,多选矩阵的校验放到 PreviewMatrixCheckbox 内 - 添加新的错误提示支持 - 增加 矩阵 类型 - 添加矩阵测试文件
This commit is contained in:
@@ -9,13 +9,16 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import type { IQuestion } from '@/types/question';
|
||||
import type { IMatrixCheckboxConfig } from '@/types/questions/matrixCheckbox';
|
||||
|
||||
// 接受获取到的 col row 的索引参数
|
||||
const rowIndex = defineModel<number>('rowIndex', { required: true, default: 0 });
|
||||
const colIndex = defineModel<number>('colIndex', { required: true, default: 0 });
|
||||
|
||||
const rowRecord = defineModel<number[][]>('rowRecord', { required: false, default: () => [] });
|
||||
|
||||
const element = defineModel<question>('element', {
|
||||
const element = defineModel<IQuestion<IMatrixCheckboxConfig>>('element', {
|
||||
required: false,
|
||||
default: () => {
|
||||
/**/
|
||||
@@ -61,6 +64,7 @@ const emitValue = (/* val: unknown */) => {
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
@import '@/assets/css/main';
|
||||
|
||||
input[type='checkbox'] {
|
||||
appearance: none;
|
||||
-webkit-appearance: none;
|
||||
@@ -73,9 +77,11 @@ input[type='checkbox'] {
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
transition: border-color 0.4s ease;
|
||||
|
||||
&:checked {
|
||||
border-color: $theme-color;
|
||||
background: $theme-color;
|
||||
|
||||
&::after {
|
||||
content: '\2713';
|
||||
font-family: 'Arial', sans-serif; // 确保符号正常显示
|
||||
|
||||
Reference in New Issue
Block a user