|
@@ -106,6 +106,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
<div class="option-list">
|
|
<div class="option-list">
|
|
|
<div v-for="(item, i) in data.option_list" :key="i" class="table-node">
|
|
<div v-for="(item, i) in data.option_list" :key="i" class="table-node">
|
|
|
|
|
+ <el-color-picker v-model="data.rows_bg_list[i]" />
|
|
|
<div v-for="li in item" :key="li.mark" class="table-item">
|
|
<div v-for="li in item" :key="li.mark" class="table-item">
|
|
|
<!-- eslint-disable max-len -->
|
|
<!-- eslint-disable max-len -->
|
|
|
<RichText
|
|
<RichText
|
|
@@ -123,7 +124,9 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="table-node">
|
|
<div class="table-node">
|
|
|
- <div v-for="(value, index) in data.col_width" :key="index" class="table-item">
|
|
|
|
|
|
|
+ <div style="width: 32px"></div>
|
|
|
|
|
+ <div v-for="(value, index) in data.col_width" :key="index" class="table-item table-items">
|
|
|
|
|
+ <el-color-picker v-model="data.cols_bg_list[index]" />
|
|
|
<el-input v-model="value.value">
|
|
<el-input v-model="value.value">
|
|
|
<template slot="prepend">列宽:</template><template slot="append">%</template></el-input
|
|
<template slot="prepend">列宽:</template><template slot="append">%</template></el-input
|
|
|
>
|
|
>
|
|
@@ -232,11 +235,13 @@ export default {
|
|
|
if (val < this.data.option_list.length) {
|
|
if (val < this.data.option_list.length) {
|
|
|
this.data.option_list = this.data.option_list.slice(0, val);
|
|
this.data.option_list = this.data.option_list.slice(0, val);
|
|
|
this.data.answer_lists = this.data.answer_lists.slice(0, val);
|
|
this.data.answer_lists = this.data.answer_lists.slice(0, val);
|
|
|
|
|
+ this.data.rows_bg_list = this.data.rows_bg_list.slice(0, val);
|
|
|
} else {
|
|
} else {
|
|
|
const diff = val - this.data.option_list.length;
|
|
const diff = val - this.data.option_list.length;
|
|
|
for (let i = 0; i < diff; i++) {
|
|
for (let i = 0; i < diff; i++) {
|
|
|
this.data.option_list.push(Array.from({ length: this.data.property.column_count }, getOption));
|
|
this.data.option_list.push(Array.from({ length: this.data.property.column_count }, getOption));
|
|
|
this.data.answer_lists.push(Array.from({ length: this.data.property.column_count }, getAnswerOption));
|
|
this.data.answer_lists.push(Array.from({ length: this.data.property.column_count }, getAnswerOption));
|
|
|
|
|
+ this.data.rows_bg_list.push('');
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
@@ -248,7 +253,9 @@ export default {
|
|
|
this.data.col_width.push({
|
|
this.data.col_width.push({
|
|
|
value: '',
|
|
value: '',
|
|
|
});
|
|
});
|
|
|
|
|
+ this.data.cols_bg_list.push('');
|
|
|
}
|
|
}
|
|
|
|
|
+ this.data.cols_bg_list = this.data.cols_bg_list.slice(0, val);
|
|
|
this.data.option_list = this.data.option_list.map((row) => {
|
|
this.data.option_list = this.data.option_list.map((row) => {
|
|
|
if (val < row.length) {
|
|
if (val < row.length) {
|
|
|
this.data.col_width = this.data.col_width.slice(0, val);
|
|
this.data.col_width = this.data.col_width.slice(0, val);
|
|
@@ -516,6 +523,16 @@ export default {
|
|
|
:deep p {
|
|
:deep p {
|
|
|
margin: 0;
|
|
margin: 0;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ :deep .el-input-group__append,
|
|
|
|
|
+ :deep .el-input-group__prepend {
|
|
|
|
|
+ padding: 0 5px;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ &.table-items {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|