master
parent
d3e5a56c8d
commit
dc3f36181c
152
build/utils.js
152
build/utils.js
|
@ -4,99 +4,101 @@ const config = require('../config')
|
||||||
const ExtractTextPlugin = require('extract-text-webpack-plugin')
|
const ExtractTextPlugin = require('extract-text-webpack-plugin')
|
||||||
const packageConfig = require('../package.json')
|
const packageConfig = require('../package.json')
|
||||||
|
|
||||||
exports.assetsPath = function (_path) {
|
exports.assetsPath = function(_path) {
|
||||||
const assetsSubDirectory = process.env.NODE_ENV === 'production'
|
const assetsSubDirectory = process.env.NODE_ENV === 'production' ?
|
||||||
? config.build.assetsSubDirectory
|
config.build.assetsSubDirectory :
|
||||||
: config.dev.assetsSubDirectory
|
config.dev.assetsSubDirectory
|
||||||
|
|
||||||
return path.posix.join(assetsSubDirectory, _path)
|
return path.posix.join(assetsSubDirectory, _path)
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.cssLoaders = function (options) {
|
exports.cssLoaders = function(options) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
|
|
||||||
const cssLoader = {
|
const cssLoader = {
|
||||||
loader: 'css-loader',
|
loader: 'css-loader',
|
||||||
options: {
|
options: {
|
||||||
sourceMap: options.sourceMap
|
sourceMap: options.sourceMap
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const postcssLoader = {
|
const postcssLoader = {
|
||||||
loader: 'postcss-loader',
|
loader: 'postcss-loader',
|
||||||
options: {
|
options: {
|
||||||
sourceMap: options.sourceMap
|
sourceMap: options.sourceMap
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// generate loader string to be used with extract text plugin
|
// generate loader string to be used with extract text plugin
|
||||||
function generateLoaders (loader, loaderOptions) {
|
function generateLoaders(loader, loaderOptions) {
|
||||||
const loaders = options.usePostCSS ? [cssLoader, postcssLoader] : [cssLoader]
|
const loaders = options.usePostCSS ? [cssLoader, postcssLoader] : [cssLoader]
|
||||||
|
|
||||||
if (loader) {
|
if (loader) {
|
||||||
loaders.push({
|
loaders.push({
|
||||||
loader: loader + '-loader',
|
loader: loader + '-loader',
|
||||||
options: Object.assign({}, loaderOptions, {
|
options: Object.assign({}, loaderOptions, {
|
||||||
sourceMap: options.sourceMap
|
sourceMap: options.sourceMap
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// Extract CSS when that option is specified
|
// Extract CSS when that option is specified
|
||||||
// (which is the case during production build)
|
// (which is the case during production build)
|
||||||
if (options.extract) {
|
if (options.extract) {
|
||||||
return ExtractTextPlugin.extract({
|
return ExtractTextPlugin.extract({
|
||||||
use: loaders,
|
use: loaders,
|
||||||
publicPath:'../../',
|
publicPath:'../',
|
||||||
fallback: 'vue-style-loader'
|
fallback: 'vue-style-loader'
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
return ['vue-style-loader'].concat(loaders)
|
return ['vue-style-loader'].concat(loaders)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://vue-loader.vuejs.org/en/configurations/extract-css.html
|
// https://vue-loader.vuejs.org/en/configurations/extract-css.html
|
||||||
return {
|
return {
|
||||||
css: generateLoaders(),
|
css: generateLoaders(),
|
||||||
postcss: generateLoaders(),
|
postcss: generateLoaders(),
|
||||||
less: generateLoaders('less'),
|
less: generateLoaders('less'),
|
||||||
sass: generateLoaders('sass', { indentedSyntax: true }),
|
sass: generateLoaders('sass', {
|
||||||
scss: generateLoaders('sass'),
|
indentedSyntax: true
|
||||||
stylus: generateLoaders('stylus'),
|
}),
|
||||||
styl: generateLoaders('stylus')
|
scss: generateLoaders('sass'),
|
||||||
}
|
stylus: generateLoaders('stylus'),
|
||||||
|
styl: generateLoaders('stylus')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generate loaders for standalone style files (outside of .vue)
|
// Generate loaders for standalone style files (outside of .vue)
|
||||||
exports.styleLoaders = function (options) {
|
exports.styleLoaders = function(options) {
|
||||||
const output = []
|
const output = []
|
||||||
const loaders = exports.cssLoaders(options)
|
const loaders = exports.cssLoaders(options)
|
||||||
|
|
||||||
for (const extension in loaders) {
|
for (const extension in loaders) {
|
||||||
const loader = loaders[extension]
|
const loader = loaders[extension]
|
||||||
output.push({
|
output.push({
|
||||||
test: new RegExp('\\.' + extension + '$'),
|
test: new RegExp('\\.' + extension + '$'),
|
||||||
use: loader
|
use: loader
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
return output
|
return output
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.createNotifierCallback = () => {
|
exports.createNotifierCallback = () => {
|
||||||
const notifier = require('node-notifier')
|
const notifier = require('node-notifier')
|
||||||
|
|
||||||
return (severity, errors) => {
|
return (severity, errors) => {
|
||||||
if (severity !== 'error') return
|
if (severity !== 'error') return
|
||||||
|
|
||||||
const error = errors[0]
|
const error = errors[0]
|
||||||
const filename = error.file && error.file.split('!').pop()
|
const filename = error.file && error.file.split('!').pop()
|
||||||
|
|
||||||
notifier.notify({
|
notifier.notify({
|
||||||
title: packageConfig.name,
|
title: packageConfig.name,
|
||||||
message: severity + ': ' + error.name,
|
message: severity + ': ' + error.name,
|
||||||
subtitle: filename || '',
|
subtitle: filename || '',
|
||||||
icon: path.join(__dirname, 'logo.png')
|
icon: path.join(__dirname, 'logo.png')
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ module.exports = {
|
||||||
|
|
||||||
// Paths
|
// Paths
|
||||||
assetsSubDirectory: 'static',
|
assetsSubDirectory: 'static',
|
||||||
assetsPublicPath: './',
|
assetsPublicPath: '/',
|
||||||
proxyTable: {},
|
proxyTable: {},
|
||||||
|
|
||||||
// Various Dev Server settings
|
// Various Dev Server settings
|
||||||
|
|
|
@ -393,6 +393,11 @@ img {
|
||||||
padding: 48px 40px;
|
padding: 48px 40px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
overflow: hidden;
|
||||||
|
overflow-y: scroll;
|
||||||
|
}
|
||||||
|
.attendance-right::-webkit-scrollbar{
|
||||||
|
display: none;
|
||||||
}
|
}
|
||||||
.attendance-left-item-box {display: flex;align-items: center;font-size: 24px;color: #FFE68F;width: 100%;height: 76px;padding: 0 10px;}
|
.attendance-left-item-box {display: flex;align-items: center;font-size: 24px;color: #FFE68F;width: 100%;height: 76px;padding: 0 10px;}
|
||||||
.attendance-active {background-color: #6348b0;}
|
.attendance-active {background-color: #6348b0;}
|
||||||
|
|
Loading…
Reference in New Issue