@kengic/uni 0.5.1 → 0.5.2-beta.1

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.
Files changed (146) hide show
  1. package/dist/uni/uni-ui/uni-badge/uni-badge.vue +222 -219
  2. package/dist/uni/uni-ui/uni-breadcrumb/uni-breadcrumb.vue +29 -29
  3. package/dist/uni/uni-ui/uni-breadcrumb-item/uni-breadcrumb-item.vue +88 -88
  4. package/dist/uni/uni-ui/uni-calendar/calendar.js +936 -532
  5. package/dist/uni/uni-ui/uni-calendar/i18n/en.json +10 -10
  6. package/dist/uni/uni-ui/uni-calendar/i18n/index.js +8 -7
  7. package/dist/uni/uni-ui/uni-calendar/i18n/zh-Hans.json +10 -10
  8. package/dist/uni/uni-ui/uni-calendar/i18n/zh-Hant.json +10 -10
  9. package/dist/uni/uni-ui/uni-calendar/uni-calendar-item.vue +190 -168
  10. package/dist/uni/uni-ui/uni-calendar/uni-calendar.vue +459 -459
  11. package/dist/uni/uni-ui/uni-calendar/util.js +324 -340
  12. package/dist/uni/uni-ui/uni-card/uni-card.vue +8 -1
  13. package/dist/uni/uni-ui/uni-col/uni-col.vue +294 -287
  14. package/dist/uni/uni-ui/uni-collapse/uni-collapse.vue +139 -140
  15. package/dist/uni/uni-ui/uni-collapse-item/uni-collapse-item.vue +381 -378
  16. package/dist/uni/uni-ui/uni-combox/uni-combox.vue +280 -272
  17. package/dist/uni/uni-ui/uni-countdown/i18n/en.json +4 -4
  18. package/dist/uni/uni-ui/uni-countdown/i18n/index.js +8 -7
  19. package/dist/uni/uni-ui/uni-countdown/i18n/zh-Hans.json +4 -4
  20. package/dist/uni/uni-ui/uni-countdown/i18n/zh-Hant.json +4 -4
  21. package/dist/uni/uni-ui/uni-countdown/uni-countdown.vue +249 -257
  22. package/dist/uni/uni-ui/uni-data-checkbox/uni-data-checkbox.vue +832 -813
  23. package/dist/uni/uni-ui/uni-data-picker/keypress.js +42 -42
  24. package/dist/uni/uni-ui/uni-data-picker/uni-data-picker.vue +535 -516
  25. package/dist/uni/uni-ui/uni-data-pickerview/uni-data-picker.js +623 -618
  26. package/dist/uni/uni-ui/uni-data-pickerview/uni-data-pickerview.vue +293 -288
  27. package/dist/uni/uni-ui/uni-data-select/uni-data-select.vue +495 -509
  28. package/dist/uni/uni-ui/uni-dateformat/date-format.js +181 -184
  29. package/dist/uni/uni-ui/uni-dateformat/uni-dateformat.vue +81 -82
  30. package/dist/uni/uni-ui/uni-datetime-picker/calendar-item.vue +176 -170
  31. package/dist/uni/uni-ui/uni-datetime-picker/calendar.vue +926 -920
  32. package/dist/uni/uni-ui/uni-datetime-picker/i18n/en.json +20 -20
  33. package/dist/uni/uni-ui/uni-datetime-picker/i18n/index.js +8 -7
  34. package/dist/uni/uni-ui/uni-datetime-picker/i18n/zh-Hans.json +21 -21
  35. package/dist/uni/uni-ui/uni-datetime-picker/i18n/zh-Hant.json +21 -21
  36. package/dist/uni/uni-ui/uni-datetime-picker/time-picker.vue +921 -926
  37. package/dist/uni/uni-ui/uni-datetime-picker/uni-datetime-picker.vue +1059 -1012
  38. package/dist/uni/uni-ui/uni-datetime-picker/util.js +366 -377
  39. package/dist/uni/uni-ui/uni-drawer/keypress.js +42 -42
  40. package/dist/uni/uni-ui/uni-drawer/uni-drawer.vue +176 -167
  41. package/dist/uni/uni-ui/uni-easyinput/common.js +40 -42
  42. package/dist/uni/uni-ui/uni-easyinput/uni-easyinput.vue +628 -547
  43. package/dist/uni/uni-ui/uni-fab/uni-fab.vue +507 -483
  44. package/dist/uni/uni-ui/uni-fav/i18n/en.json +2 -2
  45. package/dist/uni/uni-ui/uni-fav/i18n/index.js +8 -7
  46. package/dist/uni/uni-ui/uni-fav/i18n/zh-Hans.json +2 -2
  47. package/dist/uni/uni-ui/uni-fav/i18n/zh-Hant.json +2 -2
  48. package/dist/uni/uni-ui/uni-fav/uni-fav.vue +155 -147
  49. package/dist/uni/uni-ui/uni-file-picker/choose-and-upload-file.js +172 -198
  50. package/dist/uni/uni-ui/uni-file-picker/uni-file-picker.vue +636 -634
  51. package/dist/uni/uni-ui/uni-file-picker/upload-file.vue +294 -293
  52. package/dist/uni/uni-ui/uni-file-picker/upload-image.vue +267 -270
  53. package/dist/uni/uni-ui/uni-file-picker/utils.js +81 -82
  54. package/dist/uni/uni-ui/uni-forms/uni-forms.vue +360 -372
  55. package/dist/uni/uni-ui/uni-forms/utils.js +170 -174
  56. package/dist/uni/uni-ui/uni-forms/validate.js +447 -456
  57. package/dist/uni/uni-ui/uni-forms-item/uni-forms-item.vue +497 -497
  58. package/dist/uni/uni-ui/uni-goods-nav/i18n/en.json +4 -4
  59. package/dist/uni/uni-ui/uni-goods-nav/i18n/index.js +8 -7
  60. package/dist/uni/uni-ui/uni-goods-nav/i18n/zh-Hans.json +4 -4
  61. package/dist/uni/uni-ui/uni-goods-nav/i18n/zh-Hant.json +4 -4
  62. package/dist/uni/uni-ui/uni-goods-nav/uni-goods-nav.vue +238 -222
  63. package/dist/uni/uni-ui/uni-grid/uni-grid.vue +134 -134
  64. package/dist/uni/uni-ui/uni-grid-item/uni-grid-item.vue +121 -119
  65. package/dist/uni/uni-ui/uni-group/uni-group.vue +121 -121
  66. package/dist/uni/uni-ui/uni-icons/icons.js +1170 -1168
  67. package/dist/uni/uni-ui/uni-icons/uni-icons.vue +91 -86
  68. package/dist/uni/uni-ui/uni-icons/uniicons.css +166 -166
  69. package/dist/uni/uni-ui/uni-indexed-list/uni-indexed-list-item.vue +129 -129
  70. package/dist/uni/uni-ui/uni-indexed-list/uni-indexed-list.vue +352 -347
  71. package/dist/uni/uni-ui/uni-link/uni-link.vue +134 -119
  72. package/dist/uni/uni-ui/uni-list/uni-list.vue +119 -110
  73. package/dist/uni/uni-ui/uni-list/uni-refresh.vue +14 -14
  74. package/dist/uni/uni-ui/uni-list/uni-refresh.wxs +14 -14
  75. package/dist/uni/uni-ui/uni-list-ad/uni-list-ad.vue +101 -95
  76. package/dist/uni/uni-ui/uni-list-chat/uni-list-chat.scss +18 -18
  77. package/dist/uni/uni-ui/uni-list-chat/uni-list-chat.vue +602 -586
  78. package/dist/uni/uni-ui/uni-list-item/uni-list-item.vue +507 -503
  79. package/dist/uni/uni-ui/uni-load-more/i18n/en.json +3 -3
  80. package/dist/uni/uni-ui/uni-load-more/i18n/index.js +8 -7
  81. package/dist/uni/uni-ui/uni-load-more/i18n/zh-Hans.json +3 -3
  82. package/dist/uni/uni-ui/uni-load-more/i18n/zh-Hant.json +3 -3
  83. package/dist/uni/uni-ui/uni-load-more/uni-load-more.vue +402 -392
  84. package/dist/uni/uni-ui/uni-nav-bar/uni-nav-bar.vue +328 -330
  85. package/dist/uni/uni-ui/uni-nav-bar/uni-status-bar.vue +17 -17
  86. package/dist/uni/uni-ui/uni-notice-bar/uni-notice-bar.vue +422 -401
  87. package/dist/uni/uni-ui/uni-number-box/uni-number-box.vue +211 -205
  88. package/dist/uni/uni-ui/uni-pagination/i18n/en.json +3 -3
  89. package/dist/uni/uni-ui/uni-pagination/i18n/es.json +3 -3
  90. package/dist/uni/uni-ui/uni-pagination/i18n/fr.json +3 -3
  91. package/dist/uni/uni-ui/uni-pagination/i18n/index.js +12 -11
  92. package/dist/uni/uni-ui/uni-pagination/i18n/zh-Hans.json +3 -3
  93. package/dist/uni/uni-ui/uni-pagination/i18n/zh-Hant.json +3 -3
  94. package/dist/uni/uni-ui/uni-pagination/uni-pagination.vue +450 -433
  95. package/dist/uni/uni-ui/uni-popup/uni-popup.vue +404 -404
  96. package/dist/uni/uni-ui/uni-popup-dialog/keypress.js +42 -42
  97. package/dist/uni/uni-ui/uni-popup-dialog/uni-popup-dialog.vue +1 -0
  98. package/dist/uni/uni-ui/uni-popup-message/uni-popup-message.vue +126 -125
  99. package/dist/uni/uni-ui/uni-popup-share/uni-popup-share.vue +172 -172
  100. package/dist/uni/uni-ui/uni-rate/uni-rate.vue +343 -347
  101. package/dist/uni/uni-ui/uni-row/uni-row.vue +180 -182
  102. package/dist/uni/uni-ui/uni-scss/changelog.md +11 -4
  103. package/dist/uni/uni-ui/uni-scss/package.json +73 -73
  104. package/dist/uni/uni-ui/uni-scss/readme.md +2 -1
  105. package/dist/uni/uni-ui/uni-scss/styles/setting/_border.scss +2 -2
  106. package/dist/uni/uni-ui/uni-scss/styles/setting/_color.scss +46 -47
  107. package/dist/uni/uni-ui/uni-scss/styles/setting/_radius.scss +49 -49
  108. package/dist/uni/uni-ui/uni-scss/styles/setting/_space.scss +52 -53
  109. package/dist/uni/uni-ui/uni-scss/styles/setting/_styles.scss +142 -147
  110. package/dist/uni/uni-ui/uni-scss/styles/setting/_text.scss +20 -20
  111. package/dist/uni/uni-ui/uni-scss/styles/setting/_variables.scss +111 -95
  112. package/dist/uni/uni-ui/uni-scss/styles/tools/functions.scss +28 -18
  113. package/dist/uni/uni-ui/uni-scss/theme.scss +10 -7
  114. package/dist/uni/uni-ui/uni-scss/variables.scss +42 -24
  115. package/dist/uni/uni-ui/uni-search-bar/i18n/en.json +3 -3
  116. package/dist/uni/uni-ui/uni-search-bar/i18n/index.js +8 -7
  117. package/dist/uni/uni-ui/uni-search-bar/i18n/zh-Hans.json +2 -2
  118. package/dist/uni/uni-ui/uni-search-bar/i18n/zh-Hant.json +2 -2
  119. package/dist/uni/uni-ui/uni-search-bar/uni-search-bar.vue +290 -281
  120. package/dist/uni/uni-ui/uni-section/uni-section.vue +149 -146
  121. package/dist/uni/uni-ui/uni-segmented-control/uni-segmented-control.vue +141 -131
  122. package/dist/uni/uni-ui/uni-steps/uni-steps.vue +255 -236
  123. package/dist/uni/uni-ui/uni-swipe-action/uni-swipe-action.vue +51 -51
  124. package/dist/uni/uni-ui/uni-swipe-action-item/bindingx.js +276 -282
  125. package/dist/uni/uni-ui/uni-swipe-action-item/isPC.js +10 -10
  126. package/dist/uni/uni-ui/uni-swipe-action-item/mpalipay.js +182 -187
  127. package/dist/uni/uni-ui/uni-swipe-action-item/mpother.js +235 -244
  128. package/dist/uni/uni-ui/uni-swipe-action-item/mpwxs.js +70 -75
  129. package/dist/uni/uni-ui/uni-swipe-action-item/render.js +238 -247
  130. package/dist/uni/uni-ui/uni-swipe-action-item/uni-swipe-action-item.vue +387 -313
  131. package/dist/uni/uni-ui/uni-swipe-action-item/wx.wxs +206 -215
  132. package/dist/uni/uni-ui/uni-swiper-dot/uni-swiper-dot.vue +241 -197
  133. package/dist/uni/uni-ui/uni-table/uni-table.vue +445 -447
  134. package/dist/uni/uni-ui/uni-tag/uni-tag.vue +234 -244
  135. package/dist/uni/uni-ui/uni-tbody/uni-tbody.vue +20 -23
  136. package/dist/uni/uni-ui/uni-td/uni-td.vue +79 -80
  137. package/dist/uni/uni-ui/uni-th/filter-dropdown.vue +510 -503
  138. package/dist/uni/uni-ui/uni-th/uni-th.vue +289 -273
  139. package/dist/uni/uni-ui/uni-thead/uni-thead.vue +115 -114
  140. package/dist/uni/uni-ui/uni-title/uni-title.vue +151 -154
  141. package/dist/uni/uni-ui/uni-tooltip/uni-tooltip.vue +55 -60
  142. package/dist/uni/uni-ui/uni-tr/table-checkbox.vue +162 -163
  143. package/dist/uni/uni-ui/uni-tr/uni-tr.vue +158 -157
  144. package/dist/uni/uni-ui/uni-transition/createAnimation.js +130 -113
  145. package/dist/uni/uni-ui/uni-transition/uni-transition.vue +274 -272
  146. package/package.json +1 -1
