mirror of
https://gitee.com/dromara/go-view.git
synced 2026-04-23 00:00:12 +08:00
fix: 解决组件数据无法更新的问题
This commit is contained in:
+17
-11
@@ -4,11 +4,12 @@ import { RequestHttpEnum } from '@/enums/httpEnum'
|
||||
|
||||
// 单个X数据
|
||||
export const chartDataUrl = '/mock/chartData'
|
||||
export const rankListUrl = '/mock/rankList'
|
||||
export const numberFloatUrl = '/mock/number/float'
|
||||
export const numberIntUrl = '/mock/number/int'
|
||||
export const textUrl = '/mock/text'
|
||||
export const imageUrl = '/mock/image'
|
||||
export const rankListUrl = '/mock/rankList'
|
||||
export const scrollBoardUrl = '/mock/scrollBoard'
|
||||
|
||||
const mockObject: MockMethod[] = [
|
||||
{
|
||||
@@ -16,33 +17,38 @@ const mockObject: MockMethod[] = [
|
||||
// url: /\/mock\/mockData(|\?\S*)$/,
|
||||
url: chartDataUrl,
|
||||
method: RequestHttpEnum.GET,
|
||||
response: () => test.fetchMockData,
|
||||
},
|
||||
{
|
||||
url: rankListUrl,
|
||||
method: RequestHttpEnum.GET,
|
||||
response: () => test.fetchRankList,
|
||||
response: () => test.fetchMockData
|
||||
},
|
||||
{
|
||||
url: numberFloatUrl,
|
||||
method: RequestHttpEnum.GET,
|
||||
response: () => test.fetchNumberFloat,
|
||||
response: () => test.fetchNumberFloat
|
||||
},
|
||||
{
|
||||
url: numberIntUrl,
|
||||
method: RequestHttpEnum.GET,
|
||||
response: () => test.fetchNumberInt,
|
||||
response: () => test.fetchNumberInt
|
||||
},
|
||||
{
|
||||
url: textUrl,
|
||||
method: RequestHttpEnum.GET,
|
||||
response: () => test.fetchText,
|
||||
response: () => test.fetchText
|
||||
},
|
||||
{
|
||||
url: imageUrl,
|
||||
method: RequestHttpEnum.GET,
|
||||
response: () => test.fetchImage(Math.round(Math.random()*10)),
|
||||
response: () => test.fetchImage(Math.round(Math.random() * 10))
|
||||
},
|
||||
{
|
||||
url: rankListUrl,
|
||||
method: RequestHttpEnum.GET,
|
||||
response: () => test.fetchRankList
|
||||
},
|
||||
{
|
||||
url: scrollBoardUrl,
|
||||
method: RequestHttpEnum.GET,
|
||||
response: () => test.fetchScrollBoard
|
||||
}
|
||||
]
|
||||
|
||||
export default mockObject
|
||||
|
||||
Reference in New Issue
Block a user