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

鍍金池/ 問(wèn)答/ HTML問(wèn)答
乖乖瀦 回答

將swiper的 indicator-dots='true'刪掉,自己寫指示點(diǎn)代碼,當(dāng)swiper的current值等于循環(huán)圖片的最后一個(gè)值時(shí),將指示點(diǎn)的z-index改為-1
wxml:
clipboard.png
wxss:

clipboard.png
js:

clipboard.png

clipboard.png
效果:

clipboard.png
最后一張圖的時(shí)候指示點(diǎn)隱藏,按鈕出現(xiàn)
clipboard.png

何蘇葉 回答
app.get('/api/mes/get',function(req,res){
    const wa = req.session.wa 
    if(!req.session.name){
        res.json({code:100})//么登錄
        return;
    }else{
        // 根據(jù)session中的name來(lái)查詢數(shù)據(jù)
        db.limModel.findOne({name:req.session.name},(err,doc)=>{
            //更新限制次數(shù)
            var key = doc.getnum;
            // key++
            key++;
            if(!err){
                if(key<10){
                    // 根據(jù)session中的name來(lái)更新 getnum
                    db.limModel.update({name:req.session.name},{getnum:key},(e,d)=>{
                        if(!e){
                            //更新完成后,統(tǒng)計(jì)mesModel中條目數(shù)量
                            db.mesModel.find().count(function(err,num){
                                // 得到mesModel中的條目數(shù)量
                                var maxnum = num 
                                if(!err){
                                    // 隨機(jī)數(shù)生成方法
                                    function ya(){
                                        var randnum = Math.round(maxnum*Math.random());
                                        // 判斷 session中的wa值 是否和randnum相等
                                        if(wa.indexOf(randnum) == -1){
                                            // 如果相等,添加值到wa數(shù)組中
                                            wa.push(randnum)
                                            console.log(randnum)
                                            return randnum
                                        }else{
                                            return ya();
                                        }
                                    }
                                    // 立即執(zhí)行,應(yīng)該得到一個(gè)隨機(jī)數(shù)的值
                                    ya() // 第一次執(zhí)行
                                    // 輸出最新的數(shù)組
                                    console.log(req.session.wa)
                                    // mesModel 中獲取數(shù)據(jù),并且跳過(guò)ya();  這里已經(jīng)代碼有問(wèn)題,上面執(zhí)行過(guò)一次,這里又創(chuàng)建一個(gè)隨機(jī)數(shù)值。
                                    db.mesModel.find().skip(ya()/*第二次執(zhí)行*/).limit(1).exec(function(err,doc){
                                        const d1 = doc;
                                        db.userDetailsModel.findOne({name:req.session.name},(e,d)=>{
                                            if(!e){
                                                res.json({d1,d})
                                            }
                                        });
                                    })
                                }
                            })
                        }else{
                            console.log(e)
                        }
                    });
                }else{
                    res.json({code:200})//每天10次
                }
            }else{
                console.log(err)
            }
        })
    }
})
懶洋洋 回答

<li v-for="(children,index) in item.list" :class="index==1?'one':'two'"></li>

index==1這一塊對(duì)索引進(jìn)行判斷如果滿足條件添加one樣式,不滿足則是two,判斷語(yǔ)句和樣式換成自己想要的效果

凹凸曼 回答

這個(gè)你要看你 webapp外面打包那個(gè)殼子 有沒(méi)有給你提供“返回按鍵的”事件讓你去做。

或者說(shuō)你的h5頁(yè)面有沒(méi)有做成像瀏覽器回退一樣的效果,也就是說(shuō)你的頁(yè)面有路由。

要實(shí)現(xiàn)你想要的效果,就是要監(jiān)聽上面說(shuō)的“返回按鍵的事件”然后判斷你的頁(yè)面路由回退到根路由了,那就給出一個(gè)toast提示,再按一下推出app

葬憶 回答

你那個(gè)鏈接不是已經(jīng)教你如何用了么

放開她 回答

不知道你為什么要這樣做,只能說(shuō)個(gè)我認(rèn)為符合題意的答案


主要思路是當(dāng)比較到nth-of-type 或 class不同時(shí),直接去掉

// 首先將字符串按照>符合切割
const selector1="html>body>div.container>ul>li.item:nth-of-type(1)>a.active:nth-of-type(3)";
const selector2="html>body>div.container>ul>li.item:nth-of-type(2)>a:nth-of-type(3)"
const arr1 = selector1.split(/\s*\>\s*/);
const arr2 = selector2.split(/\s*\>\s*/);
// 假設(shè)分割后得到的數(shù)組長(zhǎng)度是一樣的
const text = arr1.map((item, index)=> {
    if(arr2[index]!==item){
        const child1 = item.split(/[\.\:]/);
        const child2 = arr2[index].split(/[\.\:]/);
        return child1.filter((item)=> child2.includes(item)).reduce((a, b)=> {
            if(b.startsWith('nth-of-type')){
                return a+':'+b;
            }else{
                return a+'.'+b;
            }
        })
    }else{
        return item;
    }
}).join('>');
console.log(text)

純粹只是看到別人,遇到問(wèn)題就想到用正則可以解決,很不爽,強(qiáng)答一波.瞎寫的,懶的寫注釋,我自己都看不懂

菊外人 回答

$表示字符串的結(jié)尾,是特殊字符,使用RegExp的時(shí)候,需要使用兩個(gè)\\轉(zhuǎn)義:

const template = "the age of ${name} is ${age}";
const data = { name: "xiaoming", age: 8};
console.log(render(template, data));
// 輸出: "the age of xiaoming is 8"

