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

鍍金池/ 問(wèn)答/ HTML問(wèn)答
尤禮 回答

function test() {

document.getElementById('test').innerHTML--

}
module.exports = test
這樣可以用標(biāo)簽引用啵

<script src="./assets/js/index.js"></script>
報(bào)錯(cuò)module is not defined

抱緊我 回答

以前寫(xiě)的一個(gè)例子

<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>使用 FileReader 上傳文件</title>
</head>
<body>
    <input id="fileInput" type="file" />
    <button id="btn" type="button">上傳文件</button>
    <script>
        const fileInput = document.querySelector('#fileInput');
        const btn = document.querySelector('#btn');
        fileInput.addEventListener('change', function (e) {
            console.log(e);
            const file = e.target.files[0];
            // 可以獲取上傳的文件詳細(xì)信息
            console.log(file);
            const formData = new FormData();
            formData.append("fileName", "photo.png");
             
            const xhr = new XMLHttpRequest();
            // 假設(shè)上傳文件的接口叫 /upload
            xhr.open("POST", "/upload");
            xhr.send(formData);
        });
    </script>
</body>
</html>

參考

笨笨噠 回答

屬性選擇器。

陌如玉 回答

你只是設(shè)置了起始時(shí)間段,如果想要默認(rèn)顯示的是某一個(gè)時(shí)間,需要調(diào)用picker.setSelectedIndex()方法,對(duì)每一列的數(shù)據(jù)挨個(gè)設(shè)置選中項(xiàng)。
計(jì)算一下你期望顯示的時(shí)間,每一列的索引值,在初始化日期選擇器之后挨個(gè)設(shè)置下。
參考文檔http://dev.dcloud.net.cn/mui/ui/#picker,日期選擇組件是繼承自picker組件的。

荒城 回答

@C__C 你的博客里寫(xiě)的LodopFuncs.js在官網(wǎng)有嗎?沒(méi)看到下載這個(gè)文件的地方啊,,只有插件的安裝程序,,并且使用了這個(gè)插件,用戶打印的時(shí)候是不是也得安裝這個(gè)插件?

瘋子范 回答

如果前后端都是公司自己人做的,那和后端商量下,讓后端做這個(gè)事情比較好。前端的主要功能就是展示,數(shù)據(jù)格式化的工作不應(yīng)該放在前端來(lái)做。后端給出正確的數(shù)據(jù),是基本義務(wù)??赡苡捎诜N種原因,原來(lái)的數(shù)據(jù)格式不適用現(xiàn)在的前端,那就應(yīng)該提出來(lái),不應(yīng)該把不是自己的工作攬?jiān)谏砩?。并不是推卸?zé)任,至少在結(jié)構(gòu)化層面,后端做這個(gè)事讓人看起來(lái)更專業(yè)一些。分工上,前端的能力有限,格式化操作可能需要大量的循環(huán),很容易出現(xiàn)小馬拉大車的現(xiàn)象。如果堅(jiān)持前端來(lái)做這個(gè)事,那就無(wú)所謂優(yōu)雅不優(yōu)雅的問(wèn)題了,這么做已經(jīng)不優(yōu)雅了。

拮據(jù) 回答

是不是'style-loader' 沒(méi)有安裝好,使用npm install 或者 yarn重新安裝試試。

大濕胸 回答

如果循環(huán)體內(nèi)部用async/await呢?

茍活 回答

很顯然你漏了一個(gè)花括號(hào),你的webstorm里面不是給了你提示了么,我標(biāo)注出來(lái)的那一部分就是一個(gè)完整的域,這方面webstorm都做的很好的啊圖片描述

離殤 回答

前端如何通過(guò)后臺(tái)提供的接口文檔將數(shù)據(jù)接好?
1、接口地址、端口問(wèn)清楚
2、是否跨域,跨域如何解決
3、接口異常、報(bào)錯(cuò)、404、500等情況怎么給出相應(yīng)的提示或其他改善用戶體驗(yàn)的措施

react為什么不適合用在web端的項(xiàng)目上?
誰(shuí)說(shuō)的。。。

為什么有的項(xiàng)目有數(shù)據(jù)接口,有的項(xiàng)目數(shù)據(jù)由后臺(tái)寫(xiě)到前端的頁(yè)面?
有的是項(xiàng)目歷史遺留問(wèn)題
有的是因?yàn)閟eo的需求,需要直出頁(yè)面
有的是因?yàn)楫惒秸?qǐng)求對(duì)用戶的體驗(yàn)更友好

尛憇藌 回答

