在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問答/ HTML問答
糖果果 回答

在路由攔截中寫是正確的,往下的思路你沒想透
如果要去的登陸頁,不判斷有無本地信息
如果去的是其它頁面,有本地登陸信息且未超時(shí)過,否則轉(zhuǎn)登陸頁
show my code

    if(to.name==="login"){
        next();
    }else{
        if(loginInfo){
            // 這里要加一個(gè)有登陸信息比對(duì)時(shí)間
            next()
        }else{
            next("login")
        }
    }

另一個(gè)大佬的回答,供參考:
https://segmentfault.com/q/10...

歆久 回答

用wx.createLivePlayerContext()來播放流媒體
具體api看文檔吧
https://developers.weixin.qq....

話寡 回答

可以借助babel-plugin-import來實(shí)現(xiàn),可能是你的方法不對(duì)
https://www.cnblogs.com/chris...

胭脂淚 回答

好吧,還是我來說說自己的解決方法吧。我用的 cocos creator v1.9.1
其實(shí)是自己一開始不熟悉 cocos creator ,熟悉了就很簡(jiǎn)單。

首先把 editbox 放到需要的場(chǎng)景中,這里場(chǎng)景命名為 main,給這個(gè)場(chǎng)景 main 掛上腳本 main.js,掛的意思就是在資源管理器中創(chuàng)建好 main.js 然后就用鼠標(biāo)拖動(dòng)到 canvas 的屬性檢查器的 script 上。

接著可以在 main.js 上的 properties 上寫

//這個(gè)名字按照自己訂就好,應(yīng)為你也要把層級(jí)管理器中的那個(gè) editbox 拖到 canvas 屬性管理器的對(duì)應(yīng)位置,掛上。
editbox:{
  default: null,
  type: cc.EditBox,
}

繼續(xù)把一個(gè)按鍵 button 放到場(chǎng)景中,同樣在層級(jí)管理器中選中這個(gè) button ,在屬性管理器中找到 Click Events 把 0 改成 1,這樣這個(gè)按鍵就會(huì)有一個(gè)執(zhí)行方法了,數(shù)值代表可以掛多少個(gè)方法,下面的就是拖動(dòng) canvas 到第一個(gè)框,第二個(gè)框是哪個(gè)腳本(js),第三個(gè)框是這個(gè)腳本下的方法。CustomEventData 是這個(gè) button 傳的 value

例如我們?cè)?main.js 上寫了個(gè) buttonEvent

properties:{
  editbox:{
    default: null,
    type: cc.EditBox,
  },
  button:{
    default: null,
    type: cc.Button,
  }
},
buttonEvent: function (target, value) {
   // target 是按鍵自帶的事件,value 就是 CustomEventData
   cc.log(target, value);
   this.button.string = value;
}

按照上面的就是能把一個(gè)按鍵的值傳到 editbox 上面,模擬出虛擬鍵盤的輸入了

好了,以上是我的方法,假如有別的方法請(qǐng)不吝賜教,謝謝啦。

JS代碼:

//鼠標(biāo)事件:1.播放音樂 2.更改背景色
function mouseEvent_changeColor() {
    var tabs = document.getElementsByTagName("th");
    var tabsLen = tabs.length;
    for(var i=0;i<tabsLen;++i) {
        var curColor;
        tabs[i].onmouseover = function() {
            //更改背景色
            curColor = this.style.backgroundColor;
            this.style.backgroundColor = "#fff";
            //播放音樂
            playMusic(this.id);
        }
        tabs[i].onmouseout = function() {
            //改回原本的背景色
            this.style.backgroundColor = curColor;
        }
    }
    
}

function playMusic(thisId){
    var audio = document.getElementById("music");
    audio.src = "songs" + "/" + thisId + ".mp3";
    console.log(thisId + " " + audio.src);
    audio.play();
}

HTML代碼:

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>Color and Music</title>
        <link rel="stylesheet" href="colorAndMusic.css">
    </head>
    <body>
        <table id="colorTable">
        <tr>
            <th class="_ffffcc" id="d5"> </th>
            <th class="_ffcccc" id="d3"> </th>
            <th class="_8696a7" id="d3"> </th>
            <th class="_fffaf4" id="d4"> </th>
            <th class="_cc9999" id="d2"> </th>
            <th class="_e3b4b8" id="d2"> </th>
            <th class="_eea2a4" id="d1"> </th>
            <th class="_8fb2b9" id="d3"> </th>
        </tr>
        </table>
        <audio src="" id="music"></audio>
        <script src="colorAndMusic.js"></script>
    </body>
</html>

除了修改代碼之外,發(fā)現(xiàn)ogg格式播放有問題。雖然chrome支持ogg,但只要更換成MP3格式就能正常播放。

呃,Ls你答案里的不就是字蛛么……


好吧我再推薦一個(gè),fontmin,有獨(dú)立應(yīng)用,也有Gulp方案

vue項(xiàng)目怎么跑gulp就不是回答范疇了哦~請(qǐng)善用搜索引擎.::.

心夠野 回答

沒必要那么麻煩,直接在router/index.js里配置就好

index.js

