Giter Club home page Giter Club logo

Comments (8)

twinh avatar twinh commented on September 16, 2024 1
  1. 已解决,多了个调试语句 pr 了哈

from fower.

0x-leen avatar 0x-leen commented on September 16, 2024

恩 自定义属性今天晚上我一下,要不要改成 sx,这个我先看看哈

from fower.

0x-leen avatar 0x-leen commented on September 16, 2024

之所以用 css 属性,之前也是借鉴了 emotion。

from fower.

0x-leen avatar 0x-leen commented on September 16, 2024

@twinh v1.61.0, 支持 objectPropKeys 配置,用法如下(暂时没文档):

// 默认是 objectPropKeys: ['css'],可以自定义

// 同时支持 css, sx
setConfig({
  objectPropKeys: ['css', 'sx'],
});

// 覆盖默认,只支持 sx
setConfig({
  objectPropKeys: ['sx'],
});

from fower.

twinh avatar twinh commented on September 16, 2024

谢谢,我在使用中遇到两个问题

  1. 自定义 objectPropKeys 后,css 方法失效
import {css, setConfig} from '@fower/core';

setConfig({
  objectPropKeys: ['sx'],
});

// 预期输出 toRight,但是会输出空
console.log(css({toRight: true}));

定位到是 https://github.com/forsigner/fower/blob/master/packages/core/src/css.ts#L12 argsToProps 返回了 {css: xx} 对象,但是 Parser 解析时是判断 sx 键名,所以失效了,需要请你看下怎么调整好。

  1. 单独使用 '@fower/core' 类库,缺少 objectPropKeys 默认配置,导致 css 方法失效。
    已经提交 https://github.com/forsigner/fower/pull/32/files

from fower.

0x-leen avatar 0x-leen commented on September 16, 2024

确实放在 store 会更好,发了新版 v1.62.0

from fower.

twinh avatar twinh commented on September 16, 2024
  1. 确认已生效

from fower.

0x-leen avatar 0x-leen commented on September 16, 2024
  1. fixed in new version v1.62.1

from fower.

Related Issues (20)

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.