|
@@ -17,63 +17,15 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="序号位置">
|
|
|
<div class="grid-container">
|
|
|
- <div class="top">
|
|
|
- <el-button
|
|
|
- :class="['top-start', { active: 'top-start' === property.sn_position }]"
|
|
|
- @click="changeNumberPosition('top-start')"
|
|
|
- />
|
|
|
- <el-button
|
|
|
- :class="['top', { active: 'top' === property.sn_position }]"
|
|
|
- @click="changeNumberPosition('top')"
|
|
|
- />
|
|
|
- <el-button
|
|
|
- :class="['top-end', { active: 'top-end' === property.sn_position }]"
|
|
|
- @click="changeNumberPosition('top-end')"
|
|
|
- />
|
|
|
- </div>
|
|
|
- <div class="left">
|
|
|
- <el-button
|
|
|
- :class="['left-start', { active: 'left-start' === property.sn_position }]"
|
|
|
- @click="changeNumberPosition('left-start')"
|
|
|
- />
|
|
|
- <el-button
|
|
|
- :class="['left', { active: 'left' === property.sn_position }]"
|
|
|
- @click="changeNumberPosition('left')"
|
|
|
- />
|
|
|
- <el-button
|
|
|
- :class="['left-end', { active: 'left-end' === property.sn_position }]"
|
|
|
- @click="changeNumberPosition('left-end')"
|
|
|
- />
|
|
|
- </div>
|
|
|
+ <el-button
|
|
|
+ v-for="{ value } in serialNumberPositionList"
|
|
|
+ :key="value"
|
|
|
+ :class="[value, { active: value === property.sn_position }]"
|
|
|
+ :style="{ gridArea: value }"
|
|
|
+ @click="changeNumberPosition(value)"
|
|
|
+ />
|
|
|
+
|
|
|
<div class="main"></div>
|
|
|
- <div class="right">
|
|
|
- <el-button
|
|
|
- :class="['right-start', { active: 'right-start' === property.sn_position }]"
|
|
|
- @click="changeNumberPosition('right-start')"
|
|
|
- />
|
|
|
- <el-button
|
|
|
- :class="['right', { active: 'right' === property.sn_position }]"
|
|
|
- @click="changeNumberPosition('right')"
|
|
|
- />
|
|
|
- <el-button
|
|
|
- :class="['right-end', { active: 'right-end' === property.sn_position }]"
|
|
|
- @click="changeNumberPosition('right-end')"
|
|
|
- />
|
|
|
- </div>
|
|
|
- <div class="bottom">
|
|
|
- <el-button
|
|
|
- :class="['bottom-start', { active: 'bottom-start' === property.sn_position }]"
|
|
|
- @click="changeNumberPosition('bottom-start')"
|
|
|
- />
|
|
|
- <el-button
|
|
|
- :class="['bottom', { active: 'bottom' === property.sn_position }]"
|
|
|
- @click="changeNumberPosition('bottom')"
|
|
|
- />
|
|
|
- <el-button
|
|
|
- :class="['bottom-end', { active: 'bottom-end' === property.sn_position }]"
|
|
|
- @click="changeNumberPosition('bottom-end')"
|
|
|
- />
|
|
|
- </div>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
<el-divider />
|
|
@@ -98,6 +50,7 @@ import {
|
|
|
audioViewMethodList,
|
|
|
switchSerialNumber,
|
|
|
checkString,
|
|
|
+ serialNumberPositionList,
|
|
|
} from '@/views/book/courseware/data/common';
|
|
|
|
|
|
export default {
|
|
@@ -107,6 +60,7 @@ export default {
|
|
|
return {
|
|
|
switchSerialNumber,
|
|
|
checkString,
|
|
|
+ serialNumberPositionList,
|
|
|
snGenerationMethodList,
|
|
|
audioViewMethodList,
|
|
|
labelPosition: 'left',
|
|
@@ -133,7 +87,7 @@ export default {
|
|
|
methods: {
|
|
|
/**
|
|
|
* @description 设置属性
|
|
|
- * @param {Object} property 属性
|
|
|
+ * @param {object} property 属性
|
|
|
*/
|
|
|
setSetting(property) {
|
|
|
this.isSet = true;
|
|
@@ -169,63 +123,35 @@ export default {
|
|
|
margin-right: 16px;
|
|
|
}
|
|
|
|
|
|
- .top {
|
|
|
- grid-area: top;
|
|
|
- column-gap: 8px;
|
|
|
- justify-content: center;
|
|
|
- }
|
|
|
-
|
|
|
- .left {
|
|
|
- flex-direction: column;
|
|
|
- grid-area: left;
|
|
|
- row-gap: 4px;
|
|
|
- }
|
|
|
-
|
|
|
.main {
|
|
|
grid-area: main;
|
|
|
}
|
|
|
|
|
|
- .right {
|
|
|
- flex-direction: column;
|
|
|
- grid-area: right;
|
|
|
- row-gap: 4px;
|
|
|
- }
|
|
|
-
|
|
|
- .bottom {
|
|
|
- grid-area: bottom;
|
|
|
- column-gap: 8px;
|
|
|
- justify-content: center;
|
|
|
- }
|
|
|
-
|
|
|
.grid-container {
|
|
|
display: grid;
|
|
|
grid:
|
|
|
- 'top top top top top top'
|
|
|
- 'left main main main main right'
|
|
|
- 'bottom bottom bottom bottom bottom bottom';
|
|
|
+ '. top-start top top-end .'
|
|
|
+ 'left-start main main main right-start'
|
|
|
+ 'left main main main right'
|
|
|
+ 'left-end main main main right-end'
|
|
|
+ '. bottom-start bottom bottom-end .';
|
|
|
+ place-items: center center;
|
|
|
width: 134px;
|
|
|
height: 80px;
|
|
|
- padding: 8px 8px 0;
|
|
|
+ padding: 8px;
|
|
|
line-height: 10px;
|
|
|
border: 1px solid #ebebeb;
|
|
|
|
|
|
- div {
|
|
|
- display: flex;
|
|
|
- margin: 0 auto;
|
|
|
- text-align: center;
|
|
|
- background-color: rgba(255, 255, 255, 8%);
|
|
|
-
|
|
|
- .el-button {
|
|
|
- width: 16px;
|
|
|
- height: 8px;
|
|
|
- padding: 0;
|
|
|
- margin: 0;
|
|
|
- border: 1px solid #e4e4e4;
|
|
|
- border-radius: 2px;
|
|
|
+ .el-button {
|
|
|
+ width: 16px;
|
|
|
+ height: 8px;
|
|
|
+ padding: 0;
|
|
|
+ margin: 0;
|
|
|
+ border: 1px solid #e4e4e4;
|
|
|
+ border-radius: 2px;
|
|
|
|
|
|
- &.active {
|
|
|
- background-color: $setting-active-color;
|
|
|
- }
|
|
|
+ &.active {
|
|
|
+ background-color: $setting-active-color;
|
|
|
}
|
|
|
}
|
|
|
|