@@ -1,129 +1,130 @@
1
1
  <template>
2
- <!-- #ifdef H5 -->
3
- <thead class="uni-table-thead">
4
- <tr class="uni-table-tr">
5
- <th :rowspan="rowspan" colspan="1" class="checkbox" :class="{ 'tr-table--border': border }">
6
- <table-checkbox :indeterminate="indeterminate" :checked="checked" @checkboxSelected="checkboxSelected"></table-checkbox>
7
- </th>
8
- </tr>
9
- <slot></slot>
10
- </thead>
11
- <!-- #endif -->
12
- <!-- #ifndef H5 -->
13
- <view class="uni-table-thead"><slot></slot></view>
14
- <!-- #endif -->
2
+ <!-- #ifdef H5 -->
3
+ <thead class="uni-table-thead">
4
+ <tr class="uni-table-tr">
5
+ <th :rowspan="rowspan" colspan="1" class="checkbox" :class="{ 'tr-table--border': border }">
6
+ <table-checkbox :indeterminate="indeterminate" :checked="checked" @checkboxSelected="checkboxSelected"></table-checkbox>
7
+ </th>
8
+ </tr>
9
+ <slot></slot>
10
+ </thead>
11
+ <!-- #endif -->
12
+ <!-- #ifndef H5 -->
13
+ <view class="uni-table-thead"><slot></slot></view>
14
+ <!-- #endif -->
15
15
  </template>
