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

鍍金池/ 問(wèn)答/ HTML5問(wèn)答

你的問(wèn)題有兩種理解(1)是不知道下載完了沒(méi)沒(méi)法提示,(2)是下載完了不知道怎么提示
先說(shuō)第一種理解吧1.你要是用的Electron系統(tǒng)瀏覽器自己的下載方法的話會(huì)自動(dòng)觸發(fā)'will-download'消息
mainWindow.webContents.session.on('will-download',(event,item,webContents)=>{
item.once('done', (event, state) => {

if (state === 'completed') 
{
  console.log('Download successfully');
} 
else 
{
  console.log(`Download failed: ${state}`);
}

})
});
這樣你就知道是否下載完了,如果下載函數(shù)是你自己寫的話下載完成沒(méi)你自己肯定知道這里就不說(shuō)了。
第二種理解,在Electron主線程中你可以用console.log();控制臺(tái)輸出提示,也可以用dialog彈窗提示
const {dialog}=require('electron');
dialog.showMessageBox(
null,
{

  type: 'info',
  message: message.updateNotAva

});
還可以主線程給渲染線程通信
在主線程中
mainWindow.webContents.send('alertMessage',message);
在渲染線程中用alert或其它的彈窗提示
const {ipcRenderer} = require('electron');

ipcRenderer.on('alertMessage', (event, text) => {

    alert(text);

});

做不到 回答

微信應(yīng)該沒(méi)有單獨(dú)的關(guān)閉監(jiān)聽

左上角貌似是返回和關(guān)閉與一體的。onbeforeunload事件和onunload事件,看一下兼容性和具體生命周期會(huì)很有幫助

微信jssdk中的closeWindow可以主動(dòng)關(guān)閉頁(yè)面

硬扛 回答

你肯定是代碼有問(wèn)題,按下標(biāo)刪除不會(huì)錯(cuò)的。

arr.splice(index, 1)

我覺得有可能是你獲取下標(biāo)的代碼有問(wèn)題,把代碼貼出來(lái)看看吧

懶豬 回答

beforeRouteEnter 有3個(gè)參數(shù) 有 from to next 你跳到C的時(shí)候傳個(gè)參數(shù)區(qū)分AB 能取得到的

蟲児飛 回答

flex布局解決方案:

在外部盒子display屬性設(shè)置為flex,然后在需要空開的兩個(gè)元素中間加入一個(gè)空白元素,并設(shè)置css屬性flex: 1 1 auto自動(dòng)填充空白。flex的優(yōu)點(diǎn)就是盒子內(nèi)的元素不會(huì)浮動(dòng),切間隔是動(dòng)態(tài)的,可適應(yīng)各種寬度。

$color_1: #666;
$color_2: #344663;

.dataList {
    >ul {
        display: flex;
        width: 100%;
        >li.spacer {
            flex: 1 1 auto;
        }
    }
    box-sizing: border-box;
    box-shadow: 0 2px 4px 0 #e7e7e7;
    border-radius: 2px;
    height: 78px;
    padding: 0 15px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    li {
        list-style-type: none;
        font-size: 12px;
        &:nth-of-type(1) {
            color: $color_1;
            font-size: 12px;
        }
        &:nth-of-type(2) {
            font-size: 16px;
            color: $color_2;
        }
    }
    .fontBase {
        font-size: 16px !important;
    }
}
<div class="dataList" style="background: #E9E9E9" v-for="(data, index) in unavailableData" :key="data.voucherId">
    <ul>
        <li class="left-align">
            <div class="userInfo">
                <span>打車券-</span>
                <span>{{data.voucherReturnCode ? '個(gè)人' : '公共'}}</span>
            </div>
            <div class="dataTime">
                {{data.voucherReturnCode ? '余額' : '有效期至'}}
            </div>
        </li>
        <li class="spacer"></li>
        <li :class="{'fontBase' : data.voucherReturnCode}" class="right-align">
            <div class="numOrResc">
                {{data.voucherReturnCode ? data.voucherReturnCode : data.voucherResc}}
            </div>
            <div class="voucherBalance" v-if="data.voucherReturnCode">
                {{data.voucherBalance}}元
            </div>
        </li>
    </ul>
