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

鍍金池/ 問答
懶洋洋 回答

是否是版本問題?https://www.npmjs.com/package...

上面說"inline-manifest-webpack-plugin": "^4.0.1",版本的要用webpack4,我看你的package.json中用的是webpack3.10.0

青瓷 回答

完美符合你要求的方式肯定是沒有的,因為 bind 函數(shù)不可能改變另一個函數(shù)內(nèi)部的局部變量。

折中的方式也有很多,比如定義一個包級屬性:

var drawPaint: Paint? = null

然后原來的函數(shù)改為:

inline fun Canvas.drawPoint(
    point: PointF,
    paint: Paint) {

    paint?.let {
        drawPoint(point.x, point.y, it)
    }
}

方便使用還可以再定義一個函數(shù)來確保 drawPaint 能被準確的賦值和釋放:

fun bindPaint(paint: Paint, action: () -> Unit) {
    drawPaint = paint
    action()
    drawPaint = null
}

這樣使用時就是:

// Canvas().apply {
bindPaint(somePaint) {
    drawPoint(x, y)
}

還有一種方式是定義一個包裝類,并在其中定義一個包含帶接收者 Lambda 表達式的參數(shù)的函數(shù)(接收者為 Canvas),然后將擴展函數(shù)定義到這個類中:

class PointPainter(private val paint: Paint) {
    fun Canvas.drawPoint(rect: RectF) {
        drawPoint(rect.x, rect.y, paint)
    }
}

然后定義含有接收者為這個包裝對象 Lambda 參數(shù)的函數(shù):

fun bindPointPainter(paint: Paint, drawAction: PointPainter.() -> Unit) {
    PointPainter(paint).drawAction()
}

這樣用時更方便一些:

// in canvas.apply block
bindPointPainter(somePaint) {
    drawPoint(rect1)
    drawPoint(rect2)
    // ...
}
安于心 回答

navigator.geolocation這個api獲取經(jīng)緯度,然后找一些經(jīng)緯度解析城市的接口用下就好,至于ip,這個沒弄過,不過后臺可以直接給你

凹凸曼 回答

1 CSS,JS為什么路徑?jīng)]有/weather?
首先瀏覽器會先加載html,當發(fā)現(xiàn)這個html中還引入了其他資源如css和js,會再去服務(wù)器請求css和js資源,而這個路徑是從服務(wù)端項目根目錄開始找的,你項目static文件放在根目錄下,自然就是/static開頭了。

2 為什么html文件沒有,難道是有緩存?
看你css和js都在控制臺打印出來了,理論上html肯定是加載過了,所以,猜測你是不是控制臺上面的信息被覆蓋了,你沒有看到。另外,你也可以console.log(req.url)看下請求資源的路徑

遲月 回答

你是把項目源代碼弄到服務(wù)器上,再npm install的吧?

把node_modules中需要修改的的插件代碼拉出來,建一個代碼倉庫,自己維護,想怎么改就怎么改。然后在原項目的package.json中,把引用代碼的地方改了。

之前的package.json里面是下面這樣的

...
"dependencies": {
    ...
    "某插件": "^2.2.1",
    ...
  },
...

你把插件的代碼拉出來,自己建一個倉庫,然后把package.json里面的引用改成下面這樣,

...
"dependencies": {
    ...
    "某插件": "git+ssh://xxxxxxxxxx.git", // 這里是你代碼的git地址
    ...
  },
...

當你修改了插件的代碼時,直接重新在項目里npm install就行

骨殘心 回答

圖片描述
更古怪的是我在_getitemsHeight這個方法里面 console.log(this.$refs); console.log(this.$refs.foodList); 這兩個 出現(xiàn)了有意思的東西

傲嬌范 回答

不想讓它生效就removeEventlistener啊,想生效的時候再綁

命多硬 回答

這是你用的這個插件的問題,它把dom提到了body下,超出了vue的范圍,路由切換的時候vue已經(jīng)控不到它了。
你找下fullpage這個插件有沒有關(guān)閉這個dom的方法,沒有就自己寫一個,在路由切換時手動關(guān)閉

瘋子范 回答
old_str = '/opt/www/html'
new_str = old_str.replace('/', '\/')
print(new_str)
涼薄 回答

wxs是專門用于wxml頁面的,如果你有在頁面中使用js腳本的需求可以使用,但是wxs是不能被其他js文件引用的。
目前我很少wxs,大多數(shù)工作都是在js中完成的。

這里是我記錄的關(guān)于wxs的文章:
微信小程序:使用wxs檢測郵箱格式實例
微信小程序:新功能WXS(2017.08.30新增)

菊外人 回答

$表示字符串的結(jié)尾,是特殊字符,使用RegExp的時候,需要使用兩個\\轉(zhuǎn)義:

const template = "the age of ${name} is ${age}";
const data = { name: "xiaoming", age: 8};
console.log(render(template, data));
// 輸出: "the age of xiaoming is 8"

function render(template,data) {
  for (key in data) {
    if(key) {
      console.log(key);
      var re = new RegExp("\\${"+key+"}");
      // var re = "${" + key + "}"; // 這塊直接使用字符串就行,不用正則也可以
      console.log(re,data[key]);
      template = template.replace(re,data[key]);
      // console.log("test:",template.replace("${name}","xiaoming"));
      console.log(template); 
    }
  }
}
網(wǎng)妓 回答

答案來了。