16
16
 
17
17
  <script>
18
- import tableCheckbox from '../uni-tr/table-checkbox.vue'
19
- export default {
20
- name: 'uniThead',
21
- components: {
22
- tableCheckbox
23
- },
24
- options: {
25
- virtualHost: true
26
- },
27
- data() {
28
- return {
29
- border: false,
30
- selection: false,
31
- rowspan: 1,
32
- indeterminate: false,
33
- checked: false
34
- }
35
- },
36
- created() {
37
- this.root = this.getTable()
38
- // #ifdef H5
39
- this.root.theadChildren = this
40
- // #endif
41
- this.border = this.root.border
42
- this.selection = this.root.type
43
- },
44
- methods: {
45
- init(self) {
46
- this.rowspan++
47
- },
48
- checkboxSelected(e) {
49
- this.indeterminate = false
50
- const backIndexData = this.root.backIndexData
51
- const data = this.root.trChildren.filter(v => !v.disabled && v.keyValue)
52
- if (backIndexData.length === data.length) {
53
- this.checked = false
54
- this.root.clearSelection()
55
- } else {
56
- this.checked = true
57
- this.root.selectionAll()
58
- }
59
- },
60
- /**
61
- * 获取父元素实例
62
- */
63
- getTable(name = 'uniTable') {
64
- let parent = this.$parent
65
- let parentName = parent.$options.name
66
- while (parentName !== name) {
67
- parent = parent.$parent
68
- if (!parent) return false
69
- parentName = parent.$options.name
70
- }
71
- return parent
72
- }
73
- }
74
- }
18
+ import tableCheckbox from '../uni-tr/table-checkbox.vue';
19
+
20
+ export default {
21
+ name: 'uniThead',
22
+ components: {
23
+ tableCheckbox,
24
+ },
25
+ options: {
26
+ virtualHost: true,
27
+ },
28
+ data() {
29
+ return {
30
+ border: false,
31
+ selection: false,
32
+ rowspan: 1,
33
+ indeterminate: false,
34
+ checked: false,
35
+ };
36
+ },
37
+ created() {
38
+ this.root = this.getTable();
39
+ // #ifdef H5
40
+ this.root.theadChildren = this;
41
+ // #endif
42
+ this.border = this.root.border;
43
+ this.selection = this.root.type;
44
+ },
45
+ methods: {
46
+ init(self) {
47
+ this.rowspan++;
48
+ },
49
+ checkboxSelected(e) {
50
+ this.indeterminate = false;
51
+ const backIndexData = this.root.backIndexData;
52
+ const data = this.root.trChildren.filter((v) => !v.disabled && v.keyValue);
53
+ if (backIndexData.length === data.length) {
54
+ this.checked = false;
55
+ this.root.clearSelection();
56
+ } else {
57
+ this.checked = true;
58
+ this.root.selectionAll();
59
+ }
60
+ },
61
+ /**
62
+ * 获取父元素实例
63
+ */
64
+ getTable(name = 'uniTable') {
65
+ let parent = this.$parent;
66
+ let parentName = parent.$options.name;
67
+ while (parentName !== name) {
68
+ parent = parent.$parent;
69
+ if (!parent) return false;
70
+ parentName = parent.$options.name;
71
+ }
72
+ return parent;
73
+ },
74
+ },
75
+ };
75
76
  </script>
