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

鍍金池/ 問答
掛念你 回答

因為modules依賴是嵌套的。A依賴B,B依賴C,C又依賴D。然后就是node_modules/B/node_modules/C/node_modules/D。如果換下一個依賴,E依賴F,F(xiàn)依賴C,C又依賴D,然后是node_modules/E/node_modules/C/node_modules/D。個人拷貝代碼時發(fā)現(xiàn)的問題,復(fù)制整個項目到u盤時發(fā)現(xiàn),項目有幾個G 我只寫了幾個界面而已。

巴扎嘿 回答

應(yīng)該是先查詢這個人是否已經(jīng)點贊,如果沒有,設(shè)置點贊+1,如果已經(jīng)點贊了,設(shè)置-1,當(dāng)然要根據(jù)后臺相應(yīng)的配合

風(fēng)畔 回答

required 并不是對象屬性,只是一個dom屬性,也就是 只能通過 getAttribute() 拿到

你可能想要的是這幾個API

input.validity
input.validity.valid
input.validity.badInput

input.validationMessage
input.setCustomValidity
input.formNoValidate
input.willValidate

input.addEventListener('invalid' , function () {
    input.setCustomValidity('呵呵噠')
  console.log(input.validationMessage)
})
挽歌 回答

拖拽的控制點放在表頭上。不要放在table body。

推薦一個插件:https://www.ag-grid.com/examp...

半心人 回答

上傳圖片會旋轉(zhuǎn)是內(nèi)置了EXIF信息的緣故。可以參考這個庫的實現(xiàn),壓縮一下就行了。


附帶貼一下你題目中圖片的EXIF信息(簡略):

clipboard.png

冷溫柔 回答

在判斷的時候,做隱式轉(zhuǎn)換會調(diào)用toString方法,如果 在對象中重寫了就不會去原型鏈上找,替換成toLocaleString它會找到原型上的toString方法

亮瞎她 回答

我的沒有復(fù)現(xiàn) 正常是一秒執(zhí)行3次的 你試著更換一下基礎(chǔ)庫版本

澐染 回答

弄一個數(shù)據(jù)庫連接池. 數(shù)據(jù)庫鏈接基本沒問題.
還要看數(shù)據(jù)庫數(shù)據(jù).如果過多不宜頻繁操作.
或者把更新完的數(shù)據(jù)和狀態(tài)為1的數(shù)據(jù)分開.避免數(shù)據(jù)過多.

尐懶貓 回答
  1. 在其他模塊導(dǎo)入
  2. 或者全局導(dǎo)入
怣痛 回答

你的console.log得寫到回調(diào)函數(shù)里面,不然會出現(xiàn)boundingClientRect還未觸發(fā)回調(diào)、并setData的操作,而先執(zhí)行了console。

尋仙 回答

你好,你可以把需要跨項目共享的 razor 布局頁及其相關(guān)的 css、js、圖片打包成一個 nuget package,然后在你需要項目中安裝這個 nuget 包,在網(wǎng)上可以找到相關(guān)的教程: https://stackoverflow.com/que...

尐飯團 回答

IOS處理

