File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ const currenClickPlatform = ref('');
9
9
if (deviceType .value !== ' other' ) {
10
10
currenClickPlatform .value = deviceType .value ;
11
11
} else {
12
- deviceType .value = ' mac ' ;
12
+ currenClickPlatform .value = ' apple ' ;
13
13
}
14
14
15
15
function showCode(type : string ) {
Original file line number Diff line number Diff line change 1
1
import { Ref , ref } from 'vue' ;
2
2
import DeviceDetector from 'device-detector-js' ;
3
3
4
- type osType = 'linux' | 'windows' | 'mac ' | 'other' ;
4
+ type osType = 'linux' | 'windows' | 'apple ' | 'other' ;
5
5
6
6
const deviceDetector = new DeviceDetector ( ) ;
7
7
@@ -10,7 +10,7 @@ export const useDetectDeviceType = () => {
10
10
const useAgent = navigator . userAgent ;
11
11
const name = deviceDetector . parse ( useAgent ) . os ?. name ;
12
12
if ( name === 'Mac' ) {
13
- deviceType . value = 'mac ' ;
13
+ deviceType . value = 'apple ' ;
14
14
} else if ( name ?. includes ( 'Windows' ) ) {
15
15
deviceType . value = 'windows' ;
16
16
} else if ( name ?. includes ( 'Linux' ) || name ?. includes ( 'Debian' ) || name ?. includes ( 'Ubuntu' ) ) {
You can’t perform that action at this time.
0 commit comments