chore: consume timi packages from nexus #1
@@ -0,0 +1,93 @@
|
||||
{
|
||||
"globals": {
|
||||
"Component": true,
|
||||
"ComponentPublicInstance": true,
|
||||
"ComputedRef": true,
|
||||
"DirectiveBinding": true,
|
||||
"EffectScope": true,
|
||||
"ExtractDefaultPropTypes": true,
|
||||
"ExtractPropTypes": true,
|
||||
"ExtractPublicPropTypes": true,
|
||||
"InjectionKey": true,
|
||||
"MaybeRef": true,
|
||||
"MaybeRefOrGetter": true,
|
||||
"PropType": true,
|
||||
"Ref": true,
|
||||
"Slot": true,
|
||||
"Slots": true,
|
||||
"VNode": true,
|
||||
"WritableComputedRef": true,
|
||||
"acceptHMRUpdate": true,
|
||||
"computed": true,
|
||||
"createApp": true,
|
||||
"createPinia": true,
|
||||
"customRef": true,
|
||||
"defineAsyncComponent": true,
|
||||
"defineComponent": true,
|
||||
"defineStore": true,
|
||||
"effectScope": true,
|
||||
"getActivePinia": true,
|
||||
"getCurrentInstance": true,
|
||||
"getCurrentScope": true,
|
||||
"h": true,
|
||||
"inject": true,
|
||||
"isProxy": true,
|
||||
"isReactive": true,
|
||||
"isReadonly": true,
|
||||
"isRef": true,
|
||||
"mapActions": true,
|
||||
"mapGetters": true,
|
||||
"mapState": true,
|
||||
"mapStores": true,
|
||||
"mapWritableState": true,
|
||||
"markRaw": true,
|
||||
"nextTick": true,
|
||||
"onActivated": true,
|
||||
"onBeforeMount": true,
|
||||
"onBeforeRouteLeave": true,
|
||||
"onBeforeRouteUpdate": true,
|
||||
"onBeforeUnmount": true,
|
||||
"onBeforeUpdate": true,
|
||||
"onDeactivated": true,
|
||||
"onErrorCaptured": true,
|
||||
"onMounted": true,
|
||||
"onRenderTracked": true,
|
||||
"onRenderTriggered": true,
|
||||
"onScopeDispose": true,
|
||||
"onServerPrefetch": true,
|
||||
"onUnmounted": true,
|
||||
"onUpdated": true,
|
||||
"onWatcherCleanup": true,
|
||||
"provide": true,
|
||||
"reactive": true,
|
||||
"readonly": true,
|
||||
"ref": true,
|
||||
"resolveComponent": true,
|
||||
"setActivePinia": true,
|
||||
"setMapStoreSuffix": true,
|
||||
"shallowReactive": true,
|
||||
"shallowReadonly": true,
|
||||
"shallowRef": true,
|
||||
"storeToRefs": true,
|
||||
"toRaw": true,
|
||||
"toRef": true,
|
||||
"toRefs": true,
|
||||
"toValue": true,
|
||||
"triggerRef": true,
|
||||
"unref": true,
|
||||
"useAttrs": true,
|
||||
"useCssModule": true,
|
||||
"useCssVars": true,
|
||||
"useId": true,
|
||||
"useLink": true,
|
||||
"useModel": true,
|
||||
"useRoute": true,
|
||||
"useRouter": true,
|
||||
"useSlots": true,
|
||||
"useTemplateRef": true,
|
||||
"watch": true,
|
||||
"watchEffect": true,
|
||||
"watchPostEffect": true,
|
||||
"watchSyncEffect": true
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
/AGENTS.md
|
||||
/.npmrc
|
||||
/.env.production
|
||||
|
||||
# ---> Maven
|
||||
@@ -132,9 +131,6 @@ dist
|
||||
dist-ssr
|
||||
coverage
|
||||
*.local
|
||||
auto-imports.d.ts
|
||||
components.d.ts
|
||||
.eslintrc-auto-import.json
|
||||
|
||||
# ---> WorkBuddy 本地工作目录
|
||||
# 内含 AI 工作记忆与每日日志:写明本机绝对路径与调试上下文,且每次会话都在追加,
|
||||
|
||||
Vendored
+90
@@ -0,0 +1,90 @@
|
||||
/* eslint-disable */
|
||||
/* prettier-ignore */
|
||||
// @ts-nocheck
|
||||
// noinspection JSUnusedGlobalSymbols
|
||||
// Generated by unplugin-auto-import
|
||||
// biome-ignore lint: disable
|
||||
export {}
|
||||
declare global {
|
||||
const DialogPlugin: typeof import('tdesign-mobile-vue')['DialogPlugin']
|
||||
const EffectScope: typeof import('vue')['EffectScope']
|
||||
const THUMBNAIL_WIDTH_PARAM: typeof import('tdesign-mobile-vue')['HUMBNAIL_WIDTH_PARAM']
|
||||
const acceptHMRUpdate: typeof import('pinia')['acceptHMRUpdate']
|
||||
const computed: typeof import('vue')['computed']
|
||||
const createApp: typeof import('vue')['createApp']
|
||||
const createPinia: typeof import('pinia')['createPinia']
|
||||
const customRef: typeof import('vue')['customRef']
|
||||
const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
|
||||
const defineComponent: typeof import('vue')['defineComponent']
|
||||
const defineStore: typeof import('pinia')['defineStore']
|
||||
const effectScope: typeof import('vue')['effectScope']
|
||||
const getActivePinia: typeof import('pinia')['getActivePinia']
|
||||
const getCurrentInstance: typeof import('vue')['getCurrentInstance']
|
||||
const getCurrentScope: typeof import('vue')['getCurrentScope']
|
||||
const h: typeof import('vue')['h']
|
||||
const inject: typeof import('vue')['inject']
|
||||
const isProxy: typeof import('vue')['isProxy']
|
||||
const isReactive: typeof import('vue')['isReactive']
|
||||
const isReadonly: typeof import('vue')['isReadonly']
|
||||
const isRef: typeof import('vue')['isRef']
|
||||
const mapActions: typeof import('pinia')['mapActions']
|
||||
const mapGetters: typeof import('pinia')['mapGetters']
|
||||
const mapState: typeof import('pinia')['mapState']
|
||||
const mapStores: typeof import('pinia')['mapStores']
|
||||
const mapWritableState: typeof import('pinia')['mapWritableState']
|
||||
const markRaw: typeof import('vue')['markRaw']
|
||||
const nextTick: typeof import('vue')['nextTick']
|
||||
const onActivated: typeof import('vue')['onActivated']
|
||||
const onBeforeMount: typeof import('vue')['onBeforeMount']
|
||||
const onBeforeRouteLeave: typeof import('vue-router')['onBeforeRouteLeave']
|
||||
const onBeforeRouteUpdate: typeof import('vue-router')['onBeforeRouteUpdate']
|
||||
const onBeforeUnmount: typeof import('vue')['onBeforeUnmount']
|
||||
const onBeforeUpdate: typeof import('vue')['onBeforeUpdate']
|
||||
const onDeactivated: typeof import('vue')['onDeactivated']
|
||||
const onErrorCaptured: typeof import('vue')['onErrorCaptured']
|
||||
const onMounted: typeof import('vue')['onMounted']
|
||||
const onRenderTracked: typeof import('vue')['onRenderTracked']
|
||||
const onRenderTriggered: typeof import('vue')['onRenderTriggered']
|
||||
const onScopeDispose: typeof import('vue')['onScopeDispose']
|
||||
const onServerPrefetch: typeof import('vue')['onServerPrefetch']
|
||||
const onUnmounted: typeof import('vue')['onUnmounted']
|
||||
const onUpdated: typeof import('vue')['onUpdated']
|
||||
const onWatcherCleanup: typeof import('vue')['onWatcherCleanup']
|
||||
const provide: typeof import('vue')['provide']
|
||||
const reactive: typeof import('vue')['reactive']
|
||||
const readonly: typeof import('vue')['readonly']
|
||||
const ref: typeof import('vue')['ref']
|
||||
const resolveComponent: typeof import('vue')['resolveComponent']
|
||||
const setActivePinia: typeof import('pinia')['setActivePinia']
|
||||
const setMapStoreSuffix: typeof import('pinia')['setMapStoreSuffix']
|
||||
const shallowReactive: typeof import('vue')['shallowReactive']
|
||||
const shallowReadonly: typeof import('vue')['shallowReadonly']
|
||||
const shallowRef: typeof import('vue')['shallowRef']
|
||||
const storeToRefs: typeof import('pinia')['storeToRefs']
|
||||
const toRaw: typeof import('vue')['toRaw']
|
||||
const toRef: typeof import('vue')['toRef']
|
||||
const toRefs: typeof import('vue')['toRefs']
|
||||
const toValue: typeof import('vue')['toValue']
|
||||
const triggerRef: typeof import('vue')['triggerRef']
|
||||
const unref: typeof import('vue')['unref']
|
||||
const useAttrs: typeof import('vue')['useAttrs']
|
||||
const useCssModule: typeof import('vue')['useCssModule']
|
||||
const useCssVars: typeof import('vue')['useCssVars']
|
||||
const useId: typeof import('vue')['useId']
|
||||
const useLink: typeof import('vue-router')['useLink']
|
||||
const useModel: typeof import('vue')['useModel']
|
||||
const useRoute: typeof import('vue-router')['useRoute']
|
||||
const useRouter: typeof import('vue-router')['useRouter']
|
||||
const useSlots: typeof import('vue')['useSlots']
|
||||
const useTemplateRef: typeof import('vue')['useTemplateRef']
|
||||
const watch: typeof import('vue')['watch']
|
||||
const watchEffect: typeof import('vue')['watchEffect']
|
||||
const watchPostEffect: typeof import('vue')['watchPostEffect']
|
||||
const watchSyncEffect: typeof import('vue')['watchSyncEffect']
|
||||
}
|
||||
// for type re-export
|
||||
declare global {
|
||||
// @ts-ignore
|
||||
export type { Component, Slot, Slots, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue'
|
||||
import('vue')
|
||||
}
|
||||
Vendored
+92
@@ -0,0 +1,92 @@
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
// Generated by unplugin-vue-components
|
||||
// Read more: https://github.com/vuejs/core/pull/3399
|
||||
// biome-ignore lint: disable
|
||||
export {}
|
||||
|
||||
/* prettier-ignore */
|
||||
declare module 'vue' {
|
||||
export interface GlobalComponents {
|
||||
AttachmentSelector: typeof import('./src/components/attachmentSelector/AttachmentSelector.vue')['default']
|
||||
AttachmentViewerActions: typeof import('./src/components/attachmentSelector/AttachmentViewerActions.vue')['default']
|
||||
BirthdatePicker: typeof import('./src/components/BirthdatePicker.vue')['default']
|
||||
BodyAreaSelector: typeof import('./src/components/BodyAreaSelector.vue')['default']
|
||||
CardContainer: typeof import('timi-tdesign-mobile')['CardContainer']
|
||||
CenterTips: typeof import('timi-web')['CenterTips']
|
||||
ChartRangeSlider: typeof import('./src/components/ChartRangeSlider.vue')['default']
|
||||
CodeScanner: typeof import('./src/components/CodeScanner.vue')['default']
|
||||
CustomerCell: typeof import('./src/components/CustomerCell.vue')['default']
|
||||
CustomerList: typeof import('./src/components/CustomerList.vue')['default']
|
||||
CustomerProfileCard: typeof import('./src/components/CustomerProfileCard.vue')['default']
|
||||
CustomerSelector: typeof import('./src/components/CustomerSelector.vue')['default']
|
||||
DateRangeChartCard: typeof import('./src/components/DateRangeChartCard.vue')['default']
|
||||
DateTimeNowPicker: typeof import('./src/components/DateTimeNowPicker.vue')['default']
|
||||
DropdownMenuNavbar: typeof import('./src/components/navbar/DropdownMenuNavbar.vue')['default']
|
||||
EventOptionSelector: typeof import('./src/components/EventOptionSelector.vue')['default']
|
||||
EventRecordCalendar: typeof import('./src/components/EventRecordCalendar.vue')['default']
|
||||
EventRecordVerifyDialog: typeof import('./src/components/EventRecordVerifyDialog.vue')['default']
|
||||
EventSelector: typeof import('./src/components/EventSelector.vue')['default']
|
||||
FilterPopup: typeof import('./src/components/filter-popup/FilterPopup.vue')['default']
|
||||
GenderIcon: typeof import('./src/components/GenderIcon.vue')['default']
|
||||
MainLayout: typeof import('./src/layout/MainLayout.vue')['default']
|
||||
MonthCalendar: typeof import('./src/components/monthCalendar/MonthCalendar.vue')['default']
|
||||
NavbarActions: typeof import('./src/components/NavbarActions.vue')['default']
|
||||
PhotoField: typeof import('./src/components/PhotoField.vue')['default']
|
||||
ProductSelectFormItem: typeof import('./src/components/productSelector/ProductSelectFormItem.vue')['default']
|
||||
ProductSelectPopup: typeof import('./src/components/productSelector/ProductSelectPopup.vue')['default']
|
||||
ProductSkuFormItem: typeof import('./src/components/ProductSkuFormItem.vue')['default']
|
||||
ProductSkuOptions: typeof import('./src/components/productSelector/ProductSkuOptions.vue')['default']
|
||||
ProductSkuSelector: typeof import('./src/components/productSelector/ProductSkuSelector.vue')['default']
|
||||
ProductSkuTags: typeof import('./src/components/ProductSkuTags.vue')['default']
|
||||
ProductStockPreview: typeof import('./src/components/ProductStockPreview.vue')['default']
|
||||
RouterLink: typeof import('vue-router')['RouterLink']
|
||||
RouterView: typeof import('vue-router')['RouterView']
|
||||
SegmentedSlider: typeof import('./src/components/SegmentedSlider.vue')['default']
|
||||
StoreRemoveDialog: typeof import('./src/components/StoreRemoveDialog.vue')['default']
|
||||
TagSelector: typeof import('./src/components/TagSelector.vue')['default']
|
||||
TBadge: typeof import('tdesign-mobile-vue')['Badge']
|
||||
TButton: typeof import('tdesign-mobile-vue')['Button']
|
||||
TCalendar: typeof import('tdesign-mobile-vue')['Calendar']
|
||||
TCell: typeof import('tdesign-mobile-vue')['Cell']
|
||||
TCellGroup: typeof import('tdesign-mobile-vue')['CellGroup']
|
||||
TCheckbox: typeof import('tdesign-mobile-vue')['Checkbox']
|
||||
TCheckboxGroup: typeof import('tdesign-mobile-vue')['CheckboxGroup']
|
||||
TCollapse: typeof import('tdesign-mobile-vue')['Collapse']
|
||||
TCollapsePanel: typeof import('tdesign-mobile-vue')['CollapsePanel']
|
||||
TColorPicker: typeof import('tdesign-mobile-vue')['ColorPicker']
|
||||
TDateTimePicker: typeof import('tdesign-mobile-vue')['DateTimePicker']
|
||||
TDialog: typeof import('tdesign-mobile-vue')['Dialog']
|
||||
TDivider: typeof import('tdesign-mobile-vue')['Divider']
|
||||
TDropdownItem: typeof import('tdesign-mobile-vue')['DropdownItem']
|
||||
TDropdownMenu: typeof import('tdesign-mobile-vue')['DropdownMenu']
|
||||
TelephoneLink: typeof import('./src/components/TelephoneLink.vue')['default']
|
||||
TEmpty: typeof import('tdesign-mobile-vue')['Empty']
|
||||
TForm: typeof import('tdesign-mobile-vue')['Form']
|
||||
TFormItem: typeof import('tdesign-mobile-vue')['FormItem']
|
||||
TIcon: typeof import('tdesign-mobile-vue')['Icon']
|
||||
TImage: typeof import('tdesign-mobile-vue')['Image']
|
||||
TImageViewer: typeof import('tdesign-mobile-vue')['ImageViewer']
|
||||
TInput: typeof import('tdesign-mobile-vue')['Input']
|
||||
TLoading: typeof import('tdesign-mobile-vue')['Loading']
|
||||
TNavbar: typeof import('tdesign-mobile-vue')['Navbar']
|
||||
TNoticeBar: typeof import('tdesign-mobile-vue')['NoticeBar']
|
||||
TPicker: typeof import('tdesign-mobile-vue')['Picker']
|
||||
TPopover: typeof import('tdesign-mobile-vue')['Popover']
|
||||
TPopup: typeof import('tdesign-mobile-vue')['Popup']
|
||||
TProgress: typeof import('tdesign-mobile-vue')['Progress']
|
||||
TPullDownRefresh: typeof import('tdesign-mobile-vue')['PullDownRefresh']
|
||||
TRadio: typeof import('tdesign-mobile-vue')['Radio']
|
||||
TRadioGroup: typeof import('tdesign-mobile-vue')['RadioGroup']
|
||||
TSegmented: typeof import('tdesign-mobile-vue')['Segmented']
|
||||
TSlider: typeof import('tdesign-mobile-vue')['Slider']
|
||||
TStepper: typeof import('tdesign-mobile-vue')['Stepper']
|
||||
TSwipeCell: typeof import('tdesign-mobile-vue')['SwipeCell']
|
||||
TSwitch: typeof import('tdesign-mobile-vue')['Switch']
|
||||
TTable: typeof import('tdesign-mobile-vue')['Table']
|
||||
TTabPanel: typeof import('tdesign-mobile-vue')['TabPanel']
|
||||
TTabs: typeof import('tdesign-mobile-vue')['Tabs']
|
||||
TTag: typeof import('tdesign-mobile-vue')['Tag']
|
||||
TTextarea: typeof import('tdesign-mobile-vue')['Textarea']
|
||||
}
|
||||
}
|
||||
+4
-4
@@ -30,10 +30,10 @@
|
||||
"less": "^4.3.0",
|
||||
"pinia": "^3.0.2",
|
||||
"tdesign-mobile-vue": "^1.17.1",
|
||||
"timi-tdesign-mobile": "link:E:/WebProject/timi-tdesign-mobile",
|
||||
"timi-ts": "link:E:/WebProject/timi-ts",
|
||||
"timi-web": "link:E:/WebProject/timi-web",
|
||||
"timi-web-api": "link:E:/WebProject/timi-web-api",
|
||||
"timi-tdesign-mobile": "^1.0.1",
|
||||
"timi-ts": "^1.0.0",
|
||||
"timi-web": "^1.0.1",
|
||||
"timi-web-api": "^1.0.2",
|
||||
"ts-node": "^10.9.2",
|
||||
"vconsole": "^3.15.1",
|
||||
"vue": "^3.5.16",
|
||||
|
||||
Generated
+1255
-20
File diff suppressed because it is too large
Load Diff
+4
-4
@@ -13,9 +13,9 @@ import type { ApiResponse } from "timi-web-api";
|
||||
import { Message } from "@/utils/message";
|
||||
import { initializeTwaBridge } from "@/utils/twaBridge";
|
||||
import { VEntranceTransition } from "timi-tdesign-mobile";
|
||||
import timiWebStyle from "../../timi-web/src/assets/style/timi-web.less?inline";
|
||||
import tdesignCustomStyle from "../../timi-tdesign-mobile/src/assets/style/tdesign-custom.less?inline";
|
||||
import tuiLayoutStyle from "../../timi-tdesign-mobile/src/assets/style/page-layout.less?inline";
|
||||
import timiWebStyle from "timi-web/src/assets/style/timi-web.less?inline";
|
||||
import tdesignCustomStyle from "timi-tdesign-mobile/src/assets/style/tdesign-custom.less?inline";
|
||||
import tuiLayoutStyle from "timi-tdesign-mobile/src/assets/style/page-layout.less?inline";
|
||||
|
||||
import "vue-virtual-scroller/dist/vue-virtual-scroller.css";
|
||||
import "tdesign-mobile-vue/es/style/index.css";
|
||||
@@ -86,7 +86,7 @@ async function bootstrap(): Promise<void> {
|
||||
app.use(router);
|
||||
await router.isReady();
|
||||
await import("tdesign-mobile-vue");
|
||||
await import("../../timi-web/src/index");
|
||||
await import("timi-web");
|
||||
await import("timi-tdesign-mobile");
|
||||
mountLibraryOverrideStyle();
|
||||
app.mount("#root");
|
||||
|
||||
+1
-29
@@ -1,37 +1,9 @@
|
||||
{
|
||||
"extends": "@vue/tsconfig/tsconfig.dom.json",
|
||||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"@/*": [
|
||||
"src/*"
|
||||
],
|
||||
"timi-web": [
|
||||
"../timi-web/dist/src/index.d.ts"
|
||||
],
|
||||
"timi-web/*": [
|
||||
"../timi-web/dist/src/*"
|
||||
],
|
||||
"timi-web-api": [
|
||||
"../timi-web-api/src/index.ts"
|
||||
],
|
||||
"timi-web-api/*": [
|
||||
"../timi-web-api/src/*"
|
||||
],
|
||||
"timi-tdesign-mobile": [
|
||||
"../timi-tdesign-mobile/src/index.ts"
|
||||
],
|
||||
"timi-tdesign-mobile/*": [
|
||||
"../timi-tdesign-mobile/src/*"
|
||||
],
|
||||
"vue": [
|
||||
"node_modules/vue"
|
||||
],
|
||||
"pinia": [
|
||||
"node_modules/pinia"
|
||||
],
|
||||
"vue-router": [
|
||||
"node_modules/vue-router"
|
||||
"./src/*"
|
||||
]
|
||||
},
|
||||
"lib": [
|
||||
|
||||
+1
-28
@@ -3,34 +3,7 @@
|
||||
"compilerOptions": {
|
||||
"paths": {
|
||||
"@/*": [
|
||||
"src/*"
|
||||
],
|
||||
"timi-web": [
|
||||
"../timi-web/dist/src/index.d.ts"
|
||||
],
|
||||
"timi-web/*": [
|
||||
"../timi-web/dist/src/*"
|
||||
],
|
||||
"timi-web-api": [
|
||||
"../timi-web-api/dist/index.d.ts"
|
||||
],
|
||||
"timi-web-api/*": [
|
||||
"../timi-web-api/dist/*"
|
||||
],
|
||||
"timi-tdesign-mobile": [
|
||||
"../timi-tdesign-mobile/dist/timi-tdesign-mobile/src/index.d.ts"
|
||||
],
|
||||
"timi-tdesign-mobile/*": [
|
||||
"../timi-tdesign-mobile/dist/timi-tdesign-mobile/src/*"
|
||||
],
|
||||
"vue": [
|
||||
"node_modules/vue"
|
||||
],
|
||||
"pinia": [
|
||||
"node_modules/pinia"
|
||||
],
|
||||
"vue-router": [
|
||||
"node_modules/vue-router"
|
||||
"./src/*"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
+73
-142
@@ -1,153 +1,84 @@
|
||||
import { fileURLToPath, URL } from "node:url";
|
||||
import { defineConfig, loadEnv } from "vite";
|
||||
import { defineConfig } from "vite";
|
||||
import vue from "@vitejs/plugin-vue";
|
||||
import AutoImport from "unplugin-auto-import/vite";
|
||||
import Components from "unplugin-vue-components/vite";
|
||||
import { TDesignResolver } from "unplugin-vue-components/resolvers";
|
||||
|
||||
const localTimiWebRoot = fileURLToPath(new URL("../timi-web", import.meta.url));
|
||||
const localTimiWebModule = fileURLToPath(new URL("../timi-web/src/index.ts", import.meta.url));
|
||||
const localTimiWebStyle = fileURLToPath(new URL("../timi-web/dist/timi-web.css", import.meta.url));
|
||||
const localTimiWebEditor = fileURLToPath(new URL("../timi-web/src/editor/index.ts", import.meta.url));
|
||||
const localTimiWebApiRoot = fileURLToPath(new URL("../timi-web-api", import.meta.url));
|
||||
const localTimiWebApiModule = fileURLToPath(new URL("../timi-web-api/dist/index.js", import.meta.url));
|
||||
const localTimiTsModule = fileURLToPath(new URL("../timi-ts/src/index.ts", import.meta.url));
|
||||
const localTimiTDesignMobileRoot = fileURLToPath(new URL("../timi-tdesign-mobile", import.meta.url));
|
||||
const localTimiTDesignMobileModule = fileURLToPath(new URL("../timi-tdesign-mobile/src/index.ts", import.meta.url));
|
||||
const localTimiTDesignMobileStyle = fileURLToPath(new URL("../timi-tdesign-mobile/dist/timi-tdesign-mobile.css", import.meta.url));
|
||||
const projectRoot = fileURLToPath(new URL(".", import.meta.url));
|
||||
|
||||
export default defineConfig(({ mode }) => {
|
||||
const env = loadEnv(mode, process.cwd(), "");
|
||||
const useLocalTimiWeb = env.VITE_USE_LOCAL_TIMI_WEB !== "false";
|
||||
const useLocalTimiTDesignMobile = env.VITE_USE_LOCAL_TIMI_TDESIGN_MOBILE !== "false";
|
||||
return {
|
||||
resolve: {
|
||||
dedupe: ["vue", "pinia", "vue-router"],
|
||||
alias: [
|
||||
{
|
||||
find: "@",
|
||||
replacement: fileURLToPath(new URL("./src", import.meta.url))
|
||||
},
|
||||
...(useLocalTimiWeb
|
||||
? [
|
||||
{
|
||||
find: /^timi-web$/,
|
||||
replacement: localTimiWebModule
|
||||
},
|
||||
{
|
||||
find: /^timi-web\/editor$/,
|
||||
replacement: localTimiWebEditor
|
||||
},
|
||||
{
|
||||
find: /^timi-web\/style\.css$/,
|
||||
replacement: localTimiWebStyle
|
||||
}
|
||||
]
|
||||
: []),
|
||||
{
|
||||
find: /^timi-web-api$/,
|
||||
replacement: localTimiWebApiModule
|
||||
},
|
||||
{
|
||||
find: /^timi-web-api\//,
|
||||
replacement: `${localTimiWebApiRoot}/dist/`
|
||||
},
|
||||
...(useLocalTimiWeb
|
||||
? [
|
||||
{
|
||||
find: /^timi-ts$/,
|
||||
replacement: localTimiTsModule
|
||||
}
|
||||
]
|
||||
: []),
|
||||
...(useLocalTimiTDesignMobile
|
||||
? [
|
||||
{
|
||||
find: /^timi-tdesign-mobile$/,
|
||||
replacement: localTimiTDesignMobileModule
|
||||
},
|
||||
{
|
||||
find: /^timi-tdesign-mobile\/style\.css$/,
|
||||
replacement: localTimiTDesignMobileStyle
|
||||
}
|
||||
]
|
||||
: [])
|
||||
]
|
||||
},
|
||||
plugins: [
|
||||
vue(),
|
||||
AutoImport({
|
||||
imports: ["vue", "vue-router", "pinia"],
|
||||
dts: "auto-imports.d.ts",
|
||||
eslintrc: {
|
||||
enabled: true,
|
||||
filepath: "./.eslintrc-auto-import.json",
|
||||
globalsPropValue: true
|
||||
},
|
||||
resolvers: [
|
||||
TDesignResolver({
|
||||
library: "mobile-vue"
|
||||
})
|
||||
]
|
||||
}),
|
||||
Components({
|
||||
dirs: ["src/components", "src/layout"],
|
||||
dts: "components.d.ts",
|
||||
resolvers: [
|
||||
TDesignResolver({
|
||||
library: "mobile-vue"
|
||||
}),
|
||||
(name) => {
|
||||
if (name === "CardContainer") {
|
||||
return {
|
||||
name: "CardContainer",
|
||||
from: "timi-tdesign-mobile"
|
||||
};
|
||||
}
|
||||
if (name === "CenterTips") {
|
||||
return {
|
||||
name: "CenterTips",
|
||||
from: "timi-web"
|
||||
};
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
],
|
||||
css: {
|
||||
preprocessorOptions: {
|
||||
less: {
|
||||
javascriptEnabled: true
|
||||
}
|
||||
export default defineConfig({
|
||||
resolve: {
|
||||
dedupe: ["vue", "pinia", "vue-router"],
|
||||
alias: [
|
||||
{
|
||||
find: "@",
|
||||
replacement: fileURLToPath(new URL("./src", import.meta.url))
|
||||
}
|
||||
},
|
||||
server: {
|
||||
port: 84,
|
||||
allowedHosts: [
|
||||
"gao.imyeyu.com"
|
||||
],
|
||||
/**
|
||||
* 调试产物(截图、CDP 脚本、Chrome 的 user-data-dir)不能被监听:
|
||||
* Chrome 运行时锁着里面的 SQLite,chokidar 一 watch 就 EBUSY 把 dev server 打挂。
|
||||
* 默认的 .git / node_modules 需要显式保留,因为这里的 ignored 会覆盖默认值。
|
||||
*/
|
||||
watch: {
|
||||
ignored: [
|
||||
"**/.git/**",
|
||||
"**/node_modules/**",
|
||||
"**/.debug-*",
|
||||
"**/.debug-*/**"
|
||||
]
|
||||
]
|
||||
},
|
||||
plugins: [
|
||||
vue(),
|
||||
AutoImport({
|
||||
imports: ["vue", "vue-router", "pinia"],
|
||||
dts: "auto-imports.d.ts",
|
||||
eslintrc: {
|
||||
enabled: true,
|
||||
filepath: "./.eslintrc-auto-import.json",
|
||||
globalsPropValue: true
|
||||
},
|
||||
fs: {
|
||||
allow: [
|
||||
projectRoot,
|
||||
localTimiWebRoot,
|
||||
localTimiWebApiRoot,
|
||||
localTimiTDesignMobileRoot
|
||||
]
|
||||
resolvers: [
|
||||
TDesignResolver({
|
||||
library: "mobile-vue"
|
||||
})
|
||||
]
|
||||
}),
|
||||
Components({
|
||||
dirs: ["src/components", "src/layout"],
|
||||
dts: "components.d.ts",
|
||||
resolvers: [
|
||||
TDesignResolver({
|
||||
library: "mobile-vue"
|
||||
}),
|
||||
(name) => {
|
||||
if (name === "CardContainer") {
|
||||
return {
|
||||
name: "CardContainer",
|
||||
from: "timi-tdesign-mobile"
|
||||
};
|
||||
}
|
||||
if (name === "CenterTips") {
|
||||
return {
|
||||
name: "CenterTips",
|
||||
from: "timi-web"
|
||||
};
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
],
|
||||
css: {
|
||||
preprocessorOptions: {
|
||||
less: {
|
||||
javascriptEnabled: true
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
server: {
|
||||
port: 84,
|
||||
allowedHosts: [
|
||||
"gao.imyeyu.com"
|
||||
],
|
||||
/**
|
||||
* 调试产物(截图、CDP 脚本、Chrome 的 user-data-dir)不能被监听:
|
||||
* Chrome 运行时锁着里面的 SQLite,chokidar 一 watch 就 EBUSY 把 dev server 打挂。
|
||||
* 默认的 .git / node_modules 需要显式保留,因为这里的 ignored 会覆盖默认值。
|
||||
*/
|
||||
watch: {
|
||||
ignored: [
|
||||
"**/.git/**",
|
||||
"**/node_modules/**",
|
||||
"**/.debug-*",
|
||||
"**/.debug-*/**"
|
||||
]
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user