鍍金池/ 問答/ HTML問答
涼心人 回答

給你個思路 在線查看
更改數(shù)據(jù)的時候,通過自己定義的echarts.setOption(更改的數(shù)據(jù))

step1:定義一個初始o(jì)ption數(shù)據(jù),以及mycharts
step2:在mounted生命周期,將option賦值給mycharts
step3:點(diǎn)擊按鈕后,觸發(fā)事件,在事件里定義臨時變量,將option賦值給臨時變量,同時更改臨時變量的數(shù)據(jù),然后將更改后的臨時變量賦值給mycharts
<div id="app">
     <div id="main" style="width: 600px;height:400px;"></div>
     <button @click="change">更改數(shù)據(jù)</button>
</div>
<script>
    new Vue({
        el: "#app",
        data() {
            return {
              myChart:'',
              option:{
                  title: {
                      text: 'ECharts 1'
                  },
                  tooltip: {},
                  legend: {
                      data:['銷量']
                  },
                  xAxis: {
                      data: ["襯衫","羊毛衫","雪紡衫","褲子","高跟鞋","襪子"]
                  },
                  yAxis: {},
                  series: [{
                      name: '銷量',
                      type: 'bar',
                      data: [5, 20, 36, 10, 10, 20]
                  }]
              }
            }
        },
        mounted:function(){
          this.myChart = echarts.init(document.getElementById('main'));
          this.myChart.setOption(this.option1);
        },
        methods:{
            change:function(){
                var temp = this.option;
                temp.series[0].data=[10, 5, 3, 6, 10, 20];
                this.myChart.setOption(temp);
            }
        }
    })
</script>
孤酒 回答

position:fixed的問題,設(shè)置個padding或者margin,讓頁面出現(xiàn)滾動條。

巴扎嘿 回答

