mirror of
https://github.com/fantastic-admin/basic.git
synced 2026-10-07 11:34:10 +08:00
使用 defineOptions 设置组件 name
This commit is contained in:
@@ -64,7 +64,6 @@
|
||||
"typescript": "^5.0.4",
|
||||
"unplugin-auto-import": "^0.15.3",
|
||||
"unplugin-vue-components": "^0.24.1",
|
||||
"unplugin-vue-setup-extend-plus": "^1.0.0",
|
||||
"vite": "^4.3.5",
|
||||
"vite-plugin-banner": "^0.7.0",
|
||||
"vite-plugin-compression": "^0.5.1",
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
<script lang="ts" setup{{#if isGlobal}} name="{{ properCase name }}"{{/if}}>
|
||||
// 逻辑代码
|
||||
<script lang="ts" setup>
|
||||
{{#if isGlobal}}
|
||||
defineOptions({
|
||||
name: '{{ properCase name }}',
|
||||
})
|
||||
{{/if}}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
@@ -3,10 +3,12 @@
|
||||
meta:
|
||||
title: 页面标题
|
||||
</route>
|
||||
{{/if}}
|
||||
|
||||
<script lang="ts" setup name="{{ properCase componentName }}">
|
||||
// 逻辑代码
|
||||
{{/if}}
|
||||
<script lang="ts" setup>
|
||||
defineOptions({
|
||||
name: '{{ properCase componentName }}',
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
Generated
-89
@@ -150,9 +150,6 @@ devDependencies:
|
||||
unplugin-vue-components:
|
||||
specifier: ^0.24.1
|
||||
version: 0.24.1(vue@3.3.1)
|
||||
unplugin-vue-setup-extend-plus:
|
||||
specifier: ^1.0.0
|
||||
version: 1.0.0
|
||||
vite:
|
||||
specifier: ^4.3.5
|
||||
version: 4.3.5(sass@1.62.1)(terser@5.17.3)
|
||||
@@ -764,14 +761,6 @@ packages:
|
||||
js-tokens: 4.0.0
|
||||
dev: true
|
||||
|
||||
/@babel/parser@7.21.2:
|
||||
resolution: {integrity: sha512-URpaIJQwEkEC2T9Kn+Ai6Xe/02iNaVCuT/PtoRz3GPVJVDpPd7mLo+VddTbhCRU9TXqW5mSrQfXZyi8kDKOVpQ==}
|
||||
engines: {node: '>=6.0.0'}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
'@babel/types': 7.21.5
|
||||
dev: true
|
||||
|
||||
/@babel/parser@7.21.3:
|
||||
resolution: {integrity: sha512-lobG0d7aOfQRXh8AyklEAgZGvA4FShxo6xQbUrrT/cNBPUdIDojlokwJsQyCC/eKia7ifqM0yP+2DRZ4WKw2RQ==}
|
||||
engines: {node: '>=6.0.0'}
|
||||
@@ -2598,15 +2587,6 @@ packages:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/@vue/compiler-core@3.2.47:
|
||||
resolution: {integrity: sha512-p4D7FDnQb7+YJmO2iPEv0SQNeNzcbHdGByJDsT4lynf63AFkOTFN07HsiRSvjGo0QrxR/o3d0hUyNCUnBU2Tig==}
|
||||
dependencies:
|
||||
'@babel/parser': 7.21.2
|
||||
'@vue/shared': 3.2.47
|
||||
estree-walker: 2.0.2
|
||||
source-map: 0.6.1
|
||||
dev: true
|
||||
|
||||
/@vue/compiler-core@3.3.1:
|
||||
resolution: {integrity: sha512-5le1qYSBgLWg2jdLrbydlhnPJkkzMw46UrRUvTnOKlfg6pThtm9ohhqBhNPHbr0RcM1MCbK5WZe/3Ghz0SZjpQ==}
|
||||
dependencies:
|
||||
@@ -2615,34 +2595,12 @@ packages:
|
||||
estree-walker: 2.0.2
|
||||
source-map-js: 1.0.2
|
||||
|
||||
/@vue/compiler-dom@3.2.47:
|
||||
resolution: {integrity: sha512-dBBnEHEPoftUiS03a4ggEig74J2YBZ2UIeyfpcRM2tavgMWo4bsEfgCGsu+uJIL/vax9S+JztH8NmQerUo7shQ==}
|
||||
dependencies:
|
||||
'@vue/compiler-core': 3.2.47
|
||||
'@vue/shared': 3.2.47
|
||||
dev: true
|
||||
|
||||
/@vue/compiler-dom@3.3.1:
|
||||
resolution: {integrity: sha512-VmgIsoLivCft3+oNc5KM7b9wd0nZxP/g2qilMwi1hJyGA624KWnNKHn4hzBQs4FpzydUVpNy+TWVT8KiRCh3MQ==}
|
||||
dependencies:
|
||||
'@vue/compiler-core': 3.3.1
|
||||
'@vue/shared': 3.3.1
|
||||
|
||||
/@vue/compiler-sfc@3.2.47:
|
||||
resolution: {integrity: sha512-rog05W+2IFfxjMcFw10tM9+f7i/+FFpZJJ5XHX72NP9eC2uRD+42M3pYcQqDXVYoj74kHMSEdQ/WmCjt8JFksQ==}
|
||||
dependencies:
|
||||
'@babel/parser': 7.21.2
|
||||
'@vue/compiler-core': 3.2.47
|
||||
'@vue/compiler-dom': 3.2.47
|
||||
'@vue/compiler-ssr': 3.2.47
|
||||
'@vue/reactivity-transform': 3.2.47
|
||||
'@vue/shared': 3.2.47
|
||||
estree-walker: 2.0.2
|
||||
magic-string: 0.25.9
|
||||
postcss: 8.4.23
|
||||
source-map: 0.6.1
|
||||
dev: true
|
||||
|
||||
/@vue/compiler-sfc@3.3.1:
|
||||
resolution: {integrity: sha512-G+FPwBbXSLaA4+Ry5/bdD9Oda+sRslQcE9o6JSZaougRiT4OjVL0vtkbQHPrGRTULZV28OcrAjRfSZOSB0OTXQ==}
|
||||
dependencies:
|
||||
@@ -2657,13 +2615,6 @@ packages:
|
||||
postcss: 8.4.23
|
||||
source-map-js: 1.0.2
|
||||
|
||||
/@vue/compiler-ssr@3.2.47:
|
||||
resolution: {integrity: sha512-wVXC+gszhulcMD8wpxMsqSOpvDZ6xKXSVWkf50Guf/S+28hTAXPDYRTbLQ3EDkOP5Xz/+SY37YiwDquKbJOgZw==}
|
||||
dependencies:
|
||||
'@vue/compiler-dom': 3.2.47
|
||||
'@vue/shared': 3.2.47
|
||||
dev: true
|
||||
|
||||
/@vue/compiler-ssr@3.3.1:
|
||||
resolution: {integrity: sha512-QOQWGNCWuSeyKx4KvWSJlnIMGg+/2oCHgkFUYo7aJ+9Uaaz45yRgKQ+FNigy50NYBQIhpXn2e4OSR8GXh4knrQ==}
|
||||
dependencies:
|
||||
@@ -2673,16 +2624,6 @@ packages:
|
||||
/@vue/devtools-api@6.5.0:
|
||||
resolution: {integrity: sha512-o9KfBeaBmCKl10usN4crU53fYtC1r7jJwdGKjPT24t348rHxgfpZ0xL3Xm/gLUYnc0oTp8LAmrxOeLyu6tbk2Q==}
|
||||
|
||||
/@vue/reactivity-transform@3.2.47:
|
||||
resolution: {integrity: sha512-m8lGXw8rdnPVVIdIFhf0LeQ/ixyHkH5plYuS83yop5n7ggVJU+z5v0zecwEnX7fa7HNLBhh2qngJJkxpwEEmYA==}
|
||||
dependencies:
|
||||
'@babel/parser': 7.21.2
|
||||
'@vue/compiler-core': 3.2.47
|
||||
'@vue/shared': 3.2.47
|
||||
estree-walker: 2.0.2
|
||||
magic-string: 0.25.9
|
||||
dev: true
|
||||
|
||||
/@vue/reactivity-transform@3.3.1:
|
||||
resolution: {integrity: sha512-MkOrJauAGH4MNdxGW/PmrDegMyOGX0wGIdKUZJRBXOTpotDONg7/TPJe2QeGeBCow/5v9iOqZOWCfvmOWIaDMg==}
|
||||
dependencies:
|
||||
@@ -2725,10 +2666,6 @@ packages:
|
||||
'@vue/shared': 3.3.1
|
||||
vue: 3.3.1
|
||||
|
||||
/@vue/shared@3.2.47:
|
||||
resolution: {integrity: sha512-BHGyyGN3Q97EZx0taMQ+OLNuZcW3d37ZEVmEAyeoA9ERdGvm9Irc/0Fua8SNyOtV1w6BS4q25wbMzJujO9HIfQ==}
|
||||
dev: true
|
||||
|
||||
/@vue/shared@3.3.0-beta.4:
|
||||
resolution: {integrity: sha512-yRrdT1FUWhuLNgj3UUasmToYZ0zR0SOdmVyLa0FHIzbnn00LOiK4lZoPRELMRMnyPy6wwwWHRNmItUeWc2ZGPQ==}
|
||||
dev: true
|
||||
@@ -6875,19 +6812,6 @@ packages:
|
||||
yallist: 4.0.0
|
||||
dev: true
|
||||
|
||||
/magic-string@0.25.9:
|
||||
resolution: {integrity: sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==}
|
||||
dependencies:
|
||||
sourcemap-codec: 1.4.8
|
||||
dev: true
|
||||
|
||||
/magic-string@0.26.7:
|
||||
resolution: {integrity: sha512-hX9XH3ziStPoPhJxLq1syWuZMxbDvGNbVchfrdCtanC7D13888bMFow61x8axrx+GfHLtVeAx2kxL7tTGRl+Ow==}
|
||||
engines: {node: '>=12'}
|
||||
dependencies:
|
||||
sourcemap-codec: 1.4.8
|
||||
dev: true
|
||||
|
||||
/magic-string@0.30.0:
|
||||
resolution: {integrity: sha512-LA+31JYDJLs82r2ScLrlz1GjSgu66ZV518eyWT+S8VhyQn/JL0u9MeBOvQMGYiPk1DBiSN9DDMOcXvigJZaViQ==}
|
||||
engines: {node: '>=12'}
|
||||
@@ -8607,11 +8531,6 @@ packages:
|
||||
engines: {node: '>=0.10.0'}
|
||||
dev: true
|
||||
|
||||
/sourcemap-codec@1.4.8:
|
||||
resolution: {integrity: sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==}
|
||||
deprecated: Please use @jridgewell/sourcemap-codec instead
|
||||
dev: true
|
||||
|
||||
/spdx-correct@3.2.0:
|
||||
resolution: {integrity: sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==}
|
||||
dependencies:
|
||||
@@ -9490,14 +9409,6 @@ packages:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/unplugin-vue-setup-extend-plus@1.0.0:
|
||||
resolution: {integrity: sha512-Qb34atQ/elvkErQ12PNv6UWJPWIG4dEgjjizYKyycPeiRqQaMVNCKqRIqfxlhXntcU2l+o3VQuk1NNZN6QJ/xw==}
|
||||
dependencies:
|
||||
'@vue/compiler-sfc': 3.2.47
|
||||
magic-string: 0.26.7
|
||||
unplugin: 1.3.1
|
||||
dev: true
|
||||
|
||||
/unplugin@1.2.0:
|
||||
resolution: {integrity: sha512-7lJXQY4CxOK4jZyVskZuuNBqBSOlxezKqBpfQEpH+Odk2Ban3moKAlvzs9rZuZoZp6/1FEhvY9TZXav2FRhaBg==}
|
||||
dependencies:
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
<script lang="ts" setup name="Auth">
|
||||
<script lang="ts" setup>
|
||||
const props = defineProps<{
|
||||
value: string | string[]
|
||||
}>()
|
||||
|
||||
defineOptions({
|
||||
name: 'Auth',
|
||||
})
|
||||
|
||||
function check() {
|
||||
return useAuth().auth(props.value)
|
||||
}
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
<script lang="ts" setup name="AuthAll">
|
||||
<script lang="ts" setup>
|
||||
const props = defineProps<{
|
||||
value: string[]
|
||||
}>()
|
||||
|
||||
defineOptions({
|
||||
name: 'AuthAll',
|
||||
})
|
||||
|
||||
function check() {
|
||||
return useAuth().authAll(props.value)
|
||||
}
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
<script lang="ts" setup name="Copyright">
|
||||
<script lang="ts" setup>
|
||||
import useSettingsStore from '@/store/modules/settings'
|
||||
|
||||
defineOptions({
|
||||
name: 'Copyright',
|
||||
})
|
||||
|
||||
const route = useRoute()
|
||||
const settingsStore = useSettingsStore()
|
||||
</script>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<script lang="ts" setup name="FileUpload">
|
||||
<script lang="ts" setup>
|
||||
import { ElMessage } from 'element-plus'
|
||||
import type { UploadProps, UploadUserFile } from 'element-plus'
|
||||
|
||||
@@ -43,6 +43,10 @@ const props = defineProps({
|
||||
|
||||
const emit = defineEmits(['onSuccess'])
|
||||
|
||||
defineOptions({
|
||||
name: 'FileUpload',
|
||||
})
|
||||
|
||||
const beforeUpload: UploadProps['beforeUpload'] = (file) => {
|
||||
const fileName = file.name.split('.')
|
||||
const fileExt = fileName.at(-1)
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
<script lang="ts" setup name="FixedActionBar">
|
||||
<script lang="ts" setup>
|
||||
const isBottom = ref(false)
|
||||
|
||||
defineOptions({
|
||||
name: 'FixedActionBar',
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
onScroll()
|
||||
window.addEventListener('scroll', onScroll)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<script lang="ts" setup name="ImagePreview">
|
||||
<script lang="ts" setup>
|
||||
const props = defineProps({
|
||||
src: {
|
||||
type: String,
|
||||
@@ -14,6 +14,10 @@ const props = defineProps({
|
||||
},
|
||||
})
|
||||
|
||||
defineOptions({
|
||||
name: 'ImagePreview',
|
||||
})
|
||||
|
||||
const realWidth = computed(() => {
|
||||
return typeof props.width === 'string' ? props.width : `${props.width}px`
|
||||
})
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<script lang="ts" setup name="ImageUpload">
|
||||
<script lang="ts" setup>
|
||||
import type { UploadProps } from 'element-plus'
|
||||
import { ElMessage } from 'element-plus'
|
||||
|
||||
@@ -51,6 +51,10 @@ const props = defineProps({
|
||||
|
||||
const emit = defineEmits(['update:url', 'onSuccess'])
|
||||
|
||||
defineOptions({
|
||||
name: 'ImageUpload',
|
||||
})
|
||||
|
||||
const uploadData = ref({
|
||||
imageViewerVisible: false,
|
||||
progress: {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<script lang="ts" setup name="ImagesUpload">
|
||||
<script lang="ts" setup>
|
||||
import type { UploadProps } from 'element-plus'
|
||||
import { ElMessage } from 'element-plus'
|
||||
|
||||
@@ -55,6 +55,10 @@ const props = defineProps({
|
||||
|
||||
const emit = defineEmits(['update:url', 'onSuccess'])
|
||||
|
||||
defineOptions({
|
||||
name: 'ImagesUpload',
|
||||
})
|
||||
|
||||
const uploadData = ref({
|
||||
dialogImageIndex: 0,
|
||||
imageViewerVisible: false,
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
<script lang="ts" setup>
|
||||
defineOptions({
|
||||
name: 'NotAllowed',
|
||||
})
|
||||
|
||||
const router = useRouter()
|
||||
|
||||
const data = ref({
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<script lang="ts" setup name="PageHeader">
|
||||
<script lang="ts" setup>
|
||||
defineProps({
|
||||
title: {
|
||||
type: String,
|
||||
@@ -10,6 +10,10 @@ defineProps({
|
||||
},
|
||||
})
|
||||
|
||||
defineOptions({
|
||||
name: 'PageHeader',
|
||||
})
|
||||
|
||||
const slots = useSlots()
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<script lang="ts" setup name="PageMain">
|
||||
<script lang="ts" setup>
|
||||
const props = defineProps({
|
||||
title: {
|
||||
type: String,
|
||||
@@ -14,6 +14,10 @@ const props = defineProps({
|
||||
},
|
||||
})
|
||||
|
||||
defineOptions({
|
||||
name: 'PageMain',
|
||||
})
|
||||
|
||||
const titleSlot = !!useSlots().title
|
||||
|
||||
const collaspeData = ref(props.collaspe)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<script lang="ts" setup name="PcasCascader">
|
||||
<script lang="ts" setup>
|
||||
// 行政区划数据来源于 https://github.com/modood/Administrative-divisions-of-China
|
||||
import pcasRaw from './pcas-code.json'
|
||||
|
||||
@@ -23,6 +23,10 @@ const props = defineProps({
|
||||
|
||||
const emit = defineEmits(['update:modelValue'])
|
||||
|
||||
defineOptions({
|
||||
name: 'PcasCascader',
|
||||
})
|
||||
|
||||
interface pcasItem {
|
||||
code: string
|
||||
name: string
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
|
||||
<script lang="ts" setup name="SearchBar">
|
||||
<script lang="ts" setup>
|
||||
const props = defineProps({
|
||||
fold: {
|
||||
type: Boolean,
|
||||
@@ -19,6 +19,10 @@ const emit = defineEmits<{
|
||||
(event: 'toggle', value: boolean): void
|
||||
}>()
|
||||
|
||||
defineOptions({
|
||||
name: 'SearchBar',
|
||||
})
|
||||
|
||||
const isFold = ref(props.fold)
|
||||
|
||||
watch(() => props.fold, (value) => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<script lang="ts" setup name="SvgIcon">
|
||||
<script lang="ts" setup>
|
||||
import { Icon } from '@iconify/vue'
|
||||
|
||||
const props = defineProps({
|
||||
@@ -16,6 +16,10 @@ const props = defineProps({
|
||||
},
|
||||
})
|
||||
|
||||
defineOptions({
|
||||
name: 'SvgIcon',
|
||||
})
|
||||
|
||||
const transformStyle = computed(() => {
|
||||
const style = []
|
||||
if (props.flip !== '') {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<script lang="ts" setup name="Trend">
|
||||
<script lang="ts" setup>
|
||||
const props = defineProps({
|
||||
value: {
|
||||
type: String,
|
||||
@@ -22,6 +22,10 @@ const props = defineProps({
|
||||
},
|
||||
})
|
||||
|
||||
defineOptions({
|
||||
name: 'Trend',
|
||||
})
|
||||
|
||||
const isUp = computed(() => {
|
||||
let isUp = props.type === 'up'
|
||||
if (props.reverse) {
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
<script lang="ts" setup name="AppSetting">
|
||||
<script lang="ts" setup>
|
||||
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'
|
||||
|
||||
defineOptions({
|
||||
name: 'AppSetting',
|
||||
})
|
||||
|
||||
const route = useRoute()
|
||||
|
||||
const settingsStore = useSettingsStore()
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
<script lang="ts" setup name="BuyIt">
|
||||
<script lang="ts" setup>
|
||||
import { ElNotification } from 'element-plus'
|
||||
|
||||
defineOptions({
|
||||
name: 'BuyIt',
|
||||
})
|
||||
|
||||
const isActived = ref(true)
|
||||
setTimeout(() => {
|
||||
isActived.value = false
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
<script lang="ts" setup name="Header">
|
||||
<script lang="ts" setup>
|
||||
import Logo from '../Logo/index.vue'
|
||||
import Tools from '../Tools/index.vue'
|
||||
import useSettingsStore from '@/store/modules/settings'
|
||||
import useMenuStore from '@/store/modules/menu'
|
||||
|
||||
defineOptions({
|
||||
name: 'Header',
|
||||
})
|
||||
|
||||
const settingsStore = useSettingsStore()
|
||||
const menuStore = useMenuStore()
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<script lang="ts" setup name="Logo">
|
||||
<script lang="ts" setup>
|
||||
import imgLogo from '@/assets/images/logo.png'
|
||||
import useSettingsStore from '@/store/modules/settings'
|
||||
|
||||
@@ -13,6 +13,10 @@ defineProps({
|
||||
},
|
||||
})
|
||||
|
||||
defineOptions({
|
||||
name: 'Logo',
|
||||
})
|
||||
|
||||
const settingsStore = useSettingsStore()
|
||||
|
||||
const title = ref(import.meta.env.VITE_APP_TITLE)
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
<script lang="ts" setup name="MainSidebar">
|
||||
<script lang="ts" setup>
|
||||
import Logo from '../Logo/index.vue'
|
||||
import useSettingsStore from '@/store/modules/settings'
|
||||
import useMenuStore from '@/store/modules/menu'
|
||||
|
||||
defineOptions({
|
||||
name: 'MainSidebar',
|
||||
})
|
||||
|
||||
const settingsStore = useSettingsStore()
|
||||
const menuStore = useMenuStore()
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<script lang="ts" setup name="Search">
|
||||
<script lang="ts" setup>
|
||||
import { cloneDeep } from 'lodash-es'
|
||||
import hotkeys from 'hotkeys-js'
|
||||
import type { RouteRecordRaw } from 'vue-router'
|
||||
@@ -8,6 +8,10 @@ import useRouteStore from '@/store/modules/route'
|
||||
import useMenuStore from '@/store/modules/menu'
|
||||
import type { Menu } from '#/global'
|
||||
|
||||
defineOptions({
|
||||
name: 'Search',
|
||||
})
|
||||
|
||||
const router = useRouter()
|
||||
|
||||
const settingsStore = useSettingsStore()
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<script lang="ts" setup name="SidebarItem">
|
||||
// import SidebarItem from './index.vue'
|
||||
<script lang="ts" setup>
|
||||
import { resolveRoutePath } from '@/utils'
|
||||
import useSettingsStore from '@/store/modules/settings'
|
||||
import type { Menu } from '#/global'
|
||||
@@ -15,6 +14,10 @@ const props = defineProps({
|
||||
},
|
||||
})
|
||||
|
||||
defineOptions({
|
||||
name: 'SidebarItem',
|
||||
})
|
||||
|
||||
const settingsStore = useSettingsStore()
|
||||
|
||||
const hasChildren = computed(() => {
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
<script lang="ts" setup name="SubSidebar">
|
||||
<script lang="ts" setup>
|
||||
import Logo from '../Logo/index.vue'
|
||||
import SidebarItem from '../SidebarItem/index.vue'
|
||||
import useSettingsStore from '@/store/modules/settings'
|
||||
import useMenuStore from '@/store/modules/menu'
|
||||
|
||||
defineOptions({
|
||||
name: 'SubSidebar',
|
||||
})
|
||||
|
||||
const settingsStore = useSettingsStore()
|
||||
const menuStore = useMenuStore()
|
||||
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
<script lang="ts" setup name="Tools">
|
||||
<script lang="ts" setup>
|
||||
import { useFullscreen } from '@vueuse/core'
|
||||
import eventBus from '@/utils/eventBus'
|
||||
import useSettingsStore from '@/store/modules/settings'
|
||||
import useUserStore from '@/store/modules/user'
|
||||
|
||||
defineOptions({
|
||||
name: 'Tools',
|
||||
})
|
||||
|
||||
const router = useRouter()
|
||||
|
||||
const settingsStore = useSettingsStore()
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
<script lang="ts" setup name="Topbar">
|
||||
<script lang="ts" setup>
|
||||
import { compile } from 'path-to-regexp'
|
||||
import Tools from '../Tools/index.vue'
|
||||
import useSettingsStore from '@/store/modules/settings'
|
||||
|
||||
defineOptions({
|
||||
name: 'Topbar',
|
||||
})
|
||||
|
||||
const route = useRoute()
|
||||
|
||||
const settingsStore = useSettingsStore()
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
<script lang="ts" setup name="LinkView">
|
||||
<script lang="ts" setup>
|
||||
defineOptions({
|
||||
name: 'LinkView',
|
||||
})
|
||||
|
||||
const route = useRoute()
|
||||
|
||||
function open() {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<script lang="ts" setup name="Layout">
|
||||
<script lang="ts" setup>
|
||||
import hotkeys from 'hotkeys-js'
|
||||
import LinkView from './components/views/link.vue'
|
||||
import Header from './components/Header/index.vue'
|
||||
@@ -14,6 +14,10 @@ import useKeepAliveStore from '@/store/modules/keepAlive'
|
||||
import useMenuStore from '@/store/modules/menu'
|
||||
import eventBus from '@/utils/eventBus'
|
||||
|
||||
defineOptions({
|
||||
name: 'Layout',
|
||||
})
|
||||
|
||||
const routeInfo = useRoute()
|
||||
|
||||
const settingsStore = useSettingsStore()
|
||||
|
||||
@@ -3,7 +3,11 @@ meta:
|
||||
enabled: false
|
||||
</route>
|
||||
|
||||
<script lang="ts" setup name="ComponentExampleActionbar">
|
||||
<script lang="ts" setup>
|
||||
defineOptions({
|
||||
name: 'ComponentExampleActionbar',
|
||||
})
|
||||
|
||||
const form = ref({
|
||||
name: '',
|
||||
region: '',
|
||||
|
||||
@@ -3,10 +3,14 @@ meta:
|
||||
enabled: false
|
||||
</route>
|
||||
|
||||
<script lang="ts" setup name="ComponentExampleArea">
|
||||
<script lang="ts" setup>
|
||||
import type { FormInstance, FormRules } from 'element-plus'
|
||||
import { ElMessage } from 'element-plus'
|
||||
|
||||
defineOptions({
|
||||
name: 'ComponentExampleArea',
|
||||
})
|
||||
|
||||
const pcas1 = ref([])
|
||||
const pcas2 = ref([])
|
||||
const pcas3 = ref([])
|
||||
|
||||
@@ -3,9 +3,13 @@ meta:
|
||||
enabled: false
|
||||
</route>
|
||||
|
||||
<script lang="ts" setup name="ComponentExampleSearchbar">
|
||||
<script lang="ts" setup>
|
||||
import { ElMessage } from 'element-plus'
|
||||
|
||||
defineOptions({
|
||||
name: 'ComponentExampleSearchbar',
|
||||
})
|
||||
|
||||
const search = ref({
|
||||
name: '',
|
||||
department_id: '',
|
||||
|
||||
@@ -3,7 +3,11 @@ meta:
|
||||
enabled: false
|
||||
</route>
|
||||
|
||||
<script lang="ts" setup name="ComponentExampleSvg">
|
||||
<script lang="ts" setup>
|
||||
defineOptions({
|
||||
name: 'ComponentExampleSvg',
|
||||
})
|
||||
|
||||
const flip = ref<'horizontal' | 'vertical' | 'both' | ''>('')
|
||||
const rotate = ref(0)
|
||||
</script>
|
||||
|
||||
@@ -3,7 +3,11 @@ meta:
|
||||
enabled: false
|
||||
</route>
|
||||
|
||||
<script lang="ts" setup name="ComponentExampleTableHeightAdaption">
|
||||
<script lang="ts" setup>
|
||||
defineOptions({
|
||||
name: 'ComponentExampleTableHeightAdaption',
|
||||
})
|
||||
|
||||
const dataList = ref([
|
||||
{
|
||||
date: '2016-05-02',
|
||||
|
||||
@@ -3,10 +3,14 @@ meta:
|
||||
enabled: false
|
||||
</route>
|
||||
|
||||
<script lang="ts" setup name="ComponentExampleUpload">
|
||||
<script lang="ts" setup>
|
||||
import type { UploadProps } from 'element-plus'
|
||||
import { ElMessage } from 'element-plus'
|
||||
|
||||
defineOptions({
|
||||
name: 'ComponentExampleUpload',
|
||||
})
|
||||
|
||||
const image = ref('https://picsum.photos/750/450')
|
||||
const images = ref([
|
||||
'https://picsum.photos/400',
|
||||
|
||||
@@ -3,9 +3,13 @@ meta:
|
||||
enabled: false
|
||||
</route>
|
||||
|
||||
<script lang="ts" setup name="TabExampleNested1">
|
||||
<script lang="ts" setup>
|
||||
import useKeepAliveStore from '@/store/modules/keepAlive'
|
||||
|
||||
defineOptions({
|
||||
name: 'TabExampleNested1',
|
||||
})
|
||||
|
||||
const keepAliveStore = useKeepAliveStore()
|
||||
</script>
|
||||
|
||||
|
||||
@@ -3,9 +3,13 @@ meta:
|
||||
enabled: false
|
||||
</route>
|
||||
|
||||
<script lang="ts" setup name="TabExampleNested2">
|
||||
<script lang="ts" setup>
|
||||
import useKeepAliveStore from '@/store/modules/keepAlive'
|
||||
|
||||
defineOptions({
|
||||
name: 'TabExampleNested2',
|
||||
})
|
||||
|
||||
const keepAliveStore = useKeepAliveStore()
|
||||
</script>
|
||||
|
||||
|
||||
@@ -3,7 +3,11 @@ meta:
|
||||
enabled: false
|
||||
</route>
|
||||
|
||||
<script lang="ts" setup name="TabExampleNestedTest">
|
||||
<script lang="ts" setup>
|
||||
defineOptions({
|
||||
name: 'TabExampleNestedTest',
|
||||
})
|
||||
|
||||
const val = ref('')
|
||||
</script>
|
||||
|
||||
|
||||
@@ -3,7 +3,11 @@ meta:
|
||||
enabled: false
|
||||
</route>
|
||||
|
||||
<script lang="ts" setup name="TabExampleNestedTest2">
|
||||
<script lang="ts" setup>
|
||||
defineOptions({
|
||||
name: 'TabExampleNestedTest2',
|
||||
})
|
||||
|
||||
const val = ref('')
|
||||
</script>
|
||||
|
||||
|
||||
@@ -3,9 +3,13 @@ meta:
|
||||
enabled: false
|
||||
</route>
|
||||
|
||||
<script lang="ts" setup name="KeepAliveExamplePage">
|
||||
<script lang="ts" setup>
|
||||
import useKeepAliveStore from '@/store/modules/keepAlive'
|
||||
|
||||
defineOptions({
|
||||
name: 'KeepAliveExamplePage',
|
||||
})
|
||||
|
||||
const router = useRouter()
|
||||
|
||||
const keepAliveStore = useKeepAliveStore()
|
||||
|
||||
+5
-1
@@ -5,11 +5,15 @@ meta:
|
||||
layout: false
|
||||
</route>
|
||||
|
||||
<script lang="ts" setup name="Login">
|
||||
<script lang="ts" setup>
|
||||
import type { FormInstance, FormRules } from 'element-plus'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import useUserStore from '@/store/modules/user'
|
||||
|
||||
defineOptions({
|
||||
name: 'Login',
|
||||
})
|
||||
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
|
||||
|
||||
@@ -4,11 +4,15 @@ meta:
|
||||
title: 修改密码
|
||||
</route>
|
||||
|
||||
<script lang="ts" setup name="PersonalEditPassword">
|
||||
<script lang="ts" setup>
|
||||
import type { FormInstance, FormRules } from 'element-plus'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import useUserStore from '@/store/modules/user'
|
||||
|
||||
defineOptions({
|
||||
name: 'PersonalEditPassword',
|
||||
})
|
||||
|
||||
const userStore = useUserStore()
|
||||
|
||||
const formRef = ref<FormInstance>()
|
||||
|
||||
@@ -5,10 +5,14 @@ meta:
|
||||
cache: personal-edit.password
|
||||
</route>
|
||||
|
||||
<script lang="ts" setup name="PersonalSetting">
|
||||
<script lang="ts" setup>
|
||||
import type { UploadProps } from 'element-plus'
|
||||
import { ElMessage } from 'element-plus'
|
||||
|
||||
defineOptions({
|
||||
name: 'PersonalSetting',
|
||||
})
|
||||
|
||||
const router = useRouter()
|
||||
|
||||
const form = ref({
|
||||
|
||||
@@ -6,7 +6,6 @@ import vueLegacy from '@vitejs/plugin-legacy'
|
||||
import createInspector from './inspector'
|
||||
import createAutoImport from './auto-import'
|
||||
import createComponents from './components'
|
||||
import createSetupExtend from './setup-extend'
|
||||
import createSvgIcon from './svg-icon'
|
||||
import createMock from './mock'
|
||||
import createLayouts from './layouts'
|
||||
@@ -30,7 +29,6 @@ export default function createVitePlugins(viteEnv, isBuild = false) {
|
||||
vitePlugins.push(createInspector())
|
||||
vitePlugins.push(createAutoImport())
|
||||
vitePlugins.push(createComponents())
|
||||
vitePlugins.push(createSetupExtend())
|
||||
vitePlugins.push(createSvgIcon(isBuild))
|
||||
vitePlugins.push(createMock(viteEnv, isBuild))
|
||||
vitePlugins.push(createLayouts())
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
import setupExtend from 'unplugin-vue-setup-extend-plus/vite'
|
||||
|
||||
export default function createSetupExtend() {
|
||||
return setupExtend({})
|
||||
}
|
||||
Reference in New Issue
Block a user