mirror of https://github.com/halo-dev/halo-admin
Build config.json.
parent
7ad394d936
commit
3778b04025
|
@ -44,6 +44,7 @@
|
|||
"eslint": "^5.15.3",
|
||||
"eslint-plugin-html": "^5.0.3",
|
||||
"eslint-plugin-vue": "^5.2.2",
|
||||
"generate-asset-webpack-plugin": "^0.3.0",
|
||||
"less": "^3.9.0",
|
||||
"less-loader": "^4.1.0",
|
||||
"vue-svg-icon-loader": "^2.1.1",
|
||||
|
|
|
@ -1,7 +1,13 @@
|
|||
<template>
|
||||
<div class="page-header-index-wide">
|
||||
<a-row :gutter="12">
|
||||
<a-col :xl="10" :lg="10" :md="10" :sm="24" :xs="24" :style="{ 'padding-bottom': '12px' }">
|
||||
<a-col
|
||||
:xl="10"
|
||||
:lg="10"
|
||||
:md="10"
|
||||
:sm="24"
|
||||
:xs="24"
|
||||
:style="{ 'padding-bottom': '12px' }">
|
||||
<a-card :title="title">
|
||||
<a-form layout="horizontal">
|
||||
<a-form-item label="网站名称:">
|
||||
|
@ -33,7 +39,13 @@
|
|||
</a-form>
|
||||
</a-card>
|
||||
</a-col>
|
||||
<a-col :xl="14" :lg="14" :md="14" :sm="24" :xs="24" :style="{ 'padding-bottom': '12px' }">
|
||||
<a-col
|
||||
:xl="14"
|
||||
:lg="14"
|
||||
:md="14"
|
||||
:sm="24"
|
||||
:xs="24"
|
||||
:style="{ 'padding-bottom': '12px' }">
|
||||
<a-card title="所有友情链接">
|
||||
<a-table :columns="columns" :dataSource="links" :loading="loading">
|
||||
<template slot="url" slot-scope="text">
|
||||
|
@ -119,7 +131,7 @@ export default {
|
|||
})
|
||||
},
|
||||
updateLink() {
|
||||
this.$message.success('编辑' + id)
|
||||
this.$message.success('编辑')
|
||||
},
|
||||
addLink() {
|
||||
this.title = '添加友情链接'
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
<a-select
|
||||
v-model="queryParam.status"
|
||||
placeholder="请选择文章状态"
|
||||
defaultValue="0"
|
||||
>
|
||||
<a-select-option
|
||||
v-for="status in Object.keys(postStatus)"
|
||||
|
|
|
@ -1,10 +1,18 @@
|
|||
const path = require('path')
|
||||
const webpack = require('webpack')
|
||||
const GenerateAssetPlugin = require('generate-asset-webpack-plugin')
|
||||
|
||||
function resolve(dir) {
|
||||
return path.join(__dirname, dir)
|
||||
}
|
||||
|
||||
var createServerConfig = function(compilation) {
|
||||
const configJson = {
|
||||
apiUrl: 'http://localhost:8090'
|
||||
}
|
||||
return JSON.stringify(configJson)
|
||||
}
|
||||
|
||||
// vue.config.js
|
||||
module.exports = {
|
||||
/*
|
||||
|
@ -24,7 +32,14 @@ module.exports = {
|
|||
configureWebpack: {
|
||||
plugins: [
|
||||
// Ignore all locale files of moment.js
|
||||
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/)
|
||||
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
|
||||
new GenerateAssetPlugin({
|
||||
filename: 'config.json',
|
||||
fn: (compilation, cb) => {
|
||||
cb(null, createServerConfig(compilation))
|
||||
},
|
||||
extraFiles: []
|
||||
})
|
||||
]
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in New Issue