mirror of
https://gitee.com/fantastic-admin/basic.git
synced 2024-12-05 05:27:39 +08:00
将 element plus 反馈组件改为手动引入
This commit is contained in:
parent
a17c531340
commit
08bef75035
@ -1,5 +1,4 @@
|
||||
{
|
||||
"version": "1.0.0",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build:example": "vue-tsc --noEmit && vite build --mode example",
|
||||
|
@ -1,5 +1,6 @@
|
||||
import axios from 'axios'
|
||||
// import qs from 'qs'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import router from '@/router/index'
|
||||
import useUserStore from '@/store/modules/user'
|
||||
|
||||
|
3
src/auto-imports.d.ts
vendored
3
src/auto-imports.d.ts
vendored
@ -2,9 +2,6 @@
|
||||
export {}
|
||||
declare global {
|
||||
const EffectScope: typeof import('vue')['EffectScope']
|
||||
const ElLoading: typeof import('element-plus/es')['ElLoading']
|
||||
const ElMessage: typeof import('element-plus/es')['ElMessage']
|
||||
const ElNotification: typeof import('element-plus/es')['ElNotification']
|
||||
const acceptHMRUpdate: typeof import('pinia')['acceptHMRUpdate']
|
||||
const computed: typeof import('vue')['computed']
|
||||
const createApp: typeof import('vue')['createApp']
|
||||
|
@ -1,5 +1,5 @@
|
||||
<script lang="ts" setup name="FileUpload">
|
||||
import { UploadUserFile } from 'element-plus'
|
||||
import { ElMessage, UploadUserFile } from 'element-plus'
|
||||
import type { UploadProps } from 'element-plus'
|
||||
|
||||
const props = defineProps({
|
||||
|
@ -1,5 +1,6 @@
|
||||
<script lang="ts" setup name="ImageUpload">
|
||||
import type { UploadProps } from 'element-plus'
|
||||
import { ElMessage } from 'element-plus'
|
||||
|
||||
const props = defineProps({
|
||||
action: {
|
||||
|
@ -1,5 +1,6 @@
|
||||
<script lang="ts" setup name="ImagesUpload">
|
||||
import type { UploadProps } from 'element-plus'
|
||||
import { ElMessage } from 'element-plus'
|
||||
|
||||
const props = defineProps({
|
||||
action: {
|
||||
|
@ -16,9 +16,6 @@ onMounted(() => {
|
||||
<div>
|
||||
<el-drawer v-model="isShow" title="系统信息" direction="rtl" :size="360">
|
||||
<el-descriptions direction="vertical" :column="1" border>
|
||||
<el-descriptions-item label="版本号" align="center">
|
||||
{{ pkg.version }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="最后编译时间" align="center">
|
||||
{{ lastBuildTime }}
|
||||
</el-descriptions-item>
|
||||
|
@ -1,5 +1,6 @@
|
||||
<script lang="ts" setup name="AppSetting">
|
||||
import { useClipboard } from '@vueuse/core'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import eventBus from '@/utils/eventBus'
|
||||
import useSettingsStore from '@/store/modules/settings'
|
||||
import useMenuStore from '@/store/modules/menu'
|
||||
|
@ -1,4 +1,6 @@
|
||||
<script lang="ts" setup name="BuyIt">
|
||||
import { ElNotification } from 'element-plus'
|
||||
|
||||
const isActived = ref(true)
|
||||
setTimeout(() => {
|
||||
isActived.value = false
|
||||
|
@ -5,6 +5,7 @@ meta:
|
||||
|
||||
<script lang="ts" setup name="ComponentExampleArea">
|
||||
import type { FormInstance, FormRules } from 'element-plus'
|
||||
import { ElMessage } from 'element-plus'
|
||||
|
||||
const pcas1 = ref([])
|
||||
const pcas2 = ref([])
|
||||
|
@ -5,6 +5,7 @@ meta:
|
||||
|
||||
<script lang="ts" setup name="ComponentExampleUpload">
|
||||
import type { UploadProps } from 'element-plus'
|
||||
import { ElMessage } from 'element-plus'
|
||||
|
||||
const image = ref('https://picsum.photos/400')
|
||||
const images = ref([
|
||||
|
@ -7,6 +7,7 @@ meta:
|
||||
|
||||
<script lang="ts" setup name="Login">
|
||||
import type { FormInstance, FormRules } from 'element-plus'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import useUserStore from '@/store/modules/user'
|
||||
|
||||
const route = useRoute()
|
||||
|
@ -4,6 +4,7 @@ meta:
|
||||
</route>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ElNotification } from 'element-plus'
|
||||
import useUserStore from '@/store/modules/user'
|
||||
const userStore = useUserStore()
|
||||
|
||||
|
@ -4,6 +4,7 @@ meta:
|
||||
</route>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ElLoading, ElMessage } from 'element-plus'
|
||||
import useSettingsStore from '@/store/modules/settings'
|
||||
import useUserStore from '@/store/modules/user'
|
||||
|
||||
|
@ -6,6 +6,7 @@ meta:
|
||||
|
||||
<script lang="ts" setup name="PersonalEditPassword">
|
||||
import type { FormInstance, FormRules } from 'element-plus'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import useUserStore from '@/store/modules/user'
|
||||
|
||||
const route = useRoute()
|
||||
|
@ -7,6 +7,7 @@ meta:
|
||||
|
||||
<script lang="ts" setup name="PersonalSetting">
|
||||
import type { UploadProps } from 'element-plus'
|
||||
import { ElMessage } from 'element-plus'
|
||||
|
||||
const router = useRouter()
|
||||
|
||||
|
@ -11,8 +11,7 @@ export default ({ mode, command }) => {
|
||||
// 全局 scss 资源
|
||||
const scssResources = []
|
||||
fs.readdirSync('src/assets/styles/resources').forEach((dirname) => {
|
||||
if (fs.statSync(`src/assets/styles/resources/${dirname}`).isFile())
|
||||
scssResources.push(`@use "src/assets/styles/resources/${dirname}" as *;`)
|
||||
if (fs.statSync(`src/assets/styles/resources/${dirname}`).isFile()) { scssResources.push(`@use "src/assets/styles/resources/${dirname}" as *;`) }
|
||||
})
|
||||
// css 精灵图相关
|
||||
fs.readdirSync('src/assets/sprites').forEach((dirname) => {
|
||||
@ -43,23 +42,12 @@ export default ({ mode, command }) => {
|
||||
define: {
|
||||
__SYSTEM_INFO__: JSON.stringify({
|
||||
pkg: {
|
||||
version: pkg.version,
|
||||
dependencies: pkg.dependencies,
|
||||
devDependencies: pkg.devDependencies,
|
||||
},
|
||||
lastBuildTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
|
||||
}),
|
||||
},
|
||||
optimizeDeps: {
|
||||
include: [
|
||||
'element-plus',
|
||||
'element-plus/es',
|
||||
'element-plus/es/components/message/style/css',
|
||||
'element-plus/es/components/notification/style/css',
|
||||
'element-plus/es/components/message-box/style/css',
|
||||
'element-plus/es/components/loading/style/css',
|
||||
],
|
||||
},
|
||||
plugins: createVitePlugins(env, command === 'build'),
|
||||
resolve: {
|
||||
alias: {
|
||||
|
@ -1,5 +1,4 @@
|
||||
import autoImport from 'unplugin-auto-import/vite'
|
||||
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
|
||||
|
||||
export default function createAutoImport() {
|
||||
return autoImport({
|
||||
@ -12,8 +11,5 @@ export default function createAutoImport() {
|
||||
dirs: [
|
||||
'./src/utils/composables/**',
|
||||
],
|
||||
resolvers: [
|
||||
ElementPlusResolver(),
|
||||
],
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user