@hoenergy/hoenergy-template-pc 1.1.50 → 1.1.51

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,10 +2,10 @@ type __VLS_Props = {
2
2
  value?: string | null;
3
3
  };
4
4
  declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
5
- confirm: (value: string | null) => any;
6
5
  "update:value": (value: string | null) => any;
6
+ "on-confirm": (value: string | null) => any;
7
7
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
8
- onConfirm?: ((value: string | null) => any) | undefined;
9
8
  "onUpdate:value"?: ((value: string | null) => any) | undefined;
9
+ "onOn-confirm"?: ((value: string | null) => any) | undefined;
10
10
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
11
11
  export default _default;
package/dist/index.js CHANGED
@@ -220,7 +220,7 @@ const data = {
220
220
  function handleSelect(checked: boolean, data: object) {
221
221
  console.log(checked, data)
222
222
  }
223
- <\/script>`,previewProps:{data:{title:{text:"ECharts 示例",subtext:"纯属虚构",left:"left"},tooltip:{trigger:"item"},legend:{orient:"vertical",left:"right"},series:[{name:"访问量",type:"pie",radius:"50%",data:[{value:1048,name:"搜索引擎"},{value:735,name:"直接访问"},{value:580,name:"邮件营销"},{value:484,name:"联盟广告"},{value:300,name:"视频广告"}]}]},name:"示例卡片"},previewPath:"charts/chartCard/FormaxChartCard/preview.vue",package:"charts",category:"charts",key:"FormaxChartCard",conKey:"DCFormaxChartCard",image:"DCFormaxChartCard.png"};ft.__doc_meta__=LY;const Mt=t.defineComponent({__name:"index",props:{value:{}},emits:["update:value","confirm"],setup(e,{emit:o}){const n=e;let l=t.ref(void 0);const k=o,c=t.useAttrs(),r=[0,15,30,45],d=[0,15,30,45,59],s=t.ref(r);function h(a){if(!a){s.value=r;return}const[j]=a.split(":").map(Number);s.value=j===23?d:r}t.watch(()=>n.value,a=>{h(a),l.value=a},{immediate:!0});function u(a){const j=a?typeof a=="string"&&/^\d{2}:\d{2}$/.test(a)?a:new Date(a).toTimeString().slice(0,5):null;h(j),k("update:value",j)}function L(a){const j=a?typeof a=="string"&&/^\d{2}:\d{2}$/.test(a)?a:new Date(a).toTimeString().slice(0,5):null;k("confirm",j)}return(a,j)=>{const C=t.resolveComponent("n-time-picker");return t.openBlock(),t.createBlock(C,t.mergeProps(t.unref(c),{format:"HH:mm","value-format":"HH:mm","default-formatted-value":t.unref(l),minutes:s.value,"onUpdate:formattedValue":u,actions:["confirm"],onConfirm:L}),null,16,["default-formatted-value","minutes"])}}}),VY={name:"FormaxEleTimePicker",label:"时间选择器(15 分钟步长)",description:"基于 Naive UI n-time-picker 的业务时间选择器,只支持时分,分钟步长为 15 分钟,23 点支持 59 分钟。",props:{value:{type:"string | null",default:null,description:"时间值,格式为 HH:mm"}},events:[{name:"update:value",description:"时间变化时触发",payload:"value: string | null"}],slots:[],methods:[],usage:`<template>
223
+ <\/script>`,previewProps:{data:{title:{text:"ECharts 示例",subtext:"纯属虚构",left:"left"},tooltip:{trigger:"item"},legend:{orient:"vertical",left:"right"},series:[{name:"访问量",type:"pie",radius:"50%",data:[{value:1048,name:"搜索引擎"},{value:735,name:"直接访问"},{value:580,name:"邮件营销"},{value:484,name:"联盟广告"},{value:300,name:"视频广告"}]}]},name:"示例卡片"},previewPath:"charts/chartCard/FormaxChartCard/preview.vue",package:"charts",category:"charts",key:"FormaxChartCard",conKey:"DCFormaxChartCard",image:"DCFormaxChartCard.png"};ft.__doc_meta__=LY;const Mt=t.defineComponent({__name:"index",props:{value:{}},emits:["update:value","on-confirm"],setup(e,{emit:o}){const n=e;let l=t.ref(void 0);const k=o,c=t.useAttrs(),r=[0,15,30,45],d=[0,15,30,45,59],s=t.ref(r);function h(a){if(!a){s.value=r;return}const[j]=a.split(":").map(Number);s.value=j===23?d:r}t.watch(()=>n.value,a=>{h(a),l.value=a},{immediate:!0});function u(a){const j=a?typeof a=="string"&&/^\d{2}:\d{2}$/.test(a)?a:new Date(a).toTimeString().slice(0,5):null;h(j),k("update:value",j)}function L(a){const j=a?typeof a=="string"&&/^\d{2}:\d{2}$/.test(a)?a:new Date(a).toTimeString().slice(0,5):null;k("on-confirm",j)}return(a,j)=>{const C=t.resolveComponent("n-time-picker");return t.openBlock(),t.createBlock(C,t.mergeProps(t.unref(c),{format:"HH:mm","value-format":"HH:mm","default-formatted-value":t.unref(l),minutes:s.value,"onUpdate:formattedValue":u,actions:["confirm"],onConfirm:L}),null,16,["default-formatted-value","minutes"])}}}),VY={name:"FormaxEleTimePicker",label:"时间选择器(15 分钟步长)",description:"基于 Naive UI n-time-picker 的业务时间选择器,只支持时分,分钟步长为 15 分钟,23 点支持 59 分钟。",props:{value:{type:"string | null",default:null,description:"时间值,格式为 HH:mm"}},events:[{name:"update:value",description:"时间变化时触发",payload:"value: string | null"}],slots:[],methods:[],usage:`<template>
224
224
  <div style="padding: 16px;">
225
225
  <FormaxEleTimePicker :value="time" @update:value="val => time = val" />
226
226
  <div style="margin-top: 20px;">Current Time: {{ time }}</div>
package/dist/index.mjs CHANGED
@@ -98831,7 +98831,7 @@ const LY = /* @__PURE__ */ ce({
98831
98831
  props: {
98832
98832
  value: {}
98833
98833
  },
98834
- emits: ["update:value", "confirm"],
98834
+ emits: ["update:value", "on-confirm"],
98835
98835
  setup(e, { emit: n }) {
98836
98836
  const o = e;
98837
98837
  let l = x(void 0);
@@ -98853,7 +98853,7 @@ const LY = /* @__PURE__ */ ce({
98853
98853
  }
98854
98854
  function u(d) {
98855
98855
  const w = d ? typeof d == "string" && /^\d{2}:\d{2}$/.test(d) ? d : new Date(d).toTimeString().slice(0, 5) : null;
98856
- r("confirm", w);
98856
+ r("on-confirm", w);
98857
98857
  }
98858
98858
  return (d, w) => {
98859
98859
  const f = O("n-time-picker");
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hoenergy/hoenergy-template-pc",
3
3
  "type": "module",
4
- "version": "1.1.50",
4
+ "version": "1.1.51",
5
5
  "description": "A cross-compatible Vue component library with metadata extraction",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -12,7 +12,7 @@ const props = defineProps<{
12
12
  let currentValue = ref<any>(undefined)
13
13
  const emit = defineEmits<{
14
14
  (e: 'update:value', value: string | null): void
15
- (e: 'confirm', value: string | null): void
15
+ (e: 'on-confirm', value: string | null): void
16
16
  }>()
17
17
 
18
18
  const attrs = useAttrs()
@@ -55,6 +55,6 @@ function handleConfirm(val: string | null) {
55
55
  ? val
56
56
  : new Date(val).toTimeString().slice(0, 5)
57
57
  : null
58
- emit('confirm', timeStr)
58
+ emit('on-confirm', timeStr)
59
59
  }
60
60
  </script>
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div style="padding: 16px;">
3
- <FormaxEleTimePicker :value="time" @update:value="val => time = val" />
3
+ <FormaxEleTimePicker :value="time" @update:value="val => time = val" @confirm="test"/>
4
4
  <div style="margin-top: 20px;">Current Time: {{ time }}</div>
5
5
  </div>
6
6
  </template>
@@ -10,5 +10,7 @@ import { ref, onMounted } from 'vue'
10
10
  import FormaxEleTimePicker from './index'
11
11
  onMounted(() => {
12
12
  })
13
+ function test(){
14
+ }
13
15
  const time = ref<string | null>('23:00')
14
16
  </script>