Compare commits

..

2 Commits

16 changed files with 660 additions and 165 deletions

View File

@ -53,6 +53,7 @@ declare module 'vue' {
IconFont: typeof import('./src/components/iconfont/IconFont.vue')['default'] IconFont: typeof import('./src/components/iconfont/IconFont.vue')['default']
Layout: typeof import('./src/components/layout/layout.vue')['default'] Layout: typeof import('./src/components/layout/layout.vue')['default']
LayoutHeader: typeof import('./src/components/layout/header/LayoutHeader.vue')['default'] LayoutHeader: typeof import('./src/components/layout/header/LayoutHeader.vue')['default']
MapContainer: typeof import('./src/components/aMap/MapContainer.vue')['default']
MenuItem: typeof import('./src/components/layout/MenuItem.vue')['default'] MenuItem: typeof import('./src/components/layout/MenuItem.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink'] RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView'] RouterView: typeof import('vue-router')['RouterView']

View File

@ -1,6 +0,0 @@
declare module '*.vue' {
import type { DefineComponent } from 'vue'
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
const component: DefineComponent<{}, {}, any>
export default component
}

View File

@ -8,6 +8,8 @@
"name": "supermanagement", "name": "supermanagement",
"version": "1.0.0", "version": "1.0.0",
"dependencies": { "dependencies": {
"@amap/amap-jsapi-loader": "^1.0.1",
"@vueuse/core": "^11.2.0",
"ant-design-vue": "^4.2.3", "ant-design-vue": "^4.2.3",
"axios": "^1.7.5", "axios": "^1.7.5",
"jsencrypt": "^3.3.2", "jsencrypt": "^3.3.2",
@ -47,6 +49,12 @@
"url": "https://github.com/sponsors/sindresorhus" "url": "https://github.com/sponsors/sindresorhus"
} }
}, },
"node_modules/@amap/amap-jsapi-loader": {
"version": "1.0.1",
"resolved": "https://registry.npmmirror.com/@amap/amap-jsapi-loader/-/amap-jsapi-loader-1.0.1.tgz",
"integrity": "sha512-nPyLKt7Ow/ThHLkSvn2etQlUzqxmTVgK7bIgwdBRTg2HK5668oN7xVxkaiRe3YZEzGzfV2XgH5Jmu2T73ljejw==",
"license": "MIT"
},
"node_modules/@ampproject/remapping": { "node_modules/@ampproject/remapping": {
"version": "2.3.0", "version": "2.3.0",
"resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz",
@ -1270,6 +1278,12 @@
"resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-8.3.4.tgz", "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-8.3.4.tgz",
"integrity": "sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw==" "integrity": "sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw=="
}, },
"node_modules/@types/web-bluetooth": {
"version": "0.0.20",
"resolved": "https://registry.npmmirror.com/@types/web-bluetooth/-/web-bluetooth-0.0.20.tgz",
"integrity": "sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==",
"license": "MIT"
},
"node_modules/@vitejs/plugin-vue": { "node_modules/@vitejs/plugin-vue": {
"version": "5.1.3", "version": "5.1.3",
"resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-5.1.3.tgz", "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-5.1.3.tgz",
@ -1530,6 +1544,42 @@
"resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.5.3.tgz", "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.5.3.tgz",
"integrity": "sha512-Jp2v8nylKBT+PlOUjun2Wp/f++TfJVFjshLzNtJDdmFJabJa7noGMncqXRM1vXGX+Yo2V7WykQFNxusSim8SCA==" "integrity": "sha512-Jp2v8nylKBT+PlOUjun2Wp/f++TfJVFjshLzNtJDdmFJabJa7noGMncqXRM1vXGX+Yo2V7WykQFNxusSim8SCA=="
}, },
"node_modules/@vueuse/core": {
"version": "11.2.0",
"resolved": "https://registry.npmmirror.com/@vueuse/core/-/core-11.2.0.tgz",
"integrity": "sha512-JIUwRcOqOWzcdu1dGlfW04kaJhW3EXnnjJJfLTtddJanymTL7lF1C0+dVVZ/siLfc73mWn+cGP1PE1PKPruRSA==",
"license": "MIT",
"dependencies": {
"@types/web-bluetooth": "^0.0.20",
"@vueuse/metadata": "11.2.0",
"@vueuse/shared": "11.2.0",
"vue-demi": ">=0.14.10"
},
"funding": {
"url": "https://github.com/sponsors/antfu"
}
},
"node_modules/@vueuse/metadata": {
"version": "11.2.0",
"resolved": "https://registry.npmmirror.com/@vueuse/metadata/-/metadata-11.2.0.tgz",
"integrity": "sha512-L0ZmtRmNx+ZW95DmrgD6vn484gSpVeRbgpWevFKXwqqQxW9hnSi2Ppuh2BzMjnbv4aJRiIw8tQatXT9uOB23dQ==",
"license": "MIT",
"funding": {
"url": "https://github.com/sponsors/antfu"
}
},
"node_modules/@vueuse/shared": {
"version": "11.2.0",
"resolved": "https://registry.npmmirror.com/@vueuse/shared/-/shared-11.2.0.tgz",
"integrity": "sha512-VxFjie0EanOudYSgMErxXfq6fo8vhr5ICI+BuE3I9FnX7ePllEsVrRQ7O6Q1TLgApeLuPKcHQxAXpP+KnlrJsg==",
"license": "MIT",
"dependencies": {
"vue-demi": ">=0.14.10"
},
"funding": {
"url": "https://github.com/sponsors/antfu"
}
},
"node_modules/acorn": { "node_modules/acorn": {
"version": "8.12.1", "version": "8.12.1",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz",

View File

@ -10,6 +10,8 @@
"preview": "vite preview" "preview": "vite preview"
}, },
"dependencies": { "dependencies": {
"@amap/amap-jsapi-loader": "^1.0.1",
"@vueuse/core": "^11.2.0",
"ant-design-vue": "^4.2.3", "ant-design-vue": "^4.2.3",
"axios": "^1.7.5", "axios": "^1.7.5",
"jsencrypt": "^3.3.2", "jsencrypt": "^3.3.2",

View File

@ -0,0 +1,53 @@
<template>
<div :id="mapId" class="mapContainer">
<slot></slot>
</div>
</template>
<script setup lang="ts">
import { onMounted, onUnmounted, shallowRef } from 'vue'
import { initMap } from '@/utils/aMapUtil'
import { MapContainerProps, MapPlugins } from '@/types/components/map'
const props = withDefaults(defineProps<MapContainerProps>(), {
plugins: (): MapPlugins[] => {
return []
},
mapOptions: (): AMap.MapOptions => {
return {
// 3D
viewMode: '3D',
//
zoom: 11,
mapStyle: 'amap://styles/darkblue',
}
},
})
const mapId = 'mapContainer'
const map = shallowRef<AMap.Map>(null)
defineExpose({
mapInstance: map,
})
onMounted(() => {
initMap(props.plugins).then((AMap) => {
map.value = new AMap.Map(mapId, props.mapOptions)
props.initCallback && props.initCallback(map.value)
})
})
onUnmounted(() => {
map.value?.destroy()
})
</script>
<style scoped lang="scss">
#mapContainer {
padding: 0;
margin: 0;
width: 100%;
height: 100%;
}
</style>

View File

@ -0,0 +1,18 @@
import AMapLoader from "@amap/amap-jsapi-loader";
import { MapPlugins } from "@/types/components/map";
export const initMap = (plugins?: MapPlugins[]): Promise<typeof AMap> => new Promise((resolve, reject) => {
//@ts-ignore
window._AMapSecurityConfig = {
securityJsCode: __APP_ENV.VITE_APP_SECURITY_JS_CODE
}
AMapLoader.load({
key: __APP_ENV.VITE_APP_GAODE_KEY,
version: __APP_ENV.VITE_APP_GAODE_VERSION,
plugins
}).then((aMap: typeof AMap) => {
resolve(aMap)
}).catch(err => {
reject(err)
})
})

View File

@ -0,0 +1,326 @@
import { TableProMaxProps, TableProMaxSlots } from '@/types/components/table'
import { EnterprisesUnitPagerQueryParams, EnterprisesUnitPagerVo, EnterprisesUnitSaveOrUpdateParams, PoliceUnitPagerVo } from '@/types/views/unitManage/police/policeUnit.ts'
import { ref } from 'vue'
import { FormExpose } from 'ant-design-vue/es/form/Form'
import { ComponentExposed } from 'vue-component-type-helpers'
import MapContainer from '@/components/aMap/MapContainer.vue'
import { FormProMaxItemOptions } from '@/types/components/form'
import { dictSelectNodes } from '@/config/dict.ts'
import { AutoComplete, Button, Input, message, Modal, Space } from 'ant-design-vue'
import api from '@/axios'
import TableProMax from '@/components/table/TableProMax.vue'
import { deleteDataModal } from '@/components/tsx/ModalPro.tsx'
import { PageParams } from '@/types/hooks/useTableProMax.ts'
import FormProMax from '@/components/form/FormProMax.vue'
import { debounce } from 'lodash-es'
type _TableProps = TableProMaxProps<EnterprisesUnitPagerVo, EnterprisesUnitPagerQueryParams>
type _FormType = EnterprisesUnitSaveOrUpdateParams & {
contactPersonInfoName?: string
contactPersonInfoTelephone?: string
}
const saveOrUpdateEnterprisesUnit = (params: _FormType, callback: Function) => {
const _formRef = ref<FormExpose>(null)
const _mapRef = ref<ComponentExposed<typeof MapContainer>>(null)
const _formParams = ref<_FormType>({ ...params })
let city = ''
const initMarker = (map: AMap.Map) => {
//添加maker点 设置point
const maker = new AMap.Marker({
position: _formParams.value.point,
draggable: true,
})
maker.on('dragend', ({ lnglat }) => {
_formParams.value.point = lnglat
})
map.clearMap()
map.add(maker)
map.setFitView()
}
const autoAddress = ref<SelectNodeVo<string>[]>([])
const _formOptions = ref<FormProMaxItemOptions<_FormType>>({
name: {
type: 'custom',
label: '单位名称',
required: true,
customRender: () => {
return (
<AutoComplete
v-model:value={_formParams.value.name}
options={autoAddress.value}
onSelect={(_, options: SelectNodeVo<string>) => {
_formParams.value.point = options.extData?.location
_formParams.value.address = options.extData?.address
initMarker(_mapRef.value?.mapInstance)
}}
onSearch={debounce((val: string) => {
//@ts-ignore
const auto = new AMap.AutoComplete({
city: city,
input: 'tipinput',
citylimit: true,
})
auto.search(val, (status, result) => {
if (status === 'complete') {
autoAddress.value = result.tips?.map((e) => {
return {
value: e.name,
label: e.name,
extData: {
district: e.district,
address: e.address,
location: e.location,
},
} as SelectNodeVo<string>
})
} else {
autoAddress.value = []
}
})
}, 300)}
v-slots={{
option: (item: SelectNodeVo<string>) => {
return (
<div>
<p>{item.label}</p>
<p style={{ color: '#9a9c9d' }}>
{item.extData?.district} {item.extData?.address}
</p>
</div>
)
},
}}
>
<Input placeholder='请输入单位名称' />
</AutoComplete>
)
},
},
type: {
type: 'select',
label: '单位类型',
required: true,
options: dictSelectNodes('EnterprisesUnitType'),
},
administrativeDivisionCodes: {
type: 'administrativeDivisionTree',
label: '行政区划',
required: true,
componentsProps: {
displayRender: ({ labels }): string => {
city = labels[1]
return labels.join(' / ')
},
},
},
address: {
type: 'inputTextArea',
label: '详细地址',
},
map: {
type: 'custom',
label: '经纬度',
customRender: () => (
<MapContainer
ref={_mapRef}
plugins={['AMap.AutoComplete']}
style={{ width: '100%', height: '300px', position: 'relative' }}
initCallback={(map) => {
const contextMenu = new AMap.ContextMenu()
contextMenu.addItem(
'标记',
() => {
const { lng, lat } = contextMenu.getPosition()
_formParams.value.point = [lng, lat]
initMarker(map)
},
0
)
map.on('rightclick', ({ lnglat }) => {
contextMenu.open(map, lnglat)
})
if (_formParams.value.point) {
initMarker(map)
}
}}
></MapContainer>
),
},
contactPersonInfoName: {
type: 'input',
label: '联系人名称',
},
contactPersonInfoTelephone: {
type: 'input',
label: '联系人电话',
},
remark: {
type: 'inputTextArea',
label: '备注',
},
})
Modal.confirm({
title: params.snowFlakeId ? `${params.name}】 信息编辑` : '新增企事业单位',
width: 600,
icon: ' ',
centered: true,
content: () => <FormProMax ref={_formRef} v-model:value={_formParams.value} formItemOptions={_formOptions.value} />,
onOk: async () => {
await _formRef.value?.validate()
const resp = await api.post('/enterprisesUnit/saveOrUpdate', {
..._formParams.value,
contactPersonInfo: {
name: _formParams.value.contactPersonInfoName,
telephone: _formParams.value.contactPersonInfoTelephone,
},
})
message.success(resp.message)
callback && callback()
},
})
}
export const showEnterprisesUnit = (policeUnitPagerVo: PoliceUnitPagerVo) => {
const _tableRef = ref<ComponentExposed<typeof TableProMax>>(null)
const _columns: _TableProps['columns'] = [
{
dataIndex: 'name',
title: '名称',
},
{
dataIndex: 'type',
title: '类型',
customRender: ({ text }) => text?.label,
},
{
dataIndex: 'contactPersonInfo',
title: '联系人',
ellipsis: true,
customRender: ({ text }) => text?.name + '/' + text.telephone,
},
{
dataIndex: 'province',
title: '行政区划',
ellipsis: true,
customRender: ({ record }) => [record.provinceName, record.cityName, record.districtsName, record.streetName].filter(Boolean).join('/'),
},
{
dataIndex: 'address',
title: '详细地址',
ellipsis: true,
},
{
dataIndex: 'remark',
title: '备注',
},
{
dataIndex: 'createTime',
title: '创建时间',
},
{
dataIndex: 'opt',
title: '操作',
customRender: ({ record }) => (
<Space>
<Button
class='btn-warn'
onClick={() =>
saveOrUpdateEnterprisesUnit(
{
snowFlakeId: record.snowFlakeId,
policeUnitId: record.policeUnitId,
name: record.name,
type: record.type.value,
administrativeDivisionCodes: [record.province, record.city, record.districts, record.street].filter(Boolean),
address: record.address,
point: record.point,
contactPersonInfoName: record.contactPersonInfo?.name,
contactPersonInfoTelephone: record.contactPersonInfo?.telephone,
remark: record.remark,
},
_tableRef.value?.requestGetTableData
)
}
>
</Button>
<Button
class='btn-danger'
onClick={() =>
deleteDataModal(record.name, async () => {
const resp = await api.delete('/enterprisesUnit/deleteById', {
enterprisesUnitId: record.snowFlakeId,
})
message.success(resp.message)
await _tableRef.value?.requestGetTableData()
})
}
>
</Button>
</Space>
),
},
]
const _reqApi: _TableProps['requestApi'] = (params) => {
;(params as PageParams<EnterprisesUnitPagerQueryParams>).params.policeUnitId = policeUnitPagerVo.snowFlakeId
return api.post('/enterprisesUnit/pager', params)
}
Modal.info({
title: `${policeUnitPagerVo.name}】 管辖企事业单位`,
width: '80%',
centered: true,
maskClosable: true,
content: () => (
<TableProMax
ref={_tableRef}
size='small'
columns={_columns}
requestApi={_reqApi}
searchFormOptions={{
name: {
type: 'input',
label: '单位名称',
},
address: {
type: 'input',
label: '地址',
},
remark: {
type: 'input',
label: '备注',
},
}}
v-slots={
{
tableHeader: (_) => {
return (
<Space>
<Button
class='btn-success'
onClick={() =>
saveOrUpdateEnterprisesUnit(
{
name: undefined,
type: 'party_government',
policeUnitId: policeUnitPagerVo.snowFlakeId,
administrativeDivisionCodes: [policeUnitPagerVo.province, policeUnitPagerVo.city, policeUnitPagerVo.districts, policeUnitPagerVo.street].filter(Boolean),
},
_tableRef.value?.requestGetTableData
)
}
>
</Button>
<Button disabled></Button>
</Space>
)
},
} as TableProMaxSlots<PoliceUnitPagerVo>
}
/>
),
})
}

View File

@ -27,11 +27,11 @@ import { publicUnitPagerQueryParams, FromItem } from '@/types/views/publicUnit.t
import { FormProMaxItemOptions } from '@/types/components/form//index.ts' import { FormProMaxItemOptions } from '@/types/components/form//index.ts'
import { FormExpose } from 'ant-design-vue/es/form/Form' import { FormExpose } from 'ant-design-vue/es/form/Form'
import { message } from 'ant-design-vue' import { message } from 'ant-design-vue'
import { showEnterprisesUnit } from './index'
const formRef = ref<FormExpose>(null) const formRef = ref<FormExpose>(null)
type TableProps = TableProMaxProps<publicUnitPagerQueryParams> type TableProps = TableProMaxProps<publicUnitPagerQueryParams>
const tableRef = ref<ComponentExposed<typeof TableProMax>>(null!) const tableRef = ref<ComponentExposed<typeof TableProMax>>(null!)
const reqApi: TableProps['requestApi'] = (params) => api.post('/management/police/enterprisesUnitPager', params) // const reqApi: TableProps['requestApi'] = (params) => api.post('/enterprisesUnit/pager', params) //
const columns: TableProps['columns'] = [ const columns: TableProps['columns'] = [
{ {
@ -90,6 +90,19 @@ const columns: TableProps['columns'] = [
dataIndex: 'remark', dataIndex: 'remark',
title: '备注', title: '备注',
}, },
{
dataIndex: 'opt',
title: '操作',
customRender({ record }) {
return (
<a-space>
<a-button class='btn-success' onClick={() => showEnterprisesUnit(record)}>
企事业单位
</a-button>
</a-space>
)
},
},
] ]
const x: number = columns.reduce((a, b) => a + (b.width as number), 0) const x: number = columns.reduce((a, b) => a + (b.width as number), 0)
const visible = ref(false) const visible = ref(false)

View File

@ -1,20 +1,37 @@
// /// <reference types="vite/client" />
// // vue3导入模块报红解决方案——找不到模块“./XXX.vue”或其相应的类型声明
// // 报错原因是typescript 只能理解 .ts 文件,无法理解 .vue文件
// // 因此需要给.vue文件加上类型说明文件
// declare module '*.vue' {
// import type { DefineComponent } from 'vue'
// // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
// const component: DefineComponent<{}, {}, any>
// export default component
// }
// declare module 'lodash-es' {
// import { includes, isEmpty, ceil, divide } from 'lodash';
// export { includes, isEmpty, ceil, divide };
// }
// interface ImportMetaEnv {
// // 项目名称
// readonly VITE_APP_NAME: string;
// // 当前环境
// readonly VITE_APP_ENV: 'development' | 'production';
// // 启动端口
// readonly VITE_APP_PORT: number;
// // axios
// readonly VITE_APP_BASE_API: string;
// readonly VITE_APP_PROXY_URL: string;
// // RSA公钥
// readonly VITE_APP_RSA_PUBLIC_KEY: string;
// }
/// <reference types="vite/client" /> /// <reference types="vite/client" />
// vue3导入模块报红解决方案——找不到模块“./XXX.vue”或其相应的类型声明
// 报错原因是typescript 只能理解 .ts 文件,无法理解 .vue文件
// 因此需要给.vue文件加上类型说明文件
declare module '*.vue' {
import type { DefineComponent } from 'vue'
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
const component: DefineComponent<{}, {}, any>
export default component
}
declare module 'lodash-es' {
import { includes, isEmpty, ceil, divide } from 'lodash';
export { includes, isEmpty, ceil, divide };
}
interface ImportMetaEnv { interface ImportMetaEnv {
// 项目名称 // 项目名称
readonly VITE_APP_NAME: string; readonly VITE_APP_NAME: string;
@ -22,14 +39,30 @@ interface ImportMetaEnv {
readonly VITE_APP_ENV: 'development' | 'production'; readonly VITE_APP_ENV: 'development' | 'production';
// 启动端口 // 启动端口
readonly VITE_APP_PORT: number; readonly VITE_APP_PORT: number;
// 模块名称
readonly VITE_APP_MODULE_NAME: string;
// axios // axios
readonly VITE_APP_BASE_API: string; readonly VITE_APP_BASE_API: string;
readonly VITE_APP_PROXY_URL: string; readonly VITE_APP_PROXY_URL: string;
// minio
readonly VITE_APP_MINIO_URL: string
readonly VITE_APP_MINIO_BUCKET: string
// RSA公钥 // RSA公钥
readonly VITE_APP_RSA_PUBLIC_KEY: string; readonly VITE_APP_RSA_PUBLIC_KEY: string;
// 高德
readonly VITE_APP_GAODE_KEY: string
readonly VITE_APP_GAODE_VERSION: string
readonly VITE_APP_SECURITY_JS_CODE: string
}
declare module '*.vue' {
import { DefineComponent, readonly } from "vue"
const component: DefineComponent<{}, {}, any>
export default component
} }

View File

@ -1,82 +1,88 @@
{ {
"compilerOptions": { "compilerOptions": {
"composite": true, // [ty-reference](1) "target": "ES2020",
"target": "ES2020", // JavaScript "useDefineForClassFields": true,
"useDefineForClassFields": true, // 使 `defineProperty` "module": "ESNext",
"module": "ESNext", // "lib": [
"lib": [ // "ES2020",
"ES2020", // ES2020 "DOM",
"DOM", // DOM "DOM.Iterable"
"DOM.Iterable" // DOM
], ],
"skipLibCheck": true, // "skipLibCheck": true,
/* Bundler mode */ /* Bundler mode */
"moduleResolution": "bundler", // bundler "moduleResolution": "bundler",
"allowImportingTsExtensions": true, // TypeScript "allowImportingTsExtensions": true,
"isolatedModules": true, // "isolatedModules": true,
"moduleDetection": "force", // ESM "moduleDetection": "force",
"noEmit": false, // "noEmit": true,
"declaration": true, // .d.ts "jsx": "preserve",
"emitDeclarationOnly": true, // JS "jsxImportSource": "vue",
"jsx": "preserve", // JSX
"jsxImportSource": "vue", // JSX Vue
/* Linting */ /* Linting */
"strict": false, // "strict": false,
"noUnusedLocals": true, // 使 "noUnusedLocals": true,
"noUnusedParameters": true, // 使 "noUnusedParameters": true,
"noFallthroughCasesInSwitch": true, // switch fallthrough "noFallthroughCasesInSwitch": true,
"baseUrl": "./", // "baseUrl": "./",
/* */ /* */
"paths": { // "paths": {
"@/*": [ // @/ src/ "@/*": [
"./src/*" "src/*"
] ]
}, },
"allowSyntheticDefaultImports": true // "allowSyntheticDefaultImports": true
}, },
"include": [ // "include": [
"src/**/*.ts", // src TypeScript "src/**/*.ts",
"src/**/*.d.ts", // src "src/**/*.d.ts",
"src/**/*.tsx", // src JSX "src/**/*.tsx",
"src/**/*.vue", // src Vue "src/**/*.vue"
"global.d.ts"
] ]
} }
// //
// { // {
// "compilerOptions": { // "compilerOptions": {
// "target": "ES2020", // "composite": true, // [ty-reference](1)
// "useDefineForClassFields": true, // "target": "ES2020", // JavaScript
// "module": "ESNext", // "useDefineForClassFields": true, // 使 `defineProperty`
// "lib": [ // "module": "ESNext", //
// "ES2020", // "lib": [ //
// "DOM", // "ES2020", // ES2020
// "DOM.Iterable" // "DOM", // DOM
// "DOM.Iterable" // DOM
// ], // ],
// "skipLibCheck": true, // "skipLibCheck": true, //
// /* Bundler mode */ // /* Bundler mode */
// "moduleResolution": "bundler", // "moduleResolution": "bundler", // bundler
// "allowImportingTsExtensions": true, // "allowImportingTsExtensions": true, // TypeScript
// "isolatedModules": true, // "isolatedModules": true, //
// "moduleDetection": "force", // "moduleDetection": "force", // ESM
// "noEmit": true, // "noEmit": false, //
// "jsx": "preserve", // "declaration": true, // .d.ts
// "emitDeclarationOnly": true, // JS
// "jsx": "preserve", // JSX
// "jsxImportSource": "vue", // JSX Vue
// /* Linting */ // /* Linting */
// "strict": true, // "strict": false, //
// "noUnusedLocals": true, // "noUnusedLocals": true, // 使
// "noUnusedParameters": true, // "noUnusedParameters": true, // 使
// "noFallthroughCasesInSwitch": true, // "noFallthroughCasesInSwitch": true, // switch fallthrough
// "baseUrl": "/", // "baseUrl": "./", //
// /* */ // /* */
// "paths": { // "paths": { //
// "@/*": [ // "@/*": [ // @/ src/
// "./src/*" // "./src/*"
// ] // ]
// }, // },
// "allowSyntheticDefaultImports": true //
// }, // },
// "include": [ // "include": [ //
// "src/**/*.ts", // "src/**/*.ts", // src TypeScript
// "src/**/*.tsx", // "src/**/*.d.ts", // src
// "src/**/*.vue" // "src/**/*.tsx", // src JSX
// "src/**/*.vue", // src Vue
// "global.d.ts"
// ] // ]
// } // }

