当前位置:网站首页>Time setting in curd component
Time setting in curd component
2022-07-28 05:48:00 【I want to be a talker】
Avue crud Use of time selection components in components
Preface
because Avue crud Can make the selected box set , You can set it once in the search box and “ newly added ” The new filling box that pops up after clicking the button displays . Use when the effect we want is different in two places , You need to make corresponding changes , Without affecting another place . The following is a description and demonstration of some common attributes of the time selection component .

The two attributes are different
Most attributes can be common to both , However, after some properties are set, another selection box cannot be input or selected normally .
The width displayed on the page , For search box searchSpan adjustment ; The new selection box is used span adjustment ;
searchDefaultTime, Set the default time of the search box ; It will not affect the default time of the new box .
Be careful !defaultTime Property can also set the default time , But because the search box time selector here is the selected two times ( A start time and an end time ), The new box time selector is to select a time , If you use defaultTime Set the default time , It will affect another . example : Set up defaultTime: [“00:00:00”, “23:59:59”], The start time of the search box will default to 00:00:00, The end time will default to 23:59:59. But the time cannot be selected in the new box .
Show the whole crud Component code
<template>
<div class="container">
<avue-crud :data="data" :option="option" :table-loading="showLoading" :page.sync="page" >
<template slot="menuBtn">
<el-dropdown-item divided> Custom buttons </el-dropdown-item>
</template>
<template slot-scope="{ type, size }" slot="menu">
<el-button :type="type" :size="size"> Custom buttons </el-button>
</template>
<template slot="menu">
<div class="block">
<span class="demonstration"> Default </span>
<el-date-picker v-model="value1" type="datetimerange" range-separator=" to " start-placeholder=" Start date " end-placeholder=" End date " >
</el-date-picker>
</div>
</template>
</avue-crud>
</div>
</template>
<script> export default {
data() {
return {
page: {
total: 100, currentPage: 1, }, data: [ {
name: " Zhang San ", sex: " male ", occurrenceTime: "2022-07-22 22:20:09", }, {
name: " Li Si ", sex: " Woman ", occurrenceTime: "2020-07-12 22:20:09", }, ], menuType: "text", showLoading: false, showCard: false, showBorder: false, showStripe: false, showHeader: true, showIndex: true, showCheckbox: false, showPage: true, sizeValue: "small", }; }, computed: {
option() {
return {
title: " Table title ", titleSize: "h3", titleStyle: {
color: "red", }, card: this.showCard, border: this.showBorder, stripe: this.showStripe, showHeader: this.showHeader, index: this.showIndex, size: this.sizeValue, selection: this.showCheckbox, page: this.showPage, align: "center", menuAlign: "center", menuType: this.menuType, menuBtnTitle: "Avue crud Component time selection component attribute introduction ", column: [ {
label: " full name ", prop: "name", // Associated with data data data Corresponding property name in search: true, searchSpan: 8, }, {
label: " Gender ", prop: "sex", search: false, // Show in the search area ( Whether to become a search filter ) }, // Time selector configuration {
label: " Time ", prop: "occurrenceTime", type: "datetime", search: true, // Show in the search area ( Whether to become a search filter ) searchSpan: 16, // Three minutes and two in one line of the search box ( common 24 16 It takes three minutes and two ) searchRange: true, span: 24, // Add options in the pop-up box Fill a line ( common 24) format: "yyyy-MM-dd HH:mm:ss", // Time format HH Express 24 hourly hh Express 12 hourly valueFormat: "yyyy-MM-dd HH:mm:ss", searchDefaultTime: ["00:00:00", "23:59:59"], // The default time, minute and second setting of the search box rules: [ {
required: true, // Is it required when adding message: " Please select a time ", // If not The lifting text below the input box trigger: "blur", //trigger Trigger mode blur Trigger when out of focus }, ], pickerOptions: {
disabledDate(time) {
// Configure when cannot be selected return time.getTime() > Date.now(); // Dates after the current date cannot be selected }, }, }, ], }; }, }, }; </script>
<style></style>
边栏推荐
- JS数组的方法大全
- 函数基础知识以及特殊点
- 浅谈一段奇妙旅程
- Distance toolbar in ArcMap (distance)
- ArcMap连接表格(Join)相关问题整理
- 标准C语言总结4
- Review of metallurgical physical chemistry -- Fundamentals of metallurgical reaction kinetics and characteristics of multiphase reaction kinetics
- 冶金物理化学复习 --- 化学反应动力学基础
- ArcGIS Engine开发资源
- Review of metallurgical physical chemistry --- liquid liquid reaction kinetics
猜你喜欢

shell运行原理

Review of metallurgical physical chemistry -- rate equations of complex reactions

Review of metallurgical physical chemistry --- liquid liquid reaction kinetics

DOM——页面的渲染、style属性操作、预加载与懒加载、防抖与节流

Some problems of ArcGIS Engine Installation

Delete specific elements in order table OJ

简单几步实现小程序分享朋友圈

顺序表oj之删除特定的元素

冶金物理化学复习 -- 金属电沉积过程中的阴极极化,超电势以及阳极和阳极过程

DOM基础
随机推荐
MYSQL之搭建数据库系列(一)——下载MYSQL
【博学谷学习记录】超强总结,用心分享 | 集合
冶金物理化学复习 --- 冶金反应动力学基础与多相反应动力学特征
C语言通讯录系统
Competition arrangement in GIS field (incomplete statistics)
Mysql database index (InnoDB engine)
Oracle create table, delete table, modify table (add field, modify field, delete field) statement summary
小程序swiper实现点击暂停和播放
[idea plug-in artifact] teaches you how to set all attributes in an entity class with one click of idea
蓝桥代码 错误票据
记录某某小卢的第一篇文章
Problem set in the project
图片根据屏幕自适应
Help document making based on easy CHM and vs
Database interview
Review of metallurgical physical chemistry -- Fundamentals of chemical reaction kinetics
DOM——事件
DOM窗口相关数据、操作 & BOM操作
C语言走迷宫
Microsoft Edge浏览器插件(1)