浏览代码

feat: 完成

huangzhichao 1 年之前
父节点
当前提交
4522675f7a
共有 3 个文件被更改,包括 3 次插入3 次删除
  1. 1 1
      src/pages/index/index.tsx
  2. 1 1
      src/plugin/components/custom/index.less
  3. 1 1
      src/plugin/share/index.ts

+ 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
   }