function render(template,data) {
  for (key in data) {
    if(key) {
      console.log(key);
      var re = new RegExp("\\${"+key+"}");
      // var re = "${" + key + "}"; // 這塊直接使用字符串就行,不用正則也可以
      console.log(re,data[key]);
      template = template.replace(re,data[key]);
      // console.log("test:",template.replace("${name}","xiaoming"));
      console.log(template); 
    }
  }
}
哎呦喂 回答

終于知道怎么弄了,于是來(lái)自問(wèn)自答:
首先安裝vetur,打開首選項(xiàng)-設(shè)置

加入2行

  "prettier.tabWidth": 4,
  "vetur.format.defaultFormatter.html": "prettier"
吢丕 回答
已經(jīng)自己看著文檔實(shí)現(xiàn)了!
做不到 回答
  1. a是(調(diào)用querySelector)返回的DOM原生element對(duì)象
  2. b是(調(diào)用jQ的$/jQuery,或者可以叫做jQuery構(gòu)造器)返回的jQ包裝對(duì)象,jQ包裝對(duì)象同時(shí)包含有原生DOM對(duì)象和一些jQ自己的東西
  3. b[0]==a是因?yàn)閖Q包裝對(duì)象在存儲(chǔ)時(shí)會(huì)把原生DOM對(duì)象存儲(chǔ)在key[0]的位置(這個(gè)你console一下就很清楚了)
淡墨 回答

不完全一樣但是原理相同,我已經(jīng)回答過(guò)一次了,去那邊看看吧:https://segmentfault.com/q/10...

安淺陌 回答

我也遇到這個(gè)問(wèn)題,關(guān)注一下。

黑與白 回答

let arr = [];
let arr2 = [];
for(let i = 0,j=0; i < arr.length; i++){

(j+1)*10 === i && j++
arr2[j].push(arr[i]);

}
瞎寫的

做不到 回答

這是break的語(yǔ)法,和out無(wú)關(guān),這個(gè)可以取任意名字。只要這二個(gè)地方一致:
out:{

for(var i = 0; i < 10; i++) {
    if(i === 5) break `out`;
}

}
作用就是break結(jié)束循環(huán),然后跳轉(zhuǎn)到out: {...},繼續(xù)執(zhí)行之后的代碼。

櫻花霓 回答

用render props實(shí)現(xiàn)

官方文檔
//父組件
render() {
    const props = Object.assign(
      {...this._panResponder.panHandlers},
      {style :{ backgroundColor: 'red'}}
    )
    return (
      <View
        style={{ backgroundColor: 'orange'... }}
      >
        {this.props.renderItem(props)}
      </View>
    )
  }
子組件
<Gesture
    renderItem={
        props => (
            <Image
                source={{ uri: 'https:xxx.jpg' }}
                {...props}
            />
        )
    }
/>
尐潴豬 回答
  1. 可以使用php mail擴(kuò)展。按手冊(cè)添加相關(guān)配置之后調(diào)用

http://php.net/manual/zh/mail...

$to = "someone@example.com";         // 郵件接收者
$subject = "參數(shù)郵件";                // 郵件標(biāo)題
$message = "Hello! 這是郵件的內(nèi)容。";  // 郵件正文
$from = "someonelse@example.com";   // 郵件發(fā)送者
$headers = "From:" . $from;         // 頭部信息設(shè)置
mail($to,$subject,$message,$headers);
echo "郵件已發(fā)送";

2.也可以使用phpmailer發(fā)送
https://github.com/PHPMailer/...

use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;

//Load Composer's autoloader
require 'vendor/autoload.php';

$mail = new PHPMailer(true);                              // Passing `true` enables exceptions
try {
    //Server settings
    $mail->SMTPDebug = 2;                                 // Enable verbose debug output
    $mail->isSMTP();                                      // Set mailer to use SMTP
    $mail->Host = 'smtp1.example.com;smtp2.example.com';  // Specify main and backup SMTP servers
    $mail->SMTPAuth = true;                               // Enable SMTP authentication
    $mail->Username = 'user@example.com';                 // SMTP username
    $mail->Password = 'secret';                           // SMTP password
    $mail->SMTPSecure = 'tls';                            // Enable TLS encryption, `ssl` also accepted
    $mail->Port = 587;                                    // TCP port to connect to

    //Recipients
    $mail->setFrom('from@example.com', 'Mailer');
    $mail->addAddress('joe@example.net', 'Joe User');     // Add a recipient
    $mail->addAddress('ellen@example.com');               // Name is optional
    $mail->addReplyTo('info@example.com', 'Information');
    $mail->addCC('cc@example.com');
    $mail->addBCC('bcc@example.com');

    //Attachments
    $mail->addAttachment('/var/tmp/file.tar.gz');         // Add attachments
    $mail->addAttachment('/tmp/image.jpg', 'new.jpg');    // Optional name

    //Content
    $mail->isHTML(true);                                  // Set email format to HTML
    $mail->Subject = 'Here is the subject';
    $mail->Body    = 'This is the HTML message body <b>in bold!</b>';
    $mail->AltBody = 'This is the body in plain text for non-HTML mail clients';

    $mail->send();
    echo 'Message has been sent';
} catch (Exception $e) {
    echo 'Message could not be sent. Mailer Error: ', $mail->ErrorInfo;
}
清夢(mèng) 回答

我記得bootstra-table顯示的都是JSON數(shù)據(jù)
,你可以試試接送數(shù)據(jù)