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

鍍金池/ 問(wèn)答/ HTML問(wèn)答
笑浮塵 回答

因?yàn)槟鉻ype屬性的值是動(dòng)態(tài)的,所以用v-bind:type 簡(jiǎn)寫為:type

咕嚕嚕 回答

你腳本是不是放在head里面的

小曖昧 回答

不知道你的任務(wù)是什么類型的計(jì)算,樓上已經(jīng)回復(fù)es6的用法,那給你提供另外一種es5的方法吧,你可以試試用setTimeout代替setInterval,比如:

function do() {
  setTimeout(function () {
    /*做點(diǎn)什么*/
    do();
  },0)
}
do();

這樣的好處是讓do每次執(zhí)行都變成一個(gè)異步任務(wù),插入到任務(wù)隊(duì)列中,沒(méi)那么容易阻塞進(jìn)程。

耍太極 回答

keyup事件,keyup時(shí)判斷是否符合正則,不符合replace掉

心夠野 回答

到網(wǎng)上找了個(gè)解決高德偏移量的代碼 https://blog.csdn.net/woshimu...
我的是ip定位 轉(zhuǎn)換過(guò)的定位就準(zhǔn)確了

this.map.plugin('AMap.Geolocation', function () {
            geolocation = new AMap.Geolocation({
                enableHighAccuracy: true, //是否使用高精度定位,默認(rèn):true
                timeout: 10000, //超過(guò)10秒后停止定位,默認(rèn):無(wú)窮大
                maximumAge: 0, //定位結(jié)果緩存0毫秒,默認(rèn):0
                showButton: true, //顯示定位按鈕,默認(rèn):true
                buttonPosition: 'LB', //定位按鈕停靠位置,默認(rèn):'LB',左下角
                buttonOffset: new AMap.Pixel(10, 20), //定位按鈕與設(shè)置的??课恢玫钠屏?,默認(rèn):Pixel(10, 20)
                showMarker: true, //定位成功后在定位到的位置顯示點(diǎn)標(biāo)記,默認(rèn):true
                panToLocation: true, //定位成功后將定位到的位置作為地圖中心點(diǎn),默認(rèn):true
                zoomToAccuracy: true, //定位成功后調(diào)整地圖視野范圍使定位位置及精度范圍視野內(nèi)可見,默認(rèn):false
            });
            _this.map.addControl(geolocation);
            geolocation.getCurrentPosition();
            AMap.event.addListener(geolocation, 'complete', function (data) {
                var gpsPoint = GPS.gcj_encrypt(data.position.getLat(), data.position.getLng());
                _this.centerPointer = gpsPoint;
                _this.circleArea(gpsPoint);
                _this.getAddress(gpsPoint);
            });
            AMap.event.addListener(geolocation, 'error', function () {
                alert('定位失敗');
            });
        });
var GPS = {
            PI: 3.14159265358979324,
            x_pi: 3.14159265358979324 * 3000.0 / 180.0,
            delta: function (lat, lon) {
                var a = 6378245.0; //  a: 衛(wèi)星橢球坐標(biāo)投影到平面地圖坐標(biāo)系的投影因子。
                var ee = 0.00669342162296594323; //  ee: 橢球的偏心率。
                var dLat = this.transformLat(lon - 105.0, lat - 35.0);
                var dLon = this.transformLon(lon - 105.0, lat - 35.0);
                var radLat = lat / 180.0 * this.PI;
                var magic = Math.sin(radLat);
                magic = 1 - ee * magic * magic;
                var sqrtMagic = Math.sqrt(magic);
                dLat = (dLat * 180.0) / ((a * (1 - ee)) / (magic * sqrtMagic) * this.PI);
                dLon = (dLon * 180.0) / (a / sqrtMagic * Math.cos(radLat) * this.PI);
                return {
                    'lat': dLat,
                    'lon': dLon
                };
            },
            //WGS-84 to GCJ-02
            gcj_encrypt: function (wgsLat, wgsLon) {
                if (this.outOfChina(wgsLat, wgsLon))
                    return {
                        'lat': wgsLat,
                        'lon': wgsLon
                    };

                var d = this.delta(wgsLat, wgsLon);
                return {
                    'lat': wgsLat + d.lat,
                    'lon': wgsLon + d.lon
                };
            },
            outOfChina: function (lat, lon) {
                if (lon < 72.004 || lon > 137.8347)
                    return true;
                if (lat < 0.8293 || lat > 55.8271)
                    return true;
                return false;
            },
            transformLat: function (x, y) {
                var ret = -100.0 + 2.0 * x + 3.0 * y + 0.2 * y * y + 0.1 * x * y + 0.2 * Math.sqrt(Math.abs(x));
                ret += (20.0 * Math.sin(6.0 * x * this.PI) + 20.0 * Math.sin(2.0 * x * this.PI)) * 2.0 / 3.0;
                ret += (20.0 * Math.sin(y * this.PI) + 40.0 * Math.sin(y / 3.0 * this.PI)) * 2.0 / 3.0;
                ret += (160.0 * Math.sin(y / 12.0 * this.PI) + 320 * Math.sin(y * this.PI / 30.0)) * 2.0 / 3.0;
                return ret;
            },
            transformLon: function (x, y) {
                var ret = 300.0 + x + 2.0 * y + 0.1 * x * x + 0.1 * x * y + 0.1 * Math.sqrt(Math.abs(x));
                ret += (20.0 * Math.sin(6.0 * x * this.PI) + 20.0 * Math.sin(2.0 * x * this.PI)) * 2.0 / 3.0;
                ret += (20.0 * Math.sin(x * this.PI) + 40.0 * Math.sin(x / 3.0 * this.PI)) * 2.0 / 3.0;
                ret += (150.0 * Math.sin(x / 12.0 * this.PI) + 300.0 * Math.sin(x / 30.0 * this.PI)) * 2.0 / 3.0;
                return ret;
            }
        };
