wl-design-mobile 0.0.3 → 0.0.5

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.
@@ -0,0 +1,116 @@
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
+ min-width: 60px;
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[info] disable[true] plain[false] */
103
+ /deep/ .info-btn-div .van-button--info {
104
+ background-color: transparent;
105
+ color: var(--scl-blue);
106
+ border: 1px solid var(--scl-blue);
107
+ }
108
+
109
+ /*线框按钮不可用按钮样式*/
110
+ /deep/ .info-btn-div .van-button--disabled {
111
+ opacity: 1;
112
+ color: #000000;
113
+ border: 1px solid var(--scl-gray-6);
114
+ background-color: #ffffff;
115
+ }
116
+ </style>
@@ -0,0 +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
+ min-width: 60px;
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>
@@ -0,0 +1,116 @@
1
+ <template>
2
+ <div>
3
+ <div class="text-btn-div">
4
+ <van-button :disabled="disabled" :icon="icon" :icon-position="position" :loading="loading"
5
+ :type="'default'" :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: 'LamboTextBtn',
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
+ min-width: 60px;
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
+ /*无框类型按钮样式 */
103
+ /deep/ .text-btn-div .van-button--default {
104
+ background: var(--scl-white-1);
105
+ border: none;
106
+ color: var(--scl-blue);
107
+ }
108
+
109
+ /*无框按钮不可用按钮样式*/
110
+ /deep/ .text-btn-div .van-button--disabled {
111
+ opacity: 1;
112
+ color: #000000;
113
+ border: none;
114
+ background-color: var(--scl-white-1);
115
+ }
116
+ </style>
@@ -0,0 +1,46 @@
1
+ <template>
2
+ <div class="button-group">
3
+ <slot></slot>
4
+ </div>
5
+ </template>
6
+ <script>
7
+
8
+ export default {
9
+ name: 'LamboBtnGroup',
10
+ components: {},
11
+ props: {},
12
+ data() {
13
+ return {
14
+
15
+ }
16
+ },
17
+ methods: {
18
+
19
+ },
20
+ created() {
21
+
22
+ },
23
+ mounted() {
24
+
25
+ }
26
+ }
27
+ </script>
28
+ <style scoped>
29
+ @import "../styles/index.less";
30
+
31
+ .button-group {
32
+ display: flex;
33
+ padding: 0 14px;
34
+ background-color: var(--scl-white-1);
35
+ border-bottom: 1px solid rgba(229, 229, 229, 3);
36
+ }
37
+
38
+ .button-group /deep/ .btn-sel {
39
+ flex: 1;
40
+ text-align: center;
41
+ }
42
+
43
+ /*.button-group /deep/ .btn-sel:nth-child(n+2) {
44
+ border-left: 1px solid var(--scl-white-2);
45
+ }*/
46
+ </style>
@@ -0,0 +1,40 @@
1
+ <template>
2
+ <div class="line-parent-div">
3
+ <div class="line-div"></div>
4
+ </div>
5
+ </template>
6
+ <script>
7
+
8
+ export default {
9
+ components: {},
10
+ props: {
11
+ // 后期竖线长度和居中水平,根据插槽元素调整,目前只实现normal大小的。
12
+ // size: {
13
+ // type: String,
14
+ // default: 'normal',
15
+ // }
16
+ },
17
+ data() {
18
+ return {
19
+
20
+ }
21
+ },
22
+ methods: {
23
+
24
+ }
25
+ }
26
+ </script>
27
+ <style scoped>
28
+ .line-parent-div {
29
+ height: 27px;
30
+ width: 1px;
31
+ display: flex;
32
+ align-items: center;
33
+ justify-content: center;
34
+ }
35
+ .line-div {
36
+ height: 12px;
37
+ width: 1px;
38
+ background-color: var(--scl-white-2);
39
+ }
40
+ </style>
@@ -0,0 +1,67 @@
1
+ <template>
2
+ <div class="btn-sel">
3
+ <template v-if="type === 'info'">
4
+ <lambo-info-btn :text="text" :size="size" :position="position" :disabled="disabled" :icon="icon" :loading="loading" @click="handleClick"></lambo-info-btn>
5
+ </template>
6
+ <template v-else-if="type === 'text'">
7
+ <lambo-text-btn :text="text" :size="size" :position="position" :disabled="disabled" :icon="icon" :loading="loading" @click="handleClick"></lambo-text-btn>
8
+ </template>
9
+ <template v-else>
10
+ <lambo-primary-btn :text="text" :size="size" :position="position" :disabled="disabled" :icon="icon" :loading="loading" @click="handleClick"></lambo-primary-btn>
11
+ </template>
12
+ </div>
13
+ </template>
14
+ <script>
15
+
16
+ import LamboInfoBtn from "@/components/lambo/btn/components/lambo-info-btn.vue";
17
+ import LamboTextBtn from "@/components/lambo/btn/components/lambo-text-btn.vue";
18
+ import LamboPrimaryBtn from "@/components/lambo/btn/components/lambo-primary-btn.vue";
19
+
20
+ export default {
21
+ name: "LamboBtn",
22
+ components: {LamboPrimaryBtn, LamboTextBtn, LamboInfoBtn},
23
+ props: {
24
+ type: {
25
+ type: String,
26
+ default: 'primary'
27
+ },
28
+ text: {
29
+ type: String,
30
+ default: '按钮'
31
+ },
32
+ size: {
33
+ type: String,
34
+ default: 'normal',
35
+ },
36
+ position: {
37
+ type: String,
38
+ default: 'left'
39
+ },
40
+ disabled: {
41
+ type: Boolean,
42
+ default: false
43
+ },
44
+ icon: {
45
+ type: String,
46
+ default: null
47
+ },
48
+ loading: {
49
+ type: Boolean,
50
+ default: false
51
+ }
52
+ },
53
+ data() {
54
+ return {
55
+
56
+ }
57
+ },
58
+ methods: {
59
+ handleClick(event) {
60
+ this.$emit('click', event);
61
+ }
62
+ }
63
+ }
64
+ </script>
65
+ <style scoped>
66
+
67
+ </style>
@@ -0,0 +1,106 @@
1
+ <template>
2
+ <div class="btn-sel">
3
+ <lambo-btn :type="type" :text="text" :size="size" :position="position" :disabled="disabled" :icon="icon"
4
+ :loading="loading"
5
+ :class="dynamicClass" @click="onClick"></lambo-btn>
6
+ <ul v-show="show" class="extend-ul">
7
+ <slot></slot>
8
+ </ul>
9
+ </div>
10
+ </template>
11
+ <script>
12
+ import LamboBtn from "@/components/lambo/btn/lambo-btn.vue";
13
+
14
+ export default {
15
+ name: 'LamboExtendBtn',
16
+ components: {LamboBtn},
17
+ props: {
18
+ type: {
19
+ type: String,
20
+ default: 'text'
21
+ },
22
+ text: {
23
+ type: String,
24
+ default: '按钮'
25
+ },
26
+ size: {
27
+ type: String,
28
+ default: 'normal',
29
+ },
30
+ position: {
31
+ type: String,
32
+ default: 'right'
33
+ },
34
+ disabled: {
35
+ type: Boolean,
36
+ default: false
37
+ },
38
+ icon: {
39
+ type: String,
40
+ default: "arrow-down"
41
+ },
42
+ loading: {
43
+ type: Boolean,
44
+ default: false
45
+ }
46
+ },
47
+ data() {
48
+ return {
49
+ show: false,
50
+ }
51
+ },
52
+ methods: {
53
+ onClick() {
54
+ this.show = !this.show;
55
+ },
56
+ },
57
+ computed: {
58
+ dynamicClass() {
59
+ if (this.size === 'big') {
60
+ return {
61
+ "big-btn": true
62
+ }
63
+ } else if (this.size === 'small') {
64
+ return {
65
+ "small-btn": true
66
+ }
67
+ } else {
68
+ return {
69
+ "normal-btn": true
70
+ }
71
+ }
72
+ }
73
+ },
74
+ }
75
+ </script>
76
+ <style scoped>
77
+ @import "../styles/index.less";
78
+
79
+ .big-btn {
80
+ border: none;
81
+ min-width: 60px;
82
+ height: 38px;
83
+ font-size: 14px;
84
+ border-radius: 3px;
85
+ }
86
+
87
+ .normal-btn {
88
+ border: none;
89
+ min-width: 60px;
90
+ height: 30px;
91
+ font-size: 12px;
92
+ border-radius: 3px;
93
+ }
94
+
95
+ .small-btn {
96
+ border: none;
97
+ min-width: 60px;
98
+ height: 27px;
99
+ font-size: 11px;
100
+ border-radius: 3px;
101
+ }
102
+
103
+ .extend-ul {
104
+ z-index: 999;
105
+ }
106
+ </style>
@@ -4,7 +4,7 @@
4
4
  <script>
