taro external-class

https://nervjs.github.io/taro/docs/component-style.html

externalClasses

  1. child component

/* CustomComp.js */
export default class CustomComp extends Component {
static externalClasses = ['my-class'] render () {
return <View className="my-class">这段文本的颜色由组件外的 class 决定</View>
}
}
  1. parent component
/* MyPage.js */
export default class MyPage extends Component {
render () {
return <CustomComp my-class="red-text" />
}
} /* MyPage.scss */
.red-text {
color: red;
}


全局样式类


taro external-class的更多相关文章

  1. External Configuration Store Pattern 外部配置存储模式

    Move configuration information out of the application deployment package to a centralized location. ...

  2. OpenSceneGraph 编译 error LNK2019:unresolved external symbol 错误

    在编译 OpenSceneGraph 的一个简单示例时, #include <osgViewer/Viewer> #include <osgDB/ReadFile> void ...

  3. VC++ : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<wchar_t,struct std::char_traits<wchar_t>

    最近学习Google Breakpad,将其用在了自己的项目中,编译的版本为VS2010,没有什么问题.但是为了和之前的程序兼容,需要使用VS2008版本的程序,于是又编译了VS2008版本的代码,但 ...

  4. SQL Azure (18) 使用External Table实现垮库查询

    <Windows Azure Platform 系列文章目录> 问题 1.我们在进行SQL Server开发的时候,经常会使用垮库查询.但是在默认情况下,使用Azure SQL Datab ...

  5. 链接rel属性external、nofollow、external nofollow三种写法的区别

    <script language="javascript" type="text/javascript" src="http://files.c ...

  6. [masmplus]初次使用报external symbol _start 是配置问题

    初次使用masmplus 其中在 codesg segment 使用了 start 标记, 并在end处标明了:end  start  但是默认的masmplus 会提示 start 为 不认识的 e ...

  7. Reprint: ADB is Not Recognized as an internal or external command Fix

    ADB: Android Debug Bridge http://zacktutorials.blogspot.hk/2013/04/adb-is-not-recognized-as-internal ...

  8. error LNK2019:unresolved external symbol

    error LNK2019:unresolved external symbol 这个错误是指程序不认识函数.具体的说就是.h文件中定义并没有实现,这就是库出现了问题. 遇到这个问题,第一步就要看是哪 ...

  9. [SharePoint 2013] Create event receiver for external list

    Main list for creating event receiver for external list Subscribe   storage, it could be data table ...

  10. 链接属性rel=’external’、rel=’nofollow’、rel=’external nofollow’三种写法的区别

    链接属性rel='external'.rel='nofollow'.rel='external nofollow'三种写法的区别   大家应该都知道rel='nofllow'的作用,它是告诉搜索引擎, ...

随机推荐

  1. goroutine 分析 协程的调度和执行顺序 并发写 run in the same address space 内存地址 闭包 存在两种并发 确定性 非确定性的 Go 的协程和通道理所当然的支持确定性的并发方式(

    package main import ( "fmt" "runtime" "sync" ) const N = 26 func main( ...

  2. postgresql 知识的整理

    .example { background-color: rgba(229, 236, 243, 1); color: rgba(0, 0, 0, 1); padding: 0.5em; margin ...

  3. 目前 c++ primer学习总结笔记

    C++的开始 1 main的返回值:0为成功状态,非0为系统定义的错误类型 2 输入输出:计算结果为左侧运算对象,IO操作读写缓冲与程序中的动作无关 3 输入流istream对象:cin(标准输入): ...

  4. 根据pom标签修改

    sed -i "s/<count>1<\/count>/<count>2<\/count>/g"  pom.xml

  5. VSCode-Prettier和ESLint如何和睦共处?

    1 在VSCode中单独使用Prettier保存代码自动格式化的配置方法 1.1 为什么要使用Prettier? 手动调整代码格式,不仅低效,而且在团队协作开发中,无法保证代码风格统一,所以需要引入自 ...

  6. Spring Security原理分析:系列集合

    Spring Security 工作原理概览:https://blog.csdn.net/u012702547/article/details/89629415 spring security执行原理 ...

  7. poj 3468A Simple Problem with Integers

    Description You have N integers, A1, A2, ... , AN. You need to deal with two kinds of operations. On ...

  8. Bézout恒等式

    写在前面: 记录了个人的学习过程,同时方便复习 整理自网络 非原创部分会标明出处 目录 结论 证明 拓展 n个整数间 拓展欧几里得算法 拓展欧几里得算法的多解 结论 (Bézout / 裴蜀 / 贝祖 ...

  9. hdu3938 Portal

    Problem Description ZLGG found a magic theory that the bigger banana the bigger banana peel .This im ...

  10. 字典树 && 例题 Xor Sum HDU - 4825 (板子)

    一.字典树描述:Trie树,即字典树,又称单词查找树或键树,是一种树形结构,是一种哈希树的变种.典型应用是用于统计和排序大量的字符串(但不仅限于字符串),所以经常被搜索引擎系统用于文本词频统计.它的优 ...