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

鍍金池/ 問答/ HTML問答
話寡 回答

main.js

export const app = new Vue() .....

axios

import {app} from '....main.js'
...
app.$tips ....
...
撥弦 回答

確實,點開可以彈出Alert,但是存在執(zhí)行Js不一定就可以拿到cookie,比如HTTP-only

互擼娃 回答
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<canvas></canvas>
<script>
    window.onload = function () {
        const canvas = document.getElementsByTagName('canvas')[0]
        const ctx = canvas.getContext("2d");
        const w = document.documentElement.clientWidth;
        const h = document.documentElement.clientHeight;
        canvas.width = w;
        canvas.height = h;
        let mols = []
        function  init() {
            let mol = new generate_mol(1)
            mols.push(mol);
        }
        function draw(){
            canvas.width = canvas.width;
            for(var i=0;i<mols.length;i++){
                var m = mols[i];
                m.draw();
            }
        }
        function  generate_mol(mol) {
            this.x = w*0.3;
            this.y = h*0.3;
            // this.vx = Math.random()*-2;
            // this.vy = Math.random()*2;
            // this.vr = 0.1;
            this.r = Math.random()*Math.PI;
            this.draw = function() {
                // ctx.save();
                // ctx.translate(this.x + 20, this.y + 80);
                // ctx.rotate(Math.PI * 0.17);
                // ctx.translate(-this.x + 20, -this.y - 80);
                // ctx.beginPath();
                // ctx.moveTo(this.x, this.y + 30);
                // ctx.lineTo(this.x - 26, this.y + 45);
                // ctx.lineTo(this.x - 26, this.y + 75);
                // ctx.lineTo(this.x, this.y + 90);
                // ctx.lineTo(this.x + 26, this.y + 75);
                // ctx.lineTo(this.x + 26, this.y + 45);
                // ctx.lineTo(this.x, this.y + 30);
                // ctx.moveTo(this.x - 20, this.y + 47);
                // ctx.strokeStyle = "rgba(0,0,0,0.2)";
                // ctx.lineWidth = 3;
                // ctx.stroke();
                // ctx.closePath();
                // ctx.restore()
                ctx.fillStyle = "rgba(0,0,0,0.5)";
                ctx.font = "15px Arial";
                ctx.fillText("A", this.x+40 , this.y+80);

                ctx.save();
                ctx.translate(this.x + 20, this.y + 30);
                ctx.rotate(Math.PI * 0.17);
                ctx.translate(-this.x + 20, -this.y - 80);
                ctx.beginPath();
                ctx.moveTo(this.x, this.y + 30);
                ctx.lineTo(this.x - 26, this.y + 45);
                ctx.lineTo(this.x - 26, this.y + 75);
                ctx.lineTo(this.x, this.y + 90);
                ctx.lineTo(this.x + 26, this.y + 75);
                ctx.lineTo(this.x + 26, this.y + 45);
                ctx.lineTo(this.x, this.y + 30);
                ctx.moveTo(this.x - 20, this.y + 47);
                ctx.strokeStyle = "rgba(0,0,0,0.2)";
                ctx.lineWidth = 3;
                ctx.stroke();
                ctx.fillStyle = "rgba(0,0,0,0.5)";
                ctx.font = "15px Arial";
                ctx.fillText("B", this.x , this.y+70);
                ctx.closePath();
                ctx.restore()

                ctx.save();
                ctx.translate(this.x + 68, this.y + 56);
                ctx.rotate(Math.PI * 0.17);
                ctx.translate(-this.x + 20, -this.y - 80);
                ctx.beginPath();
                ctx.moveTo(this.x, this.y + 30);
                ctx.lineTo(this.x - 26, this.y + 45);
                ctx.lineTo(this.x - 26, this.y + 75);
                ctx.lineTo(this.x, this.y + 90);
                ctx.lineTo(this.x + 26, this.y + 75);
                ctx.lineTo(this.x + 26, this.y + 45);
                ctx.lineTo(this.x, this.y + 30);
                ctx.moveTo(this.x - 20, this.y + 47);
                ctx.strokeStyle = "rgba(0,0,0,0.2)";
                ctx.lineWidth = 3;
                ctx.stroke();
                ctx.closePath();
                ctx.restore()

                ctx.save();
                ctx.translate(this.x + 66, this.y + 110);
                ctx.rotate(Math.PI * 0.17);
                ctx.translate(-this.x + 20, -this.y - 80);
                ctx.beginPath();
                ctx.moveTo(this.x, this.y + 30);
                ctx.lineTo(this.x - 26, this.y + 45);
                ctx.lineTo(this.x - 26, this.y + 75);
                ctx.lineTo(this.x, this.y + 90);
                ctx.lineTo(this.x + 26, this.y + 75);
                ctx.lineTo(this.x + 26, this.y + 45);
                ctx.lineTo(this.x, this.y + 30);
                ctx.moveTo(this.x - 20, this.y + 47);
                ctx.strokeStyle = "rgba(0,0,0,0.2)";
                ctx.lineWidth = 3;
                ctx.stroke();
                ctx.closePath();
                ctx.restore()

                ctx.save();
                ctx.translate(this.x + 20, this.y + 135);
                ctx.rotate(Math.PI * 0.17);
                ctx.translate(-this.x + 20, -this.y - 80);
                ctx.beginPath();
                ctx.moveTo(this.x, this.y + 30);
                ctx.lineTo(this.x - 26, this.y + 45);
                ctx.lineTo(this.x - 26, this.y + 75);
                ctx.lineTo(this.x, this.y + 90);
                ctx.lineTo(this.x + 26, this.y + 75);
                ctx.lineTo(this.x + 26, this.y + 45);
                ctx.lineTo(this.x, this.y + 30);
                ctx.moveTo(this.x - 20, this.y + 47);
                ctx.strokeStyle = "rgba(0,0,0,0.2)";
                ctx.lineWidth = 3;
                ctx.stroke();
                ctx.closePath();
                ctx.restore()
                //
                ctx.save();
                ctx.translate(this.x -27,this.y + 108);
                ctx.rotate(Math.PI * 0.17);
                ctx.translate(-this.x + 20, -this.y - 80);
                ctx.beginPath();
                ctx.moveTo(this.x, this.y + 30);
                ctx.lineTo(this.x - 26, this.y + 45);
                ctx.lineTo(this.x - 26, this.y + 75);
                ctx.lineTo(this.x, this.y + 90);
                ctx.lineTo(this.x + 26, this.y + 75);
                ctx.lineTo(this.x + 26, this.y + 45);
                ctx.lineTo(this.x, this.y + 30);
                ctx.moveTo(this.x - 20, this.y + 47);
                ctx.strokeStyle = "rgba(0,0,0,0.2)";
                ctx.lineWidth = 3;
                ctx.stroke();
                ctx.closePath();
                ctx.restore()

                ctx.save();
                ctx.translate(this.x -26, this.y + 56);
                ctx.rotate(Math.PI * 0.17);
                ctx.translate(-this.x + 20, -this.y - 80);
                ctx.beginPath();
                ctx.moveTo(this.x, this.y + 30);
                ctx.lineTo(this.x - 26, this.y + 45);
                ctx.lineTo(this.x - 26, this.y + 75);
                ctx.lineTo(this.x, this.y + 90);
                ctx.lineTo(this.x + 26, this.y + 75);
                ctx.lineTo(this.x + 26, this.y + 45);
                ctx.lineTo(this.x, this.y + 30);
                ctx.moveTo(this.x - 20, this.y + 47);
                ctx.strokeStyle = "rgba(0,0,0,0.2)";
                ctx.lineWidth = 3;
                ctx.stroke();
                ctx.closePath();
                ctx.restore()
            }
        }
        init()
        draw()
    }
