Skip to content

Commit

Permalink
fix: taro-demo full class (jdf2e#2095)
Browse files Browse the repository at this point in the history
  • Loading branch information
eiinu authored Mar 21, 2024
1 parent b746d42 commit 656d834
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 15 deletions.
8 changes: 8 additions & 0 deletions packages/nutui-taro-demo/src/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ body {
overflow-y: auto;
padding: 0px 17px 10px 17px;

&.full {
padding: 57px 0 0 0;

h2 {
padding-left: 17px;
}
}

&-full {
padding: 0 0 0 0 !important;

Expand Down
3 changes: 0 additions & 3 deletions src/packages/menu/demo.scss

This file was deleted.

7 changes: 1 addition & 6 deletions src/packages/menu/demo.taro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ import { Menu, Button } from '@/packages/nutui.react.taro'
import Header from '@/sites/components/header'

const MenuDemo = () => {
const style = `
.nut-overflow-hidden .demo.full{
overflow: hidden !important;
}`
const [translated] = useTranslate({
'zh-CN': {
basic: '基础用法',
Expand Down Expand Up @@ -108,8 +104,7 @@ const MenuDemo = () => {
return (
<>
<Header />
<style>{style}</style>
<div className={`demo demo-full ${Taro.getEnv() === 'WEB' ? 'web' : ''}`}>
<div className={`demo full ${Taro.getEnv() === 'WEB' ? 'web' : ''}`}>
<h2>{translated.basic}</h2>
<Menu
onClose={(i: number) => console.log('onClose', i)}
Expand Down
6 changes: 0 additions & 6 deletions src/packages/menu/demo.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
import React, { useEffect, useRef, useState } from 'react'
import './demo.scss'
import { ArrowDown, Star } from '@nutui/icons-react'
import Button from '../button'
import { Menu } from './menu'
import { useTranslate } from '../../sites/assets/locale'

const MenuDemo = () => {
const style = `
.nut-overflow-hidden .demo.full{
overflow: hidden !important;
}`
const [translated] = useTranslate({
'zh-CN': {
basic: '基础用法',
Expand Down Expand Up @@ -107,7 +102,6 @@ const MenuDemo = () => {

return (
<>
<style>{style}</style>
<div className="demo full">
<h2>{translated.basic}</h2>
<Menu
Expand Down

0 comments on commit 656d834

Please sign in to comment.