操作过多,elementui利用下拉el-dropdown展示操作以及下拉el-dropdown

133 阅读1分钟

blog.csdn.net/qq_42899245…

image.png

              // 视频窗口分割
                  CommandMenu:{
                    width: '100%',
                    height: '100%',
                    num: 1, // 视频个数
                  }

            methods: {
                // videoSize() {
                //   console.log(20);
                //   this.videoOpen = true;
                // },
                //** 窗口分割菜单时间触发 */
                handleCommand(command) {
                    // x = 列数   y行数
                    const xy = command == '1'?{x:1,y:1}:command == '4'?{x:2,y:2}:command == '6'?{x:3,y:2}:command == '8'?{x:2,y:4}:command == '16'?{x:4,y:4}:command == '36'?{x:6,y:6}:command == '64'?{x:8,y:8}:{x:1,y:1};
                    const width = 100 / xy.x;
                    const height = 100 / xy.y;

                    this.$set(this,'CommandMenu',{
                      width: width+'%',
                      height: height+'%',
                      num: Math.round(command),
                    })

                  },