55 < meta charset ="utf-8 " />
66 < meta name ="apple-mobile-web-app-capable " content ="yes " />
77 < meta name ="apple-mobile-web-app-status-bar-style " content ="black-translucent " />
8- < meta name ="viewport " content ="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, viewport-fit=cover "" />
8+ < meta name ="viewport " content ="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, viewport-fit=cover " />
99 < link rel ="Bookmark " href ="https://raw.githubusercontent.com/chavyleung/scripts/master/BOXJS.png " />
1010 < link rel ="shortcut icon " href ="https://raw.githubusercontent.com/chavyleung/scripts/master/BOXJS.png " />
1111 < link rel ="apple-touch-icon " href ="https://raw.githubusercontent.com/chavyleung/scripts/master/BOXJS.png " />
2828 box-sizing : content-box;
2929 padding-top : constant ( safe-area-inset-top) ;
3030 padding-top : env ( safe-area-inset-top) ;
31- margin-bottom : calc ( 48px + constant ( safe-area-inset-bottom) ) ;
32- margin-bottom : calc ( 48px + env ( safe-area-inset-bottom) ) ;
3331 }
3432 . v-app-bar . v-autocomplete {
3533 box-sizing : border-box;
6361 </ head >
6462 < body >
6563 < div id ="app " v-cloak >
66- < v-app v-if ="box " :style ="appStyle ">
64+ < v-app v-if ="box " :style ="appViewStyle ">
6765 < v-snackbar top app v-model ="ui.snackbar.show " v-bind ="ui.snackbar "> {{ui.snackbar.msg}}</ v-snackbar >
6866 <!-- 头部 -->
6967 < v-app-bar app dense :color ="isDarkMode || !isWebApp ? undefined : 'primary' ">
332330 < v-avatar size ="32 "> < v-icon > mdi-language-html5</ v-icon > </ v-avatar >
333331 </ v-btn >
334332 </ v-list-item >
333+ < v-list-item class ="mt-4 "> </ v-list-item >
335334 </ v-list >
336335 </ v-navigation-drawer >
337336 <!-- 主页 -->
356355 :src ="app.icon "
357356 > </ v-img >
358357 < p class ="text-center ma-0 ">
359- < span
360- :color ="isWallpaper ? '#fff' : '' "
361- class ="d-inline-block text-truncate font-weight-bold "
362- style ="font-size: 10px; max-width: 58px; "
363- >
358+ < span class ="d-inline-block text-truncate font-weight-bold " :style ="appIconFontStyle ">
364359 {{app.name}}
365360 </ span >
366361 </ p >
@@ -525,7 +520,7 @@ <h2>{{curapp.name}}</h2>
525520 < v-subheader >
526521 应用设置 ({{curapp.settings.length}})
527522 </ v-subheader >
528- < v-form class ="pl-4 pr-4 ">
523+ < v-form class ="pl-4 pr-4 pb-4 ">
529524 < template v-for ="(setting, settingIdx) in curapp.settings ">
530525 < v-slider
531526 v-model ="setting.val "
@@ -667,6 +662,10 @@ <h2>{{curapp.name}}</h2>
667662 </ v-card-actions >
668663 </ v-card >
669664 </ v-dialog >
665+ < v-divider > </ v-divider >
666+ < v-list-item @click ="clearAppDatas() ">
667+ < v-list-item-title > 清空数据</ v-list-item-title >
668+ </ v-list-item >
670669 </ v-list >
671670 </ v-menu >
672671 </ v-subheader >
@@ -1214,7 +1213,7 @@ <h2 :class="version === ver.version ? 'primary--text' : undefined">v{{ver.versio
12141213 return items
12151214 } ,
12161215 // 样式
1217- appStyle ( ) {
1216+ appViewStyle ( ) {
12181217 if ( this . path !== '/' ) {
12191218 return null
12201219 }
@@ -1227,6 +1226,16 @@ <h2 :class="version === ver.version ? 'primary--text' : undefined">v{{ver.versio
12271226 }
12281227 return style
12291228 } ,
1229+ appIconFontStyle ( ) {
1230+ const style = {
1231+ 'font-size' : '10px' ,
1232+ 'max-width' : '58px'
1233+ }
1234+ if ( this . isWallpaper ) {
1235+ style [ 'color' ] = '#fff'
1236+ }
1237+ return style
1238+ } ,
12301239 // 是否保存用户偏好
12311240 isSaveUserCfgs : {
12321241 set ( val ) {
@@ -1728,8 +1737,12 @@ <h2 :class="version === ver.version ? 'primary--text' : undefined">v{{ver.versio
17281737 // 保存应用数据
17291738 clearAppDatas ( key ) {
17301739 const datas = this . curapp . datas
1731- const data = datas . find ( ( data ) => data . key === key )
1732- data . val = ''
1740+ if ( key ) {
1741+ const data = datas . find ( ( data ) => data . key === key )
1742+ data . val = ''
1743+ } else {
1744+ datas . forEach ( ( data ) => ( data . val = '' ) )
1745+ }
17331746 axios . post ( '/api/save' , datas ) . then ( ( resp ) => {
17341747 if ( this . curapp . id === 'BoxSetting' ) {
17351748 this . isSaveUserCfgs = false
0 commit comments