组件用.vue还是.js
Vuejs温度计 (vuejs-thermometer)
Thermometer component for vue.js .
vue.js的温度计组件。
Do you have questions or want a new feature? Use the "Issues" section :point_left:
您有疑问或想要新功能吗? 使用“问题”部分:point_left:
建立 (Setup)
Install:
安装:
npm install vuejs-thermometer --save
Import:
进口:
import VueThermometer from 'vuejs-thermometer'
Vue.use(VueThermometer)
用法 (Usage)
Use: (in your local .vue file/component, html section)
使用:(在本地.vue文件/组件中的html部分)
<vue-thermometer
:value="5"
:min="-20"
:max="25"
/>
<!-- Options struct: -->
options: {
text: {
color: 'black',
fontSize: 8,
textAdjustmentY: 2,
fontFamily: 'Arial',
textEnabled: true
},
thermo: {
color: '#FF0000',
backgroundColor: '#fcf9f9',
frameColor: 'black',
ticks: 10,
ticksEnabled: true,
tickColor: 'black',
tickWidth: '1'
},
layout: {
height: 500,
width: 100
}
}
物产 (Properties)
Name | Type | Default | Description |
---|---|---|---|
value | Number | 0 | Value of temp |
min | Number | -20 | Min value |
max | Number | 25 | Max value |
scale | String | °C | Scale format |
options | Object | Object | Object struct |
customClass | String | N/A | Custom css class |
名称 | 类型 | 默认 | 描述 |
---|---|---|---|
值 | 数 | 0 | 温度值 |
分 | 数 | -20 | 最低价值 |
最高 | 数 | 25 | 最大值 |
规模 | 串 | °C | 比例格式 |
选项 | 目的 | 目的 | 对象结构 |
customClass | 串 | 不适用 | 自定义CSS类 |
翻译自: https://vuejsexamples.com/thermometer-component-for-vue-js/
组件用.vue还是.js