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

鍍金池/ 問答/ HTML問答
別硬撐 回答

flask view里面調(diào)用subprocess.Popen去執(zhí)行腳本,subprocess會生成一個子進(jìn)程去執(zhí)行腳本,可以立即返回

茍活 回答

已解決,代碼沒寫全導(dǎo)致的。

墻頭草 回答
import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import Login from '@/components/Login'

import Account from '@/components/user/Account'
import Course from '@/components/user/Course'
import Order from '@/components/user/Order'

import store from './../vuex/index'

Vue.use(Router)

function guardRoute (to, from, next) {
  if (!store.state.isLogin) {
    next({ path: '/login' });
  } else {
    next()
  }
}

const vueRouter = new Router({
  routes: [
    {
      path: '/hello',
      name: 'HelloWorld',
      component: HelloWorld
    },
        {
            path: '/login',
            name: 'login',
            component: Login
        },
        {
            path: '/account',
            name: 'account',
            component: Account,
            meta: {
                needAuth: true
            }
        },
        {
            path: '/course',
            name: 'course',
            component: Course,
            meta: {
                needAuth: true
            }

        },
        {
            path: '/order',
            name: 'order',
            component: Order,
            meta: {
                needAuth: true
            }

        },
  ]
});

vueRouter.beforeEach(function (to, from, next) {
    if (to.matched.some(m => m.meta.needAuth)) { 
      guardRoute(to, from, next)
    } else {
      next()
    }
});

export default vueRouter
練命 回答

我也遇到類似的問題,播放不了rtmp格式的文件,你現(xiàn)在解決這個問題了嗎

疚幼 回答

props是相對于子組件來說的概念,如果你沒有父組件,也就沒有子組件(霧

官方文檔里面有說明props鏈接Components and Props

結(jié)合你上一個提問,你打印出來的props內(nèi)容是withRouter這個高階組件給子組件的props。

短嘆 回答

公眾號獲取的openid與用戶信息都是后臺返回給前端的吧

孤巷 回答

vue有click也是事件委托,為什么混著用原生的?如果理不清兩者的區(qū)別,盡量不要混著用,能用vue的事件系統(tǒng),就用vue,框架會給你優(yōu)化的。

夢囈 回答

xAxis.axisLine.onZero
設(shè)置為false

巴扎嘿 回答

form.on('select(filter)', function(data){
console.log(data.elem); //得到select原始DOM對象
console.log(data.value); //得到被選中的值
console.log(data.othis); //得到美化后的DOM對象
});
data里面有這些內(nèi)容,就可以區(qū)分是哪一個select了,但是你把select的name,id都命名一樣的了,或者用個不同的class區(qū)分。

怣人 回答

不用 耳機域名就好了!
例如:demo.com 后臺可以用api.demo.com

妖妖 回答

一定要獲取數(shù)組里面的null就是用filter獲取,const nullArr = arr.filter(item=> item===null)

ES5: var nullArr = _times.filter(function(item){ return item === null })

但是null這個值你獲取了是沒有意義的,有意義的應(yīng)該是null的位置,也就是數(shù)組的下標(biāo)

==============================

function getNulls(arr) {
  return arr.reduce(function(nullList, item, index) {
    if (item === null) {
      nullList.push(index);
      return nullList;
    }
    return [];
  }, []);
}

var arr = [1, 2, 3, null, 4, null, null, 8, null, null, null];

var result = getNulls(arr);
console.log(result);

// [8, 9, 10]

上面是獲取下標(biāo)的方法。不過我還是不太理解你的需求,比如你為什么要在if判斷?最好你能完整描述下需求,以找到更好的實現(xiàn)方式

夏夕 回答

執(zhí)行:npm rebuild node-sass --force便可安裝上

冷咖啡 回答

去看一下 Highcharts 圖例相關(guān)的教程吧:https://www.hcharts.cn/docs/b...

實現(xiàn)思路:自定義圖例項點擊事件,然后根據(jù)條件僅限數(shù)據(jù)列的顯示與隱藏。

歆久 回答

npm i -g yarn

or

npm i -g cnpm

[lantern代理]你值得擁有

毀與悔 回答

兩種都可以。推薦 token 也只是推薦,也并不是說傳統(tǒng)的 cookie/session 就不能用,token 也有坑??葱枨?,一般 cookie/session 可以了。

魚梓 回答

壓力測試要盡可能模擬生成環(huán)境的實際情況才能得出較準(zhǔn)確的結(jié)果。
出于成本考慮可以使用 spot instance 來降低 EC2 的成本。

先執(zhí)行 console.log(1) 獲取值,再調(diào)用 "test"(console.log(1)),由于 "test" 是一個字符串,不是函數(shù),所以不能用 () 運算符,會出錯

笨尐豬 回答

在當(dāng)前的路由中,單擊的時候進(jìn)行判斷處理,如果input任然處于獲取焦點的情況下,就消失軟鍵盤,否則的話,則進(jìn)行路由的跳轉(zhuǎn)

拮據(jù) 回答

你打包之后測試過么,打包之后沒問題就可以。如果這是在dev環(huán)境卡那是正常的,因為所有的東西都存在你的內(nèi)存中,肯定會卡。

傻丟丟 回答

自己整理了一下答案:
nodejs提供了vm模塊,相當(dāng)于一個沙盒模式。我試了運行一段代碼,比如

var code = `console.log(require('fs'));`
//console.log(eval(code));
vm.runInContext(code, sandbox);

比如我擔(dān)心用戶會制造一段代碼,讀取服務(wù)器某些文件,但是測試發(fā)現(xiàn)會報錯:

因為他們的沙盒中根本就沒有這個require函數(shù),就沒有辦法加載包,更不會加載一些危險的包,如vm與fs。

所以不必?fù)?dān)心引入其他的包。

我測試讀取了我的一個全局變量。

比如

console.log(appConfig);

是讀取不到信息的。

目前來看,安全性還可以。

參考資料:

http://nodejs.cn/api/vm.html

http://blog.csdn.net/zccz14/a...