commit
0acdc97330
|
@ -0,0 +1,4 @@
|
||||||
|
# These are supported funding model platforms
|
||||||
|
|
||||||
|
patreon: panjiachen
|
||||||
|
custom: https://panjiachen.github.io/vue-element-admin-site/donate
|
|
@ -12,3 +12,24 @@ about: Asking questions about use
|
||||||
Before asking a question, please make sure that you have tried your best to solve this problem.
|
Before asking a question, please make sure that you have tried your best to solve this problem.
|
||||||
If it's a code-related issue, please don't just take screenshots. Please provide an online demo to save each other's time.
|
If it's a code-related issue, please don't just take screenshots. Please provide an online demo to save each other's time.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
#### Steps to reproduce(问题复现步骤)
|
||||||
|
<!--
|
||||||
|
1. [xxx]
|
||||||
|
2. [xxx]
|
||||||
|
3. [xxxx]
|
||||||
|
-->
|
||||||
|
|
||||||
|
#### Screenshot or Gif(截图或动态图)
|
||||||
|
|
||||||
|
|
||||||
|
#### Link to minimal reproduction(最小可在线还原demo)
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Please only use Codepen, JSFiddle, CodeSandbox or a github repo
|
||||||
|
-->
|
||||||
|
|
||||||
|
#### Other relevant information(格外信息)
|
||||||
|
- Your OS:
|
||||||
|
- Node.js version:
|
||||||
|
- vue-element-admin version:
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "vue-element-admin",
|
"name": "vue-element-admin",
|
||||||
"version": "4.2.0",
|
"version": "4.2.1",
|
||||||
"description": "A magical vue admin. An out-of-box UI solution for enterprise applications. Newest development stack of vue. Lots of awesome features",
|
"description": "A magical vue admin. An out-of-box UI solution for enterprise applications. Newest development stack of vue. Lots of awesome features",
|
||||||
"author": "Pan <panfree23@gmail.com>",
|
"author": "Pan <panfree23@gmail.com>",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
@ -78,6 +78,7 @@
|
||||||
"@vue/cli-plugin-unit-jest": "3.5.3",
|
"@vue/cli-plugin-unit-jest": "3.5.3",
|
||||||
"@vue/cli-service": "3.5.3",
|
"@vue/cli-service": "3.5.3",
|
||||||
"@vue/test-utils": "1.0.0-beta.29",
|
"@vue/test-utils": "1.0.0-beta.29",
|
||||||
|
"autoprefixer": "^9.5.1",
|
||||||
"babel-core": "7.0.0-bridge.0",
|
"babel-core": "7.0.0-bridge.0",
|
||||||
"babel-eslint": "10.0.1",
|
"babel-eslint": "10.0.1",
|
||||||
"babel-jest": "23.6.0",
|
"babel-jest": "23.6.0",
|
||||||
|
|
|
@ -839,16 +839,20 @@ export default {
|
||||||
that.$emit('crop-upload-fail', err, field, ki)
|
that.$emit('crop-upload-fail', err, field, ki)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
closeHandler(e) {
|
||||||
|
if (this.value && (e.key == 'Escape' || e.keyCode == 27)) {
|
||||||
|
this.off()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
// 绑定按键esc隐藏此插件事件
|
// 绑定按键esc隐藏此插件事件
|
||||||
document.addEventListener('keyup', (e) => {
|
document.addEventListener('keyup', this.closeHandler)
|
||||||
if (this.value && (e.key == 'Escape' || e.keyCode == 27)) {
|
},
|
||||||
this.off()
|
destroyed() {
|
||||||
}
|
document.removeEventListener('keyup', this.closeHandler)
|
||||||
})
|
},
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,11 @@
|
||||||
|
let callbacks = []
|
||||||
|
|
||||||
|
function loadedTinymce() {
|
||||||
|
// to fixed https://github.com/PanJiaChen/vue-element-admin/issues/2144
|
||||||
|
// check is successfully downloaded script
|
||||||
|
return window.tinymce
|
||||||
|
}
|
||||||
|
|
||||||
const dynamicLoadScript = (src, callback) => {
|
const dynamicLoadScript = (src, callback) => {
|
||||||
const existingScript = document.getElementById(src)
|
const existingScript = document.getElementById(src)
|
||||||
const cb = callback || function() {}
|
const cb = callback || function() {}
|
||||||
|
@ -7,19 +15,28 @@ const dynamicLoadScript = (src, callback) => {
|
||||||
script.src = src // src url for the third-party library being loaded.
|
script.src = src // src url for the third-party library being loaded.
|
||||||
script.id = src
|
script.id = src
|
||||||
document.body.appendChild(script)
|
document.body.appendChild(script)
|
||||||
|
callbacks.push(cb)
|
||||||
const onEnd = 'onload' in script ? stdOnEnd : ieOnEnd
|
const onEnd = 'onload' in script ? stdOnEnd : ieOnEnd
|
||||||
onEnd(script, cb)
|
onEnd(script)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (existingScript && cb) cb(null, existingScript)
|
if (existingScript && cb) {
|
||||||
|
if (loadedTinymce()) {
|
||||||
|
cb(null, existingScript)
|
||||||
|
} else {
|
||||||
|
callbacks.push(cb)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function stdOnEnd(script, cb) {
|
function stdOnEnd(script) {
|
||||||
script.onload = function() {
|
script.onload = function() {
|
||||||
// this.onload = null here is necessary
|
// this.onload = null here is necessary
|
||||||
// because even IE9 works not like others
|
// because even IE9 works not like others
|
||||||
this.onerror = this.onload = null
|
this.onerror = this.onload = null
|
||||||
cb(null, script)
|
for (const cb of callbacks) {
|
||||||
|
cb(null, script)
|
||||||
|
}
|
||||||
|
callbacks = null
|
||||||
}
|
}
|
||||||
script.onerror = function() {
|
script.onerror = function() {
|
||||||
this.onerror = this.onload = null
|
this.onerror = this.onload = null
|
||||||
|
@ -27,11 +44,14 @@ const dynamicLoadScript = (src, callback) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function ieOnEnd(script, cb) {
|
function ieOnEnd(script) {
|
||||||
script.onreadystatechange = function() {
|
script.onreadystatechange = function() {
|
||||||
if (this.readyState !== 'complete' && this.readyState !== 'loaded') return
|
if (this.readyState !== 'complete' && this.readyState !== 'loaded') return
|
||||||
this.onreadystatechange = null
|
this.onreadystatechange = null
|
||||||
cb(null, script) // there is no way to catch loading errors in IE8
|
for (const cb of callbacks) {
|
||||||
|
cb(null, script) // there is no way to catch loading errors in IE8
|
||||||
|
}
|
||||||
|
callbacks = null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,7 +64,9 @@ export default {
|
||||||
fullscreen: false,
|
fullscreen: false,
|
||||||
languageTypeList: {
|
languageTypeList: {
|
||||||
'en': 'en',
|
'en': 'en',
|
||||||
'zh': 'zh_CN'
|
'zh': 'zh_CN',
|
||||||
|
'es': 'es_MX',
|
||||||
|
'ja': 'ja'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -114,6 +116,7 @@ export default {
|
||||||
const _this = this
|
const _this = this
|
||||||
window.tinymce.init({
|
window.tinymce.init({
|
||||||
selector: `#${this.tinymceId}`,
|
selector: `#${this.tinymceId}`,
|
||||||
|
language: this.languageTypeList['en'],
|
||||||
height: this.height,
|
height: this.height,
|
||||||
body_class: 'panel-body ',
|
body_class: 'panel-body ',
|
||||||
object_resizing: false,
|
object_resizing: false,
|
||||||
|
|
|
@ -16,7 +16,7 @@ export default {
|
||||||
return this.$store.state.tagsView.cachedViews
|
return this.$store.state.tagsView.cachedViews
|
||||||
},
|
},
|
||||||
key() {
|
key() {
|
||||||
return this.$route.fullPath
|
return this.$route.path
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ import { getToken } from '@/utils/auth'
|
||||||
// create an axios instance
|
// create an axios instance
|
||||||
const service = axios.create({
|
const service = axios.create({
|
||||||
baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url
|
baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url
|
||||||
withCredentials: true, // send cookies when cross-domain requests
|
// withCredentials: true, // send cookies when cross-domain requests
|
||||||
timeout: 5000 // request timeout
|
timeout: 5000 // request timeout
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ service.interceptors.response.use(
|
||||||
// if the custom code is not 20000, it is judged as an error.
|
// if the custom code is not 20000, it is judged as an error.
|
||||||
if (res.code !== 20000) {
|
if (res.code !== 20000) {
|
||||||
Message({
|
Message({
|
||||||
message: res.message || 'error',
|
message: res.message || 'Error',
|
||||||
type: 'error',
|
type: 'error',
|
||||||
duration: 5 * 1000
|
duration: 5 * 1000
|
||||||
})
|
})
|
||||||
|
@ -66,7 +66,7 @@ service.interceptors.response.use(
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
return Promise.reject(res.message || 'error')
|
return Promise.reject(new Error(res.message || 'Error'))
|
||||||
} else {
|
} else {
|
||||||
return res
|
return res
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,11 +5,12 @@
|
||||||
<script>
|
<script>
|
||||||
import echarts from 'echarts'
|
import echarts from 'echarts'
|
||||||
require('echarts/theme/macarons') // echarts theme
|
require('echarts/theme/macarons') // echarts theme
|
||||||
import { debounce } from '@/utils'
|
import resize from './mixins/resize'
|
||||||
|
|
||||||
const animationDuration = 6000
|
const animationDuration = 6000
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
mixins: [resize],
|
||||||
props: {
|
props: {
|
||||||
className: {
|
className: {
|
||||||
type: String,
|
type: String,
|
||||||
|
@ -33,18 +34,11 @@ export default {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.initChart()
|
this.initChart()
|
||||||
})
|
})
|
||||||
this.__resizeHandler = debounce(() => {
|
|
||||||
if (this.chart) {
|
|
||||||
this.chart.resize()
|
|
||||||
}
|
|
||||||
}, 100)
|
|
||||||
window.addEventListener('resize', this.__resizeHandler)
|
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
if (!this.chart) {
|
if (!this.chart) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
window.removeEventListener('resize', this.__resizeHandler)
|
|
||||||
this.chart.dispose()
|
this.chart.dispose()
|
||||||
this.chart = null
|
this.chart = null
|
||||||
},
|
},
|
||||||
|
|
|
@ -5,9 +5,10 @@
|
||||||
<script>
|
<script>
|
||||||
import echarts from 'echarts'
|
import echarts from 'echarts'
|
||||||
require('echarts/theme/macarons') // echarts theme
|
require('echarts/theme/macarons') // echarts theme
|
||||||
import { debounce } from '@/utils'
|
import resize from './mixins/resize'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
mixins: [resize],
|
||||||
props: {
|
props: {
|
||||||
className: {
|
className: {
|
||||||
type: String,
|
type: String,
|
||||||
|
@ -32,8 +33,7 @@ export default {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
chart: null,
|
chart: null
|
||||||
sidebarElm: null
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
@ -48,38 +48,18 @@ export default {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.initChart()
|
this.initChart()
|
||||||
})
|
})
|
||||||
|
|
||||||
if (this.autoResize) {
|
|
||||||
this.__resizeHandler = debounce(() => {
|
|
||||||
if (this.chart) {
|
|
||||||
this.chart.resize()
|
|
||||||
}
|
|
||||||
}, 100)
|
|
||||||
window.addEventListener('resize', this.__resizeHandler)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 监听侧边栏的变化
|
|
||||||
this.sidebarElm = document.getElementsByClassName('sidebar-container')[0]
|
|
||||||
this.sidebarElm && this.sidebarElm.addEventListener('transitionend', this.sidebarResizeHandler)
|
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
if (!this.chart) {
|
if (!this.chart) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (this.autoResize) {
|
|
||||||
window.removeEventListener('resize', this.__resizeHandler)
|
|
||||||
}
|
|
||||||
|
|
||||||
this.sidebarElm && this.sidebarElm.removeEventListener('transitionend', this.sidebarResizeHandler)
|
|
||||||
|
|
||||||
this.chart.dispose()
|
this.chart.dispose()
|
||||||
this.chart = null
|
this.chart = null
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
sidebarResizeHandler(e) {
|
initChart() {
|
||||||
if (e.propertyName === 'width') {
|
this.chart = echarts.init(this.$el, 'macarons')
|
||||||
this.__resizeHandler()
|
this.setOptions(this.chartData)
|
||||||
}
|
|
||||||
},
|
},
|
||||||
setOptions({ expectedData, actualData } = {}) {
|
setOptions({ expectedData, actualData } = {}) {
|
||||||
this.chart.setOption({
|
this.chart.setOption({
|
||||||
|
@ -149,10 +129,6 @@ export default {
|
||||||
animationEasing: 'quadraticOut'
|
animationEasing: 'quadraticOut'
|
||||||
}]
|
}]
|
||||||
})
|
})
|
||||||
},
|
|
||||||
initChart() {
|
|
||||||
this.chart = echarts.init(this.$el, 'macarons')
|
|
||||||
this.setOptions(this.chartData)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,9 +5,10 @@
|
||||||
<script>
|
<script>
|
||||||
import echarts from 'echarts'
|
import echarts from 'echarts'
|
||||||
require('echarts/theme/macarons') // echarts theme
|
require('echarts/theme/macarons') // echarts theme
|
||||||
import { debounce } from '@/utils'
|
import resize from './mixins/resize'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
mixins: [resize],
|
||||||
props: {
|
props: {
|
||||||
className: {
|
className: {
|
||||||
type: String,
|
type: String,
|
||||||
|
@ -31,18 +32,11 @@ export default {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.initChart()
|
this.initChart()
|
||||||
})
|
})
|
||||||
this.__resizeHandler = debounce(() => {
|
|
||||||
if (this.chart) {
|
|
||||||
this.chart.resize()
|
|
||||||
}
|
|
||||||
}, 100)
|
|
||||||
window.addEventListener('resize', this.__resizeHandler)
|
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
if (!this.chart) {
|
if (!this.chart) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
window.removeEventListener('resize', this.__resizeHandler)
|
|
||||||
this.chart.dispose()
|
this.chart.dispose()
|
||||||
this.chart = null
|
this.chart = null
|
||||||
},
|
},
|
||||||
|
|
|
@ -5,11 +5,12 @@
|
||||||
<script>
|
<script>
|
||||||
import echarts from 'echarts'
|
import echarts from 'echarts'
|
||||||
require('echarts/theme/macarons') // echarts theme
|
require('echarts/theme/macarons') // echarts theme
|
||||||
import { debounce } from '@/utils'
|
import resize from './mixins/resize'
|
||||||
|
|
||||||
const animationDuration = 3000
|
const animationDuration = 3000
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
mixins: [resize],
|
||||||
props: {
|
props: {
|
||||||
className: {
|
className: {
|
||||||
type: String,
|
type: String,
|
||||||
|
@ -33,18 +34,11 @@ export default {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.initChart()
|
this.initChart()
|
||||||
})
|
})
|
||||||
this.__resizeHandler = debounce(() => {
|
|
||||||
if (this.chart) {
|
|
||||||
this.chart.resize()
|
|
||||||
}
|
|
||||||
}, 100)
|
|
||||||
window.addEventListener('resize', this.__resizeHandler)
|
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
if (!this.chart) {
|
if (!this.chart) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
window.removeEventListener('resize', this.__resizeHandler)
|
|
||||||
this.chart.dispose()
|
this.chart.dispose()
|
||||||
this.chart = null
|
this.chart = null
|
||||||
},
|
},
|
||||||
|
|
|
@ -0,0 +1,56 @@
|
||||||
|
import { debounce } from '@/utils'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
$_sidebarElm: null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.$_initResizeEvent()
|
||||||
|
this.$_initSidebarResizeEvent()
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
this.$_destroyResizeEvent()
|
||||||
|
this.$_destroySidebarResizeEvent()
|
||||||
|
},
|
||||||
|
// to fixed bug when cached by keep-alive
|
||||||
|
// https://github.com/PanJiaChen/vue-element-admin/issues/2116
|
||||||
|
activated() {
|
||||||
|
this.$_initResizeEvent()
|
||||||
|
this.$_initSidebarResizeEvent()
|
||||||
|
},
|
||||||
|
deactivated() {
|
||||||
|
this.$_destroyResizeEvent()
|
||||||
|
this.$_destroySidebarResizeEvent()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// use $_ for mixins properties
|
||||||
|
// https://vuejs.org/v2/style-guide/index.html#Private-property-names-essential
|
||||||
|
$_resizeHandler() {
|
||||||
|
return debounce(() => {
|
||||||
|
if (this.chart) {
|
||||||
|
this.chart.resize()
|
||||||
|
}
|
||||||
|
}, 100)()
|
||||||
|
},
|
||||||
|
$_initResizeEvent() {
|
||||||
|
window.addEventListener('resize', this.$_resizeHandler)
|
||||||
|
},
|
||||||
|
$_destroyResizeEvent() {
|
||||||
|
window.removeEventListener('resize', this.$_resizeHandler)
|
||||||
|
},
|
||||||
|
$_sidebarResizeHandler(e) {
|
||||||
|
if (e.propertyName === 'width') {
|
||||||
|
this.$_resizeHandler()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
$_initSidebarResizeEvent() {
|
||||||
|
this.$_sidebarElm = document.getElementsByClassName('sidebar-container')[0]
|
||||||
|
this.$_sidebarElm && this.$_sidebarElm.addEventListener('transitionend', this.$_sidebarResizeHandler)
|
||||||
|
},
|
||||||
|
$_destroySidebarResizeEvent() {
|
||||||
|
this.$_sidebarElm && this.$_sidebarElm.removeEventListener('transitionend', this.$_sidebarResizeHandler)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -7,7 +7,7 @@
|
||||||
<PlatformDropdown v-model="postForm.platforms" />
|
<PlatformDropdown v-model="postForm.platforms" />
|
||||||
<SourceUrlDropdown v-model="postForm.source_uri" />
|
<SourceUrlDropdown v-model="postForm.source_uri" />
|
||||||
<el-button v-loading="loading" style="margin-left: 10px;" type="success" @click="submitForm">
|
<el-button v-loading="loading" style="margin-left: 10px;" type="success" @click="submitForm">
|
||||||
Publush
|
Publish
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button v-loading="loading" type="warning" @click="draftForm">
|
<el-button v-loading="loading" type="warning" @click="draftForm">
|
||||||
Draft
|
Draft
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="10">
|
<el-col :span="10">
|
||||||
<el-form-item label-width="120px" label="Publush Time:" class="postInfo-container-item">
|
<el-form-item label-width="120px" label="Publish Time:" class="postInfo-container-item">
|
||||||
<el-date-picker v-model="displayTime" type="datetime" format="yyyy-MM-dd HH:mm:ss" placeholder="Select date and time" />
|
<el-date-picker v-model="displayTime" type="datetime" format="yyyy-MM-dd HH:mm:ss" placeholder="Select date and time" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
:colors="['#99A9BF', '#F7BA2A', '#FF9900']"
|
:colors="['#99A9BF', '#F7BA2A', '#FF9900']"
|
||||||
:low-threshold="1"
|
:low-threshold="1"
|
||||||
:high-threshold="3"
|
:high-threshold="3"
|
||||||
style="margin-top:8px;"
|
style="display:inline-block"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
|
@ -30,6 +30,18 @@ export default {
|
||||||
createdTimes: 0
|
createdTimes: 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
activeName(val) {
|
||||||
|
this.$router.push(`${this.$route.path}?tab=${val}`)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
// init the default selected tab
|
||||||
|
const tab = this.$route.query.tab
|
||||||
|
if (tab) {
|
||||||
|
this.activeName = tab
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
showCreatedTimes() {
|
showCreatedTimes() {
|
||||||
this.createdTimes = this.createdTimes + 1
|
this.createdTimes = this.createdTimes + 1
|
||||||
|
|
|
@ -37,7 +37,7 @@ module.exports = {
|
||||||
// change xxx-api/login => mock/login
|
// change xxx-api/login => mock/login
|
||||||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||||
[process.env.VUE_APP_BASE_API]: {
|
[process.env.VUE_APP_BASE_API]: {
|
||||||
target: `http://localhost:${port}/mock`,
|
target: `http://127.0.0.1:${port}/mock`,
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
pathRewrite: {
|
pathRewrite: {
|
||||||
['^' + process.env.VUE_APP_BASE_API]: ''
|
['^' + process.env.VUE_APP_BASE_API]: ''
|
||||||
|
|
Loading…
Reference in New Issue