// 處理撥打電話以及Url跳轉(zhuǎn)等等  
- (void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler {  
    NSURL *URL = navigationAction.request.URL;  
    NSString *scheme = [URL scheme];  
    if ([scheme isEqualToString:@"tel"]) {  
        NSString *resourceSpecifier = [URL resourceSpecifier];  
        NSString *callPhone = [NSString stringWithFormat:@"telprompt://%@", resourceSpecifier];  
        /// 防止iOS 10及其之后,撥打電話系統(tǒng)彈出框延遲出現(xiàn)  
        dispatch_async(dispatch_get_global_queue(0, 0), ^{  
            [[UIApplication sharedApplication] openURL:[NSURL URLWithString:callPhone]];  
        });  
    }  
    decisionHandler(WKNavigationActionPolicyAllow);  
}

尐懶貓 回答

根據(jù)這個參數(shù)來區(qū)分是哪個功能,然后在后臺用一個大switch來區(qū)分不同的業(yè)務(wù)邏輯代碼?
根據(jù)功能的字面描述“資產(chǎn)查詢,我的資產(chǎn)”,是查詢,“資產(chǎn)領(lǐng)用,資產(chǎn)歸還”看起來像是需要post,如果是這樣的話還寫在一個方法里,就有點太過分了吧?

巫婆 回答

。。sorry,I not see detail , let me think for a moment, the /sbin/iptables is sure reachable? and then see the iptables command is executeable.

圖片描述

不歸路 回答
version: '2'
volumes:
  data:
    external: true

services:
  test:
    image: alpine
    container_name: c_test
    command: /bin/sh
    tty: true
    volumes:
      - "${MY_DOCKER_DATA_PATH}":/tmp

這樣就會存放在當(dāng)前 ./data這個目錄下

初念 回答
但我把mounted改成created的時候會報Cannot read property 'appendChild' of null"

這是因為created的時候,Dom節(jié)點還沒有渲染出來到頁面上,這個時候是找不到id=wave的DIV的。


改成Vue的插件

import wavePng from './wave.png'
export default {
    install(Vue){
        Vue.directive('wave', {
            inserted: function(el){
                start(el)
            }
        })
    }
}
    var ctx;
    var waveImage;
    var canvasWidth;
    var canvasHeight;
    var needAnimate = false;

    function init (callback, wave) {
        // var wave = document.getElementById('wave');
        var canvas = document.createElement('canvas');
        if (!canvas.getContext) return;
        ctx = canvas.getContext('2d');
        canvasWidth = wave.offsetWidth;
        canvasHeight = wave.offsetHeight;
        canvas.setAttribute('width', canvasWidth);
        canvas.setAttribute('height', canvasHeight);
        wave.appendChild(canvas);
        waveImage = new Image();
        waveImage.onload = function () {
            console.log('000')
            waveImage.onload = null;
            callback(wave);
        }
        waveImage.src = wavePng;
    }

    function animate () {
        var waveX = 0;
        var waveY = 0;
        var waveX_min = -203;
        var waveY_max = canvasHeight * 0.7;
        var requestAnimationFrame = 
            window.requestAnimationFrame || 
            window.mozRequestAnimationFrame || 
            window.webkitRequestAnimationFrame || 
            window.msRequestAnimationFrame ||
            function (callback) { window.setTimeout(callback, 1000 / 60); };
        function loop () {
            ctx.clearRect(0, 0, canvasWidth, canvasHeight);
            if (!needAnimate) return;
            if (waveY < waveY_max) waveY += 1.5;
            if (waveX < waveX_min) waveX = 0; else waveX -= 3;
            
            ctx.globalCompositeOperation = 'source-over';
            ctx.beginPath();
            ctx.arc(canvasWidth/2, canvasHeight/2, canvasHeight/2, 0, Math.PI*2, true);
            ctx.closePath();
            ctx.fill();

            ctx.globalCompositeOperation = 'source-in';
            ctx.drawImage(waveImage, waveX, canvasHeight - waveY);
            
            requestAnimationFrame(loop);
        }
        loop();
    }

    function start (el) {
        console.log(1)
        if (!ctx) return init(start, el);
        needAnimate = true;
        setTimeout(function () {
            if (needAnimate) animate();
        }, 500);
    }
    function stop () {
        needAnimate = false;
    }

上述的代碼,把原先插件的閉包去掉了,因為這個改成vue的插件webpack打包完本身就是一個閉包了。
然后使用的話,就用指令的形式

<template>
  <div id="wave" class="wave" v-wave><span>60%</span></div>
</template>

<script>
import wave from './a'
export default {

}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
.wave{width:200px;height:200px;overflow:hidden;border-radius:50%;background:rgba(255,203,103,.6);margin:100px auto;position:relative;text-align:center;display:table-cell;vertical-align:middle;}
.wave span{display:inline-block;color:#fff;font-size:20px;position:relative;z-index:2;}
.wave canvas{position:absolute;left:0;top:0;z-index:1;}
</style>

main.js

import Vue from 'vue'
import App from './App'
import router from './router'
import wave from './components/a'

Vue.config.productionTip = false
Vue.use(wave)
/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})

這樣就可以了。

瞄小懶 回答

clipboard.png

pycharm 寫python不錯,錯誤提示也很友好

怣人 回答

這是一個 bug ,目前還沒有解決。

分開來處理也是一種解決方式,或者通過繼承:

interface MyEventTarget extends EventTarget {
    addEventListener(
        type: string,
        listener: EventListener | EventListenerOrEventListenerObject,
        options?: boolean | AddEventListenerOptions
    ): void
}

function test(foo: MyEventTarget) {
    return foo.addEventListener('click', console.log);
}