Merge branch 'preview-fixes' into preview-features

This commit is contained in:
the1812 2023-02-20 22:41:45 +08:00
commit 0efe0b32c1
6 changed files with 15 additions and 11 deletions

View File

@ -9,7 +9,7 @@
</div>
<div class="live-info">
<div class="live-title" :title="c.title">{{ c.title }}</div>
<div class="live-name" :title="c.name">{{ c.upName }}</div>
<div class="live-name" :title="c.upName">{{ c.upName }}</div>
</div>
</a>
</transition-group>

View File

@ -3,10 +3,19 @@
</template>
<script lang="ts">
import type { PropType } from 'vue'
import type { NavbarIframeConfig } from './iframe'
import { popperMixin } from '../mixins'
import { CustomNavbarItem } from '../custom-navbar-item'
export default Vue.extend({
name: 'IframePopup',
mixins: [popperMixin],
props: {
item: {
type: CustomNavbarItem as unknown as PropType<CustomNavbarItem & NavbarIframeConfig>,
required: true,
},
},
})
</script>

View File

@ -1,6 +1,6 @@
import { CustomNavbarItemInit } from '../custom-navbar-item'
interface NavbarIframeConfig {
export interface NavbarIframeConfig {
src: string
href: string
width: number

View File

@ -34,8 +34,6 @@ export default Vue.extend({
data() {
return {
client: null,
// sessions: [],
// devRecords: options.devRecords,
isConnected: false,
}
},
@ -44,12 +42,10 @@ export default Vue.extend({
this.client = devClient
this.updateConnectionStatus()
devClient.addEventListener(DevClientEvents.ServerChange, this.updateConnectionStatus)
// devClient.addEventListener(DevClientEvents.SessionsUpdate, this.updateSessionsStatus)
},
beforeDestroy() {
const devClient = this.client as DevClient
devClient.removeEventListener(DevClientEvents.ServerChange, this.updateConnectionStatus)
// devClient.removeEventListener(DevClientEvents.SessionsUpdate, this.updateSessionsStatus)
},
methods: {
async connect() {
@ -61,9 +57,6 @@ export default Vue.extend({
updateConnectionStatus() {
this.isConnected = this.client.isConnected
},
updateSessionsStatus() {
this.sessions = [...this.client.sessions]
},
},
})
</script>

View File

@ -1,6 +1,7 @@
import * as ajax from '@/core/ajax'
import * as cdnTypes from '@/core/cdn-types'
import * as download from '@/core/download'
import * as dialog from '@/core/dialog'
import * as externalInput from '@/core/external-input'
import * as filePicker from '@/core/file-picker'
import * as installFeature from '@/core/install-feature'
@ -40,6 +41,7 @@ export const coreApis = {
ajax,
cdnTypes,
download,
dialog,
externalInput,
filePicker,
installFeature,
@ -80,6 +82,7 @@ export const externalApis = {
ajax,
...cdnTypes,
...download,
...dialog,
...externalInput,
...filePicker,
...installFeature,

View File

@ -49,8 +49,7 @@ export default Vue.extend({
async mounted() {
await this.$nextTick()
const appendTarget = containerMap[this.container]
this.toast = createMiniToast(this.message, this.$refs.content, {
content: this.$refs.toast,
this.toast = createMiniToast(this.$refs.toast, this.$refs.content, {
placement: this.placement,
showOnCreate: this.show,
trigger: 'mouseenter focusin',