const axios = require('axios')
// 下面代碼發(fā)送一個post請求到一個服務(wù)器
axios.post('驗證驗證碼的目標url', {
    telephone: "17202345234" // 帶上手機號參數(shù)
  })
  .then(function (response) { // 后端處理成功,給你返回一個驗證碼數(shù)據(jù),數(shù)據(jù)通過response讀取
    console.log(response.testnumber);
    return axios.post('獲取驗證碼成功再發(fā)送一次請求的地址',{
        password: "我是密碼",
        telephone: "17202345234",
        noteinfo: "我是備注"
    })
  })
  .then(function(res){
    //完成注冊了
    console.log("注冊完成");
   })
  .catch(function (error) { // 如果請求失敗就走這里了
    console.log(error);
  });
柒槿年 回答

試了一下,http header 里面說明了這個資源就是作為附件下載的,如果要直接播放的話,試試把 content-disposition: attachment;filename=1525316555231075143.mp4 從 http header 里去掉。

六扇門 回答

http://www.cnblogs.com/mdengc... google了一下 實現(xiàn)這v-selectable 不知道符合要求不

export default (Vue, options = {}) =>{
    const listener = (ele, binding) =>{
        let reactArea = {
            startX: 0,
            startY: 0,
            endX: 0,
            endY: 0
        }
        //是否一直按下鼠標
        let isMouseDown = false
        let areaSelect = {}
        //將元素定位改為relative
        ele.style.position = 'relative'
        ele.addEventListener('mousedown', function(e) {
            reactArea.startX = e.layerX;
            reactArea.startY = e.layerY;
            isMouseDown = true
        })

        ele.addEventListener('mousemove', function(e) {
             if(isMouseDown){
                 let preArea = ele.getElementsByClassName('v-selected-area')
                if(preArea.length){
                    ele.removeChild(preArea[0])
                }
                reactArea.endX = e.layerX
                reactArea.endY = e.layerY
                let leftValue = 0
                let topValue = 0
                let widthValue = Math.abs(reactArea.startX - reactArea.endX)
                let heightValue =  Math.abs(reactArea.startY - reactArea.endY)

                if(reactArea.startX >= reactArea.endX){
                    leftValue = reactArea.endX
                }else{
                    leftValue = reactArea.startX
                }
                if(reactArea.startY > reactArea.endY ){
                    topValue = reactArea.endY
                }else{
                    topValue = reactArea.startY
                }

                //判斷同時有寬高才開始畫虛線框
                if(reactArea.startX != reactArea.endX && reactArea.startY !=reactArea.endY){
                    areaSelect = document.createElement('div')
                    areaSelect.classList.add("v-selected-area")
                    areaSelect.style.position = "absolute";
                    areaSelect.style.left = leftValue + 'px'
                    areaSelect.style.top = topValue + 'px'
                    areaSelect.style.width = widthValue + 'px'
                    areaSelect.style.height = heightValue + 'px'
                    areaSelect.style.border = "1px dashed grey"
                    ele.append(areaSelect)
                }

                let children = ele.getElementsByTagName('li')
                for(let i =0 ; i < children.length ; i ++ ){
                    let childrenHeight = children[i].getBoundingClientRect().height
                    let childrenWidth = children[i].getBoundingClientRect().width
                    //每個li元素的位置
                    let offsetLeft = children[i].offsetLeft
                    let offsetTop = children[i].offsetTop
                    //每個li元素的寬高
                    let endPositionH = childrenHeight + offsetTop
                    let endPositionW = childrenWidth + offsetLeft
                    //五個條件滿足一個就可以判斷被選擇
                    //一是右下角在選擇區(qū)域內(nèi)
                    let require1 = endPositionH > topValue && endPositionW > leftValue && endPositionH < topValue + heightValue && endPositionW < leftValue + widthValue
                    //二是左上角在選擇區(qū)域內(nèi)
                    let require2 = offsetTop > topValue && offsetLeft > leftValue && offsetTop < topValue + heightValue && offsetLeft < leftValue + widthValue
                    //三是右上角在選擇區(qū)域內(nèi)
                    let require3 = offsetTop > topValue && offsetLeft + childrenWidth > leftValue && offsetTop < topValue + heightValue && offsetLeft + childrenWidth< leftValue + widthValue
                    //四是左下角在選擇區(qū)域內(nèi)
                    let require4 = offsetTop + childrenHeight > topValue && offsetLeft > leftValue && offsetTop + childrenHeight < topValue + heightValue && offsetLeft < leftValue + widthValue
                    //五選擇區(qū)域在元素體內(nèi)
                    let require5 = offsetTop < topValue && offsetLeft < leftValue && offsetTop + childrenHeight > topValue + heightValue && offsetLeft + childrenWidth > leftValue + widthValue

                    if(require1 || require2 || require3 || require4 || require5){
                        children[i].classList.add('active')
                    }else{
                        children[i].classList.remove('active')
                    }
                }
             }
        })

        ele.addEventListener('mouseup', function(e) {
            isMouseDown = false
            if(areaSelect && areaSelect.childNodes && ele.contains(areaSelect)){
                ele.removeChild(areaSelect)
            }
            areaSelect = null
        })
    }

     Vue.directive('selectable',{
        inserted:listener,
        updated:listener
    })
}
萌小萌 回答

已解決

<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Demo extends CI_Controller {

    public function index() {
       $con=mysqli_connect("localhost","root","***","test"); 
       //輸出中文可以加一句 mysqli_query($con,"SET NAMES utf8");
       $query = mysqli_query($con,"select * from user");
       $array =  array();
       while($row = mysqli_fetch_assoc($query)){
        $array[] =  $row; 
      }
      echo json_encode($array);

    }
} 
初心 回答

把這部分功能提成一個組件,然后使用watch監(jiān)聽路由變化,再根據(jù)你想用的每個路由對應(yīng)的樣式設(shè)置組件樣式

巴扎嘿 回答

不要設(shè)置高度。。。。

陌上花 回答

不輸入的話不就是null了嗎?