feat/design: 优化矩阵题样式和功能
- 新增矩阵题类型的支持和样式 - 修复矩阵题选项保存逻辑 -优化矩阵题输入框样式 - 新增项目名称保存功能 - 调整问卷创建页面逻辑
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
|
||||
<th v-for="(col, colIndex) in cols" :key="colIndex">
|
||||
<input
|
||||
class="van-icon matrix-checkbox"
|
||||
type="checkbox"
|
||||
:name="`R${rowIndex + 1}`"
|
||||
:value="`${rowIndex + 1}_${colIndex + 1}`"
|
||||
@@ -114,4 +115,38 @@ function handleMatrixRadioChange(row: number, col: number) {
|
||||
// };
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
<style scoped lang="scss">
|
||||
@import '@/assets/css/theme';
|
||||
|
||||
.matrix-table {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.matrix-checkbox {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
border: 1px solid #f4f4f4;
|
||||
border-radius: 4px;
|
||||
outline: none;
|
||||
cursor: pointer;
|
||||
appearance: none; /* 去除默认样式 */
|
||||
//transition: border-color 0.3s;
|
||||
}
|
||||
|
||||
.matrix-checkbox:checked {
|
||||
border-color: transparent; /* 选中时边框颜色 */
|
||||
}
|
||||
|
||||
.matrix-checkbox:checked::before {
|
||||
content: '\e728';
|
||||
position: absolute;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
background-color: $theme-color; /* 选中颜色 */
|
||||
color: #fff;
|
||||
line-height: 15px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user