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

鍍金池/ 問答/ HTML問答
我甘愿 回答
  1. 普通回調(diào)函數(shù)
  2. 立即執(zhí)行函數(shù)

你的這個文件我用VSCode打開就有報錯了。 27行的watch : [./],應(yīng)該是watch : ["./"],

建議你給你的編輯器配置下語法檢查插件,比如ESlint。

墨染殤 回答

寫個假的,比如用p標(biāo)簽,再關(guān)聯(lián)keydown/keyup事件。

檸檬藍 回答

sequelize或mongoose

櫻花霓 回答

都是請求啊,只不過請求的對象(接口)不一樣,所以用不著每種資源都定義對應(yīng)的action.type。(官方文檔的高級下面的那一部分,可以了解鏈接描述

冷溫柔 回答

已經(jīng)解決;
寫了個遞歸函數(shù)

舊酒館 回答

看看你的package.json文件的內(nèi)容

青裙 回答

目前看到有:

  • 使用idea自帶的html預(yù)覽功能(這個功能和實際部署到服務(wù)器上的效果相同)。前端需要依賴后端做同源處理防止跨域。
  • 使用nodejs的express服務(wù)器。這塊就是完全的nodejs做法,前端實際上也是有后臺代碼,頁面調(diào)用前端服務(wù),然后前端服務(wù)調(diào)用后端服務(wù)。
念舊 回答

把圖片路徑設(shè)置為從根目錄開始
你試一下:

test: /\.(png|gif|jpg|jpeg|bmp)$/i,
use: {
  loader: 'url-loader',
  options: {
    limit: '8192',
    outputPath: 'images/',
    publicPath : '/images'
  }
}

加上這個publicPath

礙你眼 回答

@CRIMX 方法很棒!但是我想修改一點,由于queue只是臨時存匹配結(jié)果的,還要出隊列進行新一輪的匹配所以只要再用一個緩存隊列存儲過往匹配的成功數(shù)據(jù)即可,沒有必要最后在進行遍歷的必要。代碼如下:

var arr =[

    [0,0,0,0,0,0,0,0,0,0,0], 
    [0,0,0,0,0,0,0,0,0,0,0], 
    [0,0,0,0,0,0,0,0,0,0,0], 
    [0,0,0,0,1,0,0,0,1,0,0], 
    [0,0,0,0,1,0,0,0,1,0,0],
    [0,0,0,0,1,0,0,0,1,0,0],
    [0,0,0,0,1,0,0,0,0,0,0],
    [0,0,0,0,1,0,0,0,0,0,0],
    [0,0,0,0,1,1,1,0,0,0,0],
    [0,0,0,0,0,0,0,0,0,0,0],
    [0,0,0,0,0,0,0,0,0,0,0],
] 

function fn ([x, y]) {
    if (arr[x][y] !== 1) return false
    
    const queue = [[x, y]]
    const result = [[x,y]]
    const memo = arr.map(row => new Array(row.length).fill(false))
    const direction = [
     [-1, 0],
     [1, 0],
     [0, -1],
     [0, 1],
    ]
    
    while(queue.length > 0) {
        const [x, y] = queue.pop()
        direction.forEach(([h, v]) => {
            const newX = x + h
            const newY = y + v
            if (arr[newX][newY] === 1 && !memo[newX][newY]) {
                memo[newX][newY] = true
                queue.push([newX, newY])
                result.push([newX, newY])
            }
        })
    }
    
    return result
} 

@clm1100 如果對英文不排斥的話,推薦一個老外整理的很不錯的JavaScript算法方面的GitHub項目

風(fēng)畔 回答

grid.top
grid.bottom
title.top
title.bottom
都支持百分比,可以解決你的需求
文檔里都有……

孤毒 回答

你想多了,這種換名字的事,根本不需要“可逆”。

我以為 回答

思路:
1、分別把多語言都倒入到過濾器里面;
2、在過濾器中可以通過封裝的模塊獲取當(dāng)前語言,然后根據(jù)多語言決定使用哪個語言信息模塊對象;

不過這么看來,vue.js 文件可以通過不刷新來切換多語言有點雞肋了,以為模塊化的話就必須有一部分單獨提取到.js文件里面,但是.js文件里米娜的內(nèi)容并不支持這種方式切換。

有人有更好的方法么?

瘋浪 回答

vue 提倡 狀態(tài)驅(qū)動界面,用data里面字段,控制界面的組件顯示或者隱藏就非常合理了。

不同字段對應(yīng)的不同的顯示邏輯,也就很合理了。

怣痛 回答

怎么解決呀,來人

對, 就是兩個廠家不同。 原理可能差不多,但是實現(xiàn)的方式和接口不一樣。。

大濕胸 回答

我的大概思路是,讓SimpleCalendar插件內(nèi)部的點擊事件去觸發(fā)回調(diào)函數(shù),把內(nèi)部的數(shù)據(jù)通過回調(diào)函數(shù)傳出去。

// .vue部分
export default {
    name:'content',
    data() {
        return {
            selectDate:'',
            date:''
        }
    },
    mounted:function(){
        this.$nextTick(()=>{
            new SimpleCalendar('#container', {}, this.callback.bind(this));
        })
    },
    methods:{
        callback:function(val){
            this.selectDate = val;
        }
    }
}

// SimpleCalendar部分
// 構(gòu)造函數(shù)添加cb
function SimpleCalendar(query, options, cb) {
    ...
    this.cb = cb;
}

// 插件內(nèi)部點擊事件回調(diào)cb傳遞數(shù)據(jù)
daysElement.forEach(function (v, i) {
    //鼠標(biāo)點擊
    v.onclick = function () {
        calendar.selectDay = v;
        ...
        this.cb(calendar.getSelectedDay()+1);
    }.bind(this)
}
陪我終 回答

Quite simple:

>>> print '"Hello,\\nworld!"'.decode('string_escape')
"Hello,
world!"

>>> data = json.loads('{\"count\":8,\"sub_images\":[{\"url\":\"http:\\/\\/p3.pstatp.com\\/origin\\/470700000c7084773fb2\",\"width\":1178,\"url_list\":[{\"url\":\"http:\\/\\/p3.pstatp.com\\/origin\\/470700000c7084773fb2\"},{\"url\":\"http:\\/\\/pb9.pstatp.com\\/origin\\/470700000c7084773fb2\"},{\"url\":\"http:\\/\\/pb1.pstatp.com\\/origin\\/470700000c7084773fb2\"}],\"uri\":\"origin\\/470700000c7084773fb2\",\"height\":1590},{\"url\":\"http:\\/\\/p9.pstatp.com\\/origin\\/47050001b69355a0bf1b\",\"width\":1178,\"url_list\":[{\"url\":\"http:\\/\\/p9.pstatp.com\\/origin\\/47050001b69355a0bf1b\"},{\"url\":\"http:\\/\\/pb1.pstatp.com\\/origin\\/47050001b69355a0bf1b\"},{\"url\":\"http:\\/\\/pb3.pstatp.com\\/origin\\/47050001b69355a0bf1b\"}],\"uri\":\"origin\\/47050001b69355a0bf1b\",\"height\":1557},{\"url\":\"http:\\/\\/p3.pstatp.com\\/origin\\/470300020761150d671a\",\"width\":1178,\"url_list\":[{\"url\":\"http:\\/\\/p3.pstatp.com\\/origin\\/470300020761150d671a\"},{\"url\":\"http:\\/\\/pb9.pstatp.com\\/origin\\/470300020761150d671a\"},{\"url\":\"http:\\/\\/pb1.pstatp.com\\/origin\\/470300020761150d671a\"}],\"uri\":\"origin\\/470300020761150d671a\",\"height\":1552},{\"url\":\"http:\\/\\/p1.pstatp.com\\/origin\\/47000002200f2a0a9020\",\"width\":1178,\"url_list\":[{\"url\":\"http:\\/\\/p1.pstatp.com\\/origin\\/47000002200f2a0a9020\"},{\"url\":\"http:\\/\\/pb3.pstatp.com\\/origin\\/47000002200f2a0a9020\"},{\"url\":\"http:\\/\\/pb9.pstatp.com\\/origin\\/47000002200f2a0a9020\"}],\"uri\":\"origin\\/47000002200f2a0a9020\",\"height\":1575},{\"url\":\"http:\\/\\/p1.pstatp.com\\/origin\\/470000022011d5569ccb\",\"width\":1178,\"url_list\":[{\"url\":\"http:\\/\\/p1.pstatp.com\\/origin\\/470000022011d5569ccb\"},{\"url\":\"http:\\/\\/pb3.pstatp.com\\/origin\\/470000022011d5569ccb\"},{\"url\":\"http:\\/\\/pb9.pstatp.com\\/origin\\/470000022011d5569ccb\"}],\"uri\":\"origin\\/470000022011d5569ccb\",\"height\":1588},{\"url\":\"http:\\/\\/p3.pstatp.com\\/origin\\/4700000220127db96444\",\"width\":1178,\"url_list\":[{\"url\":\"http:\\/\\/p3.pstatp.com\\/origin\\/4700000220127db96444\"},{\"url\":\"http:\\/\\/pb9.pstatp.com\\/origin\\/4700000220127db96444\"},{\"url\":\"http:\\/\\/pb1.pstatp.com\\/origin\\/4700000220127db96444\"}],\"uri\":\"origin\\/4700000220127db96444\",\"height\":1561},{\"url\":\"http:\\/\\/p3.pstatp.com\\/origin\\/46ff000532e33a9fa35a\",\"width\":1178,\"url_list\":[{\"url\":\"http:\\/\\/p3.pstatp.com\\/origin\\/46ff000532e33a9fa35a\"},{\"url\":\"http:\\/\\/pb9.pstatp.com\\/origin\\/46ff000532e33a9fa35a\"},{\"url\":\"http:\\/\\/pb1.pstatp.com\\/origin\\/46ff000532e33a9fa35a\"}],\"uri\":\"origin\\/46ff000532e33a9fa35a\",\"height\":1563},{\"url\":\"http:\\/\\/p9.pstatp.com\\/origin\\/470700000c7b871a5fae\",\"width\":1178,\"url_list\":[{\"url\":\"http:\\/\\/p9.pstatp.com\\/origin\\/470700000c7b871a5fae\"},{\"url\":\"http:\\/\\/pb1.pstatp.com\\/origin\\/470700000c7b871a5fae\"},{\"url\":\"http:\\/\\/pb3.pstatp.com\\/origin\\/470700000c7b871a5fae\"}],\"uri\":\"origin\\/470700000c7b871a5fae\",\"height\":1575}],\"max_img_width\":1178,\"labels\":[],\"sub_abstracts\":[\" \",\" \",\" \",\" \",\" \",\" \",\" \",\" \"],\"sub_titles\":[\"\\u6e05\\u65b0\\u81ea\\u7136\\uff0c\\u7f8e\\u4e3d\\u65e0\\u53cc\",\"\\u6e05\\u65b0\\u81ea\\u7136\\uff0c\\u7f8e\\u4e3d\\u65e0\\u53cc\",\"\\u6e05\\u65b0\\u81ea\\u7136\\uff0c\\u7f8e\\u4e3d\\u65e0\\u53cc\",\"\\u6e05\\u65b0\\u81ea\\u7136\\uff0c\\u7f8e\\u4e3d\\u65e0\\u53cc\",\"\\u6e05\\u65b0\\u81ea\\u7136\\uff0c\\u7f8e\\u4e3d\\u65e0\\u53cc\",\"\\u6e05\\u65b0\\u81ea\\u7136\\uff0c\\u7f8e\\u4e3d\\u65e0\\u53cc\",\"\\u6e05\\u65b0\\u81ea\\u7136\\uff0c\\u7f8e\\u4e3d\\u65e0\\u53cc\",\"\\u6e05\\u65b0\\u81ea\\u7136\\uff0c\\u7f8e\\u4e3d\\u65e0\\u53cc\"]}'.decode('string_escape'))
>>> 
>>> data["count"]
8
>>> 
鹿惑 回答

你看一下 data 的類型,data的類型如果是json,就不需要轉(zhuǎn)換。

json.parse 是把json字符串轉(zhuǎn)化成json的

https://developer.mozilla.org...