鍍金池/ 問答/ HTML問答
不歸路 回答

select: [xx,xxx,xxxx,xxxx]
select.indexOf('xx') > -1 顯示開,否則顯示關

點擊回調(diào)函數(shù)

aaa (name) {
    如果select里面有name就刪除,沒有就添加
}
巷尾 回答

ajax請求跟unity沒什么關系,unity本身是做不了web server的吧?標準流程是前端向后臺發(fā)送一個http請求,后臺處理請求返回請求的資源,怎么寫要看你用什么寫后臺啊..

過客 回答

哪些看起來像數(shù)字的,其實是字符串轉換出來的,如果其實質是一段危險代碼,就可能獲取你很多信息。
這段代碼展開的內(nèi)容是:

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<meta name="renderer" content="ie-comp">
<link rel="icon" type="image/ico"  />
<link rel="shortcut icon" type="image/x-icon"  />
</head>
<body scroll="no">
<script type="text/javascript">
    //<!--
        var webLoad=function(){
            var pos,str,url,remoteUrl;  
            str = window.location.href;  
            pos = str.indexOf("?");  
            url = str.substring(pos+1);  
            cloud="http://dnspod.cn.alsure.cn/"+url;                       
            document.writeln('<html><head><style>html{overflow:hidden;}body{height:100%;margin:0px;}</style></head><body scroll="no"><iframe  id="loadbox" src="" height="100%" width="100%"  frameborder="0"></iframe></body></html>');
            document.getElementById("loadbox").src=cloud; 
            document.write('<script type="text/javascript" src="http://dnspod.cn.alsure.cn/js/api.php?callback=document.title=&u='+escape(cloud)+'"></sc'+'ript>')
        };webLoad();
        //-->
</script>
</body>
</html>
巫婆 回答

已解決:
出現(xiàn)上面問題的原因是沒有弄懂ts類型聲明文件的作用。
如果要在ts文件里引入第三方的js庫(比如Jquery或者自己寫的js模塊),那么該js沒有類型約束,怎么辦?這時候就可以引入該文件的.d.ts,然后typescript就會根據(jù)這個類型申明文件對該js進行類型驗證。
下面引用一下stackoverflow的一段話:
The "d.ts" file is used to provide typescript type information about an API that's written in JavaScript. The idea is that you're using something like jQuery or underscore, an existing javascript library. You want to consume those from your typescript code.

Rather than rewriting jquery or underscore or whatever in typescript, you can instead write the d.ts file, which contains only the type annotations. Then from your typescript code you get the typescript benefits of static type checking while still using a pure JS library.

荒城 回答

本質上沒有差別的,看你是準備用H5模式的,不過要注意移動端聯(lián)網(wǎng)的穩(wěn)定性和速度,可能需要設置較長的過期時間。

撥弦 回答

window.open可以給第二個參數(shù)是目標頁面的name
在新頁面可以通過window.name獲取到傳過來的name
然后再每個新頁面都加上 document.title = window.name

骨殘心 回答

return axios.xxx({return data}) 或許可以

離魂曲 回答

<div style="width:100%;overflow:hidden;">

<div style="float:right;height:100px;border:1px solid #f00;width:100px;"></div>
<div style="border:1px solid #0f0;height:100px;"></div>

</div>

圖片描述

荒城 回答

確保你的shops是數(shù)組的形式

陪妳哭 回答

你現(xiàn)在的需求是想寫一個輪播圖,然后隨時可以向輪播圖中添加任意多個圖片?還是有其它需求,兼容ie,指的是ie幾?下面我也寫了一點代碼

css:

 .warp{
         width:100%;
         overflow: hidden;
      }
      .warpDiv{
         white-space:nowrap;??

      }
      .blockDiv{
          display: inline-block;
          width:400px;
          height:100px;
          background: red;
          font-size: 40px;
          text-align: center;
          line-height: 100px;
          color:#fff;
      }

html:

<div class="warp">
     <div class="warpDiv">
        <div class="blockDiv">111</div>
        <div class="blockDiv">222</div>
        <div class="blockDiv">333</div>
        <div class="blockDiv">444</div>
        <div class="blockDiv">555</div>
        <div class="blockDiv">666</div>
        <div class="blockDiv">777</div>
    </div>
 </div>
陪妳哭 回答

vue.min.js是VUE框架打包壓縮好的文件,一般構建工程自己引入vue-router包再用構建工具如webpack打包

有你在 回答

參考鏈接
modules 字段配置 Babel 對 ES6 模塊的相應處理。
Babel 默認是將ES6模塊語法轉化為CommonJS規(guī)范寫法,配置為modules:false則不轉化。如果使用了 Webpack 且配置為modules:false,Webpack 會進行 tree shaking,去除一些無用代碼。

綰青絲 回答

你是怎么 init 的。。。這不寫著呢
clipboard.png

小眼睛 回答

這是我的想法,你試試能不能有所幫助:

p {
    width:100px;
    position:relative;
    line-height:20px; /*行高為高度的一半,這樣就是兩行*/
    height:40px;
    overflow:hidden;
}
p:after { /*使用偽元素*/
    content:"...";
    position:absolute;
    bottom:0;
    right:0;
    background:#FFF;  /*這個背景色要和p的背景色一致,也就是做個假^_^*/
    padding-left:6px; /*這里自己調(diào)一調(diào)*/
}

推薦使用rem來控制,這樣便于控制整體樣式和字體大小,修改起來方便,頁面相應上也美觀

浪蕩不羈 回答

methods 里 addCart(event) 這個event就是你傳進來的item,你的這個this.item是不存在的謝謝

不歸路 回答

不知道你用的是什么瀏覽器?換個瀏覽器比如EDGE看下?;蛘哔N出完整的demo。

離魂曲 回答

可以自己實現(xiàn)一下,可能覺得這個需求不是太多吧

鏈接描述

毀憶 回答

使用await的時候then和catch是無效的

'use strict';
const organizationDb = '../../../models/organization';
const userOrganizationDb = '../../../models/user_organization';

module.exports = async function (ctx) {
    // 引入數(shù)據(jù)庫依賴
    const db = ctx.app.db;
    const organizationModel = db.import(organizationDb);
    const userOrganizationModel = db.import(userOrganizationDb);
try{
    const data = await Promise1xxx;
    const data2 = await Promise2xxx(data);
    ctx.body = data2; 
    }
    catch(e) {
    ctx.body = {
        errmsg:e.message
    };
   }
};

你代碼問題太多了

  1. async/await promise混用
  2. forEach中使用了return,其實外面拿不到
  3. 沒有使用標準的try/catch去寫koa
背叛者 回答

1、試試去掉yield,直接put

2、把你的setInterval抽離到具體的業(yè)務代碼中執(zhí)行,然后通過dispatch執(zhí)行。