File tree Expand file tree Collapse file tree 3 files changed +3
-17
lines changed
examples/sites/src/views/components
packages/mobile/components/tabs/src/tab-nav/renderless Expand file tree Collapse file tree 3 files changed +3
-17
lines changed Original file line number Diff line number Diff line change 5353 <div v-if =" isMobileFirst" class =" pc-demo-container" >
5454 <tiny-button @click =" openPlayground(demo, false)" >多端预览</tiny-button >
5555 </div >
56- <div v-else-if =" demoConfig.isMobile" class =" mobile -demo-container" >
56+ <div v-else-if =" demoConfig.isMobile" class =" pc -demo-container" >
5757 <div class =" mobile-view-btn" >
58- <tiny-button tiny_mode = " pc " @click =" openIframe(demo)" >{{ i18nByKey('yan-shi') }}</tiny-button >
58+ <tiny-button @click =" openIframe(demo)" >{{ i18nByKey('yan-shi') }}</tiny-button >
5959 </div >
6060 </div >
6161 <div v-else class =" pc-demo-container" >
@@ -369,15 +369,6 @@ onBeforeUnmount(() => {
369369 }
370370}
371371
372- .mobile-demo-container {
373- display : flex ;
374- flex-direction : column ;
375- background : #fff ;
376- border-radius : 6px ;
377- border : 1px solid #dcdfe6 ;
378- padding : 26px 18px 42px ;
379- }
380-
381372.demo-content {
382373 position : relative ;
383374
Original file line number Diff line number Diff line change @@ -17,17 +17,12 @@ import { on, off } from '@mobile-root/utils/deps/dom'
1717
1818export const computedNavStyle = ( state : ITabNavRenderlessParams [ 'state' ] ) : { transform : string ; width ?: string } => {
1919 const dir = ~ [ POSITION . Top , POSITION . Bottom ] . indexOf ( state . rootTabs . position ) ? 'X' : 'Y'
20-
2120 if ( state . mode === 'mobile' ) {
2221 const { offset, width } = state . lineStyle
2322 return {
2423 width : `${ width } px` ,
2524 transform : `translate${ dir } (${ offset } px) translate${ dir } (-50%)`
2625 }
27- } else {
28- return {
29- transform : `translate${ dir } (-${ state . navOffset } px)`
30- }
3126 }
3227}
3328
Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ export const renderless = (
8787 showExpandItem : false ,
8888 showExpandTabs : props . showExpandTabs ,
8989 expandHeaderStyle : { } ,
90- mode : props . _mode || parent . $mode || tinyMode || 'pc ',
90+ mode : props . _mode || 'mobile ',
9191 rootTabs : inject ( 'rootTabs' ) ,
9292 sizeName : computed ( ( ) => api . computedSizeName ( state ) ) ,
9393 navStyle : computed ( ( ) => api . computedNavStyle ( state ) ) ,
You can’t perform that action at this time.
0 commit comments