5
5
 
6
6
  export default {
7
- name: "LamboIconButton",
7
+ name: "LamboIconBtn",
8
8
  props: {
9
9
  icon: String,
10
10
  loading: {
@@ -25,6 +25,8 @@ export default {
25
25
  }
26
26
  },
27
27
  created() {
28
+ },
29
+ mounted() {
28
30
  console.log("LamboDetailGrid -- created -- data:", this.data)
29
31
  this.initData()
30
32
  },
@@ -11,8 +11,7 @@
11
11
  <div slot="right-icon" class="coll-title-icon">
12
12
  <van-icon :color="'#0070D2'" class="van-icon van-cell__right-icon" name="play"
13
13
  style="position:absolute;left: 1px;"/>
14
- <lambo-medium-button :disabled="false" :type="type" style="margin-top: -5px" text="删除"
15
- @click="deleteSpart"></lambo-medium-button>
14
+ <lambo-btn :type="'text'" :text="'删除'" :size="'normal'" style="margin-top: -5px" @click="deleteSpart"></lambo-btn>
16
15
  </div>
17
16
  <lambo-edit-single-select :data="singleKv" :default-item="defaultItem" :required="true"
18
17
  :title="'单选框'"></lambo-edit-single-select>
@@ -22,22 +21,20 @@
22
21
  <slot></slot>
23
22
  </van-collapse-item>
24
23
  </van-collapse>
25
- <lambo-big-button :disabled="false" :type="type" text="新增一条" @click="addSpart"></lambo-big-button>
24
+ <lambo-btn :type="'text'" :text="'新增一条'" :size="'big'" @click="addSpart"></lambo-btn>
26
25
  </div>
27
26
  </template>
28
27
  <script>
29
- import LamboBigButton from '../../btn/lambo-big-button.vue'
30
- import LamboMediumButton from '../../btn/lambo-medium-button.vue'
31
28
  import LamboEditSingleSelect from "../../edit/select/lambo-edit-single-select.vue";
32
29
  import LamboEditMultiSelect from "../../edit/select/lambo-edit-multi-select.vue";
33
30
  import LamboEditInput from "../../edit/select/lambo-edit-input.vue";
31
+ import LamboBtn from "@/components/lambo/btn/lambo-btn.vue";
34
32
 
35
33
  export default {
36
34
  name: 'LamboEditList',
37
35
  components: {
36
+ LamboBtn,
38
37
  LamboEditInput, LamboEditMultiSelect, LamboEditSingleSelect,
39
- LamboBigButton,
40
- LamboMediumButton
41
38
  },
42
39
  props: {},
43
40
  data() {
@@ -11,8 +11,7 @@
11
11
  <div slot="right-icon" class="coll-title-icon">
12
12
  <van-icon :color="'#0070D2'" class="van-icon van-cell__right-icon" name="play"
13
13
  style="position:absolute;left: 1px;"/>
14
- <lambo-medium-button :disabled="false" :type="type" style="margin-top: -5px" text="删除"
15
- @click="deleteSpart(index)"></lambo-medium-button>
14
+ <lambo-btn :type="'text'" :text="'删除'" :size="'normal'" style="margin-top: -5px" @click="deleteSpart(index)"></lambo-btn>
16
15
  </div>
17
16
  <slot></slot>
18
17
  </van-collapse-item>
@@ -20,18 +19,16 @@
20
19
  </div>
21
20
  </template>
22
21
  <script>
23
- import LamboBigButton from '../../btn/lambo-big-button.vue'
24
- import LamboMediumButton from '../../btn/lambo-medium-button.vue'
25
22
  import LamboEditSingleSelect from "../../edit/select/lambo-edit-single-select.vue";
26
23
  import LamboEditMultiSelect from "../../edit/select/lambo-edit-multi-select.vue";
27
24
  import LamboEditInput from "../../edit/select/lambo-edit-input.vue";
25
+ import LamboBtn from "@/components/lambo/btn/lambo-btn.vue";
28
26
 
29
27
  export default {
30
28
  name: 'LamboEditCardGroup',
31
29
  components: {
32
- LamboEditInput, LamboEditMultiSelect, LamboEditSingleSelect,
33
- LamboBigButton,
34
- LamboMediumButton
30
+ LamboBtn,
31
+ LamboEditInput, LamboEditMultiSelect, LamboEditSingleSelect
35
32
  },
36
33
  props: {
37
34
  lineList: {