移除 app-shared 为独立模块
This commit is contained in:
@@ -255,4 +255,5 @@ export default class Header extends TSX<Props>()(Vue) implements Props {
|
|||||||
详细请看 各前端模块 存储库内的 帮助文档!!!
|
详细请看 各前端模块 存储库内的 帮助文档!!!
|
||||||
|
|
||||||
- [商品模块 app-product](https://gitee.com/bmycode/app-product)
|
- [商品模块 app-product](https://gitee.com/bmycode/app-product)
|
||||||
|
- [共享模块 app-shared](https://gitee.com/bmycode/app-shared)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# 包含 [skip actions] 的提交会跳过工作流
|
# 包含 [skip actions] 的提交会跳过工作流
|
||||||
git commit -m "修复样式问题 [skip actions]"
|
git commit -m "修复样式问题[skip actions]"
|
||||||
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
@@ -1,13 +0,0 @@
|
|||||||
# 请求协议 http or https(建议线上配置证书后,使用https)
|
|
||||||
VITE_PREFIX=http://
|
|
||||||
|
|
||||||
# Nacos 配置中心 ip:端口 | 域名
|
|
||||||
VITE_NACOS_ADDRESS=cluster.nacos.com
|
|
||||||
#VITE_NACOS_ADDRESS=192.168.139.84:8848
|
|
||||||
|
|
||||||
|
|
||||||
# 注册到 Nacos 的服务名称(微前端模块名称)
|
|
||||||
VITE_SERVER_NAME=app-shared
|
|
||||||
|
|
||||||
# 注册到 Nacos 的端口,也是前端运行的端口
|
|
||||||
VITE_SERVER_PORT=1333
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
# 请求协议 http or https(建议线上配置证书后,使用https)
|
|
||||||
VITE_PREFIX=http://
|
|
||||||
|
|
||||||
# Nacos 配置中心 ip:端口 | 域名
|
|
||||||
#VITE_NACOS_ADDRESS=cluster.nacos.com
|
|
||||||
VITE_NACOS_ADDRESS=192.168.139.84:8848
|
|
||||||
|
|
||||||
# 注册到 Nacos 的服务名称(微前端模块名称)
|
|
||||||
VITE_SERVER_NAME=app-shared
|
|
||||||
|
|
||||||
# 注册到 Nacos 的端口,也是前端运行的端口
|
|
||||||
VITE_SERVER_PORT=1333
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="">
|
|
||||||
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<link href="/favicon.ico" rel="icon">
|
|
||||||
<meta content="width=device-width, initial-scale=1.0" name="viewport">
|
|
||||||
<title>Vite App</title>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<div id="app"></div>
|
|
||||||
<script src="/src/main.ts" type="module"></script>
|
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "app-shared",
|
|
||||||
"version": "1.0.0",
|
|
||||||
"description": "",
|
|
||||||
"keywords": [],
|
|
||||||
"author": "",
|
|
||||||
"license": "ISC",
|
|
||||||
"scripts": {
|
|
||||||
"dev": "vite",
|
|
||||||
"dep": "concurrently \"vite build --watch\" \"npm run preview\"",
|
|
||||||
"preview": "vite preview --port 1333 --strictPort",
|
|
||||||
"build": "vite build",
|
|
||||||
"type-check": "vue-tsc --build"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"@element-plus/icons-vue": "^2.3.2",
|
|
||||||
"axios": "^1.12.2",
|
|
||||||
"element-plus": "^2.11.4",
|
|
||||||
"vite-plugin-nacos": "link:../vite-plugin-nacos",
|
|
||||||
"vue": "^3.5.22"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@vitejs/plugin-vue": "^6.0.1",
|
|
||||||
"@vitejs/plugin-vue-jsx": "^5.1.1",
|
|
||||||
"rollup-plugin-visualizer": "^6.0.3",
|
|
||||||
"typescript": "~5.9.3",
|
|
||||||
"vite": "^7.1.7",
|
|
||||||
"vite-federation": "^3.4.4"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
import { defineComponent, onMounted } from 'vue'
|
|
||||||
|
|
||||||
export default defineComponent({
|
|
||||||
setup() {
|
|
||||||
|
|
||||||
onMounted({})
|
|
||||||
return () => (
|
|
||||||
<>
|
|
||||||
<div class="order-federation-placeholder">
|
|
||||||
<h2>共享资源-联邦模块</h2>
|
|
||||||
<p>此页面仅用于 商品模块 的单独开发和调试,可临时引入组件进行本地测试,实际运行时由 主应用
|
|
||||||
加载本项目代码</p>
|
|
||||||
|
|
||||||
{/*<h2>本模块包含的功能:</h2>*/ }
|
|
||||||
{/*<ul>*/ }
|
|
||||||
{/* <li>1:获取商品首页的数据和展示</li>*/ }
|
|
||||||
{/* <li>2:点击视频进入详情页</li>*/ }
|
|
||||||
{/*</ul>*/ }
|
|
||||||
{/*<p></p>*/ }
|
|
||||||
</div>
|
|
||||||
</>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
export class HttpConfig {
|
|
||||||
// public static DevBaseUrl: string = "http://127.0.0.1:3210/api"
|
|
||||||
public static DevBaseUrl: string = window.__APP_CONFIG__.VITE_DEVBASEURL
|
|
||||||
|
|
||||||
// public static ProdBaseUrl: string = "http://127.0.0.1:3210/api/"
|
|
||||||
public static ProdBaseUrl: string = window.__APP_CONFIG__.VITE_PRODBASEURL
|
|
||||||
|
|
||||||
public static apiList: string = ""
|
|
||||||
}
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
export class ThemeConfig {
|
|
||||||
public static primaryColor: string = '#1890ff'; // 主色调
|
|
||||||
public static layoutType: 'side' | 'top' = 'side'; // 侧边栏布局
|
|
||||||
}
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
export * from './HttpConfig';
|
|
||||||
export * from './ThemeConfig';
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
# 临时占位,上传空文件夹,保存文件结构用,后面删除
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
# 临时占位,上传空文件夹,保存文件结构用,后面删除
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
export * from './infra';
|
|
||||||
export * from './utils';
|
|
||||||
export * from './config';
|
|
||||||
@@ -1,98 +0,0 @@
|
|||||||
import axios, {
|
|
||||||
AxiosError,
|
|
||||||
type AxiosInstance,
|
|
||||||
type AxiosRequestConfig,
|
|
||||||
AxiosResponse,
|
|
||||||
InternalAxiosRequestConfig
|
|
||||||
} from "axios";
|
|
||||||
import { UrlCheckUtils } from '../utils/index'
|
|
||||||
|
|
||||||
class AxiosInfra {
|
|
||||||
public instance: AxiosInstance;
|
|
||||||
|
|
||||||
public constructor() {
|
|
||||||
this.instance = axios.create({
|
|
||||||
baseURL: UrlCheckUtils.check(),
|
|
||||||
timeout: Number(window.__APP_CONFIG__.VITE_HTTPTIMEOUT),
|
|
||||||
headers: {
|
|
||||||
"Content-Type": "application/json"
|
|
||||||
}
|
|
||||||
});
|
|
||||||
this.ResponseInterceptor();
|
|
||||||
this.RequestInterceptor();
|
|
||||||
}
|
|
||||||
|
|
||||||
public async get(params: AxiosRequestConfig): Promise<any> {
|
|
||||||
return await this.instance.get(<string>params.url, {
|
|
||||||
params: params.data,
|
|
||||||
headers: Object.assign({ Authorization: localStorage.getItem("token") }, params.headers)
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public async post(params: AxiosRequestConfig): Promise<any> {
|
|
||||||
return await this.instance.post(<string>params.url, params.data, {
|
|
||||||
headers: Object.assign({ Authorization: localStorage.getItem("token") }, params.headers)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Put 请求
|
|
||||||
* 请求参数请参考接口:RequestParams
|
|
||||||
* @param params
|
|
||||||
*/
|
|
||||||
public async put(params: AxiosRequestConfig): Promise<any> {
|
|
||||||
return await this.instance.put(<string>params.url, params.data)
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* delete 请求
|
|
||||||
* 请求参数请参考接口:RequestParams
|
|
||||||
* @param params
|
|
||||||
*/
|
|
||||||
public async delete(params: AxiosRequestConfig): Promise<any> {
|
|
||||||
return await this.instance.delete(<string>params.url, { params: params.data })
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 响应拦截器
|
|
||||||
* @constructor
|
|
||||||
*/
|
|
||||||
public async ResponseInterceptor(): Promise<void> {
|
|
||||||
this.instance.interceptors.response.use(
|
|
||||||
(response: AxiosResponse) => {
|
|
||||||
return response.data.result;
|
|
||||||
},
|
|
||||||
(error: AxiosError) => {
|
|
||||||
console.log(`
|
|
||||||
❌ 请求错误 ❌
|
|
||||||
1、基地址: ${ error.config?.baseURL }
|
|
||||||
2、短地址: ${ error.config?.url }
|
|
||||||
3、请求 方式: ${ error.config?.method }
|
|
||||||
4、请求 参数: ${ JSON.stringify(error.config?.params) }
|
|
||||||
5、请求 头 : ${ JSON.stringify(error.config?.headers) }
|
|
||||||
|
|
||||||
------------------------------------------------------------
|
|
||||||
|
|
||||||
6、错误信息为: ${ error.message }
|
|
||||||
7、错误代码为: ${ error.stack }
|
|
||||||
`);
|
|
||||||
return Promise.reject(error)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 添加请求拦截器
|
|
||||||
* @constructor
|
|
||||||
*/
|
|
||||||
public async RequestInterceptor(): Promise<void> {
|
|
||||||
this.instance.interceptors.request.use((config: InternalAxiosRequestConfig) => {
|
|
||||||
return config
|
|
||||||
}, function (error: AxiosError) {
|
|
||||||
return Promise.reject(error)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
export default new AxiosInfra();
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
export {default as http} from "./AxiosInfra"
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
# 临时占位,上传空文件夹,保存文件结构用,后面删除
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
// app-shared/src/lib/element-plus.ts
|
|
||||||
import ElementPlus from 'element-plus'
|
|
||||||
import 'element-plus/dist/index.css';
|
|
||||||
import * as ElementPlusIcons from '@element-plus/icons-vue';
|
|
||||||
import { App } from 'vue';
|
|
||||||
|
|
||||||
|
|
||||||
export * from 'element-plus';
|
|
||||||
export * as Icons from '@element-plus/icons-vue';
|
|
||||||
|
|
||||||
// 保留你的 init 函数
|
|
||||||
export const init = (app: App) => {
|
|
||||||
app.use(ElementPlus);
|
|
||||||
};
|
|
||||||
|
|
||||||
// 如果你仍然需要一个默认导出,可以这样做
|
|
||||||
const sharedUI = {
|
|
||||||
...ElementPlus, // 合并 ElementPlus 的所有导出
|
|
||||||
Icons: ElementPlusIcons,
|
|
||||||
init
|
|
||||||
};
|
|
||||||
export default sharedUI;
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
import { createApp } from 'vue'
|
|
||||||
|
|
||||||
import App from './App'
|
|
||||||
|
|
||||||
|
|
||||||
createApp(App)
|
|
||||||
.mount('#app')
|
|
||||||
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
import "./normalize.less";
|
|
||||||
|
|
||||||
export const initNormalizeStyles = () => {
|
|
||||||
console.log("[app-shared] 清除默认样式normalize.less 已加载...")
|
|
||||||
}
|
|
||||||
@@ -1,470 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2020. bmy
|
|
||||||
*/
|
|
||||||
|
|
||||||
html, body {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
body, h1, h2, h3, h4, h5, h6, p, a {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
list-style: none;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
html {
|
|
||||||
font-family: sans-serif; /* 1 */
|
|
||||||
line-height: 1.15; /* 2 */
|
|
||||||
-ms-text-size-adjust: 100%; /* 3 */
|
|
||||||
-webkit-text-size-adjust: 100%; /* 3 */
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
|
||||||
line-height: 1.5;
|
|
||||||
font-size: 16px;
|
|
||||||
width: 100%;
|
|
||||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
||||||
background-color: #fafafa;
|
|
||||||
color: rgba(0, 0, 0, 0.87);
|
|
||||||
}
|
|
||||||
|
|
||||||
li {
|
|
||||||
list-style: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
article,
|
|
||||||
aside,
|
|
||||||
footer,
|
|
||||||
header,
|
|
||||||
nav,
|
|
||||||
section {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Correct the font size and margin on `h1` elements within `section` and
|
|
||||||
* `article` contexts in Chrome, Firefox, and Safari.
|
|
||||||
*/
|
|
||||||
|
|
||||||
h1 {
|
|
||||||
font-size: 2em;
|
|
||||||
margin: 0.67em 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Grouping content
|
|
||||||
========================================================================== */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Add the correct display in IE 9-.
|
|
||||||
* 1. Add the correct display in IE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
figcaption,
|
|
||||||
figure,
|
|
||||||
main { /* 1 */
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Add the correct margin in IE 8.
|
|
||||||
*/
|
|
||||||
|
|
||||||
figure {
|
|
||||||
margin: 1em 40px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 1. Add the correct box sizing in Firefox.
|
|
||||||
* 2. Show the overflow in Edge and IE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
hr {
|
|
||||||
box-sizing: content-box; /* 1 */
|
|
||||||
height: 0; /* 1 */
|
|
||||||
overflow: visible; /* 2 */
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 1. Correct the inheritance and scaling of font size in all browsers.
|
|
||||||
* 2. Correct the odd `em` font sizing in all browsers.
|
|
||||||
*/
|
|
||||||
|
|
||||||
pre {
|
|
||||||
font-family: monospace, monospace; /* 1 */
|
|
||||||
font-size: 1em; /* 2 */
|
|
||||||
white-space: pre-wrap;
|
|
||||||
word-break: break-all;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Text-level semantics
|
|
||||||
========================================================================== */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 1. Remove the gray background on active links in IE 10.
|
|
||||||
* 2. Remove gaps in links underline in iOS 8+ and Safari 8+.
|
|
||||||
*/
|
|
||||||
|
|
||||||
a {
|
|
||||||
text-decoration: none;
|
|
||||||
background-color: transparent; /* 1 */
|
|
||||||
-webkit-text-decoration-skip: objects; /* 2 */
|
|
||||||
user-select: none;
|
|
||||||
-webkit-user-select: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Remove the outline on focused links when they are also active or hovered
|
|
||||||
* in all browsers (opinionated).
|
|
||||||
*/
|
|
||||||
|
|
||||||
a:active,
|
|
||||||
a:hover {
|
|
||||||
outline-width: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 1. Remove the bottom border in Firefox 39-.
|
|
||||||
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
|
|
||||||
*/
|
|
||||||
|
|
||||||
abbr[title] {
|
|
||||||
border-bottom: none; /* 1 */
|
|
||||||
text-decoration: underline; /* 2 */
|
|
||||||
text-decoration: underline dotted; /* 2 */
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Prevent the duplicate application of `bolder` by the next rule in Safari 6.
|
|
||||||
*/
|
|
||||||
|
|
||||||
b,
|
|
||||||
strong {
|
|
||||||
font-weight: inherit;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Add the correct font weight in Chrome, Edge, and Safari.
|
|
||||||
*/
|
|
||||||
|
|
||||||
b,
|
|
||||||
strong {
|
|
||||||
font-weight: bolder;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 1. Correct the inheritance and scaling of font size in all browsers.
|
|
||||||
* 2. Correct the odd `em` font sizing in all browsers.
|
|
||||||
*/
|
|
||||||
|
|
||||||
code,
|
|
||||||
kbd,
|
|
||||||
samp {
|
|
||||||
font-family: monospace, monospace; /* 1 */
|
|
||||||
font-size: 1em; /* 2 */
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Add the correct font style in Android 4.3-.
|
|
||||||
*/
|
|
||||||
|
|
||||||
dfn {
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Add the correct background and color in IE 9-.
|
|
||||||
*/
|
|
||||||
|
|
||||||
mark {
|
|
||||||
background-color: #ff0;
|
|
||||||
color: #000;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Add the correct font size in all browsers.
|
|
||||||
*/
|
|
||||||
|
|
||||||
small {
|
|
||||||
font-size: 80%;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Prevent `sub` and `sup` elements from affecting the line height in
|
|
||||||
* all browsers.
|
|
||||||
*/
|
|
||||||
|
|
||||||
sub,
|
|
||||||
sup {
|
|
||||||
font-size: 75%;
|
|
||||||
line-height: 0;
|
|
||||||
position: relative;
|
|
||||||
vertical-align: baseline;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub {
|
|
||||||
bottom: -0.25em;
|
|
||||||
}
|
|
||||||
|
|
||||||
sup {
|
|
||||||
top: -0.5em;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Embedded content
|
|
||||||
========================================================================== */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Add the correct display in IE 9-.
|
|
||||||
*/
|
|
||||||
|
|
||||||
audio,
|
|
||||||
video {
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Add the correct display in iOS 4-7.
|
|
||||||
*/
|
|
||||||
|
|
||||||
audio:not([controls]) {
|
|
||||||
display: none;
|
|
||||||
height: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Remove the border on images inside links in IE 10-.
|
|
||||||
*/
|
|
||||||
|
|
||||||
img {
|
|
||||||
border-style: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Hide the overflow in IE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
svg:not(:root) {
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Forms
|
|
||||||
========================================================================== */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 1. Change the font styles in all browsers (opinionated).
|
|
||||||
* 2. Remove the margin in Firefox and Safari.
|
|
||||||
*/
|
|
||||||
|
|
||||||
button,
|
|
||||||
input,
|
|
||||||
optgroup,
|
|
||||||
select,
|
|
||||||
textarea {
|
|
||||||
font-family: sans-serif; /* 1 */
|
|
||||||
font-size: 100%; /* 1 */
|
|
||||||
line-height: 1.15; /* 1 */
|
|
||||||
margin: 0; /* 2 */
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Show the overflow in IE.
|
|
||||||
* 1. Show the overflow in Edge.
|
|
||||||
*/
|
|
||||||
|
|
||||||
button,
|
|
||||||
input { /* 1 */
|
|
||||||
overflow: visible;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Remove the inheritance of text transform in Edge, Firefox, and IE.
|
|
||||||
* 1. Remove the inheritance of text transform in Firefox.
|
|
||||||
*/
|
|
||||||
|
|
||||||
button,
|
|
||||||
select { /* 1 */
|
|
||||||
text-transform: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
|
|
||||||
* controls in Android 4.
|
|
||||||
* 2. Correct the inability to style clickable types in iOS and Safari.
|
|
||||||
*/
|
|
||||||
|
|
||||||
button,
|
|
||||||
html [type="button"], /* 1 */
|
|
||||||
[type="reset"],
|
|
||||||
[type="submit"] {
|
|
||||||
-webkit-appearance: button; /* 2 */
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Remove the inner border and padding in Firefox.
|
|
||||||
*/
|
|
||||||
|
|
||||||
button::-moz-focus-inner,
|
|
||||||
[type="button"]::-moz-focus-inner,
|
|
||||||
[type="reset"]::-moz-focus-inner,
|
|
||||||
[type="submit"]::-moz-focus-inner {
|
|
||||||
border-style: none;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Restore the focus styles unset by the previous rule.
|
|
||||||
*/
|
|
||||||
|
|
||||||
button:-moz-focusring,
|
|
||||||
[type="button"]:-moz-focusring,
|
|
||||||
[type="reset"]:-moz-focusring,
|
|
||||||
[type="submit"]:-moz-focusring {
|
|
||||||
outline: 1px dotted ButtonText;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Change the border, margin, and padding in all browsers (opinionated).
|
|
||||||
*/
|
|
||||||
|
|
||||||
fieldset {
|
|
||||||
border: 1px solid #c0c0c0;
|
|
||||||
margin: 0 2px;
|
|
||||||
padding: 0.35em 0.625em 0.75em;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 1. Correct the text wrapping in Edge and IE.
|
|
||||||
* 2. Correct the color inheritance from `fieldset` elements in IE.
|
|
||||||
* 3. Remove the padding so developers are not caught out when they zero out
|
|
||||||
* `fieldset` elements in all browsers.
|
|
||||||
*/
|
|
||||||
|
|
||||||
legend {
|
|
||||||
box-sizing: border-box; /* 1 */
|
|
||||||
color: inherit; /* 2 */
|
|
||||||
display: table; /* 1 */
|
|
||||||
max-width: 100%; /* 1 */
|
|
||||||
padding: 0; /* 3 */
|
|
||||||
white-space: normal; /* 1 */
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 1. Add the correct display in IE 9-.
|
|
||||||
* 2. Add the correct vertical alignment in Chrome, Firefox, and Opera.
|
|
||||||
*/
|
|
||||||
|
|
||||||
progress {
|
|
||||||
display: inline-block; /* 1 */
|
|
||||||
vertical-align: baseline; /* 2 */
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Remove the default vertical scrollbar in IE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
textarea {
|
|
||||||
overflow: auto;
|
|
||||||
resize: vertical;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 1. Add the correct box sizing in IE 10-.
|
|
||||||
* 2. Remove the padding in IE 10-.
|
|
||||||
*/
|
|
||||||
|
|
||||||
[type="checkbox"],
|
|
||||||
[type="radio"] {
|
|
||||||
box-sizing: border-box; /* 1 */
|
|
||||||
padding: 0; /* 2 */
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Correct the cursor style of increment and decrement buttons in Chrome.
|
|
||||||
*/
|
|
||||||
|
|
||||||
[type="number"]::-webkit-inner-spin-button,
|
|
||||||
[type="number"]::-webkit-outer-spin-button {
|
|
||||||
height: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 1. Correct the odd appearance in Chrome and Safari.
|
|
||||||
* 2. Correct the outline style in Safari.
|
|
||||||
*/
|
|
||||||
|
|
||||||
[type="search"] {
|
|
||||||
-webkit-appearance: textfield; /* 1 */
|
|
||||||
outline-offset: -2px; /* 2 */
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Remove the inner padding and cancel buttons in Chrome and Safari on macOS.
|
|
||||||
*/
|
|
||||||
|
|
||||||
[type="search"]::-webkit-search-cancel-button,
|
|
||||||
[type="search"]::-webkit-search-decoration {
|
|
||||||
-webkit-appearance: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 1. Correct the inability to style clickable types in iOS and Safari.
|
|
||||||
* 2. Change font properties to `inherit` in Safari.
|
|
||||||
*/
|
|
||||||
|
|
||||||
::-webkit-file-upload-button {
|
|
||||||
-webkit-appearance: button; /* 1 */
|
|
||||||
font: inherit; /* 2 */
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Interactive
|
|
||||||
========================================================================== */
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Add the correct display in IE 9-.
|
|
||||||
* 1. Add the correct display in Edge, IE, and Firefox.
|
|
||||||
*/
|
|
||||||
|
|
||||||
details, /* 1 */
|
|
||||||
menu {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Add the correct display in all browsers.
|
|
||||||
*/
|
|
||||||
|
|
||||||
summary {
|
|
||||||
display: list-item;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Scripting
|
|
||||||
========================================================================== */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Add the correct display in IE 9-.
|
|
||||||
*/
|
|
||||||
|
|
||||||
canvas {
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Add the correct display in IE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
template {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Hidden
|
|
||||||
========================================================================== */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Add the correct display in IE 10-.
|
|
||||||
*/
|
|
||||||
|
|
||||||
[hidden] {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
import "./variables.less";
|
|
||||||
// import "./mixins.less";
|
|
||||||
|
|
||||||
export const initPubStyles = () => {
|
|
||||||
console.log("[app-shared] variables.less 和 mixins.less 已加载...")
|
|
||||||
}
|
|
||||||
@@ -1,297 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2020. bmy
|
|
||||||
*/
|
|
||||||
|
|
||||||
.clearfix() {
|
|
||||||
&:after,
|
|
||||||
&:before {
|
|
||||||
content: " ";
|
|
||||||
display: table;
|
|
||||||
}
|
|
||||||
&:after {
|
|
||||||
clear: both;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.hairline(@position, @color) when (@position = top) {
|
|
||||||
&:before {
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
top: 0;
|
|
||||||
bottom: auto;
|
|
||||||
right: auto;
|
|
||||||
height: 1px;
|
|
||||||
width: 100%;
|
|
||||||
background-color: @color;
|
|
||||||
display: block;
|
|
||||||
z-index: 15;
|
|
||||||
// .transform-origin(50% 0%);
|
|
||||||
html.pixel-ratio-2 & {
|
|
||||||
.transform(scaleY(0.5));
|
|
||||||
}
|
|
||||||
|
|
||||||
html.pixel-ratio-3 & {
|
|
||||||
.transform(scaleY(0.33));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.hairline(@position, @color) when (@position = left) {
|
|
||||||
&:before {
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
top: 0;
|
|
||||||
bottom: auto;
|
|
||||||
right: auto;
|
|
||||||
width: 1px;
|
|
||||||
height: 100%;
|
|
||||||
background-color: @color;
|
|
||||||
display: block;
|
|
||||||
z-index: 15;
|
|
||||||
// .transform-origin(0% 50%);
|
|
||||||
html.pixel-ratio-2 & {
|
|
||||||
.transform(scaleX(0.5));
|
|
||||||
}
|
|
||||||
|
|
||||||
html.pixel-ratio-3 & {
|
|
||||||
.transform(scaleX(0.33));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.hairline(@position, @color) when (@position = bottom) {
|
|
||||||
&:after {
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
bottom: 0;
|
|
||||||
right: auto;
|
|
||||||
top: auto;
|
|
||||||
height: 1px;
|
|
||||||
width: 100%;
|
|
||||||
background-color: @color;
|
|
||||||
display: block;
|
|
||||||
z-index: 15;
|
|
||||||
|
|
||||||
html.pixel-ratio-2 & {
|
|
||||||
.transform(scaleY(0.5));
|
|
||||||
}
|
|
||||||
|
|
||||||
html.pixel-ratio-3 & {
|
|
||||||
.transform(scaleY(0.33));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.hairline(@position, @color) when (@position = right) {
|
|
||||||
&:after {
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
right: 0;
|
|
||||||
top: 0;
|
|
||||||
left: auto;
|
|
||||||
bottom: auto;
|
|
||||||
width: 1px;
|
|
||||||
height: 100%;
|
|
||||||
background-color: @color;
|
|
||||||
display: block;
|
|
||||||
z-index: 15;
|
|
||||||
// .transform-origin(100% 50%);
|
|
||||||
html.pixel-ratio-2 & {
|
|
||||||
.transform(scaleX(0.5));
|
|
||||||
}
|
|
||||||
|
|
||||||
html.pixel-ratio-3 & {
|
|
||||||
.transform(scaleX(0.33));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// For right and bottom
|
|
||||||
.hairline-remove(@position) when not (@position = left) and not (@position = top) {
|
|
||||||
&:after {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// For left and top
|
|
||||||
.hairline-remove(@position) when not (@position = right) and not (@position = bottom) {
|
|
||||||
&:before {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// For right and bottom
|
|
||||||
.hairline-color(@position, @color) when not (@position = left) and not (@position = top) {
|
|
||||||
&:after {
|
|
||||||
background-color: @color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// For left and top
|
|
||||||
.hairline-color(@position, @color) when not (@position = right) and not (@position = bottom) {
|
|
||||||
&:before {
|
|
||||||
background-color: @color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Encoded SVG Background
|
|
||||||
.encoded-svg-background(@svg) {
|
|
||||||
@url: `encodeURIComponent(@{svg})`;
|
|
||||||
background-image: url("data:image/svg+xml;charset=utf-8,@{url}");
|
|
||||||
}
|
|
||||||
|
|
||||||
// Preserve3D
|
|
||||||
.preserve3d() {
|
|
||||||
-webkit-transform-style: preserve-3d;
|
|
||||||
-moz-transform-style: preserve-3d;
|
|
||||||
-ms-transform-style: preserve-3d;
|
|
||||||
transform-style: preserve-3d;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Shadow
|
|
||||||
.depth(@level:1) {
|
|
||||||
& when (@level = 0) {
|
|
||||||
box-shadow: none;
|
|
||||||
}
|
|
||||||
& when (@level = 1) {
|
|
||||||
box-shadow: 0 2px 1px -1px rgba(0, 0, 0, .2), 0 1px 1px 0 rgba(0, 0, 0, .14), 0 1px 3px 0 rgba(0, 0, 0, .12);
|
|
||||||
}
|
|
||||||
& when (@level = 2) {
|
|
||||||
box-shadow: 0 3px 1px -2px rgba(0, 0, 0, .2), 0 2px 2px 0 rgba(0, 0, 0, .14), 0 1px 5px 0 rgba(0, 0, 0, .12);
|
|
||||||
}
|
|
||||||
& when (@level = 3) {
|
|
||||||
box-shadow: 0 3px 3px -2px rgba(0, 0, 0, .2), 0 3px 4px 0 rgba(0, 0, 0, .14), 0 1px 8px 0 rgba(0, 0, 0, .12);
|
|
||||||
}
|
|
||||||
& when (@level = 4) {
|
|
||||||
box-shadow: 0 2px 4px -1px rgba(0, 0, 0, .2), 0 4px 5px 0 rgba(0, 0, 0, .14), 0 1px 10px 0 rgba(0, 0, 0, .12);
|
|
||||||
}
|
|
||||||
& when (@level = 5) {
|
|
||||||
box-shadow: 0 3px 5px -1px rgba(0, 0, 0, .2), 0 5px 8px 0 rgba(0, 0, 0, .14), 0 1px 14px 0 rgba(0, 0, 0, .12);
|
|
||||||
}
|
|
||||||
& when (@level = 6) {
|
|
||||||
box-shadow: 0 3px 5px -1px rgba(0, 0, 0, .2), 0 6px 10px 0 rgba(0, 0, 0, .14), 0 1px 18px 0 rgba(0, 0, 0, .12);
|
|
||||||
}
|
|
||||||
& when (@level = 7) {
|
|
||||||
box-shadow: 0 4px 5px -2px rgba(0, 0, 0, .2), 0 7px 10px 1px rgba(0, 0, 0, .14), 0 2px 16px 1px rgba(0, 0, 0, .12);
|
|
||||||
}
|
|
||||||
& when (@level = 8) {
|
|
||||||
box-shadow: 0 5px 5px -3px rgba(0, 0, 0, .2), 0 8px 10px 1px rgba(0, 0, 0, .14), 0 3px 14px 2px rgba(0, 0, 0, .12);
|
|
||||||
}
|
|
||||||
& when (@level = 9) {
|
|
||||||
box-shadow: 0 5px 6px -3px rgba(0, 0, 0, .2), 0 9px 12px 1px rgba(0, 0, 0, .14), 0 3px 16px 2px rgba(0, 0, 0, .12);
|
|
||||||
}
|
|
||||||
& when (@level = 10) {
|
|
||||||
box-shadow: 0 6px 6px -3px rgba(0, 0, 0, .2), 0 10px 14px 1px rgba(0, 0, 0, .14), 0 4px 18px 3px rgba(0, 0, 0, .12);
|
|
||||||
}
|
|
||||||
& when (@level = 11) {
|
|
||||||
box-shadow: 0 6px 7px -4px rgba(0, 0, 0, .2), 0 11px 15px 1px rgba(0, 0, 0, .14), 0 4px 20px 3px rgba(0, 0, 0, .12);
|
|
||||||
}
|
|
||||||
& when (@level = 12) {
|
|
||||||
box-shadow: 0 7px 8px -4px rgba(0, 0, 0, .2), 0 12px 17px 2px rgba(0, 0, 0, .14), 0 5px 22px 4px rgba(0, 0, 0, .12);
|
|
||||||
}
|
|
||||||
& when (@level = 13) {
|
|
||||||
box-shadow: 0 7px 8px -4px rgba(0, 0, 0, .2), 0 13px 19px 2px rgba(0, 0, 0, .14), 0 5px 24px 4px rgba(0, 0, 0, .12);
|
|
||||||
}
|
|
||||||
& when (@level = 14) {
|
|
||||||
box-shadow: 0 7px 9px -4px rgba(0, 0, 0, .2), 0 14px 21px 2px rgba(0, 0, 0, .14), 0 5px 26px 4px rgba(0, 0, 0, .12);
|
|
||||||
}
|
|
||||||
& when (@level = 15) {
|
|
||||||
box-shadow: 0 8px 9px -5px rgba(0, 0, 0, .2), 0 15px 22px 2px rgba(0, 0, 0, .14), 0 6px 28px 5px rgba(0, 0, 0, .12);
|
|
||||||
}
|
|
||||||
& when (@level = 16) {
|
|
||||||
box-shadow: 0 8px 10px -5px rgba(0, 0, 0, .2), 0 16px 24px 2px rgba(0, 0, 0, .14), 0 6px 30px 5px rgba(0, 0, 0, .12);
|
|
||||||
}
|
|
||||||
& when (@level = 17) {
|
|
||||||
box-shadow: 0 8px 11px -5px rgba(0, 0, 0, .2), 0 17px 26px 2px rgba(0, 0, 0, .14), 0 6px 32px 5px rgba(0, 0, 0, .12);
|
|
||||||
}
|
|
||||||
& when (@level = 18) {
|
|
||||||
box-shadow: 0 9px 11px -5px rgba(0, 0, 0, .2), 0 18px 28px 2px rgba(0, 0, 0, .14), 0 7px 34px 6px rgba(0, 0, 0, .12);
|
|
||||||
}
|
|
||||||
& when (@level = 19) {
|
|
||||||
box-shadow: 0 9px 12px -6px rgba(0, 0, 0, .2), 0 19px 29px 2px rgba(0, 0, 0, .14), 0 7px 36px 6px rgba(0, 0, 0, .12);
|
|
||||||
}
|
|
||||||
& when (@level = 20) {
|
|
||||||
box-shadow: 0 10px 13px -6px rgba(0, 0, 0, .2), 0 20px 31px 3px rgba(0, 0, 0, .14), 0 8px 38px 7px rgba(0, 0, 0, .12);
|
|
||||||
}
|
|
||||||
& when (@level = 21) {
|
|
||||||
box-shadow: 0 10px 13px -6px rgba(0, 0, 0, .2), 0 21px 33px 3px rgba(0, 0, 0, .14), 0 8px 40px 7px rgba(0, 0, 0, .12);
|
|
||||||
}
|
|
||||||
& when (@level = 22) {
|
|
||||||
box-shadow: 0 10px 14px -6px rgba(0, 0, 0, .2), 0 22px 35px 3px rgba(0, 0, 0, .14), 0 8px 42px 7px rgba(0, 0, 0, .12);
|
|
||||||
}
|
|
||||||
& when (@level = 23) {
|
|
||||||
box-shadow: 0 11px 14px -7px rgba(0, 0, 0, .2), 0 23px 36px 3px rgba(0, 0, 0, .14), 0 9px 44px 8px rgba(0, 0, 0, .12);
|
|
||||||
}
|
|
||||||
& when (@level = 24) {
|
|
||||||
box-shadow: 0 11px 15px -7px rgba(0, 0, 0, .2), 0 24px 38px 3px rgba(0, 0, 0, .14), 0 9px 46px 8px rgba(0, 0, 0, .12);
|
|
||||||
}
|
|
||||||
// & when (@level = 1) {
|
|
||||||
// box-shadow: rgba(0, 0, 0, 0.117647) 0px 1px 6px, rgba(0, 0, 0, 0.117647) 0px 1px 4px;
|
|
||||||
// }
|
|
||||||
// & when (@level = 2) {
|
|
||||||
// box-shadow: rgba(0, 0, 0, 0.156863) 0px 3px 10px, rgba(0, 0, 0, 0.227451) 0px 3px 10px;
|
|
||||||
// }
|
|
||||||
// & when (@level = 3) {
|
|
||||||
// box-shadow: rgba(0, 0, 0, 0.188235) 0px 10px 30px, rgba(0, 0, 0, 0.227451) 0px 6px 10px;
|
|
||||||
// }
|
|
||||||
// & when (@level = 4) {
|
|
||||||
// box-shadow: rgba(0, 0, 0, 0.247059) 0px 14px 45px, rgba(0, 0, 0, 0.219608) 0px 10px 18px;
|
|
||||||
// }
|
|
||||||
// & when (@level = 5) {
|
|
||||||
// box-shadow: rgba(0, 0, 0, 0.298039) 0px 19px 60px, rgba(0, 0, 0, 0.219608) 0px 15px 20px;
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
|
|
||||||
// Highlighted Links
|
|
||||||
.active-highlight(@color:rgba(255, 255, 255, 0.15)) {
|
|
||||||
&:before {
|
|
||||||
content: '';
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
top: 0;
|
|
||||||
background-color: @color;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
background-position: center;
|
|
||||||
background-size: 100% 100%;
|
|
||||||
opacity: 0;
|
|
||||||
pointer-events: none;
|
|
||||||
.transition(600ms);
|
|
||||||
}
|
|
||||||
&.active-state:before,
|
|
||||||
html:not(.watch-active-state) &:active:before {
|
|
||||||
opacity: 1;
|
|
||||||
.transition(150ms);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.active-highlight-color(@color) {
|
|
||||||
&:before {
|
|
||||||
background-image: -webkit-radial-gradient(center, circle cover, @color 66%, rgba(red(@color), green(@color), blue(@color), 0) 66%);
|
|
||||||
background-image: radial-gradient(circle at center, @color 66%, rgba(red(@color), green(@color), blue(@color), 0) 66%);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// No Scrollbar
|
|
||||||
.no-scrollbar() {
|
|
||||||
&::-webkit-scrollbar {
|
|
||||||
display: none !important;
|
|
||||||
width: 0 !important;
|
|
||||||
height: 0 !important;
|
|
||||||
-webkit-appearance: none;
|
|
||||||
opacity: 0 !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.ellipsis() {
|
|
||||||
white-space: nowrap;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
overflow: hidden;
|
|
||||||
word-wrap: break-word;
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2020. bmy
|
|
||||||
*/
|
|
||||||
|
|
||||||
// 公共css样式,可以在 页面组件中直接使用变量名称
|
|
||||||
:root {
|
|
||||||
--theme-color: red;
|
|
||||||
--test-color: yellow;
|
|
||||||
}
|
|
||||||
1
front-end/app-shared/src/types/env.d.ts
vendored
1
front-end/app-shared/src/types/env.d.ts
vendored
@@ -1 +0,0 @@
|
|||||||
/// <reference types="vite/client" />
|
|
||||||
13
front-end/app-shared/src/types/global.d.ts
vendored
13
front-end/app-shared/src/types/global.d.ts
vendored
@@ -1,13 +0,0 @@
|
|||||||
export interface AppConfig {
|
|
||||||
VITE_DEVBASEURL: string;
|
|
||||||
VITE_PRODBASEURL: string;
|
|
||||||
VITE_HTTPTIMEOUT: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
declare global {
|
|
||||||
interface Window {
|
|
||||||
__APP_CONFIG__: AppConfig;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export {};
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
import { HttpConfig } from '../config'
|
|
||||||
|
|
||||||
export class UrlCheckUtils {
|
|
||||||
|
|
||||||
public static check() {
|
|
||||||
if (import.meta.env.MODE === 'production') {
|
|
||||||
return HttpConfig.ProdBaseUrl;
|
|
||||||
} else {
|
|
||||||
return HttpConfig.DevBaseUrl;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
export * from './UrlCheckUtils';
|
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
{
|
|
||||||
"include": [
|
|
||||||
"src/**/*.ts",
|
|
||||||
"src/**/*.d.ts",
|
|
||||||
"src/**/*"
|
|
||||||
],
|
|
||||||
"exclude": [
|
|
||||||
"node_modules",
|
|
||||||
"dist",
|
|
||||||
"**/*.test.ts"
|
|
||||||
],
|
|
||||||
"compilerOptions": {
|
|
||||||
"target": "ES2020",
|
|
||||||
"lib": [
|
|
||||||
"ES2020",
|
|
||||||
"DOM",
|
|
||||||
"DOM.Iterable"
|
|
||||||
],
|
|
||||||
"jsx": "preserve",
|
|
||||||
"jsxImportSource": "vue",
|
|
||||||
"module": "ESNext",
|
|
||||||
"moduleResolution": "bundler",
|
|
||||||
"esModuleInterop": true,
|
|
||||||
"allowSyntheticDefaultImports": true,
|
|
||||||
"verbatimModuleSyntax": false,
|
|
||||||
"preserveValueImports": false,
|
|
||||||
"resolveJsonModule": true,
|
|
||||||
"isolatedModules": true,
|
|
||||||
"skipLibCheck": true,
|
|
||||||
"paths": {
|
|
||||||
"@/*": [
|
|
||||||
"./src/app/*"
|
|
||||||
],
|
|
||||||
"@shared/*": [
|
|
||||||
"./src/shared/*"
|
|
||||||
],
|
|
||||||
"@features/*": [
|
|
||||||
"./src/features/*"
|
|
||||||
],
|
|
||||||
"@domains/*": [
|
|
||||||
"./src/domains/*"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
import { defineConfig, loadEnv, UserConfig } from 'vite'
|
|
||||||
import federation from "vite-federation";
|
|
||||||
// @ts-ignore
|
|
||||||
import vueJsx from '@vitejs/plugin-vue-jsx'
|
|
||||||
|
|
||||||
// @ts-ignore
|
|
||||||
import vue from '@vitejs/plugin-vue';
|
|
||||||
import visualizer from 'rollup-plugin-visualizer';
|
|
||||||
import { reg, init } from 'vite-plugin-nacos';
|
|
||||||
|
|
||||||
|
|
||||||
export default defineConfig(async ({ mode }): Promise<UserConfig> => {
|
|
||||||
const env = loadEnv(mode, process.cwd());
|
|
||||||
init(env)
|
|
||||||
return {
|
|
||||||
plugins: [
|
|
||||||
reg(),
|
|
||||||
federation({
|
|
||||||
name: env.VITE_SERVER_NAME,
|
|
||||||
transformFileTypes: ['.css', '.less'],
|
|
||||||
exposes: {
|
|
||||||
"./config": "./src/config/index.ts",
|
|
||||||
"./infra": "./src/infra/index.ts",
|
|
||||||
"./utils": "./src/utils/index.ts",
|
|
||||||
"./element-plus": "./src/lib/element-plus.ts",
|
|
||||||
"./normalize": "./src/styles/common/index.ts",
|
|
||||||
"./pub": "./src/styles/pub/index.ts",
|
|
||||||
},
|
|
||||||
shared: {
|
|
||||||
vue: { import: false, generate: false, requiredVersion: '^3.5.18' },
|
|
||||||
axios: { requiredVersion: '^1.12.2' },
|
|
||||||
'element-plus': { requiredVersion: '^2.11.3' }
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
vue(),
|
|
||||||
vueJsx(),
|
|
||||||
visualizer({
|
|
||||||
title: "共享模块依赖分析",
|
|
||||||
filename: 'dist/stats.html', // 分析文件输出路径
|
|
||||||
open: false, // 构建完成后自动打开
|
|
||||||
gzipSize: true, // 显示gzip后的大小
|
|
||||||
brotliSize: true, // 显示brotli后的大小
|
|
||||||
})
|
|
||||||
],
|
|
||||||
build: {
|
|
||||||
target: 'esnext',
|
|
||||||
minify: false,
|
|
||||||
cssCodeSplit: true,
|
|
||||||
rollupOptions: {
|
|
||||||
output: {
|
|
||||||
format: 'esm',
|
|
||||||
minifyInternalExports: false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
Reference in New Issue
Block a user