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

鍍金池/ 問答/ HTML問答

@change="change(scope.$index,$event)";

methods:{

change(index,e){
    const value = e.target.value;
    this.$set(this.tableData[index],'exchangeNum',value * 10) 
}

}

應(yīng)該是可行的

笨笨噠 回答
<div> {{count}}</div>
<el-table :data="tableData" style="width: 100%;" @selection-change="handleSelectionChange" ref="multipleTable">
    <el-table-column align="center" type="selection" width="55" fixed></el-table-column>
    <el-table-column align="center" prop="name" label="方案名稱" width='120'></el-table-column>
    <el-table-column align="center" prop ="type" label="兌換類型"></el-table-column>
    <el-table-column align="center"  label="兌換個(gè)數(shù)" width="160px" prop ="exchangeNum">
      <template slot-scope="scope">
        <el-input placeholder="請(qǐng)輸入兌換個(gè)數(shù)" v-model="scope.row.exchangeNum" @input="change"></el-input>
      </template>
    </el-table-column>
    <el-table-column align="center" label="消耗積分" prop="costPointsNum"></el-table-column>
  </el-table>

//js
data() {
  return {
    tableData: [{
      type: '禮品',
      name: 'name1',
      exchangeNum:1,
      costPointsNum: 10
    },{
        type: '券',
      name: 'name2',
      exchangeNum:1,
      costPointsNum: 10
    }],
    count:0,
    selectData:[]
  }
},
methods:{
    handleSelectionChange(data){
    data && (this.selectData = data);
    this.computeCount()
  },
  change(a){
      a = a || 0;
    if(/^\d*$/.test(a))
        this.computeCount()
  },
  computeCount(){
      this.count = 0;
    this.selectData.map(i=>{
        this.count += Number(i.costPointsNum*i.exchangeNum)
    })
  }
}
兮顏 回答

parseInt("02",2)
2在2進(jìn)制不和發(fā) 但0是合法的 所以忽略2保留0
同parseInt("5m") 返回5一樣

玩控 回答

因?yàn)槟憬壎ǖ木褪莡ndefined,
1 var有聲明的提升作用,換為let或者const直接報(bào)錯(cuò)
2 在es3環(huán)境下this = undefined => window
var obj = {

con: (function(){
return function fn(x){
        console.log(x);        
        console.log(this);     
    };
console.log(obj);  // undefined
})()

}
你的代碼和這個(gè)一樣的效果
var obj = {

con: function fn(x){
        console.log(x);        
        console.log(this);     
    }

}

obj.con = obj.con.bind(undefined); // 將undefined換為obj就ok

故人嘆 回答

for循環(huán)和Promise.all作用域在同一級(jí) 所以i是5

茍活 回答

curveness設(shè)置為1試試,如果離要求差得遠(yuǎn),推薦加一些輔助的特殊樣式的點(diǎn)(實(shí)心,與線等寬,顏色與線相同,無(wú)tooltip,無(wú)hover樣式)來(lái)達(dá)到想要的效果

夏夕 回答

上面的你們?cè)搶弻忣}了,題主是在vue中使用 JSX 語(yǔ)法,他的綁定方法是對(duì)的。https://cn.vuejs.org/v2/guide...
應(yīng)該是onMousedown,而不是onMouseDown,不存在mouseDown這個(gè)事件。

愚念 回答

你把xhr.send放在onreadystatechange里面了, 請(qǐng)求沒有發(fā)出去.

var data = document.getElementById("weather");
    console.log(1);
    function fun_weather(url){
        var xhr = new XMLHttpRequest()
        xhr.open("GET", url);
        console.log(2);
        console.log(xhr.readyState);    
        xhr.onreadystatechange = function(){
            console.log(3);

            switch(xhr.readyState){
                case 0:
                    console.log("a");
                    break;
                case 1:
                    console.log("b");
                    break;
                case 2:
                    console.log("c");
                    break;
                case 3:
                    console.log("d");
                    break;
                case 4:
                    console.log("e");
                    data.innerHTML = xhr.responseText;
                    break;
            }
            console.log(4);
        }
        xhr.send();
    }
fun_weather("https://free-api.heweather.com/s6/weather/forecast?location=chongqing&key=*");
陪我終 回答

JSON.stringify完了寫文件。nodejs用fs模塊,很簡(jiǎn)單的

擱淺 回答

1

//var VueRouter = require ('vue-router')
import Router from 'vue-router'
//Vue.use (VueRouter)
Vue.use(Router)
是否use 

2 這個(gè)this.指向什么 倆個(gè)方向排查

詆毀你 回答

你上邊f(xié)orm的閉合標(biāo)簽寫錯(cuò)了,沒有加/
粗心的問題

安于心 回答

受上回答啟發(fā)確實(shí)跟css有關(guān),
但是:

html {
    height: 100%;
    overflow: scroll;
}
這樣寫是獲取不到值的
html {
    height: 100%;
    overflow: visible;
}
這樣寫就可以獲取到值了,所以跟html的高度是否是100%并無(wú)關(guān)系

這叫錨點(diǎn),你需要滾動(dòng)到的元素有個(gè)id,在url里的hash改成這個(gè)元素的id,瀏覽器就會(huì)自動(dòng)滾動(dòng)的這個(gè)元素所在的位置,比如說(shuō)你有個(gè)元素:

<div id='hello' /></div>

你的url如果是xxx/#hello 你輸入這個(gè)地址,瀏覽器會(huì)自動(dòng)滾動(dòng)的hello

單眼皮 回答

是不是這個(gè)樣子
圖片描述

