Commit 6587b7ae by 姜雷

添加时间选择组件的不可清除

parent 5017bf91
......@@ -12,6 +12,16 @@
/>
{{filters.dateRange}}
</div>
<div class="components-demo-wrap">
<date-range-picker
v-model="filters.dateRange"
format="yyyy-MM-dd HH:mm:ss"
defaultStartTime="00:00:00"
defaultEndTime="23:59:59"
clearable
/>
{{filters.dateRange}}
</div>
<el-button @click="resetTime">重置</el-button>
<el-button @click="setNullValue">置空</el-button>
<el-button @click="setNewValue">设置新时间</el-button>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"name": "rym-element-ui",
"version": "0.1.44",
"version": "0.1.45",
"description": "任意门组件库",
"main": "lib/rymUi.common.js",
"scripts": {
......
......@@ -2,7 +2,7 @@
<el-input
class="el-date-editor md-data-picker"
:class="'el-date-editor--' + type"
:readonly="!editable || readonly || type === 'dates'"
:readonly="!editable || readonly || type === 'dates' || !clearable"
:disabled="pickerDisabled"
:size="pickerSize"
:name="name"
......@@ -13,7 +13,7 @@
@focus="handleFocus"
@keydown.native="handleKeydown"
:value="displayValue"
@input="value => (userInput = value)"
@input="value => userInput = value"
@change="handleChange"
@mouseenter.native="handleMouseEnter"
@mouseleave.native="showClose = false"
......
......@@ -10,6 +10,7 @@
type="datetime"
:picker-options="defaultStartOptions"
:default-time="defaultStartTime"
:clearable="clearable"
>
</date-picker>
<date-picker
......@@ -22,6 +23,7 @@
type="datetime"
:picker-options="defaultEndOptions"
:default-time="defaultEndTime"
:clearable="clearable"
>
</date-picker>
</div>
......@@ -56,6 +58,11 @@ export default {
type: String,
default: '00:00:00',
},
clearable: {
type: Boolean,
default: false,
},
},
data() {
let starttime = null,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment