0.2.4 • Published 3 years ago

ive-vue-mobile v0.2.4

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

ive-vue-mobile

介绍

ive-vue-mobile 基于vue3封装了一些简单手机端常用的组件和方法。 库的总大小为400kb+,推荐使用按需引入的方法,方便Tree-Sharking。更多组件还在完善中,敬请期待。 css处理器使用的是scss,请预先安装好scss环境。

目录

组件

方法

安装

yarn install ive-vue-mobile --save

use in html 简单的介绍,以IveModal组件为例

<script src="vue3_path/vue.runtime.global.js"></script>
<script src="your_path/iveVueMobile.umd.js"></script>

<script>
  iveVueMobile.IveModal.show({
    title: "自定义模板",
    content: '{{label}}<input v-modal="name">',
    data: { name: "我和content模板中的值关联", label: 'exaxple'},
    footer: [
      {
        type: 'delete',
        text: '取消',
        onClick: (data, close) => {
          console.log(data);
          alert("你取消了");
          close();
        },
      },
      {
        type: 'primary',
        text: '确定',
        onClick: (data, close) => {
          console.log(data);
          if (data.name.length > 18) {
            close();
          } else {
            alert("name的长度小于18");
          }
        },
      },
    ]
  });
</script>

use in es2015

全局注册

import { createApp } from 'vue';
import IveVueMobile from 'ive-vue-mobile';

const app = createApp(App);
app.use(IveVueMobile);

On-demand 按需引入

import { IveModal } from 'ive-vue-mobile';
IveModal.show({
  title: "modalFormTemplate默认模板",
  content: IveModal.modalFormTemplate,
  data: { name: "name", label: 'modalFormTemplate的label'},
  footer: [
    {
      onClick: (data, close) => {
        console.log(data);
        if (data.name.length > 10) {
          close();
        } else {
          alert("name的长度小于10");
        }
      },
    },
  ]
});

More examples

For more examples, please visit 

https://github.com/xiaohouzimiantuo/ive-vue-mobile-examples

0.2.4

3 years ago

0.2.3

3 years ago

0.2.2

3 years ago

0.2.0-beta

3 years ago

0.1.11

3 years ago

0.2.0-beta1

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.1.10

3 years ago

0.1.8

3 years ago

0.1.7

3 years ago

0.1.9

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.2

3 years ago

0.1.0

3 years ago

0.1.1-bata

3 years ago

0.1.0-bata

3 years ago