鍍金池/ 問答/ HTML問答
嘟尛嘴 回答
<button @click="isDisabled = true" :disabled="isDisabled">click</button>

data:{
    isDisabled:false
}
帥到炸 回答

后端是node?
websocket至少也要雙向通信吧
執(zhí)行close的是哪一邊呢

1,自己生成6位的短信驗(yàn)證碼,生成一個(gè)rediskey,保存這個(gè)短信驗(yàn)證碼,并給個(gè)有效時(shí)間,這時(shí)也把rediskey告訴客戶端;
2,調(diào)用短信服務(wù)商api發(fā)送短信,
3,客戶端提交時(shí),post攜帶rediskey,輸入的短信驗(yàn)證碼,后臺(tái)根據(jù)rediskey調(diào)出redis存儲(chǔ)的短信驗(yàn)證碼與輸入的驗(yàn)證碼比對(duì),通過,刪除這個(gè)rediskey。

女流氓 回答

斜杠,應(yīng)該用“//”

萌二代 回答

var b = a(0)為underfined是因?yàn)橹唤oval賦值了,并沒有給index賦值,所以console.log(index)未定義,剩下的三個(gè)是因?yàn)閚ame為1、2、3,但是index卻賦值為0,所以與name為多少無(wú)關(guān),都會(huì)打印出0

心夠野 回答

看下html里的內(nèi)容是不是404,是不是express的路由沒配對(duì)

慢半拍 回答

先搞個(gè)數(shù)據(jù)結(jié)構(gòu)出來(lái),大體結(jié)構(gòu)就是下面這樣,把每個(gè)選中的都放在對(duì)應(yīng)的分類下。然后第二頁(yè)就是吧select弄出來(lái)就好了。也可以用index。

data = [
    {
        title: 'new',
        select: '',
        children: ['股票','科技' ,'產(chǎn)業(yè)']//單選的話,這樣就蠻好的
    },
    {
        title: 'hot',
        select: '',
        children: ['營(yíng)改增','申報(bào)辦稅' ,'出口退稅']
    },
]
<ul>
    <li  v-for="item of data">
        <h4>{{item.title}}</h4>
        <span v-for="c of item" :class="{'select': c.select == c}" @click="c.select = c">{{c}}</span>
    </li>
</ul>

枕頭人 回答

absolute定位與margin定位其實(shí)是沒有什么沖突的,無(wú)論absolute元素時(shí)候設(shè)置了left/top值,其margin屬性值都是可以起作用的。
下面展示的是沒有l(wèi)eft/top值的absolute元素的margin定位。
http://www.zhangxinxu.com/wor...

序列化一個(gè)對(duì)象,你可以用JSON.stringfy(obj),但是這里有一個(gè)問題,window對(duì)象結(jié)構(gòu)復(fù)雜,你將會(huì)面臨circular reference,所以,有個(gè)折中方案,就是你需要window的屬性,將這些屬性提取出來(lái),拼裝成一個(gè)新對(duì)象即可。
參考代碼如下:

var data = JSON.stringify({
    'location': window.location
    // etc
});

stackoverflow

司令 回答

你不能把 this.selectStatus('1').text作為一個(gè)react child,最好的方法是

render() {
    const { text } = this.selectStatus('1');
    return (
        <div>{text}</div>
    ); 
}
傻叼 回答

The reason you're receiving that error is that you're using the runtime build which doesn't support templates in HTML files as seen here vuejs.org

In essence what happens with vue loaded files is that their templates are compile time converted into render functions where as your base function was trying to compile from your html element.

夕顏 回答

clipboard.png
嘗試改變數(shù)據(jù)交互方式 ,比如:v-model 替換成 v-bind.

別硬撐 回答
  1. 遇到過。如果你的html片段沒有語(yǔ)法錯(cuò)誤的話,這個(gè)就是一個(gè)檢查語(yǔ)法格式的插件"vetur"引起的。
  2. 解決方法是:vscode -> 首選項(xiàng) -> 設(shè)置 -> 搜索 (vetur),將vetur.validation.template 設(shè)置為 false 就可以解決問題了。

這個(gè)是我參考文檔:http://blog.csdn.net/xufangfa...

她愚我 回答

提示你需要對(duì)應(yīng)的loader
可能是沒有使用vue-loader
能把webpack的loaders也貼出來(lái)嗎?

玩控 回答

1.原來(lái)的代碼還保留原來(lái)的舊的頁(yè)面就可以不重寫
2.前后端分離的開發(fā)環(huán)境也沒那么復(fù)雜,一個(gè)純前端的開發(fā)vue的,只要裝了node,npm基本就可以了,后端需要提供restful的接口或者基于http的接口
3.可以部署

