zoukankan      html  css  js  c++  java
  • FlyLine 组件

    一个2维的飞线组件

    https://github.com/davidpan123/specialUi

     

    效果图:


    image

     

    飞线使用:

    import Vue from 'vue'
    import {FlyLine} from 'special-ui'
    Vue.use(FlyLine)

     

    组件引用:

    <template>
      <div class="container">
        <fly-line :lines="flyPoints"></fly-line>
      </div>
    </template>
    
    <script>
    export default {
      name: 'App',
      data () {
        return {
          flyPoints: [
            {
              start: [329.3029054888133, 166.22157534665564],
              end: [600, 80],
              arcRadis: 0
            },
            {
              start: [829.3029054888133, 166.22157534665564],
              end: [1100, 80],
              arcRadis: -0.5
            }
          ]
        }
      }
    }
    </script>
    
    <style>
    .container {
      height: 100%;
    }
    </style>
    

    组件参数

    config: 对象

    属性 说明 默认值
    lineColor 飞线颜色 #FFCE00
    isDash 是否是虚线 true
    dash 虚线配置 '3, 3'
    isFly 是否显示飞线动效 true
    flyLineColor 飞线动效颜色 #FFCE00
    isShowArrow 是否显示箭头 true

     

    lines: 数组

    属性 说明 默认值
    start 起点坐标
    end 终点坐标
    arcRadis 曲线系数 0.5

     

     
  • 相关阅读:
    (数论选拔)联盟阵容
    ai变成bi(递增)最小次数
    状压dp
    dp被3整除的子序列
    离散化+莫队
    dp+哈希
    set的应用
    NOIP 2016 明明的随机数
    洛谷背景更改
    zzulioj 1734 堆
  • 原文地址:https://www.cnblogs.com/chinasoft/p/14244008.html
Copyright © 2011-2022 走看看