Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    鲁文祥
    @venux
    打酱油路过~
    C凉凉D
    @cdll
    console.info('HI')
    <center>Hi</center>
    <script>
    alert('Bello')
    </script>
    C凉凉D
    @cdll
    ````
    <body>
    <script type="text/javascript">
      var gg=[{"id":"1","title":"公告文章标题1"},{"id":"2","title":"公告文章标题2"},{"id":"3","title":"公告文章标题3"},{"id":"4","title":"公告文章标题4"}];
      var bd=[{"id":"1","title":"媒体报道文章标题1"},{"id":"2","title":"媒体报道文章标题2"},{"id":"3","title":"媒体报道文章标题3"},{"id":"4","title":"媒体报道文章标题4"}];
    </script>
    <div ms-controller="list">
      <span ms-mouseover="changeUl(1)">公告</span>
      <span ms-mouseover="changeUl(0)">媒体报道</span>
      <a ms-href="'#!/'+ more_name">{{more_text}}</a>
      <ul>
        <li ms-repeat="infoList">
          <a ms-href="'#!/'+ more_name + '/' + el.id" ms-title="el.title">{{el.title}}</a>
        <>
      </ul>
    </div>
    <script type="text/javascript">
      var vm = avalon.define({
        $id: "list",
        more_name: "gg",
        more_text: "更多公告",
        gg:gg,
        bd:bd,
        infoList:gg,
        changeUl:function(flag){
          if(flag){  //鼠标移过“公告”选项卡头部
            vm.more_name = "gg";
            vm.more_text = "更多公告";
            vm.infoList = vm.gg;
          }else{  //鼠标移过“媒体报道”选项卡头部
            vm.more_name = "bd";
            vm.more_text = "更多报道";
            vm.infoList = vm.bd;
          }
        }
      });
      avalon.scan();
    </script>
    </body>
    C凉凉D
    @cdll
    
    changeUl:function(flag){
      if(flag){  //鼠标移过“公告”选项卡头部
        vm.more_name = "gg";
        vm.more_text = "更多公告";
    //    vm.infoList = vm.gg;
        vm.gg.forEach(function(e, i){
          vm.infoList.push(e)
        })
      }else{  //鼠标移过“媒体报道”选项卡头部
        vm.more_name = "bd";
        vm.more_text = "更多报道";
    //    vm.infoList = vm.bd;
        vm.bd.forEach(function(e, i){
          vm.infoList.push(e)
        })
      }
    }
    C凉凉D
    @cdll
    <body class='' ms-controller='main'>
      <div class='header' ms-click='initpos()'></header>
    </body>
    <script>
    require(['avalon'], function(avalon){
      var vm= avalon.define({
        $id: 'main'
        ,initpos: function(){
          console.info(1)
        }
      })
      avalon.scan()
    })
    </script>
    C凉凉D
    @cdll
    This message was deleted
    shim: {
        jQuery: {
          exports: 'jQuery'
        }
        ,bs: {
          exports: 'bs'
          ,deps: ['jQuery']
        }
    }
    C凉凉D
    @cdll
    map= {
      api1: 'xxx'
      ,api2: 'yyy'
      ,api3: 'zzz'
    }
    list= [
      {get: 'api1'}
      ,{get: 'api3'}
    ]
    list.forEach((el, index)=>{
      ajax.get(map[el.get])
      .then((res)=>{
        //todo
      })
    })
    map= {
      api1: 'xxx'
      ,api2: 'yyy'
      ,api3: 'zzz'
    }
    list= [
      {get: 'api1'}
      ,{get: 'api3'}
      ,{get: 'api4'}
    ]
    list.forEach((el, index)=>{
      ajax.get(map[el.get])
      .then((res)=>{
        //todo
      })
    })
    C凉凉D
    @cdll
    <body>
    <input v-model='input' />
    <script>
    vm= new Vue({
      el: 'body'
      ,data: {
        input: undefined
      }
    })
    </script>
    </body>
    C凉凉D
    @cdll
    
    <body>
      <div class="fvcku" v-show='nobb' v-on:click='fvckme()'></div>
      <script>
        vm= new Vue({
          el: 'body'
          ,data: {
            nobb: true
          }
          ,methods: {
            fvckme: (b)=>{
              vm.nobb= b!== undefined? b: !vm.nobb
            }
          }
        })
      </script>
    </body>
    
    <body ms-controller='demo'>
      <div class="fvcku" ms-show='nobb' ms-click='nobb= !nobb'></div>
      <script>
        vm= avalon.define({
          $id: 'demo'
          ,nobb: true
        })
        .scan()
      </script>
    </body>
    C凉凉D
    @cdll
    <script type='text/javascript' data-main='a.js'></script>
    C凉凉D
    @cdll
    <!DOCTYPE html>
    <html lang="en">
      <head>
        <!-- @@include('common-head.html') -->
        <title>叽里呱啦</title>
        <link rel='stylesheet' href="/bower_components/Swiper/dist/css/swiper.min.css">
        <style>
          *{
            margin: 0;padding: 0;
            transition: all .1s ease;
          }
          .box{
            top: 0;left: 0;
            width: 768px;height: 768px;
            border: 1px solid lightgray;
            text-align: left;
            overflow: hidden;
          }
          .img{
            position: relative;
            top: 0;left: 0;
          }
          input{
            margin: .5em;
          }
          .file{
            margin-top: 1em;
            display: block;
            padding: .5em;
          }
        </style>
      </head>
      <body class="page-story">
        <section class="">
          <div class=''>
            <div id="box" class="box" v-bind:style='{width: width+"px", height: width+"px"}'>
              <img id="img" draggable="true" class="img" v-bind:style='{top: top+"px", left: left+"px"}'
                   src="" />
            </div>
            <input id="input" class="file" type="file" />
          </div>
          <center class="">
            外框宽度:<input class="" v-model='width' />
            <br>
            计算基数:<input class="" v-model='base' />
            <p>Y:{{top/base}} , X:{{left/base}}</p>
          </center>
        </section>
    
        <script src="/bower_components/fastclick/lib/fastclick.js" onload='FastClick.attach(document.body);'></script>
        <script src="/bower_components/vue/dist/vue.min.js"></script>
        <script>
    ;(function(Vue){
      vm= new Vue({
        el: 'body'
        ,data: {
          base: 1
          ,width: 768
          ,top: 0
          ,left: 0
        }
        ,methods: {}
      })
      input.addEventListener('change', function(eve){
        console.info(eve.target.files)
        if(eve.target.files.length> 0)
          file= eve.target.files[0]
        var reader= new FileReader()
        reader.onload= function(blob){
          img.setAttribute('src', event.target.result)
        }
        reader.readAsDataURL(file)
      })
      img.addEventListener('selectstart', function(eve){
        eve.preventDefault()
        return false
      })
      var _X= 0
      var _Y= 0
      img.addEventListener('dragstart', function(eve){
        eve.dataTransfer.effectAllowed = "move"
    //    eve.dataTransfer.setDragImage(img, 0, 0)
        eve.dataTransfer.setDragImage(img, eve.offsetX, eve.offsetY)
        _X= eve.offsetX
        _Y= eve.offsetY
        return true
      })
      img.addEventListener('dragend', function(eve){
        eve.preventDefault()
      //  img.setAttribute('src', eve.dataTransfer)
        vm.top+= eve.offsetY- _Y
        vm.left+= eve.offsetX- _X
    //    img.style.top= parseInt(img.style.top|| '0px')+ eve.offsetY+ 'px'
    //    img.style.left= parseInt(img.style.left|| '0px')+ eve.offsetX+ 'px'
        eve.dataTransfer.clearData()
        return false
      })
    })(Vue);
        </script>
      </body>
    </html>
    C凉凉D
    @cdll
    var total= 200, arr= [], len= 22
    /*
    * fn: calculate the target array 's sumary
    * params: target array
    * return the target array 's sumary
    */
    function sumArr(_arr){
      var _tt= 0
      for(var i in _arr){
        _tt+= _arr[i]
      }
      return _tt
    }
    /*
    * fn: generate the valid random num
    * params: the willing sumary, the target array
    * return the generated random number that is less than total sumary
    */
    function genRandom(sum, _arr){
      return parseInt(Math.random()*Math.random()*Math.random()*Math.random()*(sum-sumArr(_arr)))
    }
    /*
    * fn: generate the array
    * params: the willing sumary, the empty array, the willing length of the array that will be generated
    * return the generated array that sums into the total
    */
    function genArray(_total, _arr, _len){
      for(var i=0; i<_len; i++){
        var ran= genRandom(_total, _arr)
        _arr.push(ran)
        console.info(ran)
      }
      return _total
    }
    //genArray(total, arr, len)
    C凉凉D
    @cdll
    style.
      input.input-value+ i.input-flag{
        display: inline-block;width: 1.1em;height: 1.1em;border: 1px solid darkgray;border-radius: .1em;
      }
      input.input-value+ i.input-flag:before{
        display: none;
      }
      input.input-value:checked+ i.input-flag:before{
        display: block;content: '√';
      }
    
    li()
      label()
        input.input-value(hidden type='checkbox' onclick='')
        i.input-flag
        span.content 储备用地
    C凉凉D
    @cdll
    https://ecomfe.github.io/echarts-examples/public/editor.html?c=radar-multiple&theme=light
        {
            title: {
              text: null
            }
            // ,tooltip: {
            //   trigger: 'axis'
            // }
            // ,legend: {
            //   x: 'center',
            //   data: []
            // },
            ,radar: [
              {
                //desc: Indicator of radar chart, which is used to assign multiple variables(dimensions) in radar chart.
                indicator: [
                  { text: '听', max: 100, color: '#404040' }
                  ,{ text: '写', max: 100, color: '#404040' }
                  ,{ text: '读', max: 100, color: '#404040' }
                  ,{ text: '说', max: 100, color: '#404040' }
                ]
                //desc: Center position of Radar, the first of which is the horizontal position, and the second is the vertical position. Percentage is supported. When set in percentage, the item is relative to the container width, and the second item to the height.
                ,center: ['50%', '50%']
                //desc: Radius of Radar.
                ,radius: 100
                //desc: Settings related to axis line.
                , axisLine: {
                  lineStyle: {
                    //desc: line styleLine color.
                    color: '#FCD8B3'
                    //desc: line style line width.
                    ,width: 1
                  }
                  //desc: Symbol of the two ends of the axis. It could be a string, representing the same symbol for two ends; or an array with two string elements, representing the two ends separately. It's set to be 'none' by default, meaning no arrow for either end. If it is set to be 'arrow', there shall be two arrows. If there should only one arrow at the end, it should set to be ['none', 'arrow'].
                  , symbol: 'circle'
                  //desc: Size of the arrows at two ends. The first is the width perpendicular to the axis, the next is the width parallel to the axis.
                  , symbolSize: [6, 6]
                }
                //desc: SplitLine of axis in grid area.
                , splitLine: {
                  lineStyle: {
                    //desc: The color of the splitLine, which could be set separately. SplitLine color could also be set in color array, which the split lines would take as their colors in turns.
                    color: [
                      'rgba(252, 145, 38, .2)'
                      , 'rgba(252, 145, 38, .2)'
                      , 'rgba(252, 145, 38, .2)'
                      , 'rgba(252, 145, 38, .2)'
                      , 'rgba(252, 145, 38, .2)'
                      , '#FC9126'
                    ]
                    //desc: splitLine line width.
                    , width: 1
                  }
                }
                //desc: Split area of axis in grid area, shown by default.
                , splitArea: {
                  show: false
                }
                //desc: Radar render type, in which 'polygon' and 'circle' are supported.
                , shape: 'polygon'
              }
            ]
            , series: [
              {
                type: 'radar'
                //desc: tooltip settings in this series.
                ,tooltip: {
                  trigger: false
                }
                //desc: Item style of the inflection point of the lines.
                ,itemStyle: {
                  normal: {
                    areaStyle: { color: 'rgba(252, 145, 38, .2)' }
                  }
                }
                //desc: Line style.
                , lineStyle: {
                  color: '#FC9126'
                  , width: 2
                }
                //desc: Symbol of Radar. Icon types provided by ECharts includes 'circle', 'rect', 'roundRect', 'triangle', 'diamond', 'pin', 'arrow', 'none' It can be set to an image with 'image://url' , in which URL is the link to an image, or dataURI of an image.
                , symbol: 'none'
                //desc: The data in radar chart is multi-variable (dimension).
                , data: [
                  {
                    value: [60, 75, 80, 30],
                    name: '测试结果'
                  }
                ]
              }
            ]
          }