sh-view 2.0.2 → 2.0.4
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/package.json +3 -4
- package/packages/components/global-components/sh-card/index.vue +2 -2
- package/packages/components/global-components/sh-col/index.vue +84 -83
- package/packages/components/global-components/sh-split/index.vue +3 -1
- package/packages/components/global-components/sh-tabs/index.vue +2 -2
- package/packages/components/global-components/sh-tag/index.vue +8 -4
- package/packages/components/index.js +0 -2
- package/packages/components/other-components/sh-menu-card/index.vue +1 -0
- package/packages/directive/module/resize.js +153 -13
- package/packages/components/global-components/sh-date/index.vue +0 -40
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sh-view",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4",
|
|
4
4
|
"description": "基于vxe-table二次封装",
|
|
5
5
|
"main": "packages/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -26,19 +26,18 @@
|
|
|
26
26
|
"core-js": "^3.32.0",
|
|
27
27
|
"countup.js": "^1.9.3",
|
|
28
28
|
"cron-parser": "^4.8.1",
|
|
29
|
-
"element-resize-detector": "^1.2.0",
|
|
30
29
|
"exceljs": "^4.3.0",
|
|
31
30
|
"jspdf": "^2.5.1",
|
|
32
31
|
"jszip": "^3.10.1",
|
|
33
32
|
"popper.js": "^1.16.1",
|
|
34
|
-
"sh-tools": "^1.
|
|
33
|
+
"sh-tools": "^1.5.0",
|
|
35
34
|
"tinymce": "^5.10.5",
|
|
36
35
|
"vue": "^3.3.4",
|
|
37
36
|
"vue-demi": "^0.13.11",
|
|
38
37
|
"vue-masonry": "^0.16.0",
|
|
39
38
|
"vue-router": "^4.2.2",
|
|
40
39
|
"vuex": "^4.1.0",
|
|
41
|
-
"vxe-table": "^4.5.
|
|
40
|
+
"vxe-table": "^4.5.6",
|
|
42
41
|
"vxe-table-plugin-export-pdf": "^3.0.4",
|
|
43
42
|
"vxe-table-plugin-export-xlsx": "^3.0.5",
|
|
44
43
|
"xe-clipboard": "^1.10.2",
|
|
@@ -103,12 +103,12 @@ export default {
|
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
.sh-card-body {
|
|
106
|
+
display: block;
|
|
106
107
|
border-top: 1px solid var(--vxe-table-border-color);
|
|
107
|
-
@include layoutFlex;
|
|
108
108
|
}
|
|
109
109
|
.sh-card-foot {
|
|
110
|
-
border-top: 1px solid var(--vxe-table-border-color);
|
|
111
110
|
@include layoutFlex;
|
|
111
|
+
border-top: 1px solid var(--vxe-table-border-color);
|
|
112
112
|
}
|
|
113
113
|
&.large {
|
|
114
114
|
.sh-card-head .sh-card-head-title {
|
|
@@ -1,83 +1,84 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div :class="classes" :style="styles">
|
|
3
|
-
<slot></slot>
|
|
4
|
-
</div>
|
|
5
|
-
</template>
|
|
6
|
-
|
|
7
|
-
<script>
|
|
8
|
-
import './css/index.scss'
|
|
9
|
-
const prefixCls = 'sh-col'
|
|
10
|
-
function parseFlex(flex) {
|
|
11
|
-
if (typeof flex === 'number') {
|
|
12
|
-
return `${flex} ${flex} auto`
|
|
13
|
-
}
|
|
14
|
-
if (/^\d+(\.\d+)?(px|em|rem|%)$/.test(flex)) {
|
|
15
|
-
return `0 0 ${flex}`
|
|
16
|
-
}
|
|
17
|
-
return flex
|
|
18
|
-
}
|
|
19
|
-
export default {
|
|
20
|
-
name: 'ShCol',
|
|
21
|
-
inject: ['RowInstance'],
|
|
22
|
-
props: {
|
|
23
|
-
span: [Number, String],
|
|
24
|
-
order: [Number, String],
|
|
25
|
-
offset: [Number, String],
|
|
26
|
-
push: [Number, String],
|
|
27
|
-
pull: [Number, String],
|
|
28
|
-
xs: [Number, Object],
|
|
29
|
-
sm: [Number, Object],
|
|
30
|
-
md: [Number, Object],
|
|
31
|
-
lg: [Number, Object],
|
|
32
|
-
xl: [Number, Object],
|
|
33
|
-
xxl: [Number, Object],
|
|
34
|
-
flex: {
|
|
35
|
-
type: [Number, String],
|
|
36
|
-
default: ''
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
computed: {
|
|
40
|
-
gutter() {
|
|
41
|
-
return this.RowInstance?.gutter || 0
|
|
42
|
-
},
|
|
43
|
-
classes() {
|
|
44
|
-
let classList = [
|
|
45
|
-
`${prefixCls}`,
|
|
46
|
-
{
|
|
47
|
-
[`${prefixCls}-span-${this.span}`]: this.span,
|
|
48
|
-
[`${prefixCls}-order-${this.order}`]: this.order,
|
|
49
|
-
[`${prefixCls}-offset-${this.offset}`]: this.offset,
|
|
50
|
-
[`${prefixCls}-push-${this.push}`]: this.push,
|
|
51
|
-
[`${prefixCls}-pull-${this.pull}`]: this.pull
|
|
52
|
-
}
|
|
53
|
-
]
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="classes" :style="styles">
|
|
3
|
+
<slot></slot>
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
import './css/index.scss'
|
|
9
|
+
const prefixCls = 'sh-col'
|
|
10
|
+
function parseFlex(flex) {
|
|
11
|
+
if (typeof flex === 'number') {
|
|
12
|
+
return `${flex} ${flex} auto`
|
|
13
|
+
}
|
|
14
|
+
if (/^\d+(\.\d+)?(px|em|rem|%)$/.test(flex)) {
|
|
15
|
+
return `0 0 ${flex}`
|
|
16
|
+
}
|
|
17
|
+
return flex
|
|
18
|
+
}
|
|
19
|
+
export default {
|
|
20
|
+
name: 'ShCol',
|
|
21
|
+
inject: ['RowInstance'],
|
|
22
|
+
props: {
|
|
23
|
+
span: [Number, String],
|
|
24
|
+
order: [Number, String],
|
|
25
|
+
offset: [Number, String],
|
|
26
|
+
push: [Number, String],
|
|
27
|
+
pull: [Number, String],
|
|
28
|
+
xs: [Number, Object],
|
|
29
|
+
sm: [Number, Object],
|
|
30
|
+
md: [Number, Object],
|
|
31
|
+
lg: [Number, Object],
|
|
32
|
+
xl: [Number, Object],
|
|
33
|
+
xxl: [Number, Object],
|
|
34
|
+
flex: {
|
|
35
|
+
type: [Number, String],
|
|
36
|
+
default: ''
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
computed: {
|
|
40
|
+
gutter() {
|
|
41
|
+
return this.RowInstance?.gutter || 0
|
|
42
|
+
},
|
|
43
|
+
classes() {
|
|
44
|
+
let classList = [
|
|
45
|
+
`${prefixCls}`,
|
|
46
|
+
{
|
|
47
|
+
[`${prefixCls}-span-${this.span}`]: this.span,
|
|
48
|
+
[`${prefixCls}-order-${this.order}`]: this.order,
|
|
49
|
+
[`${prefixCls}-offset-${this.offset}`]: this.offset,
|
|
50
|
+
[`${prefixCls}-push-${this.push}`]: this.push,
|
|
51
|
+
[`${prefixCls}-pull-${this.pull}`]: this.pull
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
let sizeList = ['xs', 'sm', 'md', 'lg', 'xl', 'xxl']
|
|
55
|
+
sizeList.forEach(size => {
|
|
56
|
+
if (typeof this[size] === 'number') {
|
|
57
|
+
classList.push(`${prefixCls}-span-${size}-${this[size]}`)
|
|
58
|
+
} else if (typeof this[size] === 'object') {
|
|
59
|
+
let props = this[size]
|
|
60
|
+
Object.keys(props).forEach(prop => {
|
|
61
|
+
classList.push(`${prefixCls}-${size}-${prop}-${props[prop]}`)
|
|
62
|
+
})
|
|
63
|
+
}
|
|
64
|
+
})
|
|
65
|
+
return classList
|
|
66
|
+
},
|
|
67
|
+
styles() {
|
|
68
|
+
let style = {}
|
|
69
|
+
if (this.gutter !== 0) {
|
|
70
|
+
style = {
|
|
71
|
+
paddingLeft: this.gutter / 2 + 'px',
|
|
72
|
+
paddingRight: this.gutter / 2 + 'px'
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
if (this.flex) {
|
|
76
|
+
style.flex = parseFlex(this.flex)
|
|
77
|
+
}
|
|
78
|
+
return style
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
</script>
|
|
83
|
+
|
|
84
|
+
<style scoped lang="scss"></style>
|
|
@@ -246,7 +246,7 @@ export default {
|
|
|
246
246
|
overflow: hidden;
|
|
247
247
|
}
|
|
248
248
|
&-inner {
|
|
249
|
-
display:
|
|
249
|
+
display: flex;
|
|
250
250
|
width: fit-content;
|
|
251
251
|
white-space: nowrap;
|
|
252
252
|
transition: transform 0.2s ease-in-out;
|
|
@@ -294,7 +294,7 @@ export default {
|
|
|
294
294
|
}
|
|
295
295
|
.sh-tab-item-active {
|
|
296
296
|
background-color: var(--vxe-primary-color);
|
|
297
|
-
border-color: var(--vxe-primary-
|
|
297
|
+
border-color: var(--vxe-primary-color);
|
|
298
298
|
color: #fff !important;
|
|
299
299
|
}
|
|
300
300
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="sh-tag" :class="classes" :style="[borderStyle, backgroundStyle]" @click.stop="check">
|
|
3
|
-
<span v-if="type === 'dot'" class="sh-tag-dot" :style="[backgroundStyle]"></span>
|
|
3
|
+
<span v-if="type === 'dot'" class="sh-tag-other"><span class="sh-tag-dot" :style="[backgroundStyle]"></span></span>
|
|
4
4
|
<span class="sh-tag-text" :class="textClasses" :style="[fontStyle]"><slot></slot></span>
|
|
5
|
-
<a v-if="closable" class="sh-tag-close" :style="[borderStyle]" @click="close">
|
|
5
|
+
<a v-if="closable" class="sh-tag-other sh-tag-close" :style="[borderStyle]" @click="close">
|
|
6
6
|
<slot name="close"><sh-icon type="ios-close"></sh-icon></slot>
|
|
7
7
|
</a>
|
|
8
8
|
</div>
|
|
@@ -118,7 +118,7 @@ export default {
|
|
|
118
118
|
$default-color: #f7f7f7;
|
|
119
119
|
.sh-tag {
|
|
120
120
|
display: inline-flex;
|
|
121
|
-
align-items:
|
|
121
|
+
align-items: stretch;
|
|
122
122
|
margin: 2px 4px 2px 0;
|
|
123
123
|
border: 1px solid var(--vxe-table-border-color);
|
|
124
124
|
border-radius: var(--vxe-border-radius);
|
|
@@ -141,13 +141,17 @@ $default-color: #f7f7f7;
|
|
|
141
141
|
border: none !important;
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
+
&-other {
|
|
145
|
+
display: inline-flex;
|
|
146
|
+
align-items: center;
|
|
147
|
+
}
|
|
144
148
|
&-dot {
|
|
145
149
|
display: inline-block;
|
|
146
150
|
width: 12px;
|
|
147
151
|
height: 12px;
|
|
148
152
|
border-radius: 50%;
|
|
149
153
|
background-color: #ccc;
|
|
150
|
-
margin: 0
|
|
154
|
+
margin: 0 2px 0 8px;
|
|
151
155
|
}
|
|
152
156
|
&-text {
|
|
153
157
|
padding: 0 8px;
|
|
@@ -6,7 +6,6 @@ import ShCodeEditor from './global-components/sh-code-editor/index.vue'
|
|
|
6
6
|
import ShCol from './global-components/sh-col/index.vue'
|
|
7
7
|
import ShCorner from './global-components/sh-corner/index.vue'
|
|
8
8
|
import ShCountTo from './global-components/sh-count-to/index.vue'
|
|
9
|
-
import ShDate from './global-components/sh-date/index.vue'
|
|
10
9
|
import ShDrawer from './global-components/sh-drawer/index.vue'
|
|
11
10
|
import ShEmpty from './global-components/sh-empty/index.vue'
|
|
12
11
|
import ShForm from './global-components/sh-form/index.vue'
|
|
@@ -41,7 +40,6 @@ const components = {
|
|
|
41
40
|
ShCol,
|
|
42
41
|
ShCorner,
|
|
43
42
|
ShCountTo,
|
|
44
|
-
ShDate,
|
|
45
43
|
ShDrawer,
|
|
46
44
|
ShEmpty,
|
|
47
45
|
ShForm,
|
|
@@ -1,19 +1,159 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* 是否是IE浏览器的判断
|
|
3
|
+
* @function
|
|
4
|
+
* @return {Boolean} 是否IE浏览器的判断结果
|
|
5
|
+
*/
|
|
6
|
+
function isIE() {
|
|
7
|
+
let _isIE = false
|
|
8
|
+
if (typeof navigator !== 'undefined') {
|
|
9
|
+
_isIE = navigator.userAgent.match(/Trident/) || navigator.userAgent.match(/Edge/)
|
|
10
|
+
}
|
|
11
|
+
return _isIE
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
var lastTime = 0
|
|
15
|
+
var vendors = ['ms', 'moz', 'webkit', 'o']
|
|
16
|
+
if (typeof window === 'undefined') {
|
|
17
|
+
global.window = {}
|
|
18
|
+
}
|
|
19
|
+
for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
|
|
20
|
+
window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame']
|
|
21
|
+
window.cancelAnimationFrame = window[vendors[x] + 'CancelAnimationFrame'] || window[vendors[x] + 'CancelRequestAnimationFrame']
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
if (!window.requestAnimationFrame) {
|
|
25
|
+
window.requestAnimationFrame = function (callback, element) {
|
|
26
|
+
var currTime = new Date().getTime()
|
|
27
|
+
var timeToCall = Math.max(0, 16 - (currTime - lastTime))
|
|
28
|
+
var id = window.setTimeout(function () {
|
|
29
|
+
callback(currTime + timeToCall)
|
|
30
|
+
}, timeToCall)
|
|
31
|
+
lastTime = currTime + timeToCall
|
|
32
|
+
return id
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
if (!window.cancelAnimationFrame) {
|
|
37
|
+
window.cancelAnimationFrame = function (id) {
|
|
38
|
+
clearTimeout(id)
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* requestAnimationFrame的兼容处理
|
|
44
|
+
*/
|
|
45
|
+
const $requestAnimationFrame = window.requestAnimationFrame
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* cancelAnimationFrame的兼容处理
|
|
49
|
+
*/
|
|
50
|
+
const $cancelAnimationFrame = window.cancelAnimationFrame
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* resize处理器,此处回调元素v-resize的方法
|
|
54
|
+
* @param event {Event} resizeTrigge的resize事件传递,来自{@link registereResizeHandler}方法中产生的事件源
|
|
55
|
+
* @function
|
|
56
|
+
*/
|
|
57
|
+
function resizeHandler(event) {
|
|
58
|
+
event.__currentTarget__ = this.__container__
|
|
59
|
+
this.__resize__handler__.call(
|
|
60
|
+
this,
|
|
61
|
+
{
|
|
62
|
+
width: this.offsetWidth,
|
|
63
|
+
height: this.offsetHeight
|
|
64
|
+
},
|
|
65
|
+
event
|
|
66
|
+
)
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* 优化resize监听
|
|
71
|
+
* @param event {Event} resizeTrigge的resize事件传递,来自{@link registereResizeHandler}方法中产生的事件源
|
|
72
|
+
* @function
|
|
73
|
+
*/
|
|
74
|
+
function resizeTriggerListener(event) {
|
|
75
|
+
const _resizeTrigger = event.currentTarget || event.srcElement
|
|
76
|
+
if (_resizeTrigger.__requestAnimationFrameID__) {
|
|
77
|
+
$cancelAnimationFrame(_resizeTrigger.__requestAnimationFrameID__)
|
|
78
|
+
}
|
|
79
|
+
_resizeTrigger.__requestAnimationFrameID__ = $requestAnimationFrame(resizeHandler.bind(this, event))
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* 注册resize处理方法
|
|
84
|
+
* @function
|
|
85
|
+
*/
|
|
86
|
+
function registereResizeHandler() {
|
|
87
|
+
if (document.attachEvent) {
|
|
88
|
+
this.__container__.attachEvent('onresize', resizeHandler.bind(this))
|
|
89
|
+
} else {
|
|
90
|
+
this.contentDocument.defaultView.addEventListener('resize', resizeTriggerListener.bind(this))
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* 创建resize真正的触发器
|
|
96
|
+
* @function
|
|
97
|
+
*/
|
|
98
|
+
function createResizeTrigger() {
|
|
99
|
+
const object = document.createElement('object')
|
|
100
|
+
object.setAttribute('aria-hidden', 'true')
|
|
101
|
+
object.setAttribute('tabindex', -1)
|
|
102
|
+
const objectStyle = `
|
|
103
|
+
display: block !important;
|
|
104
|
+
position: absolute !important;
|
|
105
|
+
top: 0 !important;
|
|
106
|
+
left: 0 !important;
|
|
107
|
+
width: 100% !important;
|
|
108
|
+
height: 100% !important;
|
|
109
|
+
overflow: hidden !important;
|
|
110
|
+
pointer-events: none !important;
|
|
111
|
+
z-index: -1 !important;
|
|
112
|
+
opacity: 0 !important;
|
|
113
|
+
`
|
|
114
|
+
object.setAttribute('style', objectStyle)
|
|
115
|
+
object.type = 'text/html'
|
|
116
|
+
return object
|
|
117
|
+
}
|
|
2
118
|
|
|
3
119
|
export default {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
120
|
+
beforeMount(el, binding, vnode, oldVnode) {
|
|
121
|
+
// 获得真正的触发器
|
|
122
|
+
el.__resizeTrigger__ = createResizeTrigger()
|
|
123
|
+
el.__resizeTrigger__.__container__ = el
|
|
124
|
+
el.__resizeTrigger__.__resize__handler__ = binding.value
|
|
125
|
+
el.__resizeTrigger__.onload = registereResizeHandler
|
|
126
|
+
// 将真正的触发器作为子元素添加到当前元素
|
|
127
|
+
const _isIE = isIE()
|
|
128
|
+
_isIE && el.appendChild(el.__resizeTrigger__)
|
|
129
|
+
el.__resizeTrigger__.data = 'about:blank'
|
|
130
|
+
!_isIE && el.appendChild(el.__resizeTrigger__)
|
|
131
|
+
},
|
|
132
|
+
mounted(el, binding, vnode, oldVnode) {
|
|
133
|
+
if (getComputedStyle(el).position === 'static') {
|
|
134
|
+
el.style.setProperty('position', 'relative', 'important')
|
|
8
135
|
}
|
|
9
|
-
el.__resizeHandler__ = resizeHandler
|
|
10
|
-
el.__observer__ = elementResizeDetectorMaker()
|
|
11
|
-
el.__observer__.listenTo(el, resizeHandler)
|
|
12
136
|
},
|
|
13
|
-
updated() {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
137
|
+
updated(el, binding, vnode, oldVnode) {
|
|
138
|
+
var inserted = false
|
|
139
|
+
for (var i = 0, length = el.children.length; i < length; i++) {
|
|
140
|
+
if (el.children[i] === el.__resizeTrigger__) {
|
|
141
|
+
inserted = true
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
if (!inserted) {
|
|
145
|
+
var _isIE = isIE()
|
|
146
|
+
_isIE && el.appendChild(el.__resizeTrigger__)
|
|
147
|
+
el.__resizeTrigger__.data = 'about:blank'
|
|
148
|
+
!_isIE && el.appendChild(el.__resizeTrigger__)
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
unmounted(el, binding, vnode, oldVnode) {
|
|
152
|
+
if (document.attachEvent) {
|
|
153
|
+
el.detachEvent('onresize', resizeHandler)
|
|
154
|
+
} else if (el.__resizeTrigger__ && el.__resizeTrigger__.contentDocument) {
|
|
155
|
+
el.__resizeTrigger__.contentDocument.defaultView.removeEventListener('resize', resizeTriggerListener)
|
|
156
|
+
el.__resizeTrigger__ = !el.removeChild(el.__resizeTrigger__)
|
|
157
|
+
}
|
|
18
158
|
}
|
|
19
159
|
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="sh-date">
|
|
3
|
-
<div class="sh-date-input" @click="inputClick">{{ dataValue }}</div>
|
|
4
|
-
<div class="sh-date-drop">
|
|
5
|
-
<vxe-input ref="inputA" v-model="value1" type="date"></vxe-input>
|
|
6
|
-
<vxe-input ref="inputB" v-model="value2" type="date"></vxe-input>
|
|
7
|
-
</div>
|
|
8
|
-
</div>
|
|
9
|
-
</template>
|
|
10
|
-
|
|
11
|
-
<script>
|
|
12
|
-
export default {
|
|
13
|
-
name: 'ShDate',
|
|
14
|
-
emits: ['update:modelValue'],
|
|
15
|
-
data() {
|
|
16
|
-
return {
|
|
17
|
-
dataValue: '',
|
|
18
|
-
value1: '',
|
|
19
|
-
value2: ''
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
computed: {},
|
|
23
|
-
methods: {
|
|
24
|
-
inputClick() {
|
|
25
|
-
this.$refs.inputA.focus()
|
|
26
|
-
this.$refs.inputB.focus()
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
</script>
|
|
31
|
-
|
|
32
|
-
<style scoped lang="scss">
|
|
33
|
-
.sh-date {
|
|
34
|
-
&-input {
|
|
35
|
-
width: 300px;
|
|
36
|
-
height: 50px;
|
|
37
|
-
border: 1px solid #ccc;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
</style>
|