鍍金池/ 問答/ HTML問答
深記你 回答

參考答案:

@keyframes dialog-fade-in {
  0% {
    transform: translate3d(0, 100%, 0);
    opacity: 0;
  }
  100% {
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
}

@keyframes dialog-fade-out {
  0% {
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
  100% {
    transform: translate3d(0, -100%, 0);
    opacity: 0;
  }
}

在你需要的地方復寫這兩個動畫就行了。
附上完整的代碼:

<template>
<div>
  <el-dialog :visible.sync="isShown">
    <div> 111111 </div>
  </el-dialog>
  <el-button type="primary" @click="changeStatus">顯示或隱藏</el-button>
</div>
</template>
<script>
export default {
  data () {
    return {
      isShown: false
    }
  },
  methods: {
    changeStatus: function () {
      if (this.isShown) {
        this.isShown = false
      } else {
        this.isShown = true
      }
    }
  }
}
</script>

<style>
@keyframes dialog-fade-in {
  0% {
    transform: translate3d(0, 100%, 0);
    opacity: 0;
  }
  100% {
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
}
@keyframes dialog-fade-out {
  0% {
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
  100% {
    transform: translate3d(0, -100%, 0);
    opacity: 0;
  }
}
</style>

效果圖:

http://yexk.cn/temp/a.gif

實現(xiàn)思路說明:

參考源碼:https://github.com/ElemeFE/el...,由于dialog已經(jīng)使用了動畫效果,你只需要在這個基礎上去覆蓋源碼的動畫即可。這是我想出來的辦法,若其他人有其他辦法歡迎交流。

誮惜顏 回答

el-upload 加個 ref="xx",隨后 this.$refs.xx.clearFiles()

咕嚕嚕 回答

你把數(shù)據(jù)貼出來啊,一般來說vue里面你要存在對應的數(shù)據(jù)才去v-for
解決方式就是三元表達式
<div v-for="list in item">
<span>{ list.user.name?list.user.name:''}</span>
</div>

瞄小懶 回答

你可以嘗試更改css,一般這個是靠css固定位置的,或者你給Notice組件加個class,你F12還好分析下,就可以改了

效果如下

clipboard.png

加入下方css

  .ivu-notice {
    top: 100px !important;
  }
糖果果 回答

你這個 booklist 數(shù)據(jù) 8成 是 ajax 或 fetch 獲取 的 數(shù)據(jù)。。。 你初始化 肯能 是空數(shù)組,所以才出現(xiàn) [], 當獲取完數(shù)據(jù), 父組件 更改 子組件的 props, 造成 組件件更新, 就顯示出字來。
最簡單的方法, 你在 render 里面 打印 數(shù)組。 看看是不是 出兩次。

青裙 回答

方便拓展啊.
開源框架又不是一個人寫的.大都需要搭建一個平臺,提供拓展接口方便社區(qū)貢獻代碼.成功的項目這方面往往都做的很好.

我不懂 回答

hover之后將該區(qū)域塊顯示出來,然后加上animation,從左到右的滑動
舉個例子

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>JS Bin</title>
  <script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>
  <style>
    ul li{list-style:none; width:100px; position:relative; float:left; overflow:hidden;}
    ul li img{width:100%;}
    ul li .info{position:absolute; bottom:0; left:0; width:100%; height:40px; line-height:40px; background:-webkit-gradient(linear, 0 0, 0 bottom, from(rgba(255,255,255,.2)), to(rgba(0,0,0,.2)));}
    .hide{display:none;}
    .slideleft{animation:left .5s 1; animation-fill-mode:forwards;}
    .slideright{animation:right .5s 1; animation-fill-mode:forwards;}
    .slidetop{animation:top .5s 1; animation-fill-mode:forwards;}
    .slidebottom{animation:bottom .5s 1; animation-fill-mode:forwards;}
    
    @keyframes left{
      from{left:-100%;}
      to{left:0;}
    }
    @keyframes top{
      from{bottom:-100%; left:0;}
      to{bottom:0; left:0;}
    }
    @keyframes bottom{
      from{bottom:100%;}
      to{bottom:0;}
    }
    @keyframes right{
      from{left:100%;}
      to{left:0;}
    }
  </style>
</head>
<body>
  <ul>
    <li>
      <img src="https://img1.epetbar.com/2017-05/24/10/7982bafb75e8aba985e08de99780be52.jpg?x-oss-process=style/fill&$1=300&$2=300" alt="">
      <div class="info hide">
        test
      </div>
    </li>
    <li>
      <img src="https://img1.epetbar.com/2017-05/24/10/7982bafb75e8aba985e08de99780be52.jpg?x-oss-process=style/fill&$1=300&$2=300" alt="">
      <div class="info hide">
        test
      </div>
    </li>
    <li>
      <img src="https://img1.epetbar.com/2017-05/24/10/7982bafb75e8aba985e08de99780be52.jpg?x-oss-process=style/fill&$1=300&$2=300" alt="">
      <div class="info hide">
        test
      </div>
    </li>
  </ul>

<script>
$("li").hover(function(e){
  var mX = e.clientX;
  var mY = e.clientY;
  var liLeft = $(this).offset().left;
  var liTop = $(this).offset().top;
  var liW = $(this).width();
  var liH = $(this).height();

  x = (mX - liLeft - ( liW  / 2 ) ) * ( liW  > liH ? (liH / liW ) : 1 )
  y = (mY - liTop - (liH / 2)) * (liH > liW ? (liW / liH) : 1),  
  // 上(0) 右(1) 下(2) 左(3)  
  direction = Math.round( ( ( ( Math.atan2( y, x ) * ( 180 / Math.PI ) ) + 180 ) / 90) + 3 ) % 4;
  if(direction == 0){
    $(this).find(".info").removeClass("hide").addClass("slidetop");
  }else if(direction == 1){
    $(this).find(".info").removeClass("hide").addClass("slideright");
  }else if(direction == 2){
    $(this).find(".info").removeClass("hide").addClass("slidebottom");
  }else if(direction == 3){
    $(this).find(".info").removeClass("hide").addClass("slideleft");
  }
},function(){
  $(this).find(".info").addClass("hide").removeClass("slideleft").removeClass("slidetop").removeClass("slideright").removeClass("slidebottom")
})
</script>
</body>
</html>
喜歡你 回答

// 父組件
<ranting :stars='rade' :maxStars='maxd' :hasCounter.sync="has" />

// 子組件

computed: {
has() {

   return this.hasCounter

}
}

chang() {
this.$emit('update:hasCounter', !this.hasCounter);
}

然后子組件的 watch 監(jiān)聽可以移除了 data 中的 has 也可以移除了,父組件中的 @on-result-change='onResultChange' 回調(diào)也可以移除了

初念 回答

PHP支持數(shù)據(jù)中的數(shù)據(jù)是多類型的嗎?

安于心 回答

這個remoteremote組件里面綁定的那個值,因為你沒有傳數(shù)據(jù)進去,這是我修改你那個之后的代碼,直接復制粘貼你就知道哪里錯了,希望能幫助到你:

<!DOCTYPE html>
<html lang="cmn-hans">
    <head>
        <meta charset="utf-8">
        <meta http-equiv=X-UA-Compatible content="IE=edge,chrome=1">
        <meta name="renderer" content="webkit">
        <!-- 必選 響應式  -->
        <script src="https://cdn.bootcss.com/vue/2.5.13/vue.min.js"></script>
        <title>Vue component組件</title>
    </head>

    <body>
        <h3>Vue component組件</h3>
        <hr>
        <div id="app">

            <!-- <local  :here="local"></local> -->
            <local :here="local"></local>
            <remote :remote="remote"></remote>

        </div>
        <script>
            var app = new Vue({
                el: "#app",
                data: {
                    local: 'china',
                    remote: 'USA'
                },
                // <!-- 定義局部組件 -->
                components: {
                    'remote': {
                        template: `<p>我是局部組件remote來自{{remote}}</p>`,
                        props: ['remote']
                    },
                    'local': {
                        template: `
          <div style="color:green">
      我是局部組件local,來自{{here}}
  </div>
         `,
                        //選項props 數(shù)值
                        props: ['here'],
                    },
                }
            });
        </script>
    </body>
</html>
陌璃 回答

android獲取wifi名稱的代碼

public String getWifiName(Context context) {
    WifiManager manager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
    if (manager.isWifiEnabled()) {
       WifiInfo wifiInfo = manager.getConnectionInfo();
       if (wifiInfo != null) {
          DetailedState state = WifiInfo.getDetailedStateOf(wifiInfo.getSupplicantState());
          if (state == DetailedState.CONNECTED || state == DetailedState.OBTAINING_IPADDR) {
              return wifiInfo.getSSID();
          }
       }
    }
    return null;
}

iOS獲取wifi名稱的代碼

+ (NSString *)GetCurrentWifiHotSpotName {    
    NSString *wifiName = nil;
    NSArray *ifs = (__bridge_transfer id)CNCopySupportedInterfaces();
    for (NSString *ifnam in ifs) {
        NSDictionary *info = (__bridge_transfer id)CNCopyCurrentNetworkInfo((__bridge CFStringRef)ifnam);
        if (info[@"SSID"]) {
            wifiName = info[@"SSID"];
        }
    }
    return wifiName;
}
孤酒 回答

看你貼 上來的代碼 .
有一半的機率是你做異步代碼分割的時候有問題..
你可以試著一行一行的注釋來檢查一下..有可能是分割的時候.js引用順序錯了

有些模塊 在index頁需要,
但代碼分割把他分到其他異步模塊去了..

毀與悔 回答

從你發(fā)出來的代碼沒有看,只有ClassBasicModel不知道從哪里來,或許你沒有貼出來定義的代碼。
其他的沒有發(fā)現(xiàn)有什么問題。而且報的warning也無法與這段代碼對應上。

需要注意的是:
modelExtend中的namespace會把原ClassBasicModelnamespace覆蓋掉,在引用這個model時不要把namespace引錯了就可以了。

愿如初 回答

zxing的識別率本來就不是特別高的,只能改源碼或是用其他庫吧。

伐木累 回答

借助path即可

const path = require('path');

module.exports = function(options){
    var rootPath = options.rootPath;
    return {
        alias: {
            @: path.join(rootPath, "src")
        }
    }

}
神曲 回答

代碼怎么寫的,都不知道你怎么用的