feat/design: 优化矩阵题样式和功能
- 新增矩阵题类型的支持和样式 - 修复矩阵题选项保存逻辑 -优化矩阵题输入框样式 - 新增项目名称保存功能 - 调整问卷创建页面逻辑
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
<td v-for="(col, colIndex) in cols" :key="colIndex">
|
||||
<input
|
||||
type="radio"
|
||||
class="van-icon matrix-radio"
|
||||
:name="`R${rowIndex + 1}`"
|
||||
:value="`${rowIndex + 1}_${colIndex + 1}`"
|
||||
:checked="isOptionChecked(rowIndex, colIndex)"
|
||||
@@ -97,4 +98,38 @@ const emitValue = () => {
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
<style scoped lang="scss">
|
||||
@import '@/assets/css/theme';
|
||||
|
||||
.matrix-table {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.matrix-radio {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
border: 1px solid #f4f4f4;
|
||||
border-radius: 50%;
|
||||
outline: none;
|
||||
cursor: pointer;
|
||||
appearance: none; /* 去除默认样式 */
|
||||
//transition: border-color 0.3s;
|
||||
}
|
||||
|
||||
.matrix-radio:checked {
|
||||
border-color: transparent; /* 选中时边框颜色 */
|
||||
}
|
||||
|
||||
.matrix-radio: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