Giter VIP home page Giter VIP logo

iconpark-miniprogram's Introduction

Hi there 👋

Yangger's github stats

Yangger's top langs

iconpark-miniprogram's People

Contributors

yangger6 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

iconpark-miniprogram's Issues

Taro能否支持自定义size

因为不太熟悉ejs写法,所以没提pr。我本地尝试了下,如果能改成类似以下的模板,能支持自定义size,同时能兼容RN:

import Taro from '@tarojs/taro';
import { Image } from '@tarojs/components';
import originIcon from '@icon-park/svg/es/icons/Abnormal';
import { IIconProps } from '@icon-park/svg/lib/runtime';
import svg64 from 'svg64';

const Abnormal = (props: IIconProps) => {
  const base64Data = svg64(originIcon(props));
  return (
    <Image
      {...props}
      svg
      src={base64Data}
      mode="widthFix"
      style={{
        // @ts-ignore
        width: Taro.pxTransform(parseInt(props.size || 36, 10)),
        // @ts-ignore
        height: Taro.pxTransform(parseInt(props.size || 36, 10)),
      }}>
    </Image>
  );
};

export default Abnormal;

[讨论] 对于微信小程序平台组件生成的一些想法

看了一晚上资料,暂时的解决方案:

  1. useExtendedLib方式引入组件,官方只支持kbone和weui,不支持第三方npm包
  2. 通过npm包引入,@icon-park/svg包在构建后直接4.6M了 = =
  3. 暂定的想法是通过用户在iconpark项目中生成的链接, 在用户项目中的components/iconpark/目录下生成各个icon的组件代码

不知道大佬们有没有更好的意见

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.