1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- <template>
- <div class="templateEditBtnBox" @click="openEditWindow" v-if="this.$store.state.template.previewStatus==false">
- <i class="el-icon-setting"></i>
- </div>
- </template>
- <script>
- export default {
- props: {
- id: {
- type:Number,
- default:0
- },
- dataSort: {
- type:Number,
- default:0
- },
- sort:{
- type:Number,
- default:0
- },
- type:{//组件类型 1=新闻 2=广告
- type:Number,
- default:0
- },
- size:{
- type:Number,
- default:0
- },
- sizeImg:{
- type:Number,
- default:0
- },
- y: {
- type:Number,
- default:0
- }
- },
- data() {
- return {
-
- };
- },
- methods: {
- openEditWindow(){
- let data = {
- id:this.id,
- dataSort:this.dataSort,
- sort:this.sort,
- type:this.type,
- size:this.size,
- sizeImg:this.sizeImg,
- y:this.y
- }
- console.log(data);
- //小助手
- this.$store.commit('template/setEditWindowStatus',data);
- //设置组件回显数据
- this.$store.commit('template/setComponentViewData',data);
- // //获取全部导航
- // this.$store.dispatch('template/getWebsiteCategory',{pageSize:1000});
- }
- },
- mounted() {
-
- },
- };
- </script>
- <style scoped lang="less">
- .templateEditBtnBox {
- position: absolute;
- top: 0;
- right: 0;
- display: flex;
- align-items: center;
- justify-content: center;
- cursor: pointer;
- margin: 5px;
- color: #666;
- border: 2px dashed #999;
- border-radius: 8px;
- background-color: #fff1cc;
- width: 38px;
- height: 38px;
- line-height: 38px;
- text-align: center;
- font-size: 30px;
- transition: all 0.3s;
- z-index: 999;
- &:hover {
- color: #333;
- }
- }
- </style>
|