撥弦 回答

會(huì)的,因?yàn)楦淖兞隧?yè)面的結(jié)構(gòu)

拮據(jù) 回答

這種引用方式需要將CSSModule打開。

離魂曲 回答

module.exports = {
'GET /user_new': fn_usrs_new,
'OPTIONS /user_new': fn_usrs_option,
'GET /users': fn_usrs,
'POST /users': add_usrs,
'DELETE /users/:id': del_usrs,
};
這個(gè)是路由的地址,接口的地址,我本地的服務(wù),

解決的方法就是在集中處理錯(cuò)誤的地方統(tǒng)一設(shè)置
ctx.set("Access-Control-Allow-Origin", "*");
ctx.set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE");
ctx.set("Access-Control-Max-Age", "3600");
ctx.set("Access-Control-Allow-Headers", "x-requested-with,Authorization,Content-Type,Accept");
ctx.set("Access-Control-Allow-Credentials", "true");
這些東西,可以挑著用,看項(xiàng)目的需要。其次還有就是OPTIONS確實(shí)是router內(nèi)容自己處理,我們不需要處理,只需要告訴OPTIONS請(qǐng)求返回200就行,上面的函數(shù)也就變成了下面這個(gè)樣子

// 集中處理錯(cuò)誤
const handler = async (ctx, next) => {
  // log request URL:
  ctx.set("Access-Control-Allow-Origin", "*");
  ctx.set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE");
  ctx.set("Access-Control-Max-Age", "3600");
  ctx.set("Access-Control-Allow-Headers", "x-requested-with,Authorization,Content-Type,Accept");
  ctx.set("Access-Control-Allow-Credentials", "true");
  if (ctx.request.method == "OPTIONS") {
    ctx.response.status = 200
  }
  console.log(`Process ${ctx.request.method} ${ctx.request.url}`);
  try {
    await next();
    console.log('handler通過(guò)')
  } catch (err) {
    console.log('handler處理錯(cuò)誤')
    ctx.response.status = err.statusCode || err.status || 500;
    ctx.response.body = {
      message: err.message
    };
  }
};

可以.參數(shù)可以傳遞. 參數(shù)可以是任意類型.
那么你的這個(gè)width是字符串啊.傳遞參數(shù)時(shí)還不是css呢.親.

canvas元素是置換元素,需要設(shè)置其width和height屬性。<canvas id = "canvas" width="200" height="300"></canvas>必須設(shè)置其width 和height屬性,設(shè)置css的width 和height就會(huì)出現(xiàn)像素模糊。想知道具體原因,可以百度。

心癌 回答

一次for循環(huán)結(jié)束,常量b的生命周期就結(jié)束了,下一次for循環(huán)的時(shí)候,又new了一個(gè)新的常量b

北城荒 回答

<Route path="goods" component={Goods} />
<Route path="goods/:id" component={Goods} />
兩個(gè)路由對(duì)應(yīng)的component是一樣的啊,所以路由變了頁(yè)面內(nèi)容一樣

薔薇花 回答

ES7環(huán)境

b = a.reduce((origin, next) => origin.concat(next), []).reduce((origin, next) => {
    let index = origin.findIndex(item => item.some(element => element.id === next.id));
    index >= 0 ? origin[index].push(next) : origin.push([next]);
    return origin;
}, []);

Lodash

let b = _.flatten(a).reduce((origin, next) => {
    let index = _.findIndex(origin, item => item.some(element => element.id === next.id));
    index >= 0 ? origin[index].push(next) : origin.push([next]);
    return origin;
}, []);
孤客 回答

jinja可以不用學(xué)了,但是路由還是要學(xué)的,因?yàn)橐粋€(gè)后臺(tái)服務(wù)一般不會(huì)只提供一個(gè)API,并且REST API的一些參數(shù)也是放在URL里的,例如請(qǐng)求一個(gè)地區(qū)的天氣,API如https://www.example.com/api/weather/{city},后面的city隨便填比如https://www.example.com/api/weather/shanghai,在Flask里就要定義這樣的路由

@app.route('/api/weather/{city}')
def weather(city):
    pass

這樣的設(shè)置也比用'https://www.example.com/api/w...',通過(guò)參數(shù)請(qǐng)求,然后在程序里用request.arg.get('city')要方便,
所以路由還是要學(xué)一下的

夏木 回答

xlsx可以被unzip,如圖可見

clipboard.png

所以問(wèn)題就比較簡(jiǎn)單unzip your.xlsx (隨便找個(gè)zip的包 用內(nèi)置的zlib即可)
然后find all images in /xl/media (內(nèi)置fs模塊)

參考資料更容易找了 你谷歌一下nodejs get image from excel
第一條就是。所以,要善用搜索引擎

互擼娃 回答

Bootstrap 引用出錯(cuò)。

  1. 檢查資源是否全部加載:jQuery.min等
情已空 回答

先去了解下socket的原理再說(shuō),socket客戶端和服務(wù)端是怎么交互的