|
|
||
|---|---|---|
| .. | ||
| README.md | ||
| StaticText.vue | ||
| config.ts | ||
| index.ts | ||
| type.ts | ||
README.md
[toc]
静态文本(StaticText)
展示一个静态文本,主要用于页面静态文本展示
<RenderComponent :config="StaticTextComponent" :component="StaticText" :prop-value="{ base: { text: '我们一起建设DataView吧', type: 'text' } }" :style="{ color: '#d03050', fontSize: 40, fontWeight: 800, width: 550, height: 100 } " title="静态文本" mode="debug" />
属性
基础属性
| 配置项 | 作用 | 说明 |
|---|---|---|
文本类型 |
文本(text)或者符号(symbol) |
符号可选项目中已加载的iconfont 图标,具体详见工具栏的图标 |
自定义文本 |
静态文本的文件内容 | 任意文本内容 |
样式
字体设置
| 配置项 | 作用 | 说明 |
|---|---|---|
颜色 |
文字颜色,支持HEXA、HSLA和RGBA 颜色表示方法 |
|
字体大小 |
字体大小 | 单位px |
字体宽度 |
字体宽度 | 100-900,必须是 100 的整倍数 |
字体 |
字体名称 | 保证该字体在本机上存在,否则采用浏览器默认字体 |
示例
<RenderComponent :config="StaticTextComponent" :component="StaticText" :prop-value="propValue" :style="style" title="静态文本" />
<RenderComponent :config="StaticTextComponent" :component="StaticText" :prop-value="symbolPropValue" :style="{ color: '#18a058', fontSize: 40, fontWeight: 800, width: 450, height: 100 }" title="符号文本" />