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

鍍金池/ 問(wèn)答
尛曖昧 回答
<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>
<script>
    function PostData() {
        $.ajax({
            type: "POST",
            url: "https://x/x.php",
            data : "data=" + $("#input_0").val(),
            success: function(msg) {
                alert(msg);
            }
        });
        return false;
    }  
</script>
<form onsubmit="return PostData()">
    <input id="input_0" type="text" value="">
    <input type="submit">
</form>  

https://x/x.php 發(fā)送一個(gè) data=[val] 的 post 請(qǐng)求, [val] 是 input_0 標(biāo)簽的內(nèi)容, 返回的結(jié)果在 msg 里.

舊酒館 回答

只要在本地測(cè)試成功,commit,push之后,鉤子自動(dòng)同步到服務(wù)器,不能直接修改服務(wù)器上的文件,否則協(xié)同開(kāi)發(fā)豈不是亂套了。

九年囚 回答

根據(jù)你的描述,app.xxx.js 的大小達(dá)到了3MB

即使項(xiàng)目規(guī)模非常的大,也不應(yīng)該出現(xiàn)這種情況。感覺(jué)你打包的時(shí)候,代碼拆分做的不好。
如果你打包使用的 webpack 可以參考這里 代碼分離

路由異步加載只是讓 app.xxx.js 體積縮小的其中一種方案,主要是代碼分離。

熟稔 回答

定制CSS的時(shí)候,將柵格系統(tǒng)Grid system去掉,自己定義就好了。

祉小皓 回答
<script>
  export default {
    data () {
      return {
        show: [],
        items: [
          {id: 1}, {id: 2}, {id: 3}, {id: 4}, {id: 5}
        ]
      }
    },
    mounted () {
      for (let i = 0; i < this.items.length; i++) {
        this.$set(this.show, i, false) // 使用this.$set
      }
    },
    methods: {
      btn (id) {
        this.$set(this.show, id, !this.show[id]) // 使用this.$set
        console.log(this.show)
      }
    }
  }
</script>

掛載點(diǎn)就是被vue 輸出替換的 dom 節(jié)點(diǎn)

vue 編譯打包有兩種 一種是 runtime-only 這個(gè)只能在 .vue 單頁(yè)文件能用,之后掛載的元素就會(huì)提取單頁(yè)文件里面的 html。一種就是 runtime + compiler 這個(gè)需要 template 和 render 屬性才行

絯孑氣 回答

使用react-router的createElement解決!
Router.js

......
...... // 省略其他無(wú)關(guān)緊要代碼

// 此處為要點(diǎn)擊刷新的組件
const arr = [
    home
];

// 開(kāi)關(guān)優(yōu)化
let onOff =false;

// 頁(yè)面強(qiáng)制刷新,如果需要強(qiáng)制刷新在路由中添加onChange事件以及在組件數(shù)組添加
const createElement=(component, props) =>{
    if (props.children && onOff || props.children && arr.includes(props.routes.slice(-1)[0].getComponent)) {
        let children = Object.assign({}, props.children, {key : `${window.location.pathname}` + new Date().getTime()})
        props = { ...props, children };
        onOff = false;
    }
    return React.createElement(component, props)
}

const onChange = (props, next) => {
    onOff = true
    console.log(`${next.location.pathname}`, 'change');
}

const RouteConfig = (
    <Router history={history} createElement = {createElement}>
        <Route path="/home" getComponent={home} onChange = {onChange} />
        ...
        ...
    </Router>
);

export default RouteConfig;

如果您用的react-router4.0,當(dāng)使用 component 時(shí),router 將使用 React.createElement 根據(jù)給定的 component 創(chuàng)建一個(gè)新的 React 元素。這意味著如果你使用內(nèi)聯(lián)函數(shù)(inline function)傳值給 component將會(huì)產(chǎn)生不必要的重復(fù)裝載。對(duì)于內(nèi)聯(lián)渲染(inline rendering), 建議使用 renderprop。
也可以參考下我新寫(xiě)的文章:這里有沒(méi)有你想要的react-router

澐染 回答

docker鏡像建幾個(gè)容器,監(jiān)聽(tīng)不同端口

