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

鍍金池/ 問答
陌上花 回答

可以嘗試<keep-alive>進(jìn)行緩存,或者后退到B時(shí)重新渲染B里的數(shù)據(jù)

老梗 回答

toggleClass的用法就是,如果你選擇的頁面元素中存在class屬性,那就去掉calss屬性;如果不存在class屬性,就添加class屬性。

<a class="glyphicon glyphicon-chevron-down" id="row"></a>

$("#row").click(function(){
    $(this).toggleClass('glyphicon glyphicon-chevron-up');
}) 

點(diǎn)擊一次的時(shí)候,代碼去掉 ‘glyphicon’ 加上 ‘glyphicon-chevron-up’
代碼變成了

<a class="glyphicon-chevron-down glyphicon-chevron-up" id="row"></a>

所以圖標(biāo)顯示不出來

要想實(shí)現(xiàn)切換可以改成

$("#row").click(function(){
    $(this).toggleClass('glyphicon-chevron-down glyphicon-chevron-up');
})
下墜 回答
echo $PS1 

得出結(jié)果:

[033[01;32m]u@h[033[00m]:[033[01;36m]w[033[00m]&dollar;【空格】【空格】【空格】 【空格】

我查看一下PS1這個(gè)值,把整個(gè)復(fù)制下來檢車一遍,最后發(fā)現(xiàn)PS1這個(gè)值尾部多個(gè)幾個(gè)空格,去掉即可。

PS1="\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;36m\]\w\[\033[00m\]\$"
涼汐 回答

簡(jiǎn)寫方式只是針對(duì) fn(){} => fn: function() {}你寫方式引擎不認(rèn)識(shí)

莓森 回答

你在你的gulpfile文件里面把你的引入代碼壓縮的gulp插件和生成hash值的gulp插件的代碼注釋掉重新運(yùn)行g(shù)ulp就行了

不歸路 回答

不透明度為1不會(huì)有什么動(dòng)畫吧,而且點(diǎn)擊事件控制show的變化寫了么

礙你眼 回答

額,是我問題沒提好。運(yùn)行結(jié)果沒有報(bào)錯(cuò),所以這個(gè)不好改,我把所有代碼都檢查了n遍,最后我認(rèn)為,是因?yàn)槎拱陼?huì),這是我的猜測(cè)也不知道對(duì)不對(duì),會(huì)設(shè)定如果頻繁發(fā)出post請(qǐng)求會(huì)鎖定IP,cookie,然后你就沒辦法再操作,因?yàn)檫@個(gè)有時(shí)可以,有時(shí)又不行。

女流氓 回答
defer
This Boolean attribute is set to indicate to a browser that the script is meant to be executed after the document has been parsed, but before firing DOMContentLoaded.
Scripts with the defer attribute will execute in the order in which they appear in the document.
此屬性對(duì)內(nèi)聯(lián)的JS腳本無效。
script的defer值的設(shè)置就是告訴瀏覽器,這個(gè)腳本將在DOM文件解析完成后DOMContentLoaded事件發(fā)生之前執(zhí)行。有defer屬性的script腳本按在HTML文件中出現(xiàn)的順序順序執(zhí)行。

async HTML5
This is a Boolean attribute indicating that the browser should, if possible, execute the script asynchronously.
Dynamically inserted scripts execute asynchronously by default, so to turn on synchronous execution (i.e. scripts execute in the order they were inserted) set async=false.
此屬性對(duì)內(nèi)聯(lián)的JS腳本無效
設(shè)置async屬性就是告訴瀏覽器如果有可能就異步執(zhí)行指定的JS腳本,動(dòng)態(tài)插入的腳本默認(rèn)是異步加載執(zhí)行的,除非手動(dòng)設(shè)置async=false

defer 延遲執(zhí)行,但會(huì)在DOMContentLoaded事件發(fā)生之前執(zhí)行完畢,defer腳本會(huì)順序同步的執(zhí)行。defer延遲是相對(duì)于整個(gè)文檔的解析來講,指的腳本的開始加載的時(shí)間點(diǎn)。

async 異步執(zhí)行,具體什么時(shí)間點(diǎn)執(zhí)行由瀏覽器決定,具體的時(shí)間點(diǎn)不確定,但是確定會(huì)去加載執(zhí)行,設(shè)置了async的各個(gè)腳本加載執(zhí)行完畢的時(shí)間和它們放置插入的順序沒有確定的關(guān)系。和DOMContentLoaded事件發(fā)生也沒有確定的前后關(guān)系,可能在DOMContentLoaded事件前某個(gè)async腳本執(zhí)行完了,也有可能async腳本一個(gè)都沒有執(zhí)行。async指的是文檔的加載方式,同步的還是異步的,并不指定什么時(shí)候開始加載。一般都會(huì)處理成在DOMContentLoaded事件發(fā)生后,就相當(dāng)于這些腳本是通過JS腳本動(dòng)態(tài)添加的

normal.js

console.log("normal loaded js");

defer.js

console.log("defer loaded js");

html

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <script type="text/javascript" defer src="../js/defer.js"></script>
    <script type="text/javascript" src="../js/normal.js"></script>
    <title>Defer Script</title>
    <script>
        document.addEventListener("DOMContentLoaded", function(event) {
            console.log("DOMContentLoaded");
        });
    </script>
</head>
<body>

</body>
</html>

輸出

normal loaded js
defer loaded js
DOMContentLoaded
忘了我 回答

我已用其他方法解決 。找了很久,想了很久,貌似不能直接在驗(yàn)證里面做轉(zhuǎn)化,但是我想到了一個(gè)更好的解決辦法,解決方法如下 :

Laravel 有中間件,我們通常在中間件中做一些過濾 HTTP 請(qǐng)求的操作,但是還能做很多“請(qǐng)求預(yù)處理”操作,如 Laravel 內(nèi)置的 TrimStrings 中間件 和 ConvertEmptyStringsToNull 中間件 ,這兩個(gè)中間件都會(huì)把請(qǐng)求來的參數(shù)做些預(yù)處理操作,具體的使用請(qǐng)看源碼 。

所以 , 我的解決方法就是創(chuàng)建一個(gè) ConvertNumericStringsToInt 中間件 :

class ConvertNumericStringsToInt extends TransformsRequest
{
    /**
     * The attributes that should not be trimmed.
     *
     * @var array
     */
    protected $except = [
        //
    ];

    /**
     * Transform the given value.
     *
     * @param  string $key
     * @param  mixed $value
     * @return mixed
     */
    protected function transform($key, $value)
    {

        $transform = false;
        if ($key === 'id') {

            // 參數(shù)為 id
            $transform = true;
        } else if (1 === preg_match('/^[a-zA-Z][0-9a-zA-Z]*_id$/', $key)) {

            // 參數(shù)為 *_id
            $transform = true;
        } else if (1 === preg_match('/^[a-zA-Z][0-9a-zA-Z]*Id$/', $key)) {

            // 參數(shù)為 *Id
            $transform = true;
        }

        if ($transform) {

            if (!is_numeric($value)) {

                // 做你自己想做的處理( 如拋出異常 )
            }

            return is_numeric($value) ? intval($value) : $value;
        }

        // 返回原值
        return $value;
    }
}

這樣,只要我們的傳來的參數(shù)是 id , 或者 _id( user_id ),或者 Id( 如userId ),這個(gè)中間件都能檢測(cè),一旦發(fā)現(xiàn)不是數(shù)字 , 就會(huì)被處理( 如拋出異常 ),如果是數(shù)字的話,會(huì)被強(qiáng)轉(zhuǎn)為int類型,我們之后的程序中就不用做任何處理了。

根據(jù)自己的使用情況決定是否將此中間件應(yīng)用都全局中 。

鼓搗半天,現(xiàn)在如下配置,能成功運(yùn)行。還在查資料ing

build/utils.js

...
function generateLoaders (loader, loaderOptions) {
    const loaders = options.usePostCSS ? [cssLoader, postcssLoader] : [cssLoader]

    if (loader) {
      loaders.push({
        loader: loader + '-loader',
        options: Object.assign({}, loaderOptions, {
          sourceMap: options.sourceMap
        })
      })
    }

    // Extract CSS when that option is specified
    // (which is the case during production build)
    if (options.extract) {
      return ExtractTextPlugin.extract({
        use: loaders,
        publicPath: '../../',         // 解決css的字體圖標(biāo)無法找到的問題
        fallback: 'vue-style-loader'
      })
    } else {
      return ['vue-style-loader'].concat(loaders)
    }
  }
...

build/webpack.base.conf.js

'use strict'
const path = require('path')
const utils = require('./utils')
const config = require('../config')
const vueLoaderConfig = require('./vue-loader.conf')
var webpack = require('webpack')
const ExtractTextPlugin = require('extract-text-webpack-plugin')

function resolve (dir) {
  return path.join(__dirname, '..', dir)
}



module.exports = {
  context: path.resolve(__dirname, '../'),
  entry: {
    app: './src/main.js',
  },
  plugins: [
    new ExtractTextPlugin({filename: "main.css", allChunks: true}), //抽離成一個(gè)單獨(dú)的css
    new webpack.ProvidePlugin({
      $: "jquery",
      jQuery: "jquery",
      "windows.jQuery": "jquery"
    })
    
  ],
  output: {
    path: config.build.assetsRoot,
    filename: '[name].js',
    publicPath: process.env.NODE_ENV === 'production'
      ? config.build.assetsPublicPath
      : config.dev.assetsPublicPath
  },
  resolve: {
    extensions: ['.js', '.vue', '.json'],
    alias: {
      'vue$': 'vue/dist/vue.esm.js',
      '@': resolve('src'),
    }
  },
  module: {
    rules: [
      {
        test: /\.vue$/,
        loader: 'vue-loader',
        options: vueLoaderConfig
        // options: {loaders:{
        //   css: ExtractTextPlugin.extract({
        //       use: 'css-loader',
        //       fallback: 'vue-style-loader'
        //   })
        // }}
      },
      {
        test: /\.js$/,
        loader: 'babel-loader',
        include: [resolve('../src'), resolve('test')]
      },
      {
        test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
        loader: 'url-loader',
        options: {
          limit: 10000,
          name: utils.assetsPath('img/[name].[hash:7].[ext]')
        }
      },
      {
        test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/,
        loader: 'url-loader',
        options: {
          limit: 10000,
          name: utils.assetsPath('media/[name].[hash:7].[ext]')
        }
      },
      {
        test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
        loader: 'url-loader',
        options: {
          limit: 10000,
          name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
        }
      }
    ]
  },
  node: {
    // prevent webpack from injecting useless setImmediate polyfill because Vue
    // source contains it (although only uses it if it's native).
    setImmediate: false,
    // prevent webpack from injecting mocks to Node native modules
    // that does not make sense for the client
    dgram: 'empty',
    fs: 'empty',
    net: 'empty',
    tls: 'empty',
    child_process: 'empty'
  }
}
擱淺 回答

!flag是取反,不是置反

flag=!flag;可以
咕嚕嚕 回答

HTML5 中的 button 里可以放圖像,看手機(jī)是否支持 HTML5

萌二代 回答

不是代碼問題 可以問問運(yùn)維 這和網(wǎng)絡(luò)有關(guān)系

墨小羽 回答

form 表單需要阻止提交按鈕的默認(rèn)行為

你好胸 回答

沒有仔細(xì)看代碼,解決方案:

 input.on('keypress',function(event) {.....

把on前面加個(gè)解綁事件

input.off().on('keypress',function(event) {.....

可能有事件外面有循環(huán),先把事件解綁,在進(jìn)行添加就可以了,請(qǐng)采納