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

鍍金池/ 問答/ HTML問答
卟乖 回答

在 react 中應(yīng)用 redux 應(yīng)該遵守容器組件、UI 組件的分層設(shè)計模式(react-redux)。
如果你在子組件里面有調(diào)用 action 的需求,那么一種是父組件通過 props 傳遞 action 到子組件,還有一種就是創(chuàng)建一個子組件的容器組件,在容器組件中通過 mapDispatchToProps 來綁定 actions。
遵循這種設(shè)計模式讓分層更加清晰、降低耦合,有利于重用和單元測試。
好的分層設(shè)計有利于測試,請看這篇:https://segmentfault.com/a/1190000015935519

練命 回答

為何不考慮,前端js定時2分鐘,到時間后還沒收到付款成功就直接跳走呢?

愚念 回答

相關(guān)代碼

// 監(jiān)聽滾動條
new Vue({
    beforeMount: function() {
        // 監(jiān)聽scroll事件
        window.addEventListener('scroll', this.handleScroll)
    },
    beforeDestroy () {
        window.removeEventListener('scroll', this.handleScroll)
    },
    data: {},
    mothods: {
        handleScroll: function() {
            // handle you scroll event
            
            // 最大的頁面Y方向offset 加上 窗口的高度 等于 文檔的高度
            // max(window.pageYOffset) + window.innerHeight === document.documentElement.scrollHeight
            
            if (window.pageYOffset + window.innerHeight >= document.documentElement.scrollHeight) {
               // 處理上拉加載事件 放在這里 
               // 獲取服務(wù)端數(shù)據(jù)方法
               // 如果想使用預(yù)加載數(shù)據(jù),即,即將滑動到底部時候就加載數(shù)據(jù)
               // window.pageYOffset + window.innerHeight >= document.documentElement.scrollHeight - 20
            }
        }
    }
})
疚幼 回答

npm install bootstrap@3.3.6

可以通過上面的形式下載你想要的版本號。想要固定住不自動升級的惡化,需要把版本號前面的^去掉。

如果是node8+版本,有l(wèi)ock文件,可以直接固定版本號,而不需要去掉^,除非你自己手動執(zhí)行了npm update

獨白 回答

第三段代碼執(zhí)行Foo()后返回undefined undefined.getName()報錯啊 你確定彈出了undefined?

尋仙 回答

如果是用的wepy,可以使用直接使用點操作符,和vue一樣this.text = '23'就可以了

涼心人 回答

https://blog.csdn.net/liuchon... 不太清楚你說的和這個是不是一樣的了。

不討喜 回答

阿里釘釘不支持前端跨域訪問,需要通過后端獲取token后再返回前端。我采用的是.net作后端,官方?jīng)]有提供SDK,需要自己寫,需要使用到httpRequest類(我用的IDE是vs2017,在NuGet管理包里全稱是FastHttpRequest),列出簡單的代碼如下

前端html

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <script src="Scripts/jquery-3.3.1.min.js"></script>
    <script type="text/javascript">
        $(function () {
            $("#getToken").click(function () {
                $.ajax({
                    type: "post",
                    url: "getToken.ashx",
                    success: function (data) {
                        console.info(data);
                    }, error: function () {
                        console.info("error");
                    }
                })
            });
        })
    </script>
</head>
<body>
    <button type="button" id ="getToken">獲取token</button>
</body>
</html>

cs文件

using System;
using System.Collections.Generic;
using HttpRequest;

namespace myDDDev
{
    public static class DDConfig
    {
        public static string __CorpID = "xxxx";  //corpId
        public static string __CorpSecret = "xxxxx"; //corpSecret
    }
    public class M_AccessToken
    {
        public string access_token { get; set; }
        public int errcode { get; set; }
        public string errmsg { get; set; }
    }
    public static class DDHelper
    {
        public static string GetAccessToken(string url)
        {

            if (url != "")
            {
                try
                {
                    HttpRequest.HttpHelper.HttpResult result = HttpRequest.HttpHelper.Get(url);
                    M_AccessToken oat = Newtonsoft.Json.JsonConvert.DeserializeObject<M_AccessToken>(result.ToStringResult());

                    if (oat != null)
                    {
                        if (oat.errcode == 0)
                        {
                            return oat.access_token;
                        }
                    }
                }
                catch (Exception ex)
                {
                    throw;
                }
            }
            return "";
        }
    }
}

ashx文件

using System;
using System.Web;
using myDDDev;
using System.Web.SessionState;

public class getToken : IHttpHandler, IRequiresSessionState
{

    public void ProcessRequest(HttpContext context)
    {
        context.Response.ContentType = "text/plain";
        //獲取AccessToken的方法是向 https://oapi.dingtalk.com/gettoken?corpid=id&corpsecret=secrect GET請求。
        string getUrl = string.Format("https://oapi.dingtalk.com/gettoken?corpid={0}&corpsecret={1}", DDConfig.__CorpID, DDConfig.__CorpSecret);

        //access_token 會失效,需要定期獲??;
        string access_token = DDHelper.GetAccessToken(getUrl);
        context.Session["token"] = access_token;
        context.Response.Write("access_token:" + access_token);
    }

    public bool IsReusable
    {
        get
        {
            return false;
        }
    }

}
拮據(jù) 回答
找到問題所在了,大圖的寬應(yīng)該等于小圖寬乘以 放大圖的預(yù)覽圖除以放大鏡的寬, 高同理,上面的代碼自己改一部分就可以

*上面的

bigImage.width = bigImage.offsetWidth * percent;
bigImage.height = bigImage.offsetHeight * percent; 

改為

bigImage.width = container.offsetWidth * percent;
bigImage.height = container.offsetHeight * percent; 

即可,昨天寫到太晚,迷迷糊糊地沒發(fā)現(xiàn)

情未了 回答

刪除 package.json 的對應(yīng)代碼以及 e2e 文件夾,刪除 node_modules 然后重新 npm i 即可

別傷我 回答

https://open.weixin.qq.com/cg...
下載一個最新的包就可以了。。。

挽歌 回答

因為你沒有配置哪些路徑需要登陸以后才能訪問,你訪問一個不存在的地址最多報404。

.antMatchers("/admin/**").authenticated()
淚染裳 回答

Edit Vue Template 并不存在你說的這種情況,是不是你自己代碼里注冊了事件

初心 回答

綁定域名是你域名解析的事情,跟react沒關(guān)系

只要你的域名能解析到你的ip上就沒問題了

 http://IP:port   =>    http://www.abc.com
焚音 回答

vuex里直接存列表的對象 點擊事件把index傳進去 根據(jù)index改obj[index]的num