Skip to content

Commit

Permalink
feat:页面参数 新增 辅助线 功能
Browse files Browse the repository at this point in the history
  • Loading branch information
陈程 committed Nov 21, 2023
1 parent 3a0360f commit 3e1df1c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/components/panel/page.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@
<span class="unit-text">(mm)</span>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="辅助线">
<el-switch v-model="pageInfo.auxiliaryLine"
:active-value="true" :inactive-value="false"></el-switch>
</el-form-item>
</el-row>
</el-form>
</div>
</template>
Expand Down
7 changes: 6 additions & 1 deletion src/components/viewport/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
width: page.width + 'px',
backgroundImage: 'url('+backImg+')'
}"
class="screen"
:class="['screen', page.auxiliaryLine ? 'auxiliary-line': '']"
>
<!-- 组件 -->
<component
Expand Down Expand Up @@ -170,4 +170,9 @@ export default {
background-color: #ffffff;
background-repeat: no-repeat;
}
.auxiliary-line {
background-size: 5mm 5mm;
background-repeat: repeat;
background-image: linear-gradient(90deg, rgba(0, 0, 0, 0.1) 3%, rgba(0, 0, 0, 0) 3%), linear-gradient(360deg, rgba(0, 0, 0, 0.1) 3%, rgba(0, 0, 0, 0) 3%) !important;
}
</style>
1 change: 1 addition & 0 deletions src/store/state.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export default {
height: 550,
pageWidth: 750,
pageHeight: 550,
auxiliaryLine: true, // 辅助线
tempItems: [], // 模板已选项
},
optionItems: [], // 可选项
Expand Down

0 comments on commit 3e1df1c

Please sign in to comment.