用state里面的arr直接存儲(chǔ)expandedrowKeys,
this.state.arr是這樣的:空、不空、空、不空...
使其處于不穩(wěn)定的狀態(tài),應(yīng)該使用穩(wěn)定的數(shù)組存儲(chǔ),然后定期賦值給state里面的expandedrowskeys
this.state.expandedrowsKeys是始終有一項(xiàng)值的

瘋子范 回答

純js實(shí)現(xiàn):
html

<div class="a ">11</div>
<div class="b ">11</div>
<div class="c ">11</div>

css

.b{
  background:red;
}

js

function addClass (elements,className){
        for (var i=0;i < elements.length;i++){
            var element = elements[i];
            if(!element.className.match(new RegExp('(\\s|^)'+className+'(\\s|$)'))){
                element.className +=' '+className;
            }
        }
    }
var elements = document.getElementsByTagName("div");
addClass(elements,"b");

更新

(setAttr 不覆蓋原來(lái)屬性,如果需要覆蓋修改下代碼即可)

function getAttr(element,attrName){
                if(typeof element!='object'||typeof attrName!='string') return;
                return attrName =='class'? element.className:element.getAttribute(attrName);
 }

function setAttr (element,attrName,attrValue){
                if(typeof element !='object'|| typeof attrName!='string' || typeof attrName!='string') return;
                            var _attrValue = getAttr(element,attrName);
                            if(!_attrValue){
                                    _attrValue =  attrValue;
                            }else if(!_attrValue.match(new RegExp('(\\s|^)'+attrValue+'(\\s|$)'))){
                                   _attrValue = _attrValue + ' ' + attrValue;
                                }
                            attrName == 'class'? element.className=_attrValue:element.setAttribute(attrName,_attrValue);

                        
 }

var element = document.getElementsByTagName("div")[0];
setAttr(element,"class","b");

setAttr(element,"id","b");

setAttr(element,"id","b c");

更新

封裝為類似jquery的調(diào)用方式


function MyJquery(selector){ //這里演示,只實(shí)現(xiàn)id選擇器
    this.element = document.getElementById(selector);
}

MyJquery.prototype.getAttr = function (attrName){
                if(typeof attrName!='string') return;
                return attrName =='class'? this.element.className:this.element.getAttribute(attrName);
 };
     
MyJquery.prototype.setAttr = function (attrName,attrValue){
                if(typeof attrName!='string' || typeof attrName!='string') return;
                 var _attrValue = this.getAttr(attrName);
                  if(!_attrValue){
                                        _attrValue =  attrValue;
                                    }else if(!_attrValue.match(new RegExp('(\\s|^)'+attrValue+'(\\s|$)'))){
                                        _attrValue = _attrValue + ' ' + attrValue;
                                    }
                  attrName == 'class'? this.element.className = _attrValue:this.element.setAttribute(attrName, _attrValue);
                        
 };
         
             
 var $ = function (selector) {
            return new MyJquery(selector);
}
$("aa").setAttr("class","b");
     
愚念 回答

用本地服務(wù)器可以打開(kāi)

console.log(1) 輸出了一次還是兩次?
試一下mouseenter事件呢?

囍槑 回答

擴(kuò)展的話只用修改types就行了

const types = {
  'CHARTS':['pie','bar','line'],
  'TEXT':['normalText','multText'],
  'MEDIA':['file','picture','music','video'],
}

export const typeMarry = (type) => {
   for(var k in types)
     if(types[k].includes(type))
       return k;
}
老梗 回答

基礎(chǔ)庫(kù)版本應(yīng)該是2.1.0 ,需要綁定小程序與公眾號(hào)

離夢(mèng) 回答

JS:

import lineChart from '../lineChart'
export default {
  name: 'demo',
  components: {
    'line-chart': lineChart 
  },
  // ...
}

HTML:

<template>
    <div>
        <line-chart></line-chart>
    </div>
</template>

基礎(chǔ)組件的自動(dòng)化全局注冊(cè)

溫衫 回答

css沒(méi)有辦法獲取前一個(gè)元素 不過(guò)可以獲取后面的元素

/*緊鄰*/
i+.ant-upload-list-item-info{}
/*所有*/
i~.ant-upload-list-item-info{}
焚音 回答
   function test() {
        function a(){
            console.log(" a I'm A ")
            return this
        }
        function b(){
            console.log("b I'm B")
            return this
        }
        console.log('test')
        return {
            a: a,
            b: b
        }
    }
    test().a().b()

jquery 是這方面的老大哥,你可以參考下 源碼,不過(guò)這個(gè)夠你 目前 用了
樓下 回答才是正解。。。