mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2026-02-07 04:55:37 +00:00
2 lines
2.5 KiB
JavaScript
2 lines
2.5 KiB
JavaScript
import{ax as l,al as c,z as m,A as n,B as d,R as a,b2 as i,O as e,J as o}from"./chunks/framework.DkLJC2NO.js";const T=JSON.parse('{"title":"DateTimePicker 日期时间选择器","description":"","frontmatter":{},"headers":[],"relativePath":"form-config/fields/datetime-picker.md","filePath":"form-config/fields/datetime-picker.md"}'),s={name:"form-config/fields/datetime-picker.md"};function h(p,t,f,b,u,k){const r=c("demo-block");return n(),m("div",null,[t[4]||(t[4]=d("h1",{id:"datetimepicker-日期时间选择器",tabindex:"-1"},[e("DateTimePicker 日期时间选择器 "),d("a",{class:"header-anchor",href:"#datetimepicker-日期时间选择器","aria-label":'Permalink to "DateTimePicker 日期时间选择器"'},"")],-1)),t[5]||(t[5]=d("p",null,"在同一个选择器里选择日期和时间",-1)),t[6]||(t[6]=d("h2",{id:"基础用法",tabindex:"-1"},[e("基础用法 "),d("a",{class:"header-anchor",href:"#基础用法","aria-label":'Permalink to "基础用法"'},"")],-1)),a(r,{type:"form",config:[{type:"datetime",name:"dateTime",text:"日期时间选择器"}]},{source:o(()=>[...t[0]||(t[0]=[d("p",null,[e(" 通过设置 "),d("code",null,"type: 'datetime'"),e(" 使用日期时间选择器,可以同时选择日期和时间。 ")],-1)])]),_:1}),t[7]||(t[7]=d("h2",{id:"带占位符",tabindex:"-1"},[e("带占位符 "),d("a",{class:"header-anchor",href:"#带占位符","aria-label":'Permalink to "带占位符"'},"")],-1)),a(r,{type:"form",config:[{type:"datetime",name:"dateTime",text:"日期时间选择器",placeholder:"请选择日期时间"}]},{source:o(()=>[...t[1]||(t[1]=[d("p",null,[e(" 通过 "),d("code",null,"placeholder"),e(" 属性设置输入框的占位文本。 ")],-1)])]),_:1}),t[8]||(t[8]=d("h2",{id:"禁用状态",tabindex:"-1"},[e("禁用状态 "),d("a",{class:"header-anchor",href:"#禁用状态","aria-label":'Permalink to "禁用状态"'},"")],-1)),a(r,{type:"form",config:[{type:"datetime",name:"dateTime",text:"日期时间选择器",disabled:()=>!0}]},{source:o(()=>[...t[2]||(t[2]=[d("p",null,[e(" 通过 "),d("code",null,"disabled"),e(" 属性禁用日期时间选择器,支持布尔值或函数。 ")],-1)])]),_:1}),t[9]||(t[9]=i("",5)),a(r,{type:"form",config:[{type:"datetime",name:"dateTime",text:"日期时间选择器",format:"YYYY-MM-DD HH:mm",valueFormat:"x"}]},{source:o(()=>[...t[3]||(t[3]=[d("p",null,[e(" 自定义格式化:显示格式为 "),d("code",null,"YYYY-MM-DD HH:mm"),e(",绑定值格式为时间戳。 ")],-1)])]),_:1}),t[10]||(t[10]=i("",2))])}const x=l(s,[["render",h]]);export{T as __pageData,x as default};
|