76
77
 
77
78
  <style lang="scss">
78
- $border-color: #ebeef5;
79
+ $border-color: #ebeef5;
79
80
 
80
- .uni-table-thead {
81
- display: table-header-group;
82
- }
81
+ .uni-table-thead {
82
+ display: table-header-group;
83
+ }
83
84
 
84
- .uni-table-tr {
85
- /* #ifndef APP-NVUE */
86
- display: table-row;
87
- transition: all 0.3s;
88
- box-sizing: border-box;
89
- /* #endif */
90
- border: 1px red solid;
91
- background-color: #fafafa;
92
- }
85
+ .uni-table-tr {
86
+ /* #ifndef APP-NVUE */
87
+ display: table-row;
88
+ transition: all 0.3s;
89
+ box-sizing: border-box;
90
+ /* #endif */
91
+ border: 1px red solid;
92
+ background-color: #fafafa;
93
+ }
93
94
 
94
- .checkbox {
95
- padding: 0 8px;
96
- width: 26px;
97
- padding-left: 12px;
98
- /* #ifndef APP-NVUE */
99
- display: table-cell;
100
- vertical-align: middle;
101
- /* #endif */
102
- color: #333;
103
- font-weight: 500;
104
- border-bottom: 1px $border-color solid;
105
- font-size: 14px;
106
- // text-align: center;
107
- }
95
+ .checkbox {
96
+ padding: 0 8px;
97
+ width: 26px;
98
+ padding-left: 12px;
99
+ /* #ifndef APP-NVUE */
100
+ display: table-cell;
101
+ vertical-align: middle;
102
+ /* #endif */
103
+ color: #333;
104
+ font-weight: 500;
105
+ border-bottom: 1px $border-color solid;
106
+ font-size: 14px;
107
+ // text-align: center;
108
+ }
108
109
 
