鍍金池/ 問答/ HTML問答
六扇門 回答

<li>審核狀態(tài):
<el-radio v-model="radio" label="1" @change="radioVal1">已通過</el-radio>
<el-radio v-model="radio" label="2" @change="radioVal2">未通過</el-radio>
</li>
這是我剛剛出爐的代碼,和你的需求基本一致,你可以給這個(gè)el-radio綁定一個(gè)v-model,而每次選中的值就是label的值,或者你可以使用change事件來調(diào)用方法,而每次調(diào)用傳入的值都是label的屬性,上面你需要獲取name的值,你可以把name的值賦給label,這樣就能很輕松獲取,至于input值那就直接使用v-model來獲取。

維他命 回答
class MyClass
{
    constructor()
    {
        this._prop = 10;
    }

    get prop()
    {
        return this._prop;
    }

    set prop(value)
    {
        this._prop = value;
    }
}

let inst = new MyClass();
console.log(inst.prop);
inst.prop = 123;
console.log(inst.prop);
挽歌 回答

...ES6中的解構(gòu)運(yùn)算,與React的版本沒有關(guān)系。所以從其他地方入手解決。

魚梓 回答

還可以這樣玩。

const props = this.props
this.state = {
   startShowNum:0,
   get showArr(){
   return props.listArr.slice(0,this.startShowNum+8) //但是你此時(shí)的this指向這個(gè)對(duì)象了,所以你拿不到this.props了
 }
}
祈歡 回答

參考UglifyJs github中的issue:https://github.com/webpack-co...

或者提供下依賴版本(如webpack版本)

冷溫柔 回答

圖片描述

是不是這個(gè)樣子,算同一行

反正就是用css嗎,這和用什么vue什么element 有什么關(guān)系,別說同一行,覆蓋在上面也可以啊
https://jsfiddle.net/papersna...

涼薄 回答
<a data-a="" onclick="window.scrollTo(this, 'h1', '1 漏洞危害')">1 漏洞危害</a>
凹凸曼 回答

圖片也用upload組件包裹起來

<Upload
  className={style['avatar-uploader']}
  name='file'
  showUploadList={false}
  multiple={true}
  data={this.getUploadToken()}
  accept='.png,.jpg'
  action='http://xxxxxx'
  beforeUpload={this.beforeUpload.bind(this)}
  onChange={this.handleUploadChange}
>
  {
    this.state.imageUrl
    ? <img src={this.state.imageUrl} className={style['avatar']} />
    : <Icon type='plus' className={style['avatar-uploader-trigger']} />
  }
</Upload>
別硬撐 回答

watch 應(yīng)該是在變量改變的時(shí)候觸發(fā)吧 第一次mounted以后 變量還沒有改變呢吧 你試試 beforeCreate或者beforeMount 方法中處理一下這個(gè)變量

賤人曾 回答

拋磚引玉,思路如下
鍵盤唯一?
1 -- 唯一,則通過@focus觸發(fā)方法,調(diào)起鍵盤,并通過變量保存觸發(fā)鍵盤的input的唯一標(biāo)志來確保改變的值對(duì)應(yīng)
2 -- 不唯一,與input組件構(gòu)成單獨(dú)的業(yè)務(wù)邏輯組件... 則內(nèi)部處理標(biāo)識(shí)...一般考慮時(shí)間戳
具體改變值的方法 - 字符串拼接 ,包括刪除 清空都是處理字符串,通過唯一標(biāo)志來處理對(duì)應(yīng)的變量

<input @focus="inputOnFocus" v-model="inputValue" id="test1"/>
...
data(){
 inutFocus:'inputId',
 inputValue:''
},
methods:{
  inputOnFocus(e){//如果列表渲染input 則可以通過item傳入相應(yīng)的參數(shù)定位到input,此處使用event事件
    this.showKeyBoard();
    this.inutFocus = e.target.id //傳入item則  = item.id
  },
  keyboardClick(){
    //省略鍵盤處理邏輯
    let clickValue = 'a';
    this.inputValue += clickValue;//類似這樣處理,退格刪除 清空也是處理inputValue
  }
}
荒城 回答

你可以把getlist卸載export default 外面 以一種純函數(shù)的方式去寫

function getList (pagesize,pages){
  return this.$axios.get('xxx') .....
}

然后在methods中

methods: {
getListInExpDau(){
 getList(10,1) ....
}
命于你 回答
var index= layedit.build('L_content', {
    tool: ['face','code','image' ,'link', 'unlink', '|', 'left', 'center','right','yulan','strong','italic','underline']
  }); //建立編輯器
 
$('button[type=submit]').click(function(){
                //獲取編輯器的值
             var content=layedit.getContent(index);
            $.ajax({
                url : action,
                type : method || 'get',
                data : data,
                success(res)
                {
                    cosole.log(res)
                })
情殺 回答

嗯?你不是已經(jīng)寫了判斷了嗎?

不將就 回答

根據(jù)你的代碼,建議嘗試以下方法
1、表單提交的php后端,第一行添加

header("Content-Type:text/html;charset=utf-8");

2、前端的html中的<head></head>中添加以下內(nèi)容

<meta charset="UTF-8">

添加以上兩個(gè)部分后,先取消掉相關(guān)的iconv()轉(zhuǎn)換函數(shù)測(cè)試一下,如果還有問題再在評(píng)論補(bǔ)充相關(guān)描述

骨殘心 回答

goods_list是對(duì)象屬性,應(yīng)該放在對(duì)象里(carts應(yīng)該是對(duì)象)表達(dá)式才正確。