xyj-vue-components
v1.2.6
Published
A Vue.js project
Readme
xyj-vue-components 一些ui组件
Notification 1.0.2
使用示例
-main.js
import Vue from "vue";
import XYJ from 'xyj-vue-components'
Vue.use(XYJ)
-xxx.vue
this.$TT_msg("这是一段提示", {
time: 1800,
title: "成功",
type: "success"
});
this.$TT_msg("这是一段提示", {
time: 1800,
title: "失败",
type: "error"
});
this.$TT_msg("这是一段提示", {
time: 1800,
title: "警告",
type: "warning"
});Loading 1.2.1
使用示例
开启
this.$TT_loading.open();//默认'box-rotate'动画
可填值
-ball-climbing
-loader
-box-rotate
this.$TT_loading.open('loader');
关闭
//模拟异步操作
setTimeout(() => {
this.$TT_loading.close();
}, 3000);directive指令
v-focus 首次加载自动获得焦点
<input v-focus /> v-ellipsis 设置单行文本溢出隐藏 ...
//:100为 width长度
<p v-ellipsis:100 >123456789</p>v-copy 复制
<p v-copy>单击复制文字</p>
<p v-copy.dblclick>双击复制文字</p>
<p v-copy.icon>icon复制文字</p>v-drag 拖拽(不能与v-waves同时使用)
<p v-drag>单击复制文字</p>v-waves 按钮水波纹(不能与v-drag同时使用)
需要main.js引入样式
import "xyj-vue-components/css/index.scss";
<p v-drag>单击复制文字</p>一些js方法
currentTime()
import {currentTime} from 'xyj-vue-components/utils/index.js';
currentTime('yyyy-MM-dd hh:mm:ss')//'2020年-10月-01日 12:00:00'
currentTime('MM-dd hh:mm:ss')//'10月-01日 12:00:00'
currentTime('yyyy-MM-dd')//'2020年-10月-01日'