109
- .tr-table--border {
110
- border-right: 1px $border-color solid;
111
- }
110
+ .tr-table--border {
111
+ border-right: 1px $border-color solid;
112
+ }
112
113
 
113
- /* #ifndef APP-NVUE */
114
- .uni-table-tr {
115
- ::v-deep .uni-table-th {
116
- &.table--border:last-child {
117
- // border-right: none;
118
- }
119
- }
114
+ /* #ifndef APP-NVUE */
115
+ .uni-table-tr {
116
+ ::v-deep .uni-table-th {
117
+ &.table--border:last-child {
118
+ // border-right: none;
119
+ }
120
+ }
120
121
 
121
- ::v-deep .uni-table-td {
122
- &.table--border:last-child {
123
- // border-right: none;
124
- }
125
- }
126
- }
122
+ ::v-deep .uni-table-td {
123
+ &.table--border:last-child {
124
+ // border-right: none;
125
+ }
126
+ }
127
+ }
127
128
 
128
- /* #endif */
129
+ /* #endif */
129
130
  </style>
@@ -1,171 +1,168 @@
1
1
  <template>
2
- <view class="uni-title__box" :style="{'align-items':textAlign}">
3
- <text class="uni-title__base" :class="['uni-'+type]" :style="{'color':color}">{{title}}</text>
4
- </view>
2
+ <view class="uni-title__box" :style="{ 'align-items': textAlign }">
3
+ <text class="uni-title__base" :class="['uni-' + type]" :style="{ color: color }">{{ title }}</text>
4
+ </view>
5
5
  </template>