喜歡你 回答

表明該項(xiàng)目中編程語(yǔ)言的比例

陪妳哭 回答
function complete(req, callback) {
  req.then(callback, callback);
}

var req = axios(...)

complete(req, () => ...);
氕氘氚 回答

1.上傳完圖片調(diào)回到頁(yè)面上,或者用FileReader()把本地要上傳的圖像文件變成DataUrl直接在頁(yè)面上展現(xiàn)

var input = document.getElementById("inputArea")
var imgData = input.files[0];
var reader = new FileReader(); //調(diào)用FileReader對(duì)象
reader.readAsDataURL(imgData); //通過(guò)DataURL的方式返回圖像
reader.onload = function(e) {
    var result = document.getElementById("result");
    result.innerHTML = '<img src="' + e.target.result + '" alt="" />';
}

2.將圖片和你要渲染出的文字用html排版成你想要的樣子
3.用html2canvas庫(kù)將你的頁(yè)面渲染成圖片就OK了

html2canvas(document.getElementById('image'), {
    onrendered: function(canvas) {
        var image = canvas.toDataURL("image/png");  
        $("#pic").html("<img src='"+image+"' alt='from canvas'/>")
    },
});
赱丅呿 回答

怎么下載到本地??

file_put_contents('a.png',file_get_contents('http://www.xxx.com/a.png'));

另:
使用ziparchive的addfromstring,不用下載到本地
ziparchive

礙你眼 回答

vue跳轉(zhuǎn)用的是vue-router吧 你在router/index.js注冊(cè)好路由 就可以啊

默念 回答

先給一個(gè)粗略的回答,需要完善一些信息才知道是否支持你的平臺(tái)。
MongoDB是不是支持國(guó)產(chǎn)平臺(tái)實(shí)際上跟你的硬件平臺(tái)沒(méi)有直接的關(guān)系,主要還是看操作系統(tǒng)。你提到的Linux SW_64我個(gè)人并沒(méi)有接觸過(guò),但是想看一下它是從哪個(gè)Linux發(fā)行版分支出來(lái)的。不同的發(fā)行版支持的依賴(lài)軟件包不一樣,鏈接庫(kù)的位置也不完全一樣,所以可執(zhí)行文件不是隨便找一個(gè)就可以執(zhí)行的,應(yīng)該找到你的系統(tǒng)來(lái)源系統(tǒng),先試試它的來(lái)源系統(tǒng)是否有包可以運(yùn)行,如果不行,則嘗試自己編譯源代碼。

浪婳 回答

不要想太多細(xì)節(jié)上的開(kāi)銷(xiāo),這也是新手常常犯的錯(cuò)誤。先把大局上的架構(gòu)優(yōu)化弄明白才是正道

心癌 回答

先定義動(dòng)作序列,然后用一個(gè)函數(shù)來(lái)執(zhí)行動(dòng)作序列

var actions = [{
    type: 1,
    msg: '你好'
  },
  {
    type: 2,
    msg: '我是老師Tom'
  },
  {
    type: 3,
    msg: '你是誰(shuí)'
  },
  {
    type: 4,
    msg: '獲取數(shù)據(jù)'
  },
  {
    type: 5,
    msg: '歡迎你',
    value: true,
    conditions: [{
      type: 3,
      msg: '你上幾年級(jí)了'
    }, {
      type: 6,
      msg: '執(zhí)行動(dòng)作'
    }]
  }
]

function doAction(action) {
  if (!action) {
    return
  }
  console.log(action.msg)
  if (action.type === 1) {

  } else if (action.type === 5) {
    if (action.value) {
      doAction(action.conditions[0])
    } else {
      doAction(action.conditions[1])
    }
  }
}

actions.forEach(doAction)
疚幼 回答

你好, 請(qǐng)?jiān)赽方法中 使用 $this->a(); 然后在 $n = $this->name;

筱饞貓 回答

Request::input('參數(shù)')或者Request::all()獲取所有參數(shù)

瘋子范 回答

元變量, 或元語(yǔ). 相當(dāng)于張三,李四

這里有完整的列表和使用方式:

https://en.wikipedia.org/wiki...