</script>
</body>
</html>

沒畫好 畫偏了
應(yīng)該還要加算法 來生成指定個數(shù)的
預(yù)覽地址

笑浮塵 回答

先說原因:map方法遍歷數(shù)組導(dǎo)致this.p被不斷的重新賦值,所以最后在componentDidMount中拿到的永遠都是數(shù)組最后一次遍歷創(chuàng)建的dom節(jié)點。
提供解法:

export default class Content extends Component{
  componentDidMount() {
    console.log(this.p0);
    console.log(this.p1);
    console.log(this.p2);
  }

  render() {
    const arr = [{content:'內(nèi)容一'},{content:'內(nèi)容二'},{content:'內(nèi)容三'}];
    
    const domP = arr.map((item,i) => {
      return <p ref={(dom) => this['p' + i] = dom} key={i}>{item.content}</p>
    });
    retuen (
      <div>
        {domP}
      </div>
    );
  }
}
久舊酒 回答

你是要再循環(huán)渲染el-switch么? 如果是,確保up.value是對象或者是數(shù)組再次v-for就好。參考一下

<ul class="HRcertifyUl_out" v-for="(item,index) in certifyList" :key="index">
      <li class="HRcertifyLi_out" v-for="(itemL2,indexL2) in item.innerList2" :class="{active:itemL2.active}" :key="indexL2">
        <div class="HRoutTopArea" @click="listOutClick(item,itemL2)">
          <div class="HRoutBorderDiv">
            <div class="HRoutIcon">
              <Icon :type="itemL2.leftIcon" size="48"></Icon>
            </div>
            <div class="HRoutText">
              <p class="cnText">{{itemL2.tittle}}</p>
            </div>
            <div class="HRoutArrowIcon">
              <Icon :type="itemL2.active?itemL2.rightIconActive:itemL2.rightIcon"></Icon>
            </div>
          </div>
        </div>
        <div class="HRoutBottomArea">
          <ul class="HRcertifyUl_in">
            <li 
              class="HRcertifyLi_in" 
              :class="{active:itemL3.active}" 
              v-for="(itemL3,indexL3) in itemL2.list3" 
              :key="indexL3" 
              v-touch-ripple 
              @click="listInClick(itemL3,indexL3);">
              {{itemL3.name}}
            </li>
          </ul>
        </div>
      </li>
    </ul>