...
routes: [
    {
      path: '/',
      redirect: '/weixin'
    },
    {
      path: '/weixin',
      name: 'Weixin',
      component: Weixin,
      meta: {title: '微信'}
    },
    {
      path: '/contact',
      name: 'Contact',
      component: Contact,
      meta: {title: '通訊錄'}
    },
    {
      path: '/find',
      name: 'Find',
      component: Find,
      meta: {title: '發(fā)現(xiàn)'}
    },
    {
      path: '/my',
      name: 'My',
      component: My,
      meta: {title: '我'}
    },
  ]

組件里獲取標(biāo)題

this.$route.meta
陌璃 回答

凡是需要處理vuex的getter中的數(shù)據(jù),均在beforeUpdate或者update階段進(jìn)行。

8百年前做的一個(gè)實(shí)驗(yàn):笑納。

11個(gè)生命周期打印計(jì)算屬性值(前6個(gè)有輸出,后5個(gè)無輸出)

各生命周期打印從vuex的getter獲取到的計(jì)算屬性結(jié)果。
mounted階段的打印嘗試,其余的也類似:

    mounted(){
        console.log("mounted↓")
        console.log(this.users)
    }

從vuex getter獲取到的數(shù)據(jù):

    computed:mapGetters({
        users:'allUsers'
    }),

打印結(jié)果:
image

經(jīng)過觀察發(fā)現(xiàn),vue組件生命周期的11個(gè)階段,只有前6個(gè)階段有輸出結(jié)果。
beforeDestroy,destroyed,activated,deactivated,errorCaptured都沒有輸出結(jié)果。
在前6個(gè)階段的初始輸出結(jié)果均不是有效數(shù)據(jù),beforeCreate的undefined和其他階段的observer,均是無效數(shù)據(jù)。
直到16:28:33.740,才開始獲得有效數(shù)據(jù),且只在before和updated階段獲取到數(shù)據(jù)。

我們根據(jù)實(shí)驗(yàn)結(jié)果得出一個(gè)結(jié)論:凡是需要處理vuex的getter中的數(shù)據(jù),均在beforeUpdate或者update階段進(jìn)行。

有你在 回答

測(cè)試地址,http://jsrun.net/JjgKp/edit

我這邊沒有復(fù)現(xiàn)你的問題,你嘗試在一個(gè)線上編輯器試一下。如果可以復(fù)現(xiàn)把地址發(fā)出來。

我猜是不是改DOM了

心癌 回答

只有這么一點(diǎn)信息,不能準(zhǔn)備推斷問題原因。

  1. 你先試試將 v-model="mobile"那行去掉看看
  2. 若無效,給input增加一個(gè)style -webkit-user-select:auto;user-select:auto;
懷中人 回答

是使用 vue-cli@3 吧。嘗試重新構(gòu)建項(xiàng)目或者該文檔

別瞎鬧 回答

不是太明白你想要實(shí)現(xiàn)的效果,或者,你想要做什么
https://docs.npmjs.com/misc/s...
你想要的,是否是這樣呢

{
  "name": "test",
  "main": "server.js",
  "scripts": {
    "start": "npm run build && npm run dev ",
    "dev": "", // 做點(diǎn)什么
    "build": "" // 做點(diǎn)什么
  },
  "dependencies": {
  }
}
浪婳 回答

JS引擎創(chuàng)建了執(zhí)行上下文棧ECS來管理執(zhí)行上下文
當(dāng)應(yīng)用程序結(jié)束的時(shí)候,棧清空。
所以結(jié)束之前,棧底部一直有全局執(zhí)行上下文

第二個(gè)問題我也不清楚,期待解答~

舊言 回答

這樣行不行:

process.exec('cd 指定目錄 && npm run build', function (error, stdout, stderr) {
}
懶豬 回答

攔截器判斷url /common/timestamp 直接放行

export class InterceptorService implements HttpInterceptor {
  private lastTimestamp;

  constructor(private authService: AuthService) {
  }

  intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
    const authToken;
    if (req.url !== '/common/timestamp'){
        authToken = this.authService.getTimestamp();        
        this.lastTimestamp = authToken;
    } else { // 這里復(fù)用上次時(shí)間也可以不要
        authToken = this.lastTimestamp;
    }
    const clonedRequest = req.clone({
      setHeaders: {
        leo: 'test',
        version: constant.VERSIONS,
      },
    });
    console.log(clonedRequest.method);
    return next.handle(clonedRequest).pipe(
      tap(
        event => {
          if (event instanceof HttpResponse) {
            console.log(event);
          }
        },
        error => {
          console.error(error.message);
        }
      )
    );
  }
}
悶油瓶 回答

字母數(shù)字是基線對(duì)齊,漢字是底線對(duì)齊,四線=》底線、基線、中間線、頂線,有點(diǎn)類似于四線三格。你可以對(duì)比一下英文'good'和中文’好‘。

你這樣肯定是不行的,這樣的route在加載的時(shí)候已經(jīng)決定了是admin還是user,而不是一個(gè)動(dòng)態(tài)的路由,你應(yīng)該把component寫成一個(gè)函數(shù),這樣才是動(dòng)態(tài)加載。