|
@@ -41,32 +41,6 @@
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
- <!-- div class="text-lg font-medium mb-4">截图设置</div>
|
|
|
|
- <div class="hc-screenshot-box mb-4">
|
|
|
|
- <div class="item">
|
|
|
|
- <div class="label">WebRtc:</div>
|
|
|
|
- <el-popover placement="top-start" trigger="hover" :width="400">
|
|
|
|
- <template #reference>
|
|
|
|
- <el-switch v-model="webRtcVal" size="large" active-value="1" inactive-value="0" @change="webRtcUpdate"/>
|
|
|
|
- </template>
|
|
|
|
- <div>
|
|
|
|
- <div>是否启用WebRtc方式截图,WebRtc方式不会错版,但需要同意授权,调用的是浏览器的共享屏幕API (可能在某些浏览器上,不支持)。</div>
|
|
|
|
- <div class="mt-2 mb-2">不启用WebRtc时,采用 html2canvas 实现截图,但支持的并不好,容易出现错版。</div>
|
|
|
|
- <div>但目前市面上,网页截图的仅有这两种方案,推荐使用第三方截图来手动上传图片。</div>
|
|
|
|
- </div>
|
|
|
|
- </el-popover>
|
|
|
|
- </div>
|
|
|
|
- <div class="item">
|
|
|
|
- <div class="label">全屏截图:</div>
|
|
|
|
- <el-popover placement="top-start" trigger="hover" :width="180">
|
|
|
|
- <template #reference>
|
|
|
|
- <el-switch v-model="fullScreenVal" size="large" active-value="1" inactive-value="0" @change="fullScreenUpdate"/>
|
|
|
|
- </template>
|
|
|
|
- <div>单击截全屏的启用状态</div>
|
|
|
|
- </el-popover>
|
|
|
|
- </div>
|
|
|
|
- </div -->
|
|
|
|
<template #action>
|
|
<template #action>
|
|
<el-popover placement="top" trigger="hover" :width="180">
|
|
<el-popover placement="top" trigger="hover" :width="180">
|
|
<template #reference>
|
|
<template #reference>
|
|
@@ -92,7 +66,7 @@
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
import { nextTick, ref } from 'vue'
|
|
import { nextTick, ref } from 'vue'
|
|
-import { useRoute, useRouter } from 'vue-router'
|
|
|
|
|
|
+import { useRouter } from 'vue-router'
|
|
import { useAppStore } from '~src/store'
|
|
import { useAppStore } from '~src/store'
|
|
import themeData from '~src/config/theme'
|
|
import themeData from '~src/config/theme'
|
|
import { userConfigSave } from '~api/other'
|
|
import { userConfigSave } from '~api/other'
|
|
@@ -103,14 +77,11 @@ import { setElementMainColor } from 'js-fast-way'
|
|
|
|
|
|
//初始变量
|
|
//初始变量
|
|
const router = useRouter()
|
|
const router = useRouter()
|
|
-const useRoutes = useRoute()
|
|
|
|
const useAppState = useAppStore()
|
|
const useAppState = useAppStore()
|
|
|
|
|
|
//配置变量
|
|
//配置变量
|
|
const UserTheme = ref(useAppState.getTheme)
|
|
const UserTheme = ref(useAppState.getTheme)
|
|
const UserColor = ref(useAppState.getColor)
|
|
const UserColor = ref(useAppState.getColor)
|
|
-const webRtcVal = ref(useAppState.getShotWebRtc)
|
|
|
|
-const fullScreenVal = ref(useAppState.getFullScreen)
|
|
|
|
const UserColorNmae = ref(UserColor.value?.name || 'green')
|
|
const UserColorNmae = ref(UserColor.value?.name || 'green')
|
|
|
|
|
|
//颜色
|
|
//颜色
|
|
@@ -148,15 +119,6 @@ const ThemeTabsUpdate = (val) => {
|
|
document.documentElement.setAttribute('class', `${val} color-${colorName}`)
|
|
document.documentElement.setAttribute('class', `${val} color-${colorName}`)
|
|
}
|
|
}
|
|
|
|
|
|
-//更改截图方式
|
|
|
|
-const webRtcUpdate = (val) => {
|
|
|
|
- useAppState.setShotWebRtc(val)
|
|
|
|
-}
|
|
|
|
-//更改全屏截图方式
|
|
|
|
-const fullScreenUpdate = (val) => {
|
|
|
|
- useAppState.setFullScreen(val)
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
//取消配置
|
|
//取消配置
|
|
const CancelClick = () => {
|
|
const CancelClick = () => {
|
|
router.back()
|
|
router.back()
|
|
@@ -170,8 +132,6 @@ const SaveConfigClick = async () => {
|
|
const { error, code } = await userConfigSave({
|
|
const { error, code } = await userConfigSave({
|
|
theme: UserTheme.value,
|
|
theme: UserTheme.value,
|
|
color: UserColorNmae.value,
|
|
color: UserColorNmae.value,
|
|
- shotWebRtc: webRtcVal.value,
|
|
|
|
- fullScreen: fullScreenVal.value,
|
|
|
|
})
|
|
})
|
|
//判断状态
|
|
//判断状态
|
|
saveLoading.value = false
|
|
saveLoading.value = false
|