靜態(tài)編譯刪除不了,動態(tài)的去 ext 目錄覆蓋就行
鼓搗半天,現(xià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}), //抽離成一個單獨的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'
}
}
參考文檔serverStatus,對每個輸出結(jié)果項都有詳細(xì)說明。mapped和mappedWithJournal只針對MMAPv1引擎有效
Only for the MMAPv1 storage engine.
3.2以后默認(rèn)的存儲引擎是WiredTiger,所以這兩個值一直為0。
至于映射方式,MMAPv1使用的就是Linux操作系統(tǒng)的內(nèi)存映射,篇幅所限沒法在這里解釋,不過網(wǎng)上已經(jīng)有很多相關(guān)的資料。
html 文件加上路徑
或者 第三個參數(shù)寫成 context={‘username': '', 'projects': ''}
參考簡數(shù)的博客教程:http://blog.jianshukeji.com/2... (示例中包含地圖)
看能不能能用抓包軟件抓包分析協(xié)議內(nèi)容
https://github.com/go-kit/kit 是一個微服務(wù)工具包,再搭配使用webserver https://github.com/gin-gonic/gin 可以很好的實現(xiàn)微服務(wù)架構(gòu)
試試下面這樣可以不
ul{
display: flex;
flex-wrap: wrap-reverse;
justify-content: center;
list-style: none;
width: 100%;
}為什么我的寫了,還是這樣子
ERROR in ./node_modules/_cube-ui@1.9.2@cube-ui/src/common/helpers/instantiate-component.js
Module parse failed: Unexpected token (10:4)
You may need an appropriate loader to handle this file type.
|
| const instance = new Vue({
| ...options,
| render(createElement) {
| let children = childrenRenderFn && childrenRenderFn(createElement)
@ ./node_modules/_cube-ui@1.9.2@cube-ui/src/common/helpers/create-api-component.js 1:0-58
@ ./node_modules/_cube-ui@1.9.2@cube-ui/src/common/helpers/create-api.js
@ ./node_modules/_cube-ui@1.9.2@cube-ui/src/modules/create-api/index.js
@ ./node_modules/_cube-ui@1.9.2@cube-ui/src/module.js
@ ./node_modules/_cube-ui@1.9.2@cube-ui/src/index.js
@ ./src/main.js
恩, 是的啦, 因為遞歸的話可能是:
<parent>
<child>
<child>
<child>
</child>
</child>
</child>
</parent>
那么最里層的child的父組件本來就是倒數(shù)第二層的子組件~
路由傳參數(shù)怎么傳的,直接拼的串?
SELECT * FROM talk_item
LEFT JOIN first_comment ON talk_item.tid=first_comment.tid
LEFT JOIN user ON talk_item.uid=user.uid
LEFT JOIN user ON first_comment.uid=user.uid
[WHERE 帖子篩選條件] LIMIT 10
最后自己發(fā)現(xiàn)了問題:
當(dāng)在beforeEnter里面,經(jīng)過判斷,想要跳轉(zhuǎn)到其他頁面,不能用 router.push()這個方法去跳轉(zhuǎn)。
必須使用 next({ path: '/' }) 這類型去進行跳轉(zhuǎn)(文檔有說明:鏈接:https://router.vuejs.org/zh/g...)
最后我使用 next({name:'CombineOrderShipments'}) 卻代替 router.push({name:'CombineOrderShipments'}) 進行路由跳轉(zhuǎn)
注意內(nèi)外的循環(huán)里的變量$i作用域
做過類似的。
因為這種原生組件層級最高,上面只能覆蓋cover-view 或者cover-image。且 只支持tap事件
所以 手勢滑動的輪播圖 就別想了。 不過,點擊 切換,或者 自動輪播還是可以的。
手寫個輪播圖 沒啥難度吧
發(fā)現(xiàn)自己不小心寫了一個axios裝飾器代碼:
axios.interceptors.request.use(function (config) {
console.log(config);
config.transformRequest = [function (data) {
let ret = '';
for (let it in data) {
ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&';
}
return ret;
}];
// 在發(fā)送請求之前做些什么
return config;
}, function (error) {
// 對請求錯誤做些什么
return Promise.reject(error);
});謝邀.
首先,不可能存在你說的 數(shù)據(jù)不確定的情況
在你即將畫圖的瞬間 你一定已經(jīng)得到確切的數(shù)據(jù)
問題可轉(zhuǎn)化為如何找到最大值
假設(shè)從接口得到的數(shù)據(jù)類似
const res = {
code:0,
message:"success",
data:[
// 0號位時間戳,1號位為值
[1533698210801,20],
[1533698212822,30],
[1533698230844,10],
[1533698233901,50],
[1533698236780,20],
]
};
// 先整理出一個一維數(shù)組
const values = res.data.map(([,v])=>v);
// 取出最大值
const max = Math.max(...values);
// 拿著最大值稍微往上按百分比再加一點去設(shè)置你的圖表option,略去
你寫成
max: function(value) {
/*往上預(yù)留20%*/
return value.max * 1.2;
}
不就好了
北大青鳥APTECH成立于1999年。依托北京大學(xué)優(yōu)質(zhì)雄厚的教育資源和背景,秉承“教育改變生活”的發(fā)展理念,致力于培養(yǎng)中國IT技能型緊缺人才,是大數(shù)據(jù)專業(yè)的國家
達內(nèi)教育集團成立于2002年,是一家由留學(xué)海歸創(chuàng)辦的高端職業(yè)教育培訓(xùn)機構(gòu),是中國一站式人才培養(yǎng)平臺、一站式人才輸送平臺。2014年4月3日在美國成功上市,融資1
北大課工場是北京大學(xué)校辦產(chǎn)業(yè)為響應(yīng)國家深化產(chǎn)教融合/校企合作的政策,積極推進“中國制造2025”,實現(xiàn)中華民族偉大復(fù)興的升級產(chǎn)業(yè)鏈。利用北京大學(xué)優(yōu)質(zhì)教育資源及背
博為峰,中國職業(yè)人才培訓(xùn)領(lǐng)域的先行者
曾工作于聯(lián)想擔(dān)任系統(tǒng)開發(fā)工程師,曾在博彥科技股份有限公司擔(dān)任項目經(jīng)理從事移動互聯(lián)網(wǎng)管理及研發(fā)工作,曾創(chuàng)辦藍懿科技有限責(zé)任公司從事總經(jīng)理職務(wù)負(fù)責(zé)iOS教學(xué)及管理工作。
浪潮集團項目經(jīng)理。精通Java與.NET 技術(shù), 熟練的跨平臺面向?qū)ο箝_發(fā)經(jīng)驗,技術(shù)功底深厚。 授課風(fēng)格 授課風(fēng)格清新自然、條理清晰、主次分明、重點難點突出、引人入勝。
精通HTML5和CSS3;Javascript及主流js庫,具有快速界面開發(fā)的能力,對瀏覽器兼容性、前端性能優(yōu)化等有深入理解。精通網(wǎng)頁制作和網(wǎng)頁游戲開發(fā)。
具有10 年的Java 企業(yè)應(yīng)用開發(fā)經(jīng)驗。曾經(jīng)歷任德國Software AG 技術(shù)顧問,美國Dachieve 系統(tǒng)架構(gòu)師,美國AngelEngineers Inc. 系統(tǒng)架構(gòu)師。