有點壞 回答

(1)你在切換導(dǎo)航的時候給個類型區(qū)別,你可以在url添加一個錨點,例如http://localhost:8086/topic/index?nav=XXX.(XXX就是點擊nav名字)
(2)

<ul>
    <li data-type=“wangye”>網(wǎng)頁</li>
    <li data-type=“xinwen”>新聞</li>
    <li data-type=“tieba”>貼吧</li>
</ul>

(3)用jquery或者js或者angularjs里自帶的路由獲取url里的XXX,讓li里的data-type值與XXX相等的添加高亮狀態(tài)。當然你也可以不用data-type,用id也可以。例如:

<ul>
    <li id=“wangye”>網(wǎng)頁</li>
    <li id=“xinwen”>新聞</li>
    <li id=“tieba”>貼吧</li>
</ul>

$(XXX).addClass(高亮class);把XXX當id即可;
(4)好處:頁面刷新,選中的高亮狀態(tài)也不會消失,到達預(yù)期效果。 壞處:代碼不夠優(yōu)美,有待優(yōu)化與改善

胭脂淚 回答

text-align: center的意思是使該元素內(nèi)部的行內(nèi)元素居中。
img一種特殊的行內(nèi)元素,我們暫且將其視為行內(nèi)元素。這樣,設(shè)置divcenter即設(shè)置了圖片在容器中居中。
就像文字在h標簽中居中一樣。

糖果果 回答

可以嘗試用下面這個,也可以自己找一個
https://www.npmjs.com/package...

慢半拍 回答

不是你的問題,是翻譯的問題,你可以看那個博客的原文,原文push的是一個對象,這個對象有兩個屬性,一個context,一個callingContext,所以pop一次就夠了:

clipboard.png

卟乖 回答

pyspider 會自動去重,抓過的連接不會重新抓取,引用大神的:https://segmentfault.com/q/10...
pyspider說明手冊
http://docs.pyspider.org/en/l...

我改成這樣就好了:

class Handler(BaseHandler):

crawl_config = {
    'itag': 'v223'
}
嫑吢丕 回答

解決

  • 不用添加自定義標簽
  • 只需要設(shè)置不認識的標簽不進行提示即可

    • file -> settings -> editor -> inspections -> html -> unkown html tag, unkown html tag attribute
硬扛 回答

在你的頁面body后面插入

<script src="https://cdn.socket.io/socket.io-1.0.0.js"></script>

之后就是正常的socketio使用了,

var socket = io('http://localhost');
    socket.on('connect', function(){
    socket.on('event', function(data){});
    socket.on('disconnect', function(){});
抱緊我 回答

我是存在localstorage里,然后進入最外層的路由時判斷:

let routes = [{
    path: '/login',
    component: Login,
    name: 'login'
},{
    path: '/admin',
    component: Admin,
    beforeEnter: (to, from, next) => {
        if(!localStorage.ACCOUNT || localStorage.ACCOUNT == ''){
            next({
                name: 'login'
            })
        }else{
            next()
        }
    }
}]
懷中人 回答
后端不是一樣可以拿到數(shù)據(jù)嗎

是沒問題啊,你跟后端商量好就行。

生性 回答

mapMutations的寫法不對。

navTabs寫到[]里面,再試試。

真難過 回答

你在module、route、myController中分別定義了一個myApp的模塊,但是他們之間并沒有關(guān)聯(lián)~

var app = angular.module('myApp', [ui.router]); // 定義app模塊

app.config(['$stateProvider', function(){}]) // 為app模塊注冊路由

傻丟丟 回答

dispatch是異步,commit是同步,沒找到數(shù)據(jù)就會報錯