</div>
若相惜 回答

應(yīng)該用 flex布局 不用設(shè)置行高 直接測(cè)量高度 讓文字居中顯示即可

互擼娃 回答

感覺沒(méi)有安裝。

凹凸曼 回答

<navigator/>沒(méi)加url

脾氣硬 回答

已修正 數(shù)字也轉(zhuǎn)正了
附上https://codepen.io/wanroulin/... 供參考

主要修改的片段為內(nèi)圈旋轉(zhuǎn)角度 及 數(shù)字校正角度

  // scale
        ctx.setTransform(1, 0, 0, 1, Math.floor(W / 2), Math.floor(W / 2));
        ctx.beginPath();
        ctx.lineWidth = 2;
        ctx.strokeStyle = 'rgba(255, 255, 255, .3)';
        // there should be 10 lines
        var stepAngle = (Math.PI * 2) / 10;
        // begin angle
        ctx.rotate(0.7 * Math.PI);
        // draw only 9 of the 10 lines
        for (var i = 0; i < 9; i++) {
            ctx.moveTo(Math.floor(W / 3) - 50, 0);
            ctx.lineTo(Math.floor(W / 3) - 55, 0);
            ctx.rotate(stepAngle);
        }
        ctx.stroke();
        ctx.setTransform(1, 0, 0, 1, 0, 0);

        // scale txt
        ctx.fillStyle = 'rgba(255, 255, 255, .4)';
        ctx.font = "1.5vh play";
        ctx.textAlign = 'center';
        ctx.textBaseline = 'middle';

        var stepAngle = (Math.PI * 2) / 10;
        var currentAngle = 0.20 * Math.PI;

        for (i = 0; i < 9; i++) {
            // move to center, unrotated
            ctx.setTransform(1, 0, 0, 1, Math.floor(W / 2), Math.floor(W / 2));
            // set current rotation
            ctx.rotate(currentAngle)
            // move the context to our text's position
            ctx.translate(0, Math.floor(W / 3) - 65);
            // inverse rotate so we face North
            ctx.rotate(-currentAngle);
            // fill at 0,0
            ctx.fillText(0 + 1 * i, 0, 0);
            // increment currentAngle for next iteration
            currentAngle += stepAngle;
        }
        ctx.setTransform(1, 0, 0, 1, 0, 0);

        ctx.restore();
挽歌 回答

axios 使用 post 請(qǐng)求需要自己添加配置

使用qs這個(gè)類庫(kù)

import qs from 'qs';
axios.interceptors.request.use( (config) => {
    if (config.method=="post"){
        config.data = qs.stringify(config.data);
        config.headers['Content-Type'] = 'application/x-www-form-urlencoded';
    }
    return config;
},  (error) => {
    return Promise.reject(error);
});
臭榴蓮 回答

我試了一下,沒(méi)出現(xiàn)你說(shuō)的這個(gè)情況。。。

大濕胸 回答

官方文檔有vue.js對(duì)typescript的支持: Typescript Support

撿肥皂 回答
.first-step:after {
            width: 0;
            height: 0;
            content: '';
            border-left: 14px solid #e5e5e5;
            /*border-right: 14px solid transparent;*/
            border-top: 12.5px solid transparent;
            border-bottom: 12.5px solid transparent;
            position: absolute;
            right: -14px;
            top: -1px;
            z-index: -2;
        }
        .first-step:before {
            width: 0;
            height: 0;
            content: '';
            border-left: 14px solid white;
            border-top: 12.5px solid transparent;
            border-bottom: 12.5px solid transparent;
            position: absolute;
            right: -12.7px;
            top: -1px;
            z-index: -1;
        }
        調(diào)了一下zindex 然后不完美的地方就是邊有點(diǎn)窄