border-image實(shí)現(xiàn),要圓角的話還要嵌套一層標(biāo)簽

       button{
        background: #ffffff;
        outline: none;
        width: 100px;
        height: 36px;
        border: none;
        border-radius: 14px;
        overflow: hidden;     
        cursor: pointer;
       }
       button span{
           height: 100%;
           width: 100%;
           display: block;
           border: 2px solid transparent;
           border-image: linear-gradient(60deg, #16d5be , #18c8cc) 2;
           box-sizing: border-box;
           line-height: 32px;
           color: #16d5be;
       }
       
         <button><span>了解更多</span></button>
莫小染 回答

以前的gist收藏過

//
// UNICODE RANGE : DESCRIPTION
// 
// 3000-303F : punctuation
// 3040-309F : hiragana
// 30A0-30FF : katakana
// FF00-FFEF : Full-width roman + half-width katakana
// 4E00-9FAF : Common and uncommon kanji
// 
// Non-Japanese punctuation/formatting characters commonly used in Japanese text
// 2605-2606 : Stars
// 2190-2195 : Arrows
// u203B     : Weird asterisk thing

/[\u3000-\u303F]|[\u3040-\u309F]|[\u30A0-\u30FF]|[\uFF00-\uFFEF]|[\u4E00-\u9FAF]|[\u2605-\u2606]|[\u2190-\u2195]|\u203B/g

\u意思是unicode符號,-代表range

硬扛 回答

提示的很清楚。login.js中有個對象的屬性是apply,出現(xiàn)了這個對象為undefined的情況。
判斷一下空undefined的情況。

兔寶寶 回答

代碼好像一模一樣吧、只是代碼風(fēng)格不一樣、就像C# 和java一樣!一個在后面寫{ ,一個換行寫{

c#

    public static void main(String[] args) 
    {
        System.out.println("Hello World");
    }

java

    public static void main(String[] args) {
        System.out.println("Hello World");
    }

這沒什么可爭的

浪蕩不羈 回答

<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <title></title>
    <style>
        
        li{
            float: left;
            line-break: 30px;
            list-style-type: none;
            margin-right: 5px;
            cursor: pointer;
            text-align: center;
            color: lightcoral;
        }
        li:first-of-type{
            border-right: none;
            color: lightgreen;
        }
        li:last-of-type{
            color: lightblue;
        }
        .bottomLine{
            position: fixed;
            height: 1px;
            transition: 0.3s all ease-in-out;
            pointer-events: none;
        }
    </style>
</head>
<body>
    <div class="bottomLine"></div>
    <head>
        <ul>
            <li class="current">news</li>
            <li>product</li>
            <li>service</li>
        </ul>
    </head>
    <script type="text/javascript" src="jquery-1.10.2.min.js" ></script>
    <script>
        $(document).ready(function(){
            change();
            function change(bold){
                if(bold){
                    $('.bottomLine').css("height","5px")
                }
                var oLeft=$(".current").offset().left;
                var oTop=$(".current").offset().top;
                var height=$(".current").height();
                var width=$(".current").width();
                var color=$(".current").css('color')
                console.log(color)
                $('.bottomLine').css({'background-color':color,'left':oLeft,'top':oTop+height,'width':width+'px'});
            }
        
            $('ul').mouseover(function(e){
                console.log(e.target)
                $('li').removeClass('current');
                $(e.target).addClass('current');
                change(true);
            })
        })
        
    </script>
</body>

</html>

執(zhí)念 回答

@kikong
top里加了一個填充的
SF上傳圖片功能掛了,試下唄,瀏覽器高度拉小一點(diǎn)

    <div class="main">
      <div class="top">
        <div class="topL"></div>
      </div>
      <div class="bottom"></div>
    </div>
.main {
    position: absolute;
    left: 0;
    top: 0;
    background-color: aquamarine;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    height: 100%;
  }

  .top {
    height: calc(100vh - 61px);
    /**可以不要**/
    width: 100%;
    background-color: blue;
    flex: 1;
    /**占據(jù)所有剩余空間**/
  }

  .topL {
    height: 800px;
    width: 200px;
    background-color: green;
  }

  .bottom {
    width: 100%;
    height: 61px;
    background-color: red;
    flex-shrink: 0;
    /**不能縮放*/
    flex-grow: 0;
    /**不能縮放*/
  }

---------------分割線-------------
知道怎么做了,我得給綠色一個Min-height,然后出現(xiàn)滾動條就行了

礙你眼 回答

你好,最后是什么問題呢?怎么確定簽名正確呢

淚染裳 回答

// 需要根據(jù)路由動態(tài)處理的文件

runtimeCaching: [
    // 如果在staticFileGlobs中設(shè)置相同的緩存路徑,可能導(dǎo)致此處不起作用
    {
        urlPattern: /\/js\//,
        handler: 'fastest',
        options: {
            cache: {
                maxEntries: 10,
                name: 'js-cache'
            }
        }
    },
    {
        urlPattern: /\/fonts\/|\.ttf|\.eot|\.svg|\.woff/,
        handler: 'fastest',
        options: {
            cache: {
                maxEntries: 10,
                name: 'fonts-cache'
            }
        }
    },
    {
        urlPattern: /^https:\/\/example\.com\/api/,
        handler: 'networkFirst',
        options: {
            cache: {
                maxEntries: 1000,
                name: 'api-cache'
            }
        }
    },
]

參考:https://lavas.baidu.com/pwa/offline-and-cache-loading/service-worker/service-worker-lifecycle
莫小染 回答
rsync --delete-after -avz /home/test/dir1/ /home/test/dir2

這樣寫就對了

莓森 回答

云端還是原生?云端應(yīng)該不成問題,原生的估計要稍等一下各個框架的API適配。

祈歡 回答

麻煩的辦法是監(jiān)聽滾動距離,計算當(dāng)前滾動位置,獲得背景色,進(jìn)行計算
還有個取巧的辦法是利用 css backdrop-filter

裸橙 回答

執(zhí)行下面語句后再發(fā)布看看

git config --global http.postBuffer 524288000
茍活 回答

執(zhí)行時機(jī)的問題,你在使用

oBtn.onclick = function() {
                alert(n1+n2);
            };

實(shí)際上n1和n2的賦值語句的執(zhí)行時機(jī)是window.onload,那個時候input里面還沒有值,所以是NaN,