6
6
 
7
7
  <script>
8
- /**
9
- * Title 标题
10
- * @description 标题,通常用于记录页面标题,使用当前组件,uni-app 如果开启统计,将会自动统计页面标题
11
- * @tutorial https://ext.dcloud.net.cn/plugin?id=1066
12
- * @property {String} type = [h1|h2|h3|h4|h5] 标题类型
13
- * @value h1 一级标题
14
- * @value h2 二级标题
15
- * @value h3 三级标题
16
- * @value h4 四级标题
17
- * @value h5 五级标题
18
- * @property {String} title 标题内容
19
- * @property {String} align = [left|center|right] 对齐方式
20
- * @value left 做对齐
21
- * @value center 居中对齐
22
- * @value right 右对齐
23
- * @property {String} color 字体颜色
24
- * @property {Boolean} stat = [true|false] 是否开启统计功能呢,如不填写type值,默认为开启,填写 type 属性,默认为关闭
25
- */
26
- export default {
27
- name:"UniTitle",
28
- props: {
29
- type: {
30
- type: String,
31
- default: ''
32
- },
33
- title: {
34
- type: String,
35
- default: ''
36
- },
37
- align: {
38
- type: String,
39
- default: 'left'
40
- },
41
- color: {
42
- type: String,
43
- default: '#333333'
44
- },
45
- stat: {
46
- type: [Boolean, String],
47
- default: ''
48
- }
49
- },
50
- data() {
51
- return {
8
+ /**
9
+ * Title 标题
10
+ * @description 标题,通常用于记录页面标题,使用当前组件,uni-app 如果开启统计,将会自动统计页面标题
11
+ * @tutorial https://ext.dcloud.net.cn/plugin?id=1066
12
+ * @property {String} type = [h1|h2|h3|h4|h5] 标题类型
13
+ * @value h1 一级标题
14
+ * @value h2 二级标题
15
+ * @value h3 三级标题
16
+ * @value h4 四级标题
17
+ * @value h5 五级标题
18
+ * @property {String} title 标题内容
19
+ * @property {String} align = [left|center|right] 对齐方式
20
+ * @value left 做对齐
21
+ * @value center 居中对齐
22
+ * @value right 右对齐
23
+ * @property {String} color 字体颜色
24
+ * @property {Boolean} stat = [true|false] 是否开启统计功能呢,如不填写type值,默认为开启,填写 type 属性,默认为关闭
25
+ */
26
+ export default {
27
+ name: 'UniTitle',
28
+ props: {
29
+ type: {
30
+ type: String,
31
+ default: '',
32
+ },
33
+ title: {
34
+ type: String,
35
+ default: '',
36
+ },
37
+ align: {
38
+ type: String,
39
+ default: 'left',
40
+ },
41
+ color: {
42
+ type: String,
43
+ default: '#333333',
44
+ },
45
+ stat: {
46
+ type: [Boolean, String],
47
+ default: '',
48
+ },
49
+ },
50
+ data() {
51
+ return {};
52
+ },
53
+ computed: {
54
+ textAlign() {
55
+ let align = 'center';
56
+ switch (this.align) {
57
+ case 'left':
58
+ align = 'flex-start';
59
+ break;
60
+ case 'center':
61
+ align = 'center';
62
+ break;
63
+ case 'right':
64
+ align = 'flex-end';
65
+ break;
66
+ }
67
+ return align;
68
+ },
69
+ },
70
+ watch: {
71
+ title(newVal) {
72
+ if (this.isOpenStat()) {
73
+ // 上报数据
74
+ if (uni.report) {
75
+ uni.report('title', this.title);
76
+ }
77
+ }
78
+ },
79
+ },
80
+ mounted() {
81
+ if (this.isOpenStat()) {
82
+ // 上报数据
83
+ if (uni.report) {
84
+ uni.report('title', this.title);
85
+ }
86
+ }
87
+ },
88
+ methods: {
89
+ isOpenStat() {
90
+ if (this.stat === '') {
91
+ this.isStat = false;
92
+ }
93
+ let stat_type = (typeof this.stat === 'boolean' && this.stat) || (typeof this.stat === 'string' && this.stat !== '');
94
+ if (this.type === '') {
95
+ this.isStat = true;
96
+ if (this.stat.toString() === 'false') {
97
+ this.isStat = false;
98
+ }
99
+ }
52
100
 
53
- };
54
- },
55
- computed: {
56
- textAlign() {
57
- let align = 'center';
58
- switch (this.align) {
59
- case 'left':
60
- align = 'flex-start'
61
- break;
62
- case 'center':
63
- align = 'center'
64
- break;
65
- case 'right':
66
- align = 'flex-end'
67
- break;
68
- }
69
- return align
70
- }
71
- },
72
- watch: {
73
- title(newVal) {
74
- if (this.isOpenStat()) {
75
- // 上报数据
76
- if (uni.report) {
77
- uni.report('title', this.title)
78
- }
79
- }
80
- }
81
- },
82
- mounted() {
83
- if (this.isOpenStat()) {
84
- // 上报数据
85
- if (uni.report) {
86
- uni.report('title', this.title)
87
- }
88
- }
89
- },
90
- methods: {
91
- isOpenStat() {
92
- if (this.stat === '') {
93
- this.isStat = false
94
- }
95
- let stat_type = (typeof(this.stat) === 'boolean' && this.stat) || (typeof(this.stat) === 'string' && this.stat !==
96
- '')
97
- if (this.type === "") {
98
- this.isStat = true
99
- if (this.stat.toString() === 'false') {
100
- this.isStat = false
101
- }
102
- }
103
-
104
- if (this.type !== '') {
105
- this.isStat = true
106
- if (stat_type) {
107
- this.isStat = true
108
- } else {
109
- this.isStat = false
110
- }
111
- }
112
- return this.isStat
113
- }
114
- }
115
- }
101
+ if (this.type !== '') {
102
+ this.isStat = true;
103
+ if (stat_type) {
104
+ this.isStat = true;
105
+ } else {
106
+ this.isStat = false;
107
+ }
108
+ }
109
+ return this.isStat;
110
+ },
111
+ },
112
+ };
116
113
  </script>
