0.0.3 • Published 3 years ago

zc-plugins-vue v0.0.3

Weekly downloads
-
License
-
Repository
-
Last release
3 years ago

易展翅组件库

快速开始

直接使用npm安装

安装 zc-plugins

npm i zc-plguins --save-dev

script 中引用组件:

import loading from 'zc-plugins-vue/lib/loading/loading.vue'
export default {
    components: {loading}
}

template 中使用组件:

<loading ref="loading"/>

::: danger 注意

  • import组件的时候一定要按照上面的路劲来,路劲要给全,可省略后缀。

已支持的组件列表

组件名组件说明
加载状态加载状态

加载中状态

组件名:zc-loading 代码块: zcLoading 关联组件:zc-loading

用意在于替换官方的uni.showLoading()方法。

注意事项 为了避免错误使用,给大家带来不好的开发体验,请在使用组件前仔细阅读下面的使用说明,可以帮你避免一些错误。

基本用法

<!-- loading -->
<our-loading isFullScreen ref="loading" />
export default {
    components: {},
    data() {
        return {
			
		}
	},
	methods: {
		open(){
            this.$refs.loading.open()
        },
        close(){
            this.$refs.loading.close()
        }
	}
}

API

Rate Props

属性名类型默认值说明
translateYNumber100距顶部的距离
textString加载中的文案
textColorString#65cf6b文案颜色
isFullScreenBooleanfalse是否全屏

如何发布组件

我们只需要在/components/index/package.json文件里面修改版本号

然后npm login 登录npm

最后运行 npm run build:npm 即可发布