配置引导页完成一部分
This commit is contained in:
		
							
								
								
									
										35
									
								
								core/components/AiDrag.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										35
									
								
								core/components/AiDrag.vue
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,35 @@ | ||||
| <template> | ||||
|   <section class="AiDrag"> | ||||
|     <vue-draggable-resizable v-bind="$attrs"> | ||||
|       <slot/> | ||||
|     </vue-draggable-resizable> | ||||
|   </section> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import 'vue-draggable-resizable/dist/VueDraggableResizable.css' | ||||
| import VueDraggableResizable from 'vue-draggable-resizable' | ||||
|  | ||||
| export default { | ||||
|   name: "AiDrag", | ||||
|   components: {VueDraggableResizable}, | ||||
|   props: { | ||||
|     type: {default: "show"} //show:只拖拽 | ||||
|   } | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
| .AiDrag { | ||||
|   position: absolute; | ||||
|   top: 0; | ||||
|   bottom: 0; | ||||
|   left: 0; | ||||
|   right: 0; | ||||
|   pointer-events: none; | ||||
|  | ||||
|   ::v-deep.vdr { | ||||
|     pointer-events: auto; | ||||
|   } | ||||
| } | ||||
| </style> | ||||
							
								
								
									
										31
									
								
								core/components/AiEditBtn.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								core/components/AiEditBtn.vue
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,31 @@ | ||||
| <template> | ||||
|   <section class="AiEditBtn"> | ||||
|     <el-button v-if="!edit" type="text" @click="handleOper('edit')">编辑</el-button> | ||||
|     <template v-else> | ||||
|       <el-button type="text" @click="handleOper('submit')">保存</el-button> | ||||
|       <el-button type="text" @click="handleOper('cancel')">取消</el-button> | ||||
|     </template> | ||||
|   </section> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| export default { | ||||
|   name: "AiEditBtn", | ||||
|   data() { | ||||
|     return { | ||||
|       edit: false | ||||
|     } | ||||
|   }, | ||||
|   methods: { | ||||
|     handleOper(event) { | ||||
|       this.edit = !this.edit | ||||
|       this.$emit(event) | ||||
|     } | ||||
|   } | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
| .AiEditBtn { | ||||
| } | ||||
| </style> | ||||
		Reference in New Issue
	
	Block a user