1.11.4 • Published 2 years ago

vue-pithy-calendar v1.11.4

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

vue-pithy-calendar package重构

vue-pithy-calendar@0.1.2 发现在vue3中使用不了,因为是2年前编写的组件库,使用webpack进行打包构建,可能一些构建上的语法不兼容vue3,这次重构就用了rollup进行打包构建,进测试,兼容vue2和vue3,且包体积减少了。

vue-pithy-calendar@0.1.2

下载

npm i vue-pithy-calendar@0.1.2 -D

引入

//main.js
import VuePithyCalendar from 'vue-pithy-calendar'
import 'vue-pithy-calendar/dist/vue-pithy-calendar.css'
Vue.use(VuePithyCalendar)

使用

<template>
  <div id="app">
  <vue-pithy-calendar @chooseDay="getChooseDay"/> 
  </div>
</template>
<script>
export default {
  name: 'App',
   methods: {
   getChooseDay(msg){
     console.log(msg);
   } 
  },
}
</script>

重构版本

vue-pithy-calendar@latest

下载

npm i vue-pithy-calendar@latest -D

使用

//vue2
<template>
    <div>
        <vue-pithy-calendar @chooseDay="getChooseDay"/>
    </div>
</template>
<script>
import VuePithyCalendar from 'vue-pithy-calendar/dist/vue2/esm'
export default({
    components:{VueCalendar},
    methods:{
      getChooseDay(msg){
      console.log(msg);
    }
})
</script>
//vue3
<template>
    <div>
        <vue-pithy-calendar @chooseDay="getChooseDay"/>
    </div>
</template>
<script setup lang="ts">
import VuePithyCalendar from 'vue-pithy-calendar'
const getChooseDay = (msg:any)=>{
  console.log(msg)
}
</script>

效果展示

npm.io

参数

方法是否必写说明返回结果
chooseDay获取点击选中的日期例如:2021-5-10
1.11.4

2 years ago

1.11.3

2 years ago

1.11.2

2 years ago

1.0.17

2 years ago

1.11.1

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.3

2 years ago

1.0.10

2 years ago

1.11.0

2 years ago

1.0.13

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago