meixioacomponent 2.0.46 → 2.0.47
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.
- package/lib/components/base/baseGuide/GuideControl.d.ts +44 -44
- package/lib/components/base/baseGuide/GuideControl.js +238 -238
- package/lib/components/dynamicmount/DynamicMountClass.d.ts +15 -15
- package/lib/components/dynamicmount/DynamicMountClass.js +65 -65
- package/lib/components/dynamicmount/index.d.ts +4 -4
- package/lib/components/dynamicmount/index.js +71 -71
- package/lib/components/index.d.ts +110 -110
- package/lib/components/index.js +242 -242
- package/lib/config/LinkViewClass.d.ts +56 -56
- package/lib/config/LinkViewClass.js +154 -154
- package/lib/config/ProTableLocalConfigManage/ProTableLocalConfigManage.d.ts +12 -12
- package/lib/config/ProTableLocalConfigManage/ProTableLocalConfigManage.js +68 -68
- package/lib/config/componentConfig.d.ts +3 -3
- package/lib/config/componentConfig.js +71 -71
- package/lib/config/uploadRequest.d.ts +2 -2
- package/lib/config/uploadRequest.js +87 -87
- package/lib/config/use/UseGuide.d.ts +8 -8
- package/lib/config/use/UseGuide.js +33 -33
- package/lib/config/use/UseImg.d.ts +9 -9
- package/lib/config/use/UseImg.js +44 -44
- package/lib/config/use/UseUpload.d.ts +12 -12
- package/lib/config/use/UseUpload.js +79 -79
- package/lib/config/use/UseViewVideo.d.ts +11 -11
- package/lib/config/use/UseViewVideo.js +41 -41
- package/lib/config/use/UseWait.d.ts +4 -4
- package/lib/config/use/UseWait.js +21 -21
- package/lib/config/use/WaitPlugin.d.ts +25 -25
- package/lib/config/use/WaitPlugin.js +106 -106
- package/lib/config/use/useConfirm/UseConfirm.d.ts +6 -6
- package/lib/config/use/useConfirm/UseConfirm.js +33 -33
- package/lib/config/use/useConfirm/UseNotify.d.ts +6 -6
- package/lib/config/use/useConfirm/UseNotify.js +18 -18
- package/lib/config/use/useConfirm/executeConfirm.d.ts +2 -2
- package/lib/config/use/useConfirm/executeConfirm.js +11 -11
- package/lib/config/use/useConfirm/registerConfirm.d.ts +4 -4
- package/lib/config/use/useConfirm/registerConfirm.js +8 -8
- package/lib/meixioacomponent.common.js +23346 -23345
- package/lib/meixioacomponent.umd.js +23350 -23349
- package/lib/meixioacomponent.umd.min.js +3 -3
- package/lib/style/tdesignStyle.less +21 -21
- package/lib/typings/type.d.ts +405 -405
- package/lib/typings/type.js +2 -2
- package/lib/useType/useType.d.ts +27 -27
- package/lib/useType/useType.js +89 -89
- package/package.json +1 -1
- package/packages/components/base/baseAnchor/baseAnchor.vue +168 -168
- package/packages/components/base/baseAnchor/baseAnchorV2.vue +165 -165
- package/packages/components/base/baseArea/api.js +6 -6
- package/packages/components/base/baseArea/area.js +14979 -14979
- package/packages/components/base/baseArea/areaConfig.js +7 -7
- package/packages/components/base/baseArea/baseArea.vue +590 -590
- package/packages/components/base/baseArea/baseAreaV2.vue +144 -144
- package/packages/components/base/baseArea/baseAreaV21.vue +156 -156
- package/packages/components/base/baseArea/index.js +6 -6
- package/packages/components/base/baseAreaByMultiple/baseAreaByMultiple.vue +70 -70
- package/packages/components/base/baseAreaByMultiple/index.js +7 -7
- package/packages/components/base/baseButton/baseButton.vue +85 -85
- package/packages/components/base/baseButton/index.js +6 -6
- package/packages/components/base/baseInput/baseInput.vue +98 -98
- package/packages/components/base/baseSelect/baseSelect.vue +102 -102
- package/packages/components/base/baseSelect/index.js +6 -6
- package/packages/components/base/baseTimeRangePicker/baseTimeRangePicker.vue +59 -59
- package/packages/components/base/baseTimeRangePicker/index.js +7 -7
- package/packages/components/base/tDateRangePicker/index.js +5 -5
- package/packages/components/base/tDateRangePicker/tDateRangePicker.vue +95 -95
- package/packages/components/dynamicmount/DynamicMountClass.js +64 -64
- package/packages/components/dynamicmount/index.js +69 -69
- package/packages/components/hooks/useHookByBaseArea.js +49 -49
- package/packages/components/hooks/useHookByGuide.js +46 -46
- package/packages/components/hooks/useHookByUpload.js +130 -130
- package/packages/components/index.js +239 -239
- package/packages/components/mixins/mixinsByBaseArea.js +53 -53
- package/packages/components/proPageTable/oa_pro_table.vue +1 -0
- package/packages/components/style/tdesignStyle.less +21 -21
- package/packages/config/LinkViewClass.js +152 -152
- package/packages/config/ProTableLocalConfigManage/ProTableLocalConfigManage.js +75 -75
- package/packages/config/ProTableLocalConfigManage/ProTableLocalConfigManage.ts +99 -99
- package/packages/config/componentConfig.js +68 -68
- package/packages/config/use/UseGuide.js +43 -43
- package/packages/config/use/UseImg.js +44 -44
- package/packages/config/use/UseUpload.js +79 -79
- package/packages/config/use/UseViewVideo.js +40 -40
- package/packages/config/use/UseWait.js +18 -18
- package/packages/config/use/WaitPlugin.js +106 -106
- package/packages/config/use/useConfirm/UseConfirm.js +31 -31
- package/packages/config/use/useConfirm/UseConfirm.ts +34 -34
- package/packages/config/use/useConfirm/UseNotify.js +16 -16
- package/packages/config/use/useConfirm/UseNotify.ts +18 -18
- package/packages/config/use/useConfirm/executeConfirm.js +8 -8
- package/packages/config/use/useConfirm/executeConfirm.ts +6 -6
- package/packages/config/use/useConfirm/registerConfirm.js +8 -8
- package/packages/config/use/useConfirm/registerConfirm.ts +7 -7
- package/packages/typings/type.js +2 -2
- package/packages/useType/useType.js +90 -90
|
@@ -1,102 +1,102 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
<template>
|
|
4
|
-
<div class="base_select-wrap">
|
|
5
|
-
|
|
6
|
-
<t-select v-model="value"
|
|
7
|
-
:clearable="clearable"
|
|
8
|
-
@change="onChange"
|
|
9
|
-
@clear="onClear"
|
|
10
|
-
@blur="onBlur"
|
|
11
|
-
@focus="onFocus"
|
|
12
|
-
@visible-change="onVisibleChange"
|
|
13
|
-
:multiple="multiple" :placeholder="placeholder" :disabled="disabled" :size="size">
|
|
14
|
-
<t-option v-for="(item,index) in options" :key="index" :label="labelKey" :value="valueKey"></t-option>
|
|
15
|
-
</t-select>
|
|
16
|
-
|
|
17
|
-
</div>
|
|
18
|
-
|
|
19
|
-
</template>
|
|
20
|
-
|
|
21
|
-
<script>
|
|
22
|
-
import {defineComponent} from 'vue'
|
|
23
|
-
export default defineComponent({
|
|
24
|
-
name: "baseSelect",
|
|
25
|
-
props: {
|
|
26
|
-
multiple: {
|
|
27
|
-
type: Boolean,
|
|
28
|
-
default: false,
|
|
29
|
-
},
|
|
30
|
-
disabled: {
|
|
31
|
-
type: Boolean,
|
|
32
|
-
default: false,
|
|
33
|
-
},
|
|
34
|
-
value: {},
|
|
35
|
-
size: {
|
|
36
|
-
type: String,
|
|
37
|
-
default: 'small'
|
|
38
|
-
},
|
|
39
|
-
clearable: {
|
|
40
|
-
type: Boolean,
|
|
41
|
-
default: false,
|
|
42
|
-
},
|
|
43
|
-
placeholder: {
|
|
44
|
-
type: String,
|
|
45
|
-
default: '请选择'
|
|
46
|
-
},
|
|
47
|
-
options: {
|
|
48
|
-
type: Array,
|
|
49
|
-
default: () => {
|
|
50
|
-
return []
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
valueKey: {
|
|
54
|
-
type: String,
|
|
55
|
-
default: 'value'
|
|
56
|
-
},
|
|
57
|
-
labelKey: {
|
|
58
|
-
type: String,
|
|
59
|
-
default: 'label'
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
computed: {
|
|
63
|
-
module: {
|
|
64
|
-
set(val) {
|
|
65
|
-
this.$emit('input', val);
|
|
66
|
-
},
|
|
67
|
-
get() {
|
|
68
|
-
return this.$props.value
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
},
|
|
73
|
-
methods: {
|
|
74
|
-
onChange(event) {
|
|
75
|
-
this.$emit('change', event);
|
|
76
|
-
},
|
|
77
|
-
onClear(event) {
|
|
78
|
-
this.$emit('clear', event);
|
|
79
|
-
},
|
|
80
|
-
onBlur(event) {
|
|
81
|
-
this.$emit('blur', event);
|
|
82
|
-
},
|
|
83
|
-
onFocus(event) {
|
|
84
|
-
this.$emit('focus', event);
|
|
85
|
-
},
|
|
86
|
-
onVisibleChange(value) {
|
|
87
|
-
this.$emit('visible-change', value);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
})
|
|
91
|
-
</script>
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
<style scoped lang="less">
|
|
96
|
-
.base_select-wrap {
|
|
97
|
-
width: auto;
|
|
98
|
-
height: auto;
|
|
99
|
-
}
|
|
100
|
-
</style>
|
|
101
|
-
|
|
102
|
-
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
<template>
|
|
4
|
+
<div class="base_select-wrap">
|
|
5
|
+
|
|
6
|
+
<t-select v-model="value"
|
|
7
|
+
:clearable="clearable"
|
|
8
|
+
@change="onChange"
|
|
9
|
+
@clear="onClear"
|
|
10
|
+
@blur="onBlur"
|
|
11
|
+
@focus="onFocus"
|
|
12
|
+
@visible-change="onVisibleChange"
|
|
13
|
+
:multiple="multiple" :placeholder="placeholder" :disabled="disabled" :size="size">
|
|
14
|
+
<t-option v-for="(item,index) in options" :key="index" :label="labelKey" :value="valueKey"></t-option>
|
|
15
|
+
</t-select>
|
|
16
|
+
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script>
|
|
22
|
+
import {defineComponent} from 'vue'
|
|
23
|
+
export default defineComponent({
|
|
24
|
+
name: "baseSelect",
|
|
25
|
+
props: {
|
|
26
|
+
multiple: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: false,
|
|
29
|
+
},
|
|
30
|
+
disabled: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
default: false,
|
|
33
|
+
},
|
|
34
|
+
value: {},
|
|
35
|
+
size: {
|
|
36
|
+
type: String,
|
|
37
|
+
default: 'small'
|
|
38
|
+
},
|
|
39
|
+
clearable: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
default: false,
|
|
42
|
+
},
|
|
43
|
+
placeholder: {
|
|
44
|
+
type: String,
|
|
45
|
+
default: '请选择'
|
|
46
|
+
},
|
|
47
|
+
options: {
|
|
48
|
+
type: Array,
|
|
49
|
+
default: () => {
|
|
50
|
+
return []
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
valueKey: {
|
|
54
|
+
type: String,
|
|
55
|
+
default: 'value'
|
|
56
|
+
},
|
|
57
|
+
labelKey: {
|
|
58
|
+
type: String,
|
|
59
|
+
default: 'label'
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
computed: {
|
|
63
|
+
module: {
|
|
64
|
+
set(val) {
|
|
65
|
+
this.$emit('input', val);
|
|
66
|
+
},
|
|
67
|
+
get() {
|
|
68
|
+
return this.$props.value
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
},
|
|
73
|
+
methods: {
|
|
74
|
+
onChange(event) {
|
|
75
|
+
this.$emit('change', event);
|
|
76
|
+
},
|
|
77
|
+
onClear(event) {
|
|
78
|
+
this.$emit('clear', event);
|
|
79
|
+
},
|
|
80
|
+
onBlur(event) {
|
|
81
|
+
this.$emit('blur', event);
|
|
82
|
+
},
|
|
83
|
+
onFocus(event) {
|
|
84
|
+
this.$emit('focus', event);
|
|
85
|
+
},
|
|
86
|
+
onVisibleChange(value) {
|
|
87
|
+
this.$emit('visible-change', value);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
})
|
|
91
|
+
</script>
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
<style scoped lang="less">
|
|
96
|
+
.base_select-wrap {
|
|
97
|
+
width: auto;
|
|
98
|
+
height: auto;
|
|
99
|
+
}
|
|
100
|
+
</style>
|
|
101
|
+
|
|
102
|
+
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import baseSelect from "./baseSection.vue";
|
|
2
|
-
|
|
3
|
-
baseSelect.install = function (Vue) {
|
|
4
|
-
Vue.component(baseSelect.name, baseSelect);
|
|
5
|
-
};
|
|
6
|
-
export default baseSelect;
|
|
1
|
+
import baseSelect from "./baseSection.vue";
|
|
2
|
+
|
|
3
|
+
baseSelect.install = function (Vue) {
|
|
4
|
+
Vue.component(baseSelect.name, baseSelect);
|
|
5
|
+
};
|
|
6
|
+
export default baseSelect;
|
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="base_time_range_picker-wrap">
|
|
3
|
-
<t-date-range-picker
|
|
4
|
-
ref="baseTimeRangePickerContentRef"
|
|
5
|
-
v-model="module" v-bind="$attrs"
|
|
6
|
-
@change="onChange"
|
|
7
|
-
@focus="onFocus"
|
|
8
|
-
@blur="onblur"
|
|
9
|
-
></t-date-range-picker>
|
|
10
|
-
</div>
|
|
11
|
-
</template>
|
|
12
|
-
|
|
13
|
-
<script>
|
|
14
|
-
|
|
15
|
-
export default {
|
|
16
|
-
name: "baseTimeRangePicker",
|
|
17
|
-
data() {
|
|
18
|
-
return {}
|
|
19
|
-
},
|
|
20
|
-
computed: {
|
|
21
|
-
module: {
|
|
22
|
-
set(val) {
|
|
23
|
-
this.$emit('input', val);
|
|
24
|
-
},
|
|
25
|
-
get() {
|
|
26
|
-
return this.$props.value
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
props: {
|
|
31
|
-
value: {
|
|
32
|
-
type: Array,
|
|
33
|
-
default: () => {
|
|
34
|
-
return []
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
methods: {
|
|
39
|
-
onChange(value) {
|
|
40
|
-
this.$emit('change', value);
|
|
41
|
-
},
|
|
42
|
-
onFocus(value) {
|
|
43
|
-
this.$emit('focus', value);
|
|
44
|
-
},
|
|
45
|
-
onblur(value) {
|
|
46
|
-
this.$emit('blur', value);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
</script>
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
<style scoped lang="less">
|
|
55
|
-
.base_time_range_picker-wrap {
|
|
56
|
-
width: auto;
|
|
57
|
-
height: auto;
|
|
58
|
-
}
|
|
59
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div class="base_time_range_picker-wrap">
|
|
3
|
+
<t-date-range-picker
|
|
4
|
+
ref="baseTimeRangePickerContentRef"
|
|
5
|
+
v-model="module" v-bind="$attrs"
|
|
6
|
+
@change="onChange"
|
|
7
|
+
@focus="onFocus"
|
|
8
|
+
@blur="onblur"
|
|
9
|
+
></t-date-range-picker>
|
|
10
|
+
</div>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<script>
|
|
14
|
+
|
|
15
|
+
export default {
|
|
16
|
+
name: "baseTimeRangePicker",
|
|
17
|
+
data() {
|
|
18
|
+
return {}
|
|
19
|
+
},
|
|
20
|
+
computed: {
|
|
21
|
+
module: {
|
|
22
|
+
set(val) {
|
|
23
|
+
this.$emit('input', val);
|
|
24
|
+
},
|
|
25
|
+
get() {
|
|
26
|
+
return this.$props.value
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
props: {
|
|
31
|
+
value: {
|
|
32
|
+
type: Array,
|
|
33
|
+
default: () => {
|
|
34
|
+
return []
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
methods: {
|
|
39
|
+
onChange(value) {
|
|
40
|
+
this.$emit('change', value);
|
|
41
|
+
},
|
|
42
|
+
onFocus(value) {
|
|
43
|
+
this.$emit('focus', value);
|
|
44
|
+
},
|
|
45
|
+
onblur(value) {
|
|
46
|
+
this.$emit('blur', value);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
</script>
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
<style scoped lang="less">
|
|
55
|
+
.base_time_range_picker-wrap {
|
|
56
|
+
width: auto;
|
|
57
|
+
height: auto;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
60
|
</style>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import baseTimeRangePicker from "./baseTimeRangePicker.vue";
|
|
2
|
-
|
|
3
|
-
baseTimeRangePicker.install = function (Vue) {
|
|
4
|
-
Vue.component(baseTimeRangePicker.name, baseTimeRangePicker);
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
export default baseTimeRangePicker;
|
|
1
|
+
import baseTimeRangePicker from "./baseTimeRangePicker.vue";
|
|
2
|
+
|
|
3
|
+
baseTimeRangePicker.install = function (Vue) {
|
|
4
|
+
Vue.component(baseTimeRangePicker.name, baseTimeRangePicker);
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export default baseTimeRangePicker;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import tDateRangePicker from "./tDateRangePicker.vue"
|
|
2
|
-
|
|
3
|
-
tDateRangePicker.install = function (Vue) {
|
|
4
|
-
Vue.component(tDateRangePicker.name, tDateRangePicker)
|
|
5
|
-
}
|
|
1
|
+
import tDateRangePicker from "./tDateRangePicker.vue"
|
|
2
|
+
|
|
3
|
+
tDateRangePicker.install = function (Vue) {
|
|
4
|
+
Vue.component(tDateRangePicker.name, tDateRangePicker)
|
|
5
|
+
}
|
|
6
6
|
export default tDateRangePicker
|
|
@@ -1,96 +1,96 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<date-range-picker v-model="module"
|
|
3
|
-
v-bind="$attrs"
|
|
4
|
-
@blur="onBlur"
|
|
5
|
-
@change="onChange"
|
|
6
|
-
@confirm="onConfirm"
|
|
7
|
-
@focus="onFocus"
|
|
8
|
-
@input="onInput"
|
|
9
|
-
@pick="onPick"
|
|
10
|
-
@preset-click="onPresetClick"
|
|
11
|
-
:presets="computedPresets"/>
|
|
12
|
-
</template>
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
<script>
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
export default {
|
|
19
|
-
name: "tDateRangePicker",
|
|
20
|
-
data() {
|
|
21
|
-
return {}
|
|
22
|
-
},
|
|
23
|
-
props: {
|
|
24
|
-
value: {
|
|
25
|
-
type: Array,
|
|
26
|
-
default: () => {
|
|
27
|
-
return []
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
components: {},
|
|
32
|
-
created() {
|
|
33
|
-
},
|
|
34
|
-
computed: {
|
|
35
|
-
module: {
|
|
36
|
-
set(val) {
|
|
37
|
-
this.$emit('input', val);
|
|
38
|
-
},
|
|
39
|
-
get() {
|
|
40
|
-
return this.$props.value;
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
computedPresets() {
|
|
44
|
-
const now = {
|
|
45
|
-
'此刻': () => {
|
|
46
|
-
if (this.$attrs['valueType'] === 'time-stamp') {
|
|
47
|
-
return [new Date().valueOf(), new Date().valueOf()]
|
|
48
|
-
}
|
|
49
|
-
return [new Date(), new Date()];
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
if (this.$attrs[`presets`] && typeof this.$attrs[`presets`] === 'object') {
|
|
53
|
-
return {
|
|
54
|
-
...this.$attrs['presets'],
|
|
55
|
-
...now,
|
|
56
|
-
}
|
|
57
|
-
} else {
|
|
58
|
-
return {
|
|
59
|
-
...now
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
methods: {
|
|
65
|
-
onBlur(event) {
|
|
66
|
-
this.$emit('blur', event);
|
|
67
|
-
},
|
|
68
|
-
onChange(event) {
|
|
69
|
-
this.$emit('change', event);
|
|
70
|
-
},
|
|
71
|
-
onConfirm(event) {
|
|
72
|
-
this.$emit('confirm', event);
|
|
73
|
-
},
|
|
74
|
-
onFocus(event) {
|
|
75
|
-
this.$emit('focus', event);
|
|
76
|
-
},
|
|
77
|
-
onInput(event) {
|
|
78
|
-
this.$emit('input', event);
|
|
79
|
-
},
|
|
80
|
-
onPick(event) {
|
|
81
|
-
this.$emit('pick', event);
|
|
82
|
-
},
|
|
83
|
-
onPresetClick(event) {
|
|
84
|
-
this.$emit('preset-click', event);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
</script>
|
|
89
|
-
|
|
90
|
-
<style scoped lang="less">
|
|
91
|
-
.t_date_range_picker-wrap {
|
|
92
|
-
width: auto;
|
|
93
|
-
height: auto;
|
|
94
|
-
}
|
|
95
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<date-range-picker v-model="module"
|
|
3
|
+
v-bind="$attrs"
|
|
4
|
+
@blur="onBlur"
|
|
5
|
+
@change="onChange"
|
|
6
|
+
@confirm="onConfirm"
|
|
7
|
+
@focus="onFocus"
|
|
8
|
+
@input="onInput"
|
|
9
|
+
@pick="onPick"
|
|
10
|
+
@preset-click="onPresetClick"
|
|
11
|
+
:presets="computedPresets"/>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
<script>
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
export default {
|
|
19
|
+
name: "tDateRangePicker",
|
|
20
|
+
data() {
|
|
21
|
+
return {}
|
|
22
|
+
},
|
|
23
|
+
props: {
|
|
24
|
+
value: {
|
|
25
|
+
type: Array,
|
|
26
|
+
default: () => {
|
|
27
|
+
return []
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
components: {},
|
|
32
|
+
created() {
|
|
33
|
+
},
|
|
34
|
+
computed: {
|
|
35
|
+
module: {
|
|
36
|
+
set(val) {
|
|
37
|
+
this.$emit('input', val);
|
|
38
|
+
},
|
|
39
|
+
get() {
|
|
40
|
+
return this.$props.value;
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
computedPresets() {
|
|
44
|
+
const now = {
|
|
45
|
+
'此刻': () => {
|
|
46
|
+
if (this.$attrs['valueType'] === 'time-stamp') {
|
|
47
|
+
return [new Date().valueOf(), new Date().valueOf()]
|
|
48
|
+
}
|
|
49
|
+
return [new Date(), new Date()];
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
if (this.$attrs[`presets`] && typeof this.$attrs[`presets`] === 'object') {
|
|
53
|
+
return {
|
|
54
|
+
...this.$attrs['presets'],
|
|
55
|
+
...now,
|
|
56
|
+
}
|
|
57
|
+
} else {
|
|
58
|
+
return {
|
|
59
|
+
...now
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
methods: {
|
|
65
|
+
onBlur(event) {
|
|
66
|
+
this.$emit('blur', event);
|
|
67
|
+
},
|
|
68
|
+
onChange(event) {
|
|
69
|
+
this.$emit('change', event);
|
|
70
|
+
},
|
|
71
|
+
onConfirm(event) {
|
|
72
|
+
this.$emit('confirm', event);
|
|
73
|
+
},
|
|
74
|
+
onFocus(event) {
|
|
75
|
+
this.$emit('focus', event);
|
|
76
|
+
},
|
|
77
|
+
onInput(event) {
|
|
78
|
+
this.$emit('input', event);
|
|
79
|
+
},
|
|
80
|
+
onPick(event) {
|
|
81
|
+
this.$emit('pick', event);
|
|
82
|
+
},
|
|
83
|
+
onPresetClick(event) {
|
|
84
|
+
this.$emit('preset-click', event);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
</script>
|
|
89
|
+
|
|
90
|
+
<style scoped lang="less">
|
|
91
|
+
.t_date_range_picker-wrap {
|
|
92
|
+
width: auto;
|
|
93
|
+
height: auto;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
96
|
</style>
|
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
exports.__esModule = true;
|
|
3
|
-
var componentConfig_1 = require("../../config/componentConfig");
|
|
4
|
-
var DynamicMountClass = /** @class */ (function () {
|
|
5
|
-
function DynamicMountClass(dynamicMount) {
|
|
6
|
-
this.params = dynamicMount;
|
|
7
|
-
this.domComponent = null;
|
|
8
|
-
this.refComponent = null;
|
|
9
|
-
this.mountdCb = null;
|
|
10
|
-
this.destroyCb = null;
|
|
11
|
-
}
|
|
12
|
-
DynamicMountClass.prototype.init = function () {
|
|
13
|
-
var _this = this;
|
|
14
|
-
this.domComponent = componentConfig_1["default"].Vue.prototype.$dynmaicMount({
|
|
15
|
-
mountedDom: this.params.mountedDom,
|
|
16
|
-
vueComponent: this.params.vueComponent,
|
|
17
|
-
componentProps: this.params.componentProps,
|
|
18
|
-
customClassName: this.params.customClassName,
|
|
19
|
-
zIndex: this.params.zIndex ? this.params.zIndex : '9999'
|
|
20
|
-
});
|
|
21
|
-
this.refComponent = this.domComponent.componentMounted;
|
|
22
|
-
this.refComponent.$on('hook:destroyed', function () {
|
|
23
|
-
_this.destroy();
|
|
24
|
-
});
|
|
25
|
-
this.refComponent.$on('hook:mounted', function () {
|
|
26
|
-
_this.mounted();
|
|
27
|
-
});
|
|
28
|
-
};
|
|
29
|
-
DynamicMountClass.prototype.getComponent = function () {
|
|
30
|
-
return this.refComponent;
|
|
31
|
-
};
|
|
32
|
-
DynamicMountClass.prototype.on = function (type, cb) {
|
|
33
|
-
switch (type) {
|
|
34
|
-
case 'mounted':
|
|
35
|
-
this.mountdCb = cb;
|
|
36
|
-
break;
|
|
37
|
-
case 'destroyed':
|
|
38
|
-
this.destroyCb = cb;
|
|
39
|
-
break;
|
|
40
|
-
default:
|
|
41
|
-
break;
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
DynamicMountClass.prototype.mounted = function () {
|
|
45
|
-
if (this.mountdCb) {
|
|
46
|
-
this.mountdCb(this.refComponent);
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
DynamicMountClass.prototype.destroy = function () {
|
|
50
|
-
if (this.destroyCb) {
|
|
51
|
-
this.destroyCb(this.refComponent);
|
|
52
|
-
}
|
|
53
|
-
componentConfig_1["default"].Vue.component("".concat(this.domComponent.$options.name), null);
|
|
54
|
-
delete componentConfig_1["default"].Vue.options.components["".concat(this.domComponent.$options.name)];
|
|
55
|
-
// @ts-ignore
|
|
56
|
-
this.params = null;
|
|
57
|
-
this.domComponent = null;
|
|
58
|
-
this.refComponent = null;
|
|
59
|
-
this.mountdCb = null;
|
|
60
|
-
this.destroyCb = null;
|
|
61
|
-
};
|
|
62
|
-
return DynamicMountClass;
|
|
63
|
-
}());
|
|
64
|
-
exports["default"] = DynamicMountClass;
|
|
1
|
+
"use strict";
|
|
2
|
+
exports.__esModule = true;
|
|
3
|
+
var componentConfig_1 = require("../../config/componentConfig");
|
|
4
|
+
var DynamicMountClass = /** @class */ (function () {
|
|
5
|
+
function DynamicMountClass(dynamicMount) {
|
|
6
|
+
this.params = dynamicMount;
|
|
7
|
+
this.domComponent = null;
|
|
8
|
+
this.refComponent = null;
|
|
9
|
+
this.mountdCb = null;
|
|
10
|
+
this.destroyCb = null;
|
|
11
|
+
}
|
|
12
|
+
DynamicMountClass.prototype.init = function () {
|
|
13
|
+
var _this = this;
|
|
14
|
+
this.domComponent = componentConfig_1["default"].Vue.prototype.$dynmaicMount({
|
|
15
|
+
mountedDom: this.params.mountedDom,
|
|
16
|
+
vueComponent: this.params.vueComponent,
|
|
17
|
+
componentProps: this.params.componentProps,
|
|
18
|
+
customClassName: this.params.customClassName,
|
|
19
|
+
zIndex: this.params.zIndex ? this.params.zIndex : '9999'
|
|
20
|
+
});
|
|
21
|
+
this.refComponent = this.domComponent.componentMounted;
|
|
22
|
+
this.refComponent.$on('hook:destroyed', function () {
|
|
23
|
+
_this.destroy();
|
|
24
|
+
});
|
|
25
|
+
this.refComponent.$on('hook:mounted', function () {
|
|
26
|
+
_this.mounted();
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
DynamicMountClass.prototype.getComponent = function () {
|
|
30
|
+
return this.refComponent;
|
|
31
|
+
};
|
|
32
|
+
DynamicMountClass.prototype.on = function (type, cb) {
|
|
33
|
+
switch (type) {
|
|
34
|
+
case 'mounted':
|
|
35
|
+
this.mountdCb = cb;
|
|
36
|
+
break;
|
|
37
|
+
case 'destroyed':
|
|
38
|
+
this.destroyCb = cb;
|
|
39
|
+
break;
|
|
40
|
+
default:
|
|
41
|
+
break;
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
DynamicMountClass.prototype.mounted = function () {
|
|
45
|
+
if (this.mountdCb) {
|
|
46
|
+
this.mountdCb(this.refComponent);
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
DynamicMountClass.prototype.destroy = function () {
|
|
50
|
+
if (this.destroyCb) {
|
|
51
|
+
this.destroyCb(this.refComponent);
|
|
52
|
+
}
|
|
53
|
+
componentConfig_1["default"].Vue.component("".concat(this.domComponent.$options.name), null);
|
|
54
|
+
delete componentConfig_1["default"].Vue.options.components["".concat(this.domComponent.$options.name)];
|
|
55
|
+
// @ts-ignore
|
|
56
|
+
this.params = null;
|
|
57
|
+
this.domComponent = null;
|
|
58
|
+
this.refComponent = null;
|
|
59
|
+
this.mountdCb = null;
|
|
60
|
+
this.destroyCb = null;
|
|
61
|
+
};
|
|
62
|
+
return DynamicMountClass;
|
|
63
|
+
}());
|
|
64
|
+
exports["default"] = DynamicMountClass;
|