青檸 回答

好像無(wú)解吧。只能用域名,而且備案的域名會(huì)好很多的。。。

打個(gè)醬油,路過(guò)...

帥到炸 回答

發(fā)布訂閱,簡(jiǎn)單說(shuō)就是觀察者模式。
"訂閱"必然意味著又發(fā)布這個(gè)動(dòng)作。以http為例:

this.http.post(url, body, ops).subscribe(data => {
     里面是訂閱post請(qǐng)求后觸發(fā)的內(nèi)容
     ...
    });

這是你訂閱的一個(gè)post的請(qǐng)求,當(dāng)你觸發(fā)(發(fā)布)了一個(gè)http請(qǐng)求之后,就會(huì)執(zhí)行你提前訂閱好想執(zhí)行的東西,有點(diǎn)像成功之后的回調(diào), 包括但不限于http。

焚音 回答

img本身沒(méi)有焦點(diǎn),要想獲得焦點(diǎn)請(qǐng)?jiān)趇mg標(biāo)簽里加上tabindex屬性,讓其能夠接受輸入焦點(diǎn),但是還是推薦用點(diǎn)擊事件來(lái)添加active

.active{
                border:1px solid red;
            }
    <div class="box">
            <ul >
                <li><img src="img/451e0f1.png"/></li>
                <li><img src="img/4caa0aa.png"></li>
                <li><img src="img/123.jpg"></li>
                <li><img src="img/2e0f7f7.png"/></li>
            </ul>
        </div>

    var imgs = document.querySelectorAll(".box img");
            imgs.forEach(function(el){
                el.onclick=function(){
                    imgs.forEach(function(el2){
                        if(el.isEqualNode(el2)){
                            if(this.classList.contains('active')){
                                this.classList.remove('active');
                        }else{
                            this.classList.add('active');
                        }
                        }else{
                            el2.classList.remove('active');
                        }
                    }.bind(this));                
                }
            });

用focus的話

    <div class="box">
            <ul class="ul1">
                <li><img src="img/451e0f1.png" tabIndex="1"/></li>
                <li><img src="img/4caa0aa.png" tabIndex="1"></li>
                <li><img src="img/123.jpg" tabIndex="1"></li>
                <li><img src="img/2e0f7f7.png" tabIndex="1"/></li>
            </ul>
        </div>

    var imgs = document.querySelectorAll(".box img");
            imgs.forEach(function(el){
                el.onfocus=function(){
                    imgs.forEach(function(el2){
                        if(el.isEqualNode(el2)){
                            if(this.classList.contains('active')){
                                this.classList.remove('active');
                        }else{
                            this.classList.add('active');
                        }
                        }else{
                            el2.classList.remove('active');
                        }
                    }.bind(this));                
                }
            });
旖襯 回答

Vue.component(name, comp) 方式注冊(cè)組件也會(huì)出現(xiàn)這個(gè)錯(cuò)誤。

我的情況略微復(fù)雜,我使用以上方式注冊(cè)了全局組件,在頁(yè)面中是通過(guò) v-else-if 使用的,在滿足條件的時(shí)候才使用該組件,這種情況下就出現(xiàn)了該錯(cuò)誤信息。

我在頁(yè)面再次注冊(cè)該組件解決的這個(gè)問(wèn)題。

夕顏 回答

不知道你有沒(méi)有解決這個(gè)問(wèn)題,在項(xiàng)目中也遇到過(guò)幾次。
大體上有兩個(gè)原因吧,

  1. 電腦內(nèi)存不夠, 可以試著在package.json中修改一下命令增加一下運(yùn)行的space

類似于這樣:

"start": "node --max-old-space-size=6144 ./node_modules/@angular/cli/bin/ng serve --progress --aot",
  1. Command Line Interface命令行客戶端的問(wèn)題,

可以考慮切換使用vs code內(nèi)置的terminal來(lái)啟動(dòng),應(yīng)該就可以啟動(dòng)起來(lái)了。