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

鍍金池/ 問答/ HTML問答
礙你眼 回答

用ui.router 支持路由嵌套
不要用自帶的ng-route,這個(gè)不支持路由嵌套

撿肥皂 回答

建議你把completed 維護(hù)為一個(gè)狀態(tài),計(jì)算屬性里根據(jù)這一個(gè)狀態(tài)進(jìn)行過濾就好了。
如:status = [all: 全部, open: 未完成, closed: 已完成];

   filterlists:function(){
       if(this.status === 'all') {
           return this.lists;
       } else {
           return this.lists.filter(value => this.status === 'closed' ? value.ischeck : !value.ischeck)
       }
   }
未命名 回答

先給建議,看看能否有幫助:
1、查看下server項(xiàng)目中對(duì)應(yīng)的頁面被加載前是否引入了 portal 中controller文件(controller/header);
2、server 和 portal 聲明header的controller的模塊名稱是否為同一個(gè):例如angular.module(“模塊名稱”).controller("header")

乞許 回答

可以用elementUI提供的$confirm方法,這樣簡單很多。內(nèi)容也可以是html

this.$confirm('地址確認(rèn)')
    .then( _ => {
        this.$confirm('聯(lián)系人確認(rèn)')
            .then( _ => {
                // ...
            } )
    } )
臭榴蓮 回答

假設(shè)有n個(gè)項(xiàng)目
每個(gè)項(xiàng)目的人數(shù)分別為: k1,k2,k3....kn,總?cè)藬?shù)為k1+k2+k3+....+kn=sum

則這些項(xiàng)目組的人員的投票權(quán)重為: k1/sum,k2/sum,k3/sum....kn/sum

巴扎嘿 回答

自己解決了 用$set方法就可以了

悶油瓶 回答

userath()這個(gè)函數(shù)是沒有返回值的
響應(yīng)的話 ctx.body=response

mongoose支持promise,配合await使用

try{
    var user = awiat userModel.find({name: ctx.request.body.username});
    if(user.length == 0){
        ctx.body = "user not register"
    } else {
        let user = await userModel.find({
            name: ctx.request.body.username,
            password: ctx.request.body.password
            });
        if (user == null || user.length == 0) {
            console.log(user);
            console.log('password wrong');
            ctx.body = "login fail";
         
        }
        if (user != null && user.length > 0) {
            console.log('login sccessful');
            ctx.body = "login successful";
        }
    }
} catch(e){
}


情皺 回答
只要找到View(ViewHolder)顯示隱藏的調(diào)用函數(shù),就能計(jì)算出每個(gè)View(ViewHolder)的顯示時(shí)長。

很幸運(yùn)的時(shí),RecyclerView提供了這樣的接口函數(shù),而且還是兩對(duì)接口函數(shù):

1.RecyclerView#Adapter提供了一對(duì)函數(shù):onViewAttachedToWindow(VH)onViewDetachedFromWindow(VH)

public abstract static class Adapter<VH extends ViewHolder> {
    ... ...
    
    /**
     * Called when a view created by this adapter has been attached to a window.
     *
     * <p>This can be used as a reasonable signal that the view is about to be seen
     * by the user. If the adapter previously freed any resources in
     * {@link #onViewDetachedFromWindow(RecyclerView.ViewHolder) onViewDetachedFromWindow}
     * those resources should be restored here.</p>
     *
     * @param holder Holder of the view being attached
     */
    public void onViewAttachedToWindow(VH holder) {
    }

    /**
     * Called when a view created by this adapter has been detached from its window.
     *
     * <p>Becoming detached from the window is not necessarily a permanent condition;
     * the consumer of an Adapter's views may choose to cache views offscreen while they
     * are not visible, attaching and detaching them as appropriate.</p>
     *
     * @param holder Holder of the view being detached
     */
    public void onViewDetachedFromWindow(VH holder) {
    }

    ... ...
}

2.RecyclerView提供了OnChildAttachStateChangeListener接口:

public interface OnChildAttachStateChangeListener {

    /**
     * Called when a view is attached to the RecyclerView.
     *
     * @param view The View which is attached to the RecyclerView
     */
    void onChildViewAttachedToWindow(View view);

    /**
     * Called when a view is detached from RecyclerView.
     *
     * @param view The View which is being detached from the RecyclerView
     */
    void onChildViewDetachedFromWindow(View view);
}

上面的兩對(duì)接口函數(shù),根據(jù)情況選用其一就好了,基本實(shí)現(xiàn)邏輯:

  1. 設(shè)置兩個(gè)變量,一個(gè)用來保存AttachedToWindow被調(diào)用時(shí)的時(shí)間戳,一個(gè)用來保存顯示的總時(shí)長
  2. DetachedFromWindow被調(diào)用時(shí),計(jì)算與AttachedToWindow的時(shí)間戳差值,并將AttachedToWindow的時(shí)間戳清零,然后總時(shí)長加上這個(gè)差值
  3. AttachedToWindow后,DetachedFromWindow未被調(diào)用前,只需獲取當(dāng)前系統(tǒng)時(shí)間戳,然后計(jì)算與AttachedToWindow的時(shí)間戳差值,再加上總時(shí)長,就是總時(shí)長
幼梔 回答

background-position:10px 20px

背景定位,接收兩個(gè)值x偏移和y偏移,值可以是top/right/bottom/left或者px或者相對(duì)于父元素的%
點(diǎn)擊查看w3c參考

擱淺 回答

本身就不支持。你用到什么技術(shù)就要在vscode擴(kuò)展選項(xiàng)里面下載相應(yīng)的插件。才能支持對(duì)應(yīng)語言的語法高亮

眼雜 回答
  1. 給三個(gè)inline-block加上vertical-align:top;

  2. 用float: left來布局

拼未來 回答

該方法的參數(shù)可以是一個(gè)字符串路徑。

所以傳字符串的時(shí)候需要是個(gè)路徑,而不是name。
另外,你的多路由出口是什么概念,就是兩個(gè)獨(dú)立的項(xiàng)目,還是根據(jù)用戶權(quán)限分配不同的跳轉(zhuǎn)規(guī)則?


// 目錄變成
src
|
|---- aProject
|---- aProject

修改config/index.js

const projectName = process.argv[2]
index: path.resolve(__dirname, `../dist/{$projectName}/index.html`),
assetsRoot: path.resolve(__dirname, `../dist/{$projectName}/`),

修改build/webpack.base.conf.js

const projectName = process.argv[2]
app: `./src/${$projectName}/main.js`

然后啟動(dòng)項(xiàng)目的時(shí)候就
npm run dev -- aProject
npm run dev -- bProject
啟動(dòng)各自的項(xiàng)目

扯不斷 回答

可以先獲取到頁面上那個(gè)盒子的jquery對(duì)象,然后克隆一下,再進(jìn)行append
var $box = $('#box').clone();
$('.container').append($box);

其次注意一下你這里的$(this)是什么,確定是否是你打算append進(jìn)的那個(gè)容器

遲月 回答

時(shí)間盡量使用時(shí)間戳。
比較可以直接使用時(shí)間戳相減了。也可以使用momentjs的一些方法,比如:isAfter isBefore等。

兮顏 回答

應(yīng)該是table里的單元格寬度寫死了