wl-design-mobile 0.8.18 → 0.8.20
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/README.md +6 -6
- package/api/doc.js +25 -25
- package/api/x1.js +56 -56
- package/btn/components/lambo-info-btn.vue +123 -123
- package/btn/components/lambo-primary-btn.vue +117 -117
- package/btn/components/lambo-text-btn.vue +116 -116
- package/btn/lambo-btn-divide.vue +35 -35
- package/btn/lambo-btn-group.vue +46 -46
- package/btn/lambo-btn-split-line.vue +41 -41
- package/btn/lambo-btn.vue +68 -68
- package/btn/lambo-extend-btn.vue +121 -121
- package/btn/lambo-icon-btn.vue +82 -82
- package/card-item/card-row-icon.vue +71 -71
- package/card-item/filtrate-row.vue +73 -73
- package/card-item/lambo-card-footer.vue +40 -40
- package/card-item/lambo-card-head.vue +66 -66
- package/card-item/lambo-card-row.vue +59 -59
- package/collapse/lambo-collapse.vue +93 -93
- package/config/config.js +14 -14
- package/detail/lambo-detail-grid.vue +58 -58
- package/detail/lambo-detail-row.vue +59 -59
- package/doc/file/compoents/lambo-file-list.vue +42 -42
- package/doc/file/compoents/lambo-file-row.vue +77 -77
- package/doc/file/lambo-file-upload-collapse.vue +107 -107
- package/doc/file-type/file-type.js +286 -286
- package/doc/img/comonents/lambo-img-grid.vue +109 -109
- package/doc/img/lambo-img-upload-collapse.vue +107 -107
- package/doc/img/styles/css/index.css +3 -3
- package/edit/list/Lambo-edit-list.vue +87 -87
- package/edit/list/lambo-edit-card-group.vue +100 -100
- package/edit/list/styles/css/index.css +39 -39
- package/edit/select/lambo-edit-date-range.vue +147 -147
- package/edit/select/lambo-edit-date-time.vue +122 -122
- package/edit/select/lambo-edit-date.vue +120 -120
- package/edit/select/lambo-edit-input-textarea.vue +91 -91
- package/edit/select/lambo-edit-input.vue +91 -91
- package/edit/select/lambo-edit-multi-select.vue +168 -168
- package/edit/select/lambo-edit-search-single-select.vue +186 -186
- package/edit/select/lambo-edit-single-select.vue +162 -162
- package/edit/select/styles/css/index.css +133 -133
- package/flow/approval/flow-approval.vue +552 -552
- package/flow/comps/flow-attachment-list.vue +230 -230
- package/flow/comps/flow-attachment-modal.vue +194 -194
- package/flow/comps/flow-copy-users.vue +358 -358
- package/flow/comps/flow-node-card.vue +150 -150
- package/flow/comps/flow-node-header.vue +172 -172
- package/flow/comps/flow-util.js +156 -156
- package/flow/comps/icons/approved.svg +11 -11
- package/flow/comps/icons/canceled.svg +11 -11
- package/flow/comps/icons/rejected.svg +11 -11
- package/flow/comps/icons/underway.svg +11 -11
- package/flow/detail/flow-detail.vue +467 -467
- package/flow/index.js +51 -51
- package/flow/lambo-flow-detail.vue +912 -912
- package/flow/lambo-flow-edit.vue +15 -15
- package/flow/submit/flow-submit.vue +383 -383
- package/icon/lambo-required-red-star.vue +47 -47
- package/icon/lambo-vector-icon.vue +71 -71
- package/list/lambo-list.vue +412 -412
- package/nav/lambo-top-nav.vue +81 -81
- package/order/comps/icons/approved.svg +10 -10
- package/order/comps/icons/underway.svg +10 -10
- package/order/comps/order-attachment-list.vue +228 -228
- package/order/comps/order-attachment-modal.vue +194 -194
- package/order/comps/order-node-card.vue +126 -126
- package/order/comps/order-node-header.vue +133 -133
- package/order/comps/order-util.js +132 -132
- package/order/detail/order-detail.vue +432 -432
- package/order/handle/order-handle.vue +517 -517
- package/order/index.js +33 -33
- package/package.json +38 -37
- package/search/lambo-date-range-page.vue +196 -196
- package/search/lambo-date-range.vue +111 -111
- package/search/lambo-date.vue +105 -105
- package/search/lambo-input.vue +74 -74
- package/search/lambo-multi-select.vue +129 -129
- package/search/lambo-org-select-page.vue +109 -109
- package/search/lambo-search-box.vue +61 -61
- package/search/lambo-search-single-select.vue +152 -152
- package/search/lambo-single-select.vue +123 -123
- package/search/lambo-week-date-select.vue +521 -521
- package/search/styles/css/index.css +138 -138
- package/styles/base.less +77 -77
- package/styles/components/btn.less +7 -7
- package/styles/components/search.less +33 -33
- package/styles/components/tag.less +181 -181
- package/styles/index.less +4 -4
- package/table/lambo-ag-table.vue +227 -227
- package/tag/lambo-tag.vue +23 -23
- package/title/lambo-title1.vue +151 -151
- package/title/lambo-title2.vue +37 -37
- package/title/lambo-title3.vue +77 -77
- package/util/assist.js +43 -43
- package/util/axios/cacheconf.js +19 -19
- package/util/axios/index.js +11 -11
- package/util/axios/interceptors.js +101 -101
- package/util/bus.js +4 -4
- package/util/jssdk-sczy.js +104 -104
- package/util/jssdk.js +608 -565
- package/util/math.js +76 -76
- package/util/token.js +36 -36
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# wl-design-mobile
|
|
2
|
-
|
|
3
|
-
## Setup
|
|
4
|
-
```
|
|
5
|
-
npm i wl-design-mobile
|
|
6
|
-
```
|
|
1
|
+
# wl-design-mobile
|
|
2
|
+
|
|
3
|
+
## Setup
|
|
4
|
+
```
|
|
5
|
+
npm i wl-design-mobile
|
|
6
|
+
```
|
package/api/doc.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import config from '../config/config'
|
|
2
|
-
import {axios} from '../util/axios'
|
|
3
|
-
|
|
4
|
-
// Post请求上传文件
|
|
5
|
-
export const fileUploadUrl = config.sclDocServerContext + '/doc/file/put'
|
|
6
|
-
|
|
7
|
-
// Post请求删除文件
|
|
8
|
-
export const fileDeleteUrl = config.sclDocServerContext + '/doc/file/delete'
|
|
9
|
-
|
|
10
|
-
// Get获取文件流
|
|
11
|
-
export const fileGetUrl = config.sclDocServerContext + '/doc/file/get/'
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* 删除文件
|
|
15
|
-
*
|
|
16
|
-
* @param docId
|
|
17
|
-
* @returns {Promise<AxiosResponse<any>>}
|
|
18
|
-
*/
|
|
19
|
-
export const deleteFile = (docId) => {
|
|
20
|
-
const params = {
|
|
21
|
-
docId
|
|
22
|
-
}
|
|
23
|
-
return axios.post(fileDeleteUrl, null, {params})
|
|
24
|
-
}
|
|
25
|
-
|
|
1
|
+
import config from '../config/config'
|
|
2
|
+
import {axios} from '../util/axios'
|
|
3
|
+
|
|
4
|
+
// Post请求上传文件
|
|
5
|
+
export const fileUploadUrl = config.sclDocServerContext + '/doc/file/put'
|
|
6
|
+
|
|
7
|
+
// Post请求删除文件
|
|
8
|
+
export const fileDeleteUrl = config.sclDocServerContext + '/doc/file/delete'
|
|
9
|
+
|
|
10
|
+
// Get获取文件流
|
|
11
|
+
export const fileGetUrl = config.sclDocServerContext + '/doc/file/get/'
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* 删除文件
|
|
15
|
+
*
|
|
16
|
+
* @param docId
|
|
17
|
+
* @returns {Promise<AxiosResponse<any>>}
|
|
18
|
+
*/
|
|
19
|
+
export const deleteFile = (docId) => {
|
|
20
|
+
const params = {
|
|
21
|
+
docId
|
|
22
|
+
}
|
|
23
|
+
return axios.post(fileDeleteUrl, null, {params})
|
|
24
|
+
}
|
|
25
|
+
|
package/api/x1.js
CHANGED
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
import config from '../config/config'
|
|
2
|
-
import {axios} from '../util/axios'
|
|
3
|
-
|
|
4
|
-
export const getDictList = (dictId) => {
|
|
5
|
-
const params = {
|
|
6
|
-
dictId
|
|
7
|
-
}
|
|
8
|
-
return axios.request({
|
|
9
|
-
url: config.platformServerContext + '/x1/dict/list', method: 'get', params
|
|
10
|
-
})
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export const getDictMap = (dictId) => {
|
|
14
|
-
const params = {
|
|
15
|
-
dictId
|
|
16
|
-
}
|
|
17
|
-
return axios.request({
|
|
18
|
-
url: config.platformServerContext + '/x1/dict/map', method: 'get', params
|
|
19
|
-
})
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export const getDictVal = (dictId, dictKey) => {
|
|
23
|
-
const params = {
|
|
24
|
-
dictId, dictKey
|
|
25
|
-
}
|
|
26
|
-
return axios.request({
|
|
27
|
-
url: config.platformServerContext + '/x1/dict/val', method: 'get', params
|
|
28
|
-
})
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export const getRuleVal = (ruleId, organId) => {
|
|
32
|
-
const params = {
|
|
33
|
-
ruleId, organId
|
|
34
|
-
}
|
|
35
|
-
return axios.request({
|
|
36
|
-
url: config.platformServerContext + '/x1/rule/val', method: 'get', params
|
|
37
|
-
})
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export const getIdNext = (idKey) => {
|
|
41
|
-
const params = {
|
|
42
|
-
idKey
|
|
43
|
-
}
|
|
44
|
-
return axios.request({
|
|
45
|
-
url: config.platformServerContext + '/x1/id/next', method: 'get', params
|
|
46
|
-
})
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export const getIdNextOrg = (idKey, orgId) => {
|
|
50
|
-
const params = {
|
|
51
|
-
idKey, orgId
|
|
52
|
-
}
|
|
53
|
-
return axios.request({
|
|
54
|
-
url: config.platformServerContext + '/x1/id/orgNext', method: 'get', params
|
|
55
|
-
})
|
|
56
|
-
}
|
|
1
|
+
import config from '../config/config'
|
|
2
|
+
import {axios} from '../util/axios'
|
|
3
|
+
|
|
4
|
+
export const getDictList = (dictId) => {
|
|
5
|
+
const params = {
|
|
6
|
+
dictId
|
|
7
|
+
}
|
|
8
|
+
return axios.request({
|
|
9
|
+
url: config.platformServerContext + '/x1/dict/list', method: 'get', params
|
|
10
|
+
})
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const getDictMap = (dictId) => {
|
|
14
|
+
const params = {
|
|
15
|
+
dictId
|
|
16
|
+
}
|
|
17
|
+
return axios.request({
|
|
18
|
+
url: config.platformServerContext + '/x1/dict/map', method: 'get', params
|
|
19
|
+
})
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export const getDictVal = (dictId, dictKey) => {
|
|
23
|
+
const params = {
|
|
24
|
+
dictId, dictKey
|
|
25
|
+
}
|
|
26
|
+
return axios.request({
|
|
27
|
+
url: config.platformServerContext + '/x1/dict/val', method: 'get', params
|
|
28
|
+
})
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export const getRuleVal = (ruleId, organId) => {
|
|
32
|
+
const params = {
|
|
33
|
+
ruleId, organId
|
|
34
|
+
}
|
|
35
|
+
return axios.request({
|
|
36
|
+
url: config.platformServerContext + '/x1/rule/val', method: 'get', params
|
|
37
|
+
})
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export const getIdNext = (idKey) => {
|
|
41
|
+
const params = {
|
|
42
|
+
idKey
|
|
43
|
+
}
|
|
44
|
+
return axios.request({
|
|
45
|
+
url: config.platformServerContext + '/x1/id/next', method: 'get', params
|
|
46
|
+
})
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export const getIdNextOrg = (idKey, orgId) => {
|
|
50
|
+
const params = {
|
|
51
|
+
idKey, orgId
|
|
52
|
+
}
|
|
53
|
+
return axios.request({
|
|
54
|
+
url: config.platformServerContext + '/x1/id/orgNext', method: 'get', params
|
|
55
|
+
})
|
|
56
|
+
}
|
|
@@ -1,123 +1,123 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<div class="info-btn-div" >
|
|
4
|
-
<van-button :disabled="disabled" :icon="icon" :icon-position="position" :loading="loading"
|
|
5
|
-
:type="'info'" :class="dynamicClass" size="normal" @click="handleClick"> {{ text }}
|
|
6
|
-
<slot name="extend"></slot>
|
|
7
|
-
</van-button>
|
|
8
|
-
</div>
|
|
9
|
-
</div>
|
|
10
|
-
</template>
|
|
11
|
-
<script>
|
|
12
|
-
|
|
13
|
-
export default {
|
|
14
|
-
name: 'LamboInfoBtn',
|
|
15
|
-
components: {},
|
|
16
|
-
props: {
|
|
17
|
-
text: {
|
|
18
|
-
type: String,
|
|
19
|
-
default: '中号按钮'
|
|
20
|
-
},
|
|
21
|
-
position: {
|
|
22
|
-
type: String,
|
|
23
|
-
default: 'left'
|
|
24
|
-
},
|
|
25
|
-
disabled: {
|
|
26
|
-
type: Boolean,
|
|
27
|
-
default: false
|
|
28
|
-
},
|
|
29
|
-
icon: {
|
|
30
|
-
type: String,
|
|
31
|
-
default: null
|
|
32
|
-
},
|
|
33
|
-
loading: {
|
|
34
|
-
type: Boolean,
|
|
35
|
-
default: false
|
|
36
|
-
},
|
|
37
|
-
size: {
|
|
38
|
-
type: String,
|
|
39
|
-
default: "normal"
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
data() {
|
|
43
|
-
return {}
|
|
44
|
-
},
|
|
45
|
-
methods: {
|
|
46
|
-
handleClick(event) {
|
|
47
|
-
this.$emit('click', event);
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
computed: {
|
|
51
|
-
dynamicClass() {
|
|
52
|
-
if (this.size === 'big') {
|
|
53
|
-
return {
|
|
54
|
-
"big-btn": true
|
|
55
|
-
}
|
|
56
|
-
} else if (this.size === 'small') {
|
|
57
|
-
return {
|
|
58
|
-
"small-btn": true
|
|
59
|
-
}
|
|
60
|
-
} else {
|
|
61
|
-
return {
|
|
62
|
-
"normal-btn": true
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
created() {
|
|
68
|
-
|
|
69
|
-
},
|
|
70
|
-
mounted() {
|
|
71
|
-
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
</script>
|
|
75
|
-
<style scoped>
|
|
76
|
-
@import "../../styles/index.less";
|
|
77
|
-
|
|
78
|
-
.big-btn {
|
|
79
|
-
border: none;
|
|
80
|
-
width: 100%;
|
|
81
|
-
height: 38px;
|
|
82
|
-
font-size: 14px;
|
|
83
|
-
border-radius: 3px;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.normal-btn {
|
|
87
|
-
border: none;
|
|
88
|
-
min-width: 60px;
|
|
89
|
-
height: 30px;
|
|
90
|
-
font-size: 12px;
|
|
91
|
-
border-radius: 3px;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.small-btn {
|
|
95
|
-
border: none;
|
|
96
|
-
min-width: 60px;
|
|
97
|
-
height: 27px;
|
|
98
|
-
font-size: 11px;
|
|
99
|
-
border-radius: 3px;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.info-btn-div {
|
|
103
|
-
display: flex;
|
|
104
|
-
justify-content: center;
|
|
105
|
-
align-items: center;
|
|
106
|
-
align-content: center;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
/* type[info] disable[true] plain[false] */
|
|
110
|
-
/deep/ .info-btn-div .van-button--info {
|
|
111
|
-
background-color: transparent;
|
|
112
|
-
color: var(--scl-blue);
|
|
113
|
-
border: 1px solid var(--scl-blue);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
/*线框按钮不可用按钮样式*/
|
|
117
|
-
/deep/ .info-btn-div .van-button--disabled {
|
|
118
|
-
opacity: 1;
|
|
119
|
-
color: #000000;
|
|
120
|
-
border: 1px solid var(--scl-gray-6);
|
|
121
|
-
background-color: #ffffff;
|
|
122
|
-
}
|
|
123
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div class="info-btn-div" >
|
|
4
|
+
<van-button :disabled="disabled" :icon="icon" :icon-position="position" :loading="loading"
|
|
5
|
+
:type="'info'" :class="dynamicClass" size="normal" @click="handleClick"> {{ text }}
|
|
6
|
+
<slot name="extend"></slot>
|
|
7
|
+
</van-button>
|
|
8
|
+
</div>
|
|
9
|
+
</div>
|
|
10
|
+
</template>
|
|
11
|
+
<script>
|
|
12
|
+
|
|
13
|
+
export default {
|
|
14
|
+
name: 'LamboInfoBtn',
|
|
15
|
+
components: {},
|
|
16
|
+
props: {
|
|
17
|
+
text: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: '中号按钮'
|
|
20
|
+
},
|
|
21
|
+
position: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: 'left'
|
|
24
|
+
},
|
|
25
|
+
disabled: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: false
|
|
28
|
+
},
|
|
29
|
+
icon: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: null
|
|
32
|
+
},
|
|
33
|
+
loading: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: false
|
|
36
|
+
},
|
|
37
|
+
size: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: "normal"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
data() {
|
|
43
|
+
return {}
|
|
44
|
+
},
|
|
45
|
+
methods: {
|
|
46
|
+
handleClick(event) {
|
|
47
|
+
this.$emit('click', event);
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
computed: {
|
|
51
|
+
dynamicClass() {
|
|
52
|
+
if (this.size === 'big') {
|
|
53
|
+
return {
|
|
54
|
+
"big-btn": true
|
|
55
|
+
}
|
|
56
|
+
} else if (this.size === 'small') {
|
|
57
|
+
return {
|
|
58
|
+
"small-btn": true
|
|
59
|
+
}
|
|
60
|
+
} else {
|
|
61
|
+
return {
|
|
62
|
+
"normal-btn": true
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
created() {
|
|
68
|
+
|
|
69
|
+
},
|
|
70
|
+
mounted() {
|
|
71
|
+
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
</script>
|
|
75
|
+
<style scoped>
|
|
76
|
+
@import "../../styles/index.less";
|
|
77
|
+
|
|
78
|
+
.big-btn {
|
|
79
|
+
border: none;
|
|
80
|
+
width: 100%;
|
|
81
|
+
height: 38px;
|
|
82
|
+
font-size: 14px;
|
|
83
|
+
border-radius: 3px;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.normal-btn {
|
|
87
|
+
border: none;
|
|
88
|
+
min-width: 60px;
|
|
89
|
+
height: 30px;
|
|
90
|
+
font-size: 12px;
|
|
91
|
+
border-radius: 3px;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.small-btn {
|
|
95
|
+
border: none;
|
|
96
|
+
min-width: 60px;
|
|
97
|
+
height: 27px;
|
|
98
|
+
font-size: 11px;
|
|
99
|
+
border-radius: 3px;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.info-btn-div {
|
|
103
|
+
display: flex;
|
|
104
|
+
justify-content: center;
|
|
105
|
+
align-items: center;
|
|
106
|
+
align-content: center;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/* type[info] disable[true] plain[false] */
|
|
110
|
+
/deep/ .info-btn-div .van-button--info {
|
|
111
|
+
background-color: transparent;
|
|
112
|
+
color: var(--scl-blue);
|
|
113
|
+
border: 1px solid var(--scl-blue);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/*线框按钮不可用按钮样式*/
|
|
117
|
+
/deep/ .info-btn-div .van-button--disabled {
|
|
118
|
+
opacity: 1;
|
|
119
|
+
color: #000000;
|
|
120
|
+
border: 1px solid var(--scl-gray-6);
|
|
121
|
+
background-color: #ffffff;
|
|
122
|
+
}
|
|
123
|
+
</style>
|
|
@@ -1,117 +1,117 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<div class="primary-btn-div">
|
|
4
|
-
<van-button :disabled="disabled" :icon="icon" :icon-position="position" :loading="loading"
|
|
5
|
-
:type="'primary'" :class="dynamicClass" size="normal" @click="handleClick"> {{ text }}
|
|
6
|
-
<slot name="extend"></slot>
|
|
7
|
-
</van-button>
|
|
8
|
-
</div>
|
|
9
|
-
</div>
|
|
10
|
-
</template>
|
|
11
|
-
<script>
|
|
12
|
-
|
|
13
|
-
export default {
|
|
14
|
-
name: 'LamboPrimaryBtn',
|
|
15
|
-
components: {},
|
|
16
|
-
props: {
|
|
17
|
-
text: {
|
|
18
|
-
type: String,
|
|
19
|
-
default: '中号按钮'
|
|
20
|
-
},
|
|
21
|
-
position: {
|
|
22
|
-
type: String,
|
|
23
|
-
default: 'left'
|
|
24
|
-
},
|
|
25
|
-
disabled: {
|
|
26
|
-
type: Boolean,
|
|
27
|
-
default: false
|
|
28
|
-
},
|
|
29
|
-
icon: {
|
|
30
|
-
type: String,
|
|
31
|
-
default: null
|
|
32
|
-
},
|
|
33
|
-
loading: {
|
|
34
|
-
type: Boolean,
|
|
35
|
-
default: false
|
|
36
|
-
},
|
|
37
|
-
size: {
|
|
38
|
-
type: String,
|
|
39
|
-
default: "normal"
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
data() {
|
|
43
|
-
return {}
|
|
44
|
-
},
|
|
45
|
-
methods: {
|
|
46
|
-
handleClick(event) {
|
|
47
|
-
this.$emit('click', event);
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
computed: {
|
|
51
|
-
dynamicClass() {
|
|
52
|
-
if (this.size === 'big') {
|
|
53
|
-
return {
|
|
54
|
-
"big-btn": true
|
|
55
|
-
}
|
|
56
|
-
} else if (this.size === 'small') {
|
|
57
|
-
return {
|
|
58
|
-
"small-btn": true
|
|
59
|
-
}
|
|
60
|
-
} else {
|
|
61
|
-
return {
|
|
62
|
-
"normal-btn": true
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
created() {
|
|
68
|
-
|
|
69
|
-
},
|
|
70
|
-
mounted() {
|
|
71
|
-
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
</script>
|
|
75
|
-
<style scoped>
|
|
76
|
-
@import "../../styles/index.less";
|
|
77
|
-
|
|
78
|
-
.big-btn {
|
|
79
|
-
border: none;
|
|
80
|
-
width: 100%;
|
|
81
|
-
height: 38px;
|
|
82
|
-
font-size: 14px;
|
|
83
|
-
border-radius: 3px;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.normal-btn {
|
|
87
|
-
border: none;
|
|
88
|
-
min-width: 60px;
|
|
89
|
-
height: 30px;
|
|
90
|
-
font-size: 12px;
|
|
91
|
-
border-radius: 3px;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.small-btn {
|
|
95
|
-
border: none;
|
|
96
|
-
min-width: 60px;
|
|
97
|
-
height: 27px;
|
|
98
|
-
font-size: 11px;
|
|
99
|
-
border-radius: 3px;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
/* type[primary] disable[true] plain[false] */
|
|
103
|
-
/deep/ .primary-btn-div .van-button--primary {
|
|
104
|
-
background-color: var(--scl-blue);
|
|
105
|
-
border: none;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
/* type[primary] disable[false] plain[false] */
|
|
109
|
-
/deep/ .primary-btn-div .van-button--disabled {
|
|
110
|
-
cursor: not-allowed;
|
|
111
|
-
opacity: 1;
|
|
112
|
-
background-color: var(--scl-gray-6);
|
|
113
|
-
color: #000000;
|
|
114
|
-
border: none;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div class="primary-btn-div">
|
|
4
|
+
<van-button :disabled="disabled" :icon="icon" :icon-position="position" :loading="loading"
|
|
5
|
+
:type="'primary'" :class="dynamicClass" size="normal" @click="handleClick"> {{ text }}
|
|
6
|
+
<slot name="extend"></slot>
|
|
7
|
+
</van-button>
|
|
8
|
+
</div>
|
|
9
|
+
</div>
|
|
10
|
+
</template>
|
|
11
|
+
<script>
|
|
12
|
+
|
|
13
|
+
export default {
|
|
14
|
+
name: 'LamboPrimaryBtn',
|
|
15
|
+
components: {},
|
|
16
|
+
props: {
|
|
17
|
+
text: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: '中号按钮'
|
|
20
|
+
},
|
|
21
|
+
position: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: 'left'
|
|
24
|
+
},
|
|
25
|
+
disabled: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: false
|
|
28
|
+
},
|
|
29
|
+
icon: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: null
|
|
32
|
+
},
|
|
33
|
+
loading: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: false
|
|
36
|
+
},
|
|
37
|
+
size: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: "normal"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
data() {
|
|
43
|
+
return {}
|
|
44
|
+
},
|
|
45
|
+
methods: {
|
|
46
|
+
handleClick(event) {
|
|
47
|
+
this.$emit('click', event);
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
computed: {
|
|
51
|
+
dynamicClass() {
|
|
52
|
+
if (this.size === 'big') {
|
|
53
|
+
return {
|
|
54
|
+
"big-btn": true
|
|
55
|
+
}
|
|
56
|
+
} else if (this.size === 'small') {
|
|
57
|
+
return {
|
|
58
|
+
"small-btn": true
|
|
59
|
+
}
|
|
60
|
+
} else {
|
|
61
|
+
return {
|
|
62
|
+
"normal-btn": true
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
created() {
|
|
68
|
+
|
|
69
|
+
},
|
|
70
|
+
mounted() {
|
|
71
|
+
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
</script>
|
|
75
|
+
<style scoped>
|
|
76
|
+
@import "../../styles/index.less";
|
|
77
|
+
|
|
78
|
+
.big-btn {
|
|
79
|
+
border: none;
|
|
80
|
+
width: 100%;
|
|
81
|
+
height: 38px;
|
|
82
|
+
font-size: 14px;
|
|
83
|
+
border-radius: 3px;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.normal-btn {
|
|
87
|
+
border: none;
|
|
88
|
+
min-width: 60px;
|
|
89
|
+
height: 30px;
|
|
90
|
+
font-size: 12px;
|
|
91
|
+
border-radius: 3px;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.small-btn {
|
|
95
|
+
border: none;
|
|
96
|
+
min-width: 60px;
|
|
97
|
+
height: 27px;
|
|
98
|
+
font-size: 11px;
|
|
99
|
+
border-radius: 3px;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/* type[primary] disable[true] plain[false] */
|
|
103
|
+
/deep/ .primary-btn-div .van-button--primary {
|
|
104
|
+
background-color: var(--scl-blue);
|
|
105
|
+
border: none;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/* type[primary] disable[false] plain[false] */
|
|
109
|
+
/deep/ .primary-btn-div .van-button--disabled {
|
|
110
|
+
cursor: not-allowed;
|
|
111
|
+
opacity: 1;
|
|
112
|
+
background-color: var(--scl-gray-6);
|
|
113
|
+
color: #000000;
|
|
114
|
+
border: none;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
</style>
|