easy-libs
v1.1.0
Published
基于element ui的二次开发组件库
Readme
easy-libs for vue2 基于element ui二次开发库
🌱 使用示例
🔈 安装
npm install easy-libs🔈 全局引入main.js
1. import EasyLibs from "easy-libs"
2. Vue.use(EasyLibs)🔈 组件内引入
import { EasyForm } from "easy-libs"🔈 组件内使用
<easy-form ref="form" :viewWrap="false" :viewUnderLine="true"
@focus="focus"
@blur="blur"
@clear="clear"
@input="input"
@valueChange="valueChange"
@optionActive="optionActive"
@visibleChange="visibleChange"
@expandChange="expandChange"
@removeTag="removeTag"
>
<template slot-scope="scope">
<span v-if="scope.data.type == 'input' && scope.data.field == 'cs1'">
<span v-if="scope.data.slot=='append'">后面{{scope.data.field}}</span>
<span v-else-if="scope.data.slot=='prepend'">前面{{scope.data.field}}</span>
</span>
<span v-else-if="scope.data.type == 'select' && scope.data.field == 'cs2'">
<span style="float:left">{{scope.data.row.label}}</span>
<span style="float:right">{{scope.data.row.value}}</span>
</span>
</template>
</easy-form>