117
114
 
118
115
  <style>
119
- /* .uni-title {
116
+ /* .uni-title {
120
117
 
121
118
  } */
122
- .uni-title__box {
123
- /* #ifndef APP-NVUE */
124
- display: flex;
125
- /* #endif */
126
- flex-direction: column;
127
- align-items: flex-start;
128
- justify-content: center;
129
- padding: 8px 0;
130
- flex: 1;
131
- }
119
+ .uni-title__box {
120
+ /* #ifndef APP-NVUE */
121
+ display: flex;
122
+ /* #endif */
123
+ flex-direction: column;
124
+ align-items: flex-start;
125
+ justify-content: center;
126
+ padding: 8px 0;
127
+ flex: 1;
128
+ }
132
129
 
133
- .uni-title__base {
134
- font-size: 15px;
135
- color: #333;
136
- font-weight: 500;
137
- }
130
+ .uni-title__base {
131
+ font-size: 15px;
132
+ color: #333;
133
+ font-weight: 500;
134
+ }
138
135
 
139
- .uni-h1 {
140
- font-size: 20px;
141
- color: #333;
142
- font-weight: bold;
143
- }
136
+ .uni-h1 {
137
+ font-size: 20px;
138
+ color: #333;
139
+ font-weight: bold;
140
+ }
144
141
 
