File tree Expand file tree Collapse file tree 7 files changed +106
-119
lines changed
Expand file tree Collapse file tree 7 files changed +106
-119
lines changed Original file line number Diff line number Diff line change 1+ <template >
2+ <div class =" bottomNav" >
3+ 13245879
4+ </div >
5+ </template >
6+
7+ <script >
8+ export default {
9+ name: ' BottomNav' ,
10+ props: {
11+ title: String
12+ }
13+ };
14+ </script >
15+
16+ <!-- Add "scoped" attribute to limit CSS to this component only -->
17+ <style scoped lang="scss">
18+ .bottomNav {
19+ height : 60px ;
20+ width : 100% ;
21+ padding-bottom : 20px ;
22+ position : absolute ;
23+ bottom : 0 ;
24+ left : 0 ;
25+ }
26+ </style >
Original file line number Diff line number Diff line change 1+ <template >
2+ <div class =" headre" >
3+ <span >{{ title }}</span >
4+ </div >
5+ </template >
6+
7+ <script >
8+ export default {
9+ name: ' ComHeader' ,
10+ props: {
11+ title: String
12+ }
13+ };
14+ </script >
15+
16+ <!-- Add "scoped" attribute to limit CSS to this component only -->
17+ <style scoped lang="scss">
18+ .headre {
19+ height : 50px ;
20+ width : 100% ;
21+ padding-top : 30px ;
22+ color : #ffffff ;
23+ font-size : 20px ;
24+ display : flex ;
25+ justify-content : center ;
26+ align-items : center ;
27+ background-image : linear-gradient (
28+ 45deg ,
29+ rgb (108 , 189 , 255 ) 0% ,
30+ rgb (7 , 87 , 179 ) 100%
31+ );
32+ }
33+ </style >
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ export default {
2+
3+ }
Original file line number Diff line number Diff line change 11import App from './app' ;
22import Vue from 'vue' ;
3+ import apicloud from '@/utils/common' ;
34
5+ Vue . use ( apicloud ) ;
46Vue . config . productionTip = false ;
57
68new Vue ( {
Original file line number Diff line number Diff line change 11<template >
2- <div class =" index" >{{ title }}</div >
2+ <div class =" index" >
3+ <com-header :title =" title" />
4+ <button
5+ style =" height :100px ; width : 100% ; background : deepskyblue "
6+ @click =" $openPage({ name: 'login', url: 'loginindex.html' })"
7+ >
8+ 123456
9+ </button >
10+ </div >
311</template >
412
513<script >
14+ import ComHeader from ' @/components/ComHeader' ;
15+
616export default {
717 name: ' index' ,
18+ components: {
19+ ComHeader
20+ },
821 data () {
922 return {
10- title: ' lalala '
23+ title: ' 首页 '
1124 };
1225 },
1326 mounted () {}
@@ -16,8 +29,6 @@ export default {
1629
1730<style lang="scss" scoped>
1831.index {
19- width : 100px ;
20- color : #000 ;
21- background : dodgerblue ;
32+ width : 100% ;
2233}
2334 </style >
Original file line number Diff line number Diff line change 1+ export class APICloud {
2+ $isMobile = typeof api !== 'undefined' ;
3+
4+ openWin ( params ) {
5+ console . log ( typeof api ) ;
6+ if ( this . $isMobile ) {
7+ window . api . openWin ( params ) ;
8+ } else {
9+ location . href = params . url ;
10+ }
11+ }
12+
13+ install = Vue => {
14+ if ( this . $isMobile ) {
15+ Vue . prototype . $api = window . api ;
16+ }
17+ Vue . prototype . $isMobile = this . $isMobile ;
18+ Vue . prototype . $openPage = this . openWin ;
19+ Vue . mixin ( {
20+ created : function ( ) { }
21+ } ) ;
22+ } ;
23+ }
24+
25+ const apicloud = new APICloud ( ) ;
26+ export default apicloud ;
You can’t perform that action at this time.
0 commit comments