cms-v2 v1.1.5
Vue 3 + Typescript + Vite
This template should help get you started developing with Vue 3 and Typescript in Vite. The template uses Vue 3 <script setup>
SFCs, check out the script setup docs to learn more.
部署步骤
初始化项目
npm install
运行项目
num run dev
打包更新文件
npm run build
更新组件版本
npm version
发布更新组件包
npm publish
引入插件
npm i cms-v2
更新插件最新版
npm install -g cms-v2
更新插件指定版本
npm -g install cms-v2@版本号
页面引用插件
import { StaticText } from 'cms-v2'; import 'cms-v2/dist/style.css'
npm包插件说明
static-text ------ 静态文本
props参数说明
@setStyle --设置样式 width --组件宽度 类型number height --组件高度 类型number x --距离左边距离 类型number y --距离头部距离 类型number rotate --旋转角度 类型number unit --像素单位 类型string color --字体颜色 类型string fontFamily -字体 类型string fontWeight -字体加粗 类型number|string fontSize -字体字号 类型number textDecoration -是否下划线 类型string backgroundColor -背景颜色 类型string opacity -透明度 类型nubmer textAlign -字体对齐方式 类型string zIndex -层级 类型number alignItems -文字位置 类型string
@contenteditable --是否可编辑 类型Boolean
@staticTextValue --显示的文本值 类型string
straight-line ------ 直线
props参数说明
@setStyle --设置样式 width --组件宽度 类型number height --组件高度 类型number x --距离左边距离 类型number y --距离头部距离 类型number rotate --旋转角度 类型number unit --像素单位 类型string borderWidth --线宽 类型number borderStyle --线的样式 类型string borderColor: --线的颜色 类型string zIndex -层级 类型number