1.0.1 • Published 10 months ago
keduchi v1.0.1
刻度尺: vue3 版本
有问题或建议,请联系 itliuxiangyu@163.com
安装
npm install keduchi --save
在界面中导入该组件
import Keduchi from "Keduchi"
使用
<Keduchi 上面有很多可选属性...></Keduchi>
属性介绍
height: number 默认 || 50, //刻度尺高度 maxScale: number 默认 300, //最大刻度 startValue: number 默认 200, //刻度开始的初始值 region: array[number , number] 默认[50 , 220] //选择刻度的区间范围 background: string 默认 "#ffa43c", //刻度尺背景色 color: string 默认 "#fff", //刻度线和字体的颜色 markColor: string 默认 "#3786db", //中心刻度标记颜色 isConstant: boolean 默认 true, //是否不断地获取值 onChange: callback(参数:选中的值)
测试代码
<template> <div> <h1>我是测试界面11111</h1> <Keduchi :onChange="xxx"></Keduchi> </div> </template>
<script setup> import Keduchi from "Keduchi" function xxx(cc) { console.log("2222" , cc) } </script>