145
- .uni-h2 {
146
- font-size: 18px;
147
- color: #333;
148
- font-weight: bold;
149
- }
142
+ .uni-h2 {
143
+ font-size: 18px;
144
+ color: #333;
145
+ font-weight: bold;
146
+ }
150
147
 
151
- .uni-h3 {
152
- font-size: 16px;
153
- color: #333;
154
- font-weight: bold;
155
- /* font-weight: 400; */
156
- }
148
+ .uni-h3 {
149
+ font-size: 16px;
150
+ color: #333;
151
+ font-weight: bold;
152
+ /* font-weight: 400; */
153
+ }
157
154
 
158
- .uni-h4 {
159
- font-size: 14px;
160
- color: #333;
161
- font-weight: bold;
162
- /* font-weight: 300; */
163
- }
155
+ .uni-h4 {
156
+ font-size: 14px;
157
+ color: #333;
158
+ font-weight: bold;
159
+ /* font-weight: 300; */
160
+ }
164
161
 
165
- .uni-h5 {
166
- font-size: 12px;
167
- color: #333;
168
- font-weight: bold;
169
- /* font-weight: 200; */
170
- }
162
+ .uni-h5 {
163
+ font-size: 12px;
164
+ color: #333;
165
+ font-weight: bold;
166
+ /* font-weight: 200; */
167
+ }
171
168
  </style>