mirror of
https://gitee.com/ineo6/homebrew-install.git
synced 2025-06-24 21:39:15 +08:00
feat: ts定义
This commit is contained in:
parent
27cc7c4d21
commit
f38a1a806e
@ -72,7 +72,7 @@ const AppDetail = ({}) => {
|
||||
|
||||
const getCaskDetail = id => {
|
||||
fetch(
|
||||
'http://localhost:8000/homebrew/cask-detail?' +
|
||||
AVALON_SERVER + '/homebrew/cask-detail?' +
|
||||
queryString.stringify({
|
||||
id,
|
||||
}),
|
||||
@ -92,7 +92,7 @@ const AppDetail = ({}) => {
|
||||
|
||||
const getFormulaDetail = id => {
|
||||
fetch(
|
||||
'http://localhost:8000/homebrew/formula-detail?' +
|
||||
AVALON_SERVER + '/homebrew/formula-detail?' +
|
||||
queryString.stringify({
|
||||
id,
|
||||
}),
|
||||
|
@ -47,7 +47,7 @@ const CaskAndFormula = ({}) => {
|
||||
|
||||
const getCaskList = () => {
|
||||
fetch(
|
||||
'http://localhost:8000/homebrew/cask-list?' +
|
||||
AVALON_SERVER + '/homebrew/cask-list?' +
|
||||
queryString.stringify(listParams),
|
||||
)
|
||||
.then(response => response.json())
|
||||
@ -60,7 +60,7 @@ const CaskAndFormula = ({}) => {
|
||||
|
||||
const getFormula = () => {
|
||||
fetch(
|
||||
'http://localhost:8000/homebrew/formula-list?' +
|
||||
AVALON_SERVER + '/homebrew/formula-list?' +
|
||||
queryString.stringify(listParams),
|
||||
)
|
||||
.then(response => response.json())
|
||||
|
@ -4,6 +4,9 @@ export default defineConfig({
|
||||
title: 'Homebrew 中文网',
|
||||
mode: 'site',
|
||||
logo: '/images/homebrew-256x256.png',
|
||||
define: {
|
||||
'AVALON_SERVER': process.env.NODE_ENV === 'production' ? 'https://avalon.idayer.com' : 'http://localhost:8000',
|
||||
},
|
||||
favicon: '/favicon.ico',
|
||||
locales: [['zh-CN', '中文']],
|
||||
metas: [],
|
||||
|
@ -15,6 +15,7 @@
|
||||
},
|
||||
"allowSyntheticDefaultImports": true
|
||||
},
|
||||
"include": ["./global.d.ts"],
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"lib",
|
||||
|
8
typings.d.ts
vendored
8
typings.d.ts
vendored
@ -1,2 +1,10 @@
|
||||
declare module '*.css';
|
||||
declare module '*.less';
|
||||
|
||||
declare var AVALON_SERVER: string
|
||||
|
||||
declare global {
|
||||
var AVALON_SERVER: string
|
||||
}
|
||||
|
||||
export {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user