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

鍍金池/ 問答
我不懂 回答

先試著在
computed里面寫

captchaId: this.$store.getters.captchaId

尛曖昧 回答

405 通常是因為HTTP Method不對,即如果后臺只支持用POST提交,你卻用了GET等等

初心 回答

git revert是把這個 commit id相關(guān)的提交給回退了.如果這個commit后面還有人基于這個commit修改了的文件提交了代碼 revert就會產(chǎn)生沖突.

背叛者 回答

https://doc.webpack-china.org...
webpack支持特定的寫法,加載模塊你那樣寫還不支持。

喵小咪 回答
  1. 將你的request包裝成promise

  2. ctx.body = await requestxxx();

初心 回答

你打包的dll文件里面是不是有兩個vue模塊,如果是有兩個vue模塊那就是webpack.dll.conf.js的配置文件有問題

const path    = require('path');
const webpack = require('webpack');
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
const CompressionWebpackPlugin = require('compression-webpack-plugin')
const libraryName = 'vendor_lib'
let config = {
    entry: {
        vendor: ['vue/dist/vue.esm.js', 'vue-router','element-ui','axios']
    },
    output: {
        path: path.join(__dirname, '../static/js'),
        filename: '[name].dll.js',
        library: libraryName
    },
    resolve: {
        extensions: ['.js', '.vue', '.json'],
        alias: {
            'vue$': 'vue/dist/vue.esm.js',
        }
    },
    plugins: [
        new webpack.DefinePlugin({
            'process.env': {
                NODE_ENV: JSON.stringify('production')
            }
        }),
        new webpack.DllPlugin({
            path: path.join(__dirname, '../', '[name]-manifest.json'),
            name: libraryName,
            context: __dirname,
        }),
        new UglifyJsPlugin({
            uglifyOptions: {
              compress: {
                warnings: false
              }
            },
            sourceMap: true,
            parallel: true
        }),
        // new CompressionWebpackPlugin({
        //     asset: '[path].gz[query]',
        //     algorithm: 'gzip',
        //     test: /\.(js|css)$/,
        //     threshold: 10240,
        //     minRatio: 0.8
        // })
    ]
};
if(process.env.npm_config_report){
    const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
    config.plugins.push(new BundleAnalyzerPlugin())
}

module.exports = config;

用這份配置文件打包看下問題還存不存在,指定vue的版本(vue/dist/vue.esm.js)和打包的環(huán)境

//設(shè)置打包環(huán)境
new webpack.DefinePlugin({
    'process.env': {
        NODE_ENV: JSON.stringify('production')
    }
}),
舊言 回答

找到方法了

既然是開發(fā)環(huán)境配置,估計和devServer有關(guān),查看了webpack4官網(wǎng)關(guān)于devServer的部分,找到了devServer.historyApiFallback

看到了這部分

module.exports = {
  //...
  devServer: {
    historyApiFallback: {
      rewrites: [
        { from: /^\/$/, to: '/views/landing.html' },
        { from: /^\/subpage/, to: '/views/subpage.html' },
        { from: /./, to: '/views/404.html' }
      ]
    }
  }
};

恍然大悟,對于特定路由,可以指定靜態(tài)資源。
所以把vue.config.js 改為了如下

module.exports = {
  devServer: {
    port: 3007,
    host: 'localhost',
    open: true,
    historyApiFallback: {
      rewrites: [
        { from: /^\/login/, to: '/login.html' },
      ]
    },
    proxy: {
      '/api': {
        target: 'localhost: 3333',
        changeOrigin: true,
        // ws: true,
        pathRewrite: {
          '^/api': '/api'
        }
      }
    }
  },
  chainWebpack: config => {
  },
  pages: {
    index: {
      // page 的入口
      entry: 'src/main.js',
      // 模板來源
      template: 'public/index.html',
      // 在 dist/index.html 的輸出
      filename: 'index.html',
      // 當使用 title 選項時,
      // template 中的 title 標簽需要是 <title><%= htmlWebpackPlugin.options.title %></title>
      title: 'Index Page',
      // 在這個頁面中包含的塊,默認情況下會包含
      // 提取出來的通用 chunk 和 vendor chunk。
      chunks: ['chunk-vendors', 'chunk-common', 'index']
    },
    login: {
      entry: 'src/login.js',
      template: 'public/login.html',
      filename: 'login.html',
      title: '登陸',
      chunks: ['chunk-vendors', 'chunk-common', 'login']
    },
    // 當使用只有入口的字符串格式時,
    // 模板會被推導為 `public/subpage.html`
    // 并且如果找不到的話,就回退到 `public/index.html`。
    // 輸出文件名會被推導為 `subpage.html`。
    // subpage: 'src/subpage.js'
  },
}

這樣當我 window.location.href = '/login'時,匹配到login,靜態(tài)資源就會返回login.html, 而且 若login頁面若有多個路由時,login/route1login/route2也會正常匹配。

未命名 回答

能來個具體例子嗎?

看看你想要什么樣的數(shù)據(jù)結(jié)構(gòu)

還有你把html轉(zhuǎn)成json是為了什么?想要實現(xiàn)什么功能?

毀了心 回答

有什么區(qū)別沒有區(qū)別啊,再說了,上面的代碼輸出 也是[1,3]

醉淸風 回答

最安全的做法是加內(nèi)存(你用內(nèi)存數(shù)據(jù)庫當然要用大點的內(nèi)存啊)
而且既然是緩存,清除應該是沒有問題的,常規(guī)做法是把過期的數(shù)據(jù)清除掉

陌如玉 回答

router/index.js文件下的path路徑指的是路由路徑,你改為/pages/mine試試

冷眸 回答

加一條

redirect: 'layout/TwoLevelHeadlines'
淡墨 回答

第一次沒執(zhí)行完,再次調(diào)用會再執(zhí)行一次,因為不同的進程再處理,這肯定不是你想要的結(jié)果,所以你需要自行處理掉,文件鎖或者redis鎖都行。

孤慣 回答

哎 同事也遇到了這個問題,最后她把設(shè)置的placeholder去掉了 ie上就好了

安若晴 回答

為啥不這樣,請求父列表的時候,把子列表的數(shù)據(jù)一同返回,然后點擊時只做展開收起,不調(diào)接口

澐染 回答

驗証完後調(diào)用 document.activeElement.blur();

陌顏 回答

開發(fā) android 務必使用 Android Studio
這是官方唯一支持的IDE

撥弦 回答

模板中的 span 不用寫 [(ngModel)] 了,直接寫 {{textContent.length}} 就可以了。