zoukankan      html  css  js  c++  java
  • Vue EasyUI 调整大小v-Resizable的坑

    具体安装,参考

    https://www.w3cschool.cn/vueeasyui/vueeasyui-p8h937nn.html

    坑:

    这样无效  v-Resizable 直接套在  LayoutPanel 标签里面

    <template>
      <div>
        <Layout style=" 700px; height: 250px">
          <LayoutPanel region="north" style="height: 50px">
            <div class="title">North Region</div>
          </LayoutPanel>
          <LayoutPanel region="south" style="height: 50px">
            <div class="title">South Region</div>
          </LayoutPanel>
          <LayoutPanel region="west" style=" 120px">
            <div class="title">West Region</div>
          </LayoutPanel>
          <LayoutPanel region="east" style=" 120px">
            <div class="title">East Region</div>
          </LayoutPanel>
          <LayoutPanel region="center" id="center" 
              v-Resizable="{
                resizeStart: () => resize(),
                resizing:() => resize(),
                resizeStop: () => resize()
              }">
              <div class="title">Center Region</div>
              <div class="title">Center Region</div>
          </LayoutPanel>
        </Layout>
      </div>
    </template>
    <script>
    export default {
      methods: {
        resize () {
          console.log(111)
        }
      }
    };
    </script>

    这样有效 LayoutPanel  里面在套一层 div, v-Resizable才会生效

    <template>
      <div>
        <Layout style=" 700px; height: 250px">
          <LayoutPanel region="north" style="height: 50px">
            <div class="title">North Region</div>
          </LayoutPanel>
          <LayoutPanel region="south" style="height: 50px">
            <div class="title">South Region</div>
          </LayoutPanel>
          <LayoutPanel region="west" style=" 120px">
            <div class="title">West Region</div>
          </LayoutPanel>
          <LayoutPanel region="east" style=" 120px">
            <div class="title">East Region</div>
          </LayoutPanel>
          <LayoutPanel region="center" id="center" >
            <div 
              v-Resizable="{
                resizeStart: () => resize(),
                resizing:() => resize(),
                resizeStop: () => resize()
              }">
              <div class="title">Center Region</div>
              <div class="title">Center Region</div>
            </div>
          </LayoutPanel>
        </Layout>
      </div>
    </template>
    <script>
    export default {
      methods: {
        resize () {
          console.log(111)
        }
      }
    };
    </script>
  • 相关阅读:
    WP7中HttpWebRequest的使用方法之GET方式
    C#使用技巧之调用JS脚本方法一
    SQL Server Date 函数之CONVERT()
    C#日期格式化和数字格式化
    C#使用技巧之调用JS脚本方法二
    Win8的RSS阅读器
    yield
    浮点类型(float、double)在内存中的存储
    从<<CSS禅意花园>>中学到的用户界面设计原则
    The First Essay
  • 原文地址:https://www.cnblogs.com/-roc/p/14646843.html
Copyright © 2011-2022 走看看