<head>
    <meta charset="utf-8" />
    <title></title>
    <!--<link rel="stylesheet" href="css/style.css" />-->
    <style>
        #container {
            width: 500px;
            height: 250px;
            background-color: #ccc;
            margin: 0 auto;
            margin-top: 100px;
        }
        
        path {
            fill: none;
            stroke: cornflowerblue;
            stroke-width: 2px;
        }
        
        .domain,
        .tick line {
            stroke: gray;
            stroke-width: 1px;
        }
    </style>
</head>

<body>
    <div id="container"></div>
</body>
<script src="./../d3.js" charset="utf-8"></script>
<script>
    var width = 500,
        height = 250,
        margin = {
            left: 50,
            top: 30,
            right: 20,
            bottom: 20
        },
        g_width = width - margin.left - margin.right,
        g_height = height - margin.top - margin.bottom;

    //獲取div,向里面添加svg
    var svg = d3.select("#container")
        .append("svg:svg") //在“container”中插入svg
        .attr("width", width) //設(shè)置svg的寬度
        .attr("height", height) //設(shè)置svg的高度

    //添加g元素
    var g = d3.select("svg")
        .append("g")
        .attr("transform", "translate(" + margin.left + "," + margin.top + ")")

    var data = [0, 1, 3, 5, 9, 4, 2, 3, 6, 8] //定義一個(gè)數(shù)組,里面放置了一些任意數(shù)字
    var scale_x = d3.scaleLinear() //把曲線沿x軸按比例放大
        .domain([0, data.length - 1])
        .range([0, g_width])
    var scale_y = d3.scaleLinear() //把曲線沿y軸按比例放大
        .domain([0, d3.max(data)])
        .range([200, 0]) //使y軸按照數(shù)學(xué)中的方式顯示,而不是瀏覽器的格式

    var line_generator = d3.line() //d3中繪制曲線的函數(shù)
        .x(function(d, i) {
            return scale_x(i);
        }) //曲線中x的值
        .y(function(d) {
            return scale_y(d);
        }) //曲線中y的值
        .curve(d3.curveCardinal)
        //            .interpolate("curveCardinal") //把曲線設(shè)置光滑

    d3.select("g")
        .append("path")
        .attr("d", line_generator(data))

    var x_axis = d3.axisBottom(scale_x),
        y_axis = d3.axisLeft().scale(scale_y)

    g.append("g")
        .call(x_axis)
        .attr("transform", "translate(0," + g_height + ")")

    g.append("g")
        .call(y_axis)
        .append("text")
        .text("price(¥)")
        .attr("transform", "rotate(-90)") //text旋轉(zhuǎn)-90°
        .attr("text-anchor", "end") //字體尾部對(duì)齊
        .attr("dy", "1em") //沿y軸平移一個(gè)字體的大小


    var g = svg.selectAll('circle')
        .data(data)
        .enter()
        .append('g');
    g.append('circle')
        .attr('class', 'linecircle')
        .attr('cx', (d, i) => scale_x(i) + 50)
        .attr('cy', d => scale_y(d) + 30)
        .attr('r', 3.5)
        .on('mouseover', function() {
            d3.select(this).transition().duration(500).attr('r', 5);
        })
        .on('mouseout', function() {
            d3.select(this).transition().duration(500).attr('r', 3.5);
        });
    // <text x="20" y="20" font-family="sans-serif" font-size="20px" fill="red">Hello!</text>
    g.append('text')
        .attr('class', 'text')
        .attr('x', (d, i) => scale_x(i) + 50)
        .attr('y', d => scale_y(d) + 20)
        .text(d => d)
        .attr("font-size", "14px")
        .attr("fill", "blue");
</script>
我以為 回答

你得按照語(yǔ)法分析自己的代碼。很明顯,你在頁(yè)面就緒之后,聲明了一個(gè)變量 change_ani,它是一個(gè) anime 對(duì)象,其中顏色的部分是一個(gè)隨機(jī)顏色。當(dāng)動(dòng)畫開始時(shí),就從當(dāng)前顏色變化到隨機(jī)顏色。你每次點(diǎn)擊都是這個(gè)效果。

如果你需要讓每次點(diǎn)擊都隨機(jī)到另一種顏色,那你自然需要每次點(diǎn)擊都改變一下目標(biāo)顏色。

爛人 回答

如果確定代碼沒問題,試試用英文做文件名

我不懂 回答

這么理解,CommonsChunkPlugin 是為了提取出公共的模塊,那么 minChunks 就是說(shuō)提取出的公共模塊必須(至少)在哪些 chunks 中。

在 webpack 中 chunk 會(huì)組成 bundle(bundle 就是最后輸出的文件)。一般兩者是一一對(duì)應(yīng)的關(guān)系,但也不一定,一些插件可以改變,比如這個(gè) CommonsChunkPlugin

模塊就是 import、require 的東西,一個(gè) chunk 里一般會(huì)有多個(gè)模塊。

可以給 minChunks 傳數(shù)字和數(shù)組,這個(gè)好理解。而傳函數(shù)的時(shí)候 webpack 會(huì)用它來(lái)檢驗(yàn)每個(gè)模塊。

module.resource 是指正在被處理的文件。

                return (
                    module.resource &&
                    /\.js$/.test(module.resource) &&
                    module.resource.indexOf(path.join(__dirname, '../node_modules')) === 0
                )

就是“有正在處理文件” + “這個(gè)文件是 .js 后綴” + “這個(gè)文件是在 node_modules 中”

互擼娃 回答

你在編寫的時(shí)候不停的編譯應(yīng)該是你編輯器的問題,你看看你的編輯器是不是打開了自動(dòng)保存,eslint只會(huì)在你保存的時(shí)候去查找錯(cuò)誤。關(guān)閉eslint或者關(guān)閉編輯器的自動(dòng)保存,都能解決問題。