npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@blueking/date-picker

v2.0.0-beta.33

Published

蓝鲸监控平台日期时间选择

Downloads

2,655

Readme

支持 Vue2/Vue3 版本 无差别使用

show

安装

npm i @blueking/date-picker

使用

  • vue3框架下使用
<template>
  <div class="app">
    <DatePicker
      v-model="value"
      v-model:timezone="timezone"
      format="YYYY-MM-DD HH:mm:ss"
      :behavior="'normal'"
      :version="2"
      :disabled="false"
      @update:model-value="handleValueChange"
    />
  </div>
</template>
<script setup lang="ts">
import { ref } from 'vue';

import DatePicker from '@blueking/date-picker';
import DatePicker from '@blueking/date-picker/vue3/vue3.css';


const value = ref(['now-2d/d', 'now',]);
const timezone = ref('Asia/Shanghai');
const handleValueChange = (value, info) => {
  console.log(value, info);
};
</script>
  • vue2框架下使用
<template>
  <div class="hello">
    <DatePicker
      :modelValue="modelValue"
      :timezone.sync="timezone"
      @update:modelValue="handleValueChange"/>
  </div>
</template>

<script>
import DatePicker from '@blueking/date-picker/vue2'
import '@blueking/date-picker/vue2/vue2.css'
export default {
  data(){
      return {
        modelValue: ['now-2d/d', 'now'],
        timezone: 'Asia/Shanghai'
    }
  },
  components: {
    DatePicker
  },
  methods: {
    handleValueChange(v, info) {
      console.log(v, info)
      this.modelValue = v
    }
  }
}
</script>

属性列表

| 属性名 | 描述 | 属性类型 | 默认值 | | -------------- | ----------------------- | ----------------------------------------------------------------- | ---------- | | behavior | 组件展示风格 | 'normal' \| 'simplicity' | 'normal' | | commonUseList | 常用列表 | DateValue[] | | | disabled | 是否禁用 | boolean | | | format | 日期转换显示格式 | string | | | modelValue | 日期值 | DateValue \| dayjs.Dayjs[] \| number[] \| string[] \| undefined | | | needTimezone | 是否展示时区 | boolean | | | timezone | 时区值 | string | 浏览器时区 | | validDateRange | 有效可选的日期范围 | DateValue \| undefined | | | version | 版本号 用于控制本地缓存 | number \| string | '1.0' |

事件列表

| 事件名 | 参数 | 参数类型 | 描述 | | ----------------- | ------------------- | --------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ | | update:modelValue | value, info | value: IDatePickerProps['modelValue']info: Array{dayjs: dayjs.Dayjs | null;formatText: null | string;} | 更新date值的事件,以及相关信息 | | update:timezone | value, timezoneInfo | value: stringtimezoneInfo: ITimezoneItem | 更新时区值的事件,以及时区信息 |