File diff suppressed because one or more lines are too long

View File

@ -1,40 +1,43 @@
{
"compilerOptions": {
"baseUrl": "/", //
"paths": { //
"@/*": [ // @/ src/
"./src/*"
]
}
},
"files": [], //
"references": [ // tsconfig
{
"path": "./tsconfig.app.json" // tsconfig.app.json
},
{
"path": "./tsconfig.node.json" // tsconfig.node.json
}
],
"include": [ //
"env.d.ts", //
"src/vite-env.d.ts", // Vite
"src/**/*.ts", // src TypeScript
"src/**/*.tsx", // src JSX
"src/**/*.vue", // src Vue
"global.d.ts", // global.d.ts
"vite.config.ts" // Node
]
}
// //
// { // {
// "files": [], // "compilerOptions": {
// "references": [ // "jsx": "react",
// "baseUrl": "/", //
// "paths": { //
// "@/*": [ // @/ src/
// "./src/*"
// ]
// }
// },
// "files": [], //
// "references": [ // tsconfig
// { // {
// "path": "./tsconfig.app.json" // "path": "./tsconfig.app.json" // tsconfig.app.json
// }, // },
// { // {
// "path": "./tsconfig.node.json" // "path": "./tsconfig.node.json" // tsconfig.node.json
// } // }
// ],
// "include": [ //
// "env.d.ts", //
// "src/vite-env.d.ts", // Vite
// "src/**/*.ts", // src TypeScript
// "src/**/*.tsx", // src JSX
// "src/**/*.vue", // src Vue
// "global.d.ts", // global.d.ts
// "vite.config.ts" // Node
// ] // ]
// } // }
//
{
"files": [],
"references": [
{
"path": "./tsconfig.app.json"
},
{
"path": "./tsconfig.node.json"
}
]
}

View File

@ -1,47 +1,47 @@
{
"compilerOptions": {
"composite": true, // [ty-reference](1)
"target": "ES2022", // JavaScript
"lib": [ //
"ES2023" // ES2023
],
"module": "ESNext", //
"skipLibCheck": true, //
/* Bundler mode */
"moduleResolution": "bundler", // bundler
"allowImportingTsExtensions": true, // TypeScript
"isolatedModules": true, //
"moduleDetection": "force", // ESM
"noEmit": false, //
"declaration": true, // .d.ts
"emitDeclarationOnly": true, // JS
"strict": true, //
"noUnusedLocals": true, // 使
"noUnusedParameters": true, // 使
"noFallthroughCasesInSwitch": true // switch fallthrough
},
"include": [ //
"vite.config.ts" // Vite
]
}
//
// { // {
// "compilerOptions": { // "compilerOptions": {
// "target": "ES2022", // "composite": true, // [ty-reference](1)
// "lib": ["ES2023"], // "target": "ES2022", // JavaScript
// "module": "ESNext", // "lib": [ //
// "skipLibCheck": true, // "ES2023" // ES2023
// ],
// "module": "ESNext", //
// "skipLibCheck": true, //
// /* Bundler mode */ // /* Bundler mode */
// "moduleResolution": "bundler", // "moduleResolution": "bundler", // bundler
// "allowImportingTsExtensions": true, // "allowImportingTsExtensions": true, // TypeScript
// "isolatedModules": true, // "isolatedModules": true, //
// "moduleDetection": "force", // "moduleDetection": "force", // ESM
// "noEmit": true, // "noEmit": false, //
// /* Linting */ // "declaration": true, // .d.ts
// "strict": true, // "emitDeclarationOnly": true, // JS
// "noUnusedLocals": true, // "strict": true, //
// "noUnusedParameters": true, // "noUnusedLocals": true, // 使
// "noFallthroughCasesInSwitch": true // "noUnusedParameters": true, // 使
// "noFallthroughCasesInSwitch": true // switch fallthrough
// }, // },
// "include": ["vite.config.ts"] // "include": [ //
// } // "vite.config.ts" // Vite
// ]
// }
//
{
"compilerOptions": {
"target": "ES2022",
"lib": ["ES2023"],
"module": "ESNext",
"skipLibCheck": true,
/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"isolatedModules": true,
"moduleDetection": "force",
"noEmit": true,
/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true
},
"include": ["vite.config.ts"]
}

File diff suppressed because one or more lines are too long

View File

@ -1,2 +0,0 @@
declare const _default: import("vite").UserConfigFnObject;
export default _default;