0706笔记

学习$confirm的用法,$notify提示

this.$confirm('是否确认退出?', '提示')
.then(() => {
    this.$axios.get(`${this.$api}/b/logout`)
    .then(res => {
        if (res.data.code == 0) {
            this.$notify({
                title: '提示',
                message: '退出登录成功',
                type: 'success'
            })
            this.$router.push('/login')
        } else {
            this.$notify({
                title: '提示',
                message: res.data.message,
                type: 'warning'
            })
        }
    })
})
this.$axios.delete(`${this.$api}/b/food/${row.id}`)
.then(res => {
    this.$message({
        type: 'success',
        message: res.data.message
    })
    this.getList(this.page, this.dishSearch, this.dishType)
})

当列是01237时候,合并表格。

objectSpanMethod({ row, column, rowIndex, columnIndex }) {
    if (/[27103]/.test(columnIndex)) {
        if (this.tableData[rowIndex].rowSpan) {
            if (this.tableData[rowIndex].rowSpan > 0) {
                return {
                    rowspan: this.tableData[rowIndex].rowSpan,
                    colspan: 1
                }
            } else {
                return {
                    rowspan: 0,
                    colspan: 1
                }
            }
        }
    }
},

造成结果是如下

f5381d3b359f04033fc94de1efebd2fe4bf.jpg

做好改bug的准备,完成b端代码的逻辑文档


前端开发工作流程

MVC  业务模型  视图层  控制层

首先完成M层,完成模型设计,与后端对接接口
接着简单完成视图层
先开发控制层,最后来调整视图层

思考一下要用什么,先去查看相应的文档,并且搭建demo

路由接收参数 this.$route.query.id

@selection-change表格选中

@current-change页数

 objectSpanMethod({ row, column, rowIndex, columnIndex }) {
            if (/[27103]/.test(columnIndex)) {
                if (this.tableData[rowIndex].rowSpan) {
                    if (this.tableData[rowIndex].rowSpan > 0) {
                        return {
                            rowspan: this.tableData[rowIndex].rowSpan,
                            colspan: 1
                        }
                    } else {
                        return {
                            rowspan: 0,
                            colspan: 1
                        }
                    }
                }                
            }
        },

 handleSelectionChange(val) {
            this.multipleSelection = val;
        },

  methods: {
      arraySpanMethod({ row, column, rowIndex, columnIndex }) {
        if (rowIndex % 2 === 0) {
          if (columnIndex === 0) {
            return [1, 2];
          } else if (columnIndex === 1) {
            return [0, 0];
          }
        }
      },

      objectSpanMethod({ row, column, rowIndex, columnIndex }) {
        if (columnIndex === 0) {
          if (rowIndex % 2 === 0) {
            return {
              rowspan: 2,
              colspan: 1
            };
          } else {
            return {
              rowspan: 0,
              colspan: 0
            };
          }
        }
      }

转载于:https://my.oschina.net/dmq/blog/1841577

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值