<template>
    <i-select :model.sync="model10" multiple style="width:260px">
        <i-option v-for="item in cityList" :value="item.value">{{ item.label }}</i-option>
    </i-select>
</template>
<script>
    export default {
        data () {
            return {
                cityList: [
                    {
                        value: 'beijing',
                        label: '北京市'
                    },
                    {
                        value: 'shanghai',
                        label: '上海市'
                    },
                    {
                        value: 'shenzhen',
                        label: '深圳市'
                    },
                    {
                        value: 'hangzhou',
                        label: '杭州市'
                    },
                    {
                        value: 'nanjing',
                        label: '南京市'
                    },
                    {
                        value: 'chongqing',
                        label: '重慶市'
                    }
                ],
                model10: []
            }
        }
    }
</script>

官方文檔鏈接描述

悶油瓶 回答

Error syncing 可能是容器本身的問題。可以用 kubectl logs nginx-xxx來(lái)看一下

巫婆 回答

簡(jiǎn)單來(lái)說(shuō)是有特別的標(biāo)志位。Wiki上是這么說(shuō)的:

In IEEE 754 standard-conforming floating-point storage formats, NaNs are identified by specific, pre-defined bit patterns unique to NaNs. The sign bit does not matter. Binary format NaNs are represented with the exponential field filled with ones (like infinity values), and some non-zero number in the significand field (to make them distinct from infinity values). The original IEEE 754 standard from 1985 (IEEE 754-1985) only described binary floating-point formats, and did not specify how the signaling/quiet state was to be tagged. In practice, the most significant bit of the significand field determined whether a NaN is signaling or quiet. Two different implementations, with reversed meanings, resulted:
most processors (including those of the Intel and AMD's x86 family, the Motorola 68000 family, the AIM PowerPC family, the ARM family, the Sun SPARC family, and optionally new MIPS processors) set the signaling/quiet bit to non-zero if the NaN is quiet, and to zero if the NaN is signaling. Thus, on these processors, the bit represents an 'is_quiet' flag;
in NaNs generated by the PA-RISC and old MIPS processors, the signaling/quiet bit is zero if the NaN is quiet, and non-zero if the NaN is signaling. Thus, on these processors, the bit represents an 'is_signaling' flag.
The former choice has been preferred as it allows the implementation to quiet a signaling NaN by just setting the signaling/quiet bit to 1. The reverse is not possible with the latter choice because setting the signaling/quiet bit to 0 could yield an infinity.
The 2008 revision of the IEEE 754 standard (IEEE 754-2008) makes formal recommendations for the encoding of the signaling/quiet state.
For binary formats, the most significant bit of the significand field should be an 'is_quiet' flag. I.e. this bit is non-zero if the NaN is quiet, and zero if the NaN is signaling.
For decimal formats, whether binary or decimal encoded, a NaN is identified by having the top five bits of the combination field after the sign bit set to ones. The sixth bit of the field is the 'is_quiet' flag. The standard follows the interpretation as an 'is_signaling' flag. I.e. the signaling/quiet bit is zero if the NaN is quiet, and non-zero if the NaN is signaling. A signaling NaN is quieted by clearing this sixth bit.
For IEEE 754-2008 conformance, the meaning of the signaling/quiet bit in recent MIPS processors is now configurable via the NAN2008 field of the FCSR register. This support is optional in MIPS Release 3 and required in Release 5.[10]
The state/value of the remaining bits of the significand field are not defined by the standard. This value is called the 'payload' of the NaN. If an operation has a single NaN input and propagates it to the output, the result NaN's payload should be that of the input NaN (this is not always possible for binary formats when the signaling/quiet state is encoded by an 'is_signaling' flag, as explained above). If there are multiple NaN inputs, the result NaN's payload should be from one of the input NaNs; the standard does not specify which.

膽怯 回答

stringify那位兄弟的去重方法是可以的(之前說(shuō)穩(wěn)健是不對(duì)的,還不夠穩(wěn)?。?br>不過代碼也是要考慮實(shí)際業(yè)務(wù)場(chǎng)景的,這樣的數(shù)組數(shù)據(jù)是怎么來(lái)的呢?
orgId是不是已經(jīng)就是有著 唯一Id 的作用的,是不是 orgId 一致的對(duì)象,就代表著對(duì)象是一致的。如果是的話,那就沒必要stringify了,直接拿orgId當(dāng)key去重就好了