去除了多余的变量
This commit is contained in:
parent
bf3e77e7a3
commit
fe0b9edf01
|
@ -81,7 +81,6 @@ export default defineComponent(() => {
|
|||
menu.show && (
|
||||
<div
|
||||
v-outside-click={() => {
|
||||
console.log(2333)
|
||||
menu.dismiss()
|
||||
}}
|
||||
class="fixed px-2 pt-4 pb-2 bg-white/60 backdrop-blur shadow-lg rounded-lg overflow-hidden w-[120px]"
|
||||
|
|
|
@ -3,11 +3,9 @@ import {
|
|||
defineComponent,
|
||||
provide,
|
||||
ref,
|
||||
Transition,
|
||||
type InjectionKey,
|
||||
type Ref
|
||||
} from 'vue'
|
||||
import AdderPageBack from './AdderPageBack'
|
||||
import useLayoutStore from '../useLayoutStore'
|
||||
import { OhVueIcon, addIcons } from 'oh-vue-icons'
|
||||
import {
|
||||
|
|
|
@ -3,7 +3,6 @@ import useLayoutStore from '../useLayoutStore'
|
|||
import { Button, Form, Input, InputGroup } from 'ant-design-vue'
|
||||
import { OhVueIcon, addIcons } from 'oh-vue-icons'
|
||||
import { MdUpload, MdImage, MdCheck } from 'oh-vue-icons/icons'
|
||||
import ImageUploader from '@/utils/ImageUploader'
|
||||
import useLink from '../../utils/useLink'
|
||||
import { CheckOutlined } from '@ant-design/icons-vue'
|
||||
import { v4 as uuid } from 'uuid'
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
import CategoryTab from '@/utils/CategoryTab'
|
||||
import request from '@/utils/request'
|
||||
import { computed, defineComponent, inject, onMounted, ref, watch } from 'vue'
|
||||
import type { BackgroundType } from '../background/BackgroundSwtich'
|
||||
import { computed, defineComponent, inject, ref, watch } from 'vue'
|
||||
import clsx from 'clsx'
|
||||
import useLayoutStore from '../useLayoutStore'
|
||||
import { AddToToken } from './AdderPage'
|
||||
import { v4 as uuid } from 'uuid'
|
||||
import { Button } from 'ant-design-vue'
|
||||
import { frontAddress, ossBase } from '@/config'
|
||||
import dayjs from 'dayjs'
|
||||
import { generateRandomString } from '@/utils/tool'
|
||||
|
@ -161,7 +159,6 @@ export default defineComponent(() => {
|
|||
} else {
|
||||
try {
|
||||
Promise.all([fetchGame(1), fetchGame(2), fetchGame(3)]).then((res) => {
|
||||
console.log(res.flat())
|
||||
const resData = res.flat() as OtherGame[]
|
||||
appList.value = resData.map((el) => ({
|
||||
id: el.id.toString(),
|
||||
|
|
|
@ -6,7 +6,6 @@ import clsx from 'clsx'
|
|||
import useLayoutStore from '../useLayoutStore'
|
||||
import { AddToToken } from './AdderPage'
|
||||
import { v4 as uuid } from 'uuid'
|
||||
import { Button } from 'ant-design-vue'
|
||||
|
||||
interface HotAppCategoryType {
|
||||
id: string
|
||||
|
@ -129,7 +128,6 @@ export default defineComponent(() => {
|
|||
const categoryList = ref<BackgroundType[]>([])
|
||||
const selectType = ref('')
|
||||
onMounted(() => {
|
||||
console.log('hot')
|
||||
request<HotAppCategoryType[]>('GET', '/api/app/hotAppTypes').then((res) => {
|
||||
categoryList.value = res.map((el) => ({
|
||||
id: el.id,
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import { computed, defineComponent, inject } from 'vue'
|
||||
import useLayoutStore from '../useLayoutStore'
|
||||
import widgetList, { type Widget } from '@/widgets'
|
||||
import { Button } from 'ant-design-vue'
|
||||
import clsx from 'clsx'
|
||||
import { AddToToken } from './AdderPage'
|
||||
import { v4 as uuid } from 'uuid'
|
||||
|
@ -18,7 +17,6 @@ export const WidgetItem = defineComponent({
|
|||
const isGame = computed(() => layout.state.current === 0)
|
||||
const addTo = inject(AddToToken)
|
||||
const isExist = computed(() => {
|
||||
console.log(layout.state.content[layout.state.currentPage].pages)
|
||||
|
||||
return (
|
||||
layout.state.content[layout.state.current].pages[layout.state.currentPage].list.findIndex(
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import SettingItem from '@/settings/SettingItem'
|
||||
import useSettingsStore from '@/settings/useSettingsStore'
|
||||
import { Select, Slider, Switch, type SelectProps } from 'ant-design-vue'
|
||||
import { Select, Switch, type SelectProps } from 'ant-design-vue'
|
||||
import { defineComponent, ref } from 'vue'
|
||||
import useSearchConfigStore from '../header/search/useSearchConfigStore'
|
||||
|
||||
|
|
|
@ -37,7 +37,6 @@ export default defineComponent({
|
|||
layout="vertical"
|
||||
model={addState}
|
||||
onFinish={(res) => {
|
||||
console.log(res)
|
||||
}}
|
||||
>
|
||||
<Form.Item label="名称" name="name" rules={[{ required: true, message: '引擎名必填' }]}>
|
||||
|
|
|
@ -33,7 +33,6 @@ export default defineStore('layout', () => {
|
|||
[ready, state],
|
||||
([re, s]) => {
|
||||
if (!re) return
|
||||
console.log(toRaw(s))
|
||||
db.setItem('layout', toRaw(s))
|
||||
},
|
||||
{ deep: true }
|
||||
|
@ -65,8 +64,6 @@ export default defineStore('layout', () => {
|
|||
// 添加图标
|
||||
const addBlock = (block: Block, _page: number = -1) => {
|
||||
const page = _page >= 0 ? _page : state.currentPage
|
||||
console.log(page)
|
||||
console.log(state.content[state.current].pages[page])
|
||||
if (!state.content[state.current].pages[page]) {
|
||||
globalToast.warning('请先添加页面')
|
||||
return
|
||||
|
@ -99,8 +96,6 @@ export default defineStore('layout', () => {
|
|||
}
|
||||
// 处理不同的组件的名称
|
||||
if (block.name === 'gameVideo') {
|
||||
console.log(state.currentPage);
|
||||
console.log(block);
|
||||
|
||||
return state.current === 0 ? '游戏视频' : state.current === 1 ? '学习视频' : '娱乐视频'
|
||||
}
|
||||
|
|
|
@ -51,7 +51,6 @@ export default defineComponent({
|
|||
() => {
|
||||
const idx = props.list.findIndex((item) => item.id === props.selectType)
|
||||
if (idx === -1) return
|
||||
console.log(tabRefs.value)
|
||||
|
||||
if (tabRefs.value[idx]) {
|
||||
const childRef = tabRefs.value[idx]
|
||||
|
|
|
@ -45,7 +45,6 @@ export default defineComponent({
|
|||
const file: File | undefined = el.files?.[0]
|
||||
el.value = ''
|
||||
if (!file) return
|
||||
console.log(file.size, props.size)
|
||||
if (file.size > props.size * 1000 * 1000) {
|
||||
globalToast.warning(`大小不得超过${props.size}mb`)
|
||||
return
|
||||
|
|
|
@ -16,7 +16,6 @@ export default defineComponent({
|
|||
const handle = () => {
|
||||
if (!dom) return
|
||||
const { width } = dom.getBoundingClientRect()
|
||||
console.log(width)
|
||||
height.value = width * props.ratio
|
||||
}
|
||||
const listen = new ResizeObserver(handle)
|
||||
|
|
Loading…
Reference in New Issue