huangzhichao hai 1 ano
pai
achega
4522675f7a

+ 1 - 1
src/pages/index/index.tsx

@@ -7,7 +7,7 @@ const Index: React.FC = () => {
   return (
     <View className='index'>
       {/* <calendar /> */}
-      <custom props={{ adpId, width: 200 }}/>
+      <custom props={{ adpId, width: '100%' }}/>
     </View>
   )
 }

+ 1 - 1
src/plugin/components/custom/index.less

@@ -73,7 +73,7 @@
         }
 
         .title {
-          width: 100%;
+          flex: 1;
           padding: 0 12px;
           overflow: hidden;
           white-space: nowrap;

+ 1 - 1
src/plugin/share/index.ts

@@ -15,7 +15,7 @@ export function wrapProps(props: PropsWithChildren<CustomPropsType>) {
 
 
 
-  if (!width) {
+  if (typeof width !== 'number') {
     const windowInfo = Taro.getWindowInfo()
     width = windowInfo?.windowWidth
   }