mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-06-08 01:17:23 +08:00
fix: 样式微调
This commit is contained in:
parent
f07d3fef9f
commit
fd387fe5cd
@ -42,7 +42,7 @@ export const getServerConfig = async (): Promise<any> => {
|
|||||||
return axios({
|
return axios({
|
||||||
baseURL: "",
|
baseURL: "",
|
||||||
method: "get",
|
method: "get",
|
||||||
url: (app.config.globalProperties.$baseUrl || "/") + "serverConfig.json"
|
url: process.env.NODE_ENV === 'production' ? "/manages/serverConfig.json" : "/serverConfig.json"
|
||||||
}).then(({ data: config }) => {
|
}).then(({ data: config }) => {
|
||||||
let $config = app.config.globalProperties.$config
|
let $config = app.config.globalProperties.$config
|
||||||
// 自动注入项目配置
|
// 自动注入项目配置
|
||||||
|
@ -20,7 +20,7 @@ label {
|
|||||||
}
|
}
|
||||||
|
|
||||||
html {
|
html {
|
||||||
overflow-x: hidden;
|
overflow: hidden;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
@ -29,7 +29,7 @@ html {
|
|||||||
#app {
|
#app {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow-x: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
*,
|
*,
|
||||||
|
@ -6,9 +6,36 @@
|
|||||||
import { onMounted } from "vue";
|
import { onMounted } from "vue";
|
||||||
import Player from "xgplayer/dist/simple_player";
|
import Player from "xgplayer/dist/simple_player";
|
||||||
import { volume, playbackRate, screenShot } from "xgplayer/dist/controls";
|
import { volume, playbackRate, screenShot } from "xgplayer/dist/controls";
|
||||||
|
|
||||||
|
export interface deviceInter {
|
||||||
|
match: any;
|
||||||
|
}
|
||||||
export default {
|
export default {
|
||||||
setup() {
|
setup() {
|
||||||
|
// 检测设备类型(手机返回true,反之)
|
||||||
|
const deviceDetection = () => {
|
||||||
|
let sUserAgent: deviceInter = navigator.userAgent.toLowerCase();
|
||||||
|
let bIsIpad = sUserAgent.match(/ipad/i) == "ipad";
|
||||||
|
let bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os";
|
||||||
|
let bIsMidp = sUserAgent.match(/midp/i) == "midp";
|
||||||
|
let bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4";
|
||||||
|
let bIsUc = sUserAgent.match(/ucweb/i) == "ucweb";
|
||||||
|
let bIsAndroid = sUserAgent.match(/android/i) == "android";
|
||||||
|
let bIsCE = sUserAgent.match(/windows ce/i) == "windows ce";
|
||||||
|
let bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile";
|
||||||
|
return bIsIphoneOs ||
|
||||||
|
bIsMidp ||
|
||||||
|
bIsUc7 ||
|
||||||
|
bIsUc ||
|
||||||
|
bIsAndroid ||
|
||||||
|
bIsCE ||
|
||||||
|
bIsWM
|
||||||
|
? true
|
||||||
|
: false;
|
||||||
|
};
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
console.log("---", deviceDetection());
|
||||||
let player = new Player({
|
let player = new Player({
|
||||||
id: "mse",
|
id: "mse",
|
||||||
autoplay: false,
|
autoplay: false,
|
||||||
@ -17,7 +44,7 @@ export default {
|
|||||||
"https://sf1-hscdn-tos.pstatp.com/obj/media-fe/xgplayer_doc_video/mp4/xgplayer-demo-720p.mp4",
|
"https://sf1-hscdn-tos.pstatp.com/obj/media-fe/xgplayer_doc_video/mp4/xgplayer-demo-720p.mp4",
|
||||||
poster:
|
poster:
|
||||||
"https://s2.pstatp.com/cdn/expire-1-M/byted-player-videos/1.0.0/poster.jpg",
|
"https://s2.pstatp.com/cdn/expire-1-M/byted-player-videos/1.0.0/poster.jpg",
|
||||||
fluid: true,
|
fluid: deviceDetection() ? true : false,
|
||||||
controlPlugins: [volume, playbackRate, screenShot],
|
controlPlugins: [volume, playbackRate, screenShot],
|
||||||
playbackRate: [0.5, 0.75, 1, 1.5, 2], //传入倍速可选数组
|
playbackRate: [0.5, 0.75, 1, 1.5, 2], //传入倍速可选数组
|
||||||
});
|
});
|
||||||
@ -27,7 +54,7 @@ export default {
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style lang="scss" scoped>
|
||||||
#mse {
|
#mse {
|
||||||
flex: auto;
|
flex: auto;
|
||||||
}
|
}
|
||||||
|
@ -35,14 +35,14 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<NoisyPlane
|
<NoisyPlane
|
||||||
:width="200"
|
:width="120"
|
||||||
:width-segments="100"
|
:width-segments="120"
|
||||||
:height="200"
|
:height="100"
|
||||||
:height-segments="100"
|
:height-segments="120"
|
||||||
:time-coef="0.0003"
|
:time-coef="0.0003"
|
||||||
:noise-coef="5"
|
:noise-coef="5"
|
||||||
:displacement-scale="15"
|
:displacement-scale="20"
|
||||||
:delta-coef="1 / 200"
|
:delta-coef="1 / 120"
|
||||||
:position="{ x: 0, y: 0, z: 0 }"
|
:position="{ x: 0, y: 0, z: 0 }"
|
||||||
>
|
>
|
||||||
<PhysicalMaterial />
|
<PhysicalMaterial />
|
||||||
@ -115,6 +115,6 @@ export default {
|
|||||||
.welcome {
|
.welcome {
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
position: absolute;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user