mali-applet-ui 1.0.42 → 1.0.45

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 CHANGED
@@ -2,16 +2,12 @@
2
2
 
3
3
  Mali-Applet-UI 码里云小程序组件库
4
4
 
5
- ## 初始化/更新依赖
5
+ ## 运行项目
6
6
 
7
7
  ```
8
8
  npm run update
9
9
  ```
10
10
 
11
- ## 运行项目
12
-
13
- ### 本地环境
14
-
15
11
  #### 运行(微信小程序)
16
12
 
17
13
  ```
@@ -24,6 +20,11 @@ npm run serve:mp-weixin
24
20
  npm run serve:mp-dingtalk
25
21
  ```
26
22
 
23
+ ### 打开开发者工具导入项目
24
+
25
+ 例如微信开发者工具,导入本地项目/dist/dev/mp-weixin
26
+ 取名规范:[项目名]-[平台]-[环境]
27
+
27
28
  ## 发布npm
28
29
 
29
30
  需要先登陆NPM
@@ -32,31 +33,4 @@ npm run serve:mp-dingtalk
32
33
  npm run release
33
34
  ```
34
35
 
35
- ## 安装
36
-
37
- ```bash
38
- # npm方式安装
39
- npm install mali-applet-ui
40
- ```
41
-
42
- ## 按需引入
43
-
44
- 1. `pages.json`配置easycom规则(按需引入)
45
-
46
- ```js
47
- // pages.json
48
- {
49
- "easycom": {
50
- "autoscan": true,
51
- "custom": {
52
- "^ml-(.*)": "mali-applet-ui/lib/components/ml-$1/ml-$1.vue"
53
- }
54
- },
55
- // 此为本身已有的内容
56
- "pages": [
57
- // ......
58
- ]
59
- }
60
- ```
61
-
62
36
  深圳叮当科技技术有限公司
@@ -38,7 +38,7 @@ export default {
38
38
 
39
39
  <style lang="scss">
40
40
  .ml-card {
41
- margin-bottom: 20rpx;
41
+ margin-bottom: $ml-page-interval-margin;
42
42
  border-radius: $ml-border-radius;
43
43
  &.is-bg {
44
44
  background: #fff;
@@ -45,7 +45,7 @@ export default {
45
45
  display: block;
46
46
  border-radius: $ml-border-radius;
47
47
  background: #ffffff;
48
- margin-bottom: 20rpx;
48
+ margin-bottom: $ml-page-interval-margin;
49
49
  color: $ml-font-color;
50
50
  .ml-chunk-group-title {
51
51
  display: flex;
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <view class="ml-chunk-item" :class="[className || '', span && !width ? `span-${span}` : '', align ? `align-${align}` : '', {'is-fixed': span || width, 'is-vertical': isVertical}]" :style="styles" @click="clickEvent" @tap="tapEvent">
2
+ <view class="ml-chunk-item" :class="[className || '', span && !width ? `span-${span}` : '', itemAlign ? `align-${itemAlign}` : '', {'is-fixed': span || width, 'is-vertical': isVertical}]" :style="styles" @click="clickEvent" @tap="tapEvent">
3
3
  <slot></slot>
4
4
  </view>
5
5
  </template>
@@ -28,6 +28,12 @@ export default {
28
28
  isVertical () {
29
29
  return this.chunk ? this.chunk.vertical : ''
30
30
  },
31
+ itemAlign () {
32
+ if (this.align) {
33
+ return this.align
34
+ }
35
+ return this.isVertical ? '' : 'center'
36
+ },
31
37
  styles () {
32
38
  return this.width ? `width: ${this.width};` : ''
33
39
  }
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <view class="ml-drawer" :class="[className || '', `placement-${placement || 'bottom'}`, {'is-visible': visible, 'is-animate': isAnimate}]" @tap="tapMaskEvent">
3
3
  <view v-if="visible" class="ml-drawer-warpper" @tap.stop.prevent>
4
- <view v-if="showHeader" class="ml-drawer-header">
4
+ <view v-if="title || showHeader" class="ml-drawer-header">
5
5
  <slot name="header">
6
6
  <view v-if="title" class="ml-drawer-header-title">{{ title }}</view>
7
7
  </slot>
@@ -30,7 +30,7 @@ export default {
30
30
 
31
31
  <style lang="scss">
32
32
  .ml-form-group {
33
- margin-bottom: 20rpx;
33
+ margin-bottom: $ml-page-interval-margin;
34
34
  font-size: $ml-base-font-size;
35
35
  .ml-form-group-header {
36
36
  display: flex;
@@ -268,7 +268,7 @@ export default {
268
268
 
269
269
  <style lang="scss">
270
270
  .ml-list-group {
271
- margin-bottom: 20rpx;
271
+ margin-bottom: $ml-page-interval-margin;
272
272
  color: $uni-text-color;
273
273
  font-size: $ml-base-font-size;
274
274
  .ml-list-group-content {
@@ -169,7 +169,7 @@ export default {
169
169
  // #endif
170
170
  }
171
171
  &.is-padding {
172
- margin-bottom: 20rpx;
172
+ margin-bottom: $ml-page-interval-margin;
173
173
  }
174
174
  &:last-child {
175
175
  margin-bottom: 0;
@@ -156,7 +156,7 @@ export default {
156
156
  .ml-list-menu-group {
157
157
  display: flex;
158
158
  flex-direction: column;
159
- margin-bottom: 20rpx;
159
+ margin-bottom: $ml-page-interval-margin;
160
160
  .ml-list-menu-group-title {
161
161
  display: flex;
162
162
  flex-direction: row;
@@ -23,10 +23,10 @@ export default {
23
23
  },
24
24
  watch: {
25
25
  value () {
26
- this.value()
26
+ this.load()
27
27
  }
28
28
  },
29
- created () {
29
+ mounted () {
30
30
  this.load()
31
31
  },
32
32
  methods: {
@@ -42,4 +42,4 @@ export default {
42
42
  display: block;
43
43
  word-break: break-word;
44
44
  }
45
- </style>
45
+ </style>
@@ -41,46 +41,46 @@ export default {
41
41
  border-radius: $ml-border-radius;
42
42
  font-size: $ml-describe-font-size;
43
43
  &.ss-primary {
44
- color: #ffffff;
45
- background: $uni-color-primary;
44
+ color: $uni-color-primary;
45
+ background: #e0efff;
46
46
  }
47
47
  &.ss-success {
48
- color: #ffffff;
49
- background: $uni-color-success;
48
+ color: $uni-color-success;
49
+ background: #e0f5e8;
50
50
  }
51
51
  &.ss-info {
52
- background: #909399;
52
+ background: #eaebed;
53
53
  }
54
54
  &.ss-warning {
55
55
  color: #ffffff;
56
56
  background: $uni-color-warning;
57
57
  }
58
58
  &.ss-danger {
59
- color: #ffffff;
60
- background: $uni-color-error;
59
+ color: $uni-color-error;
60
+ background: #ffeaec;
61
61
  }
62
62
  &.ss-gray {
63
63
  background: $ml-gray-color;
64
64
  }
65
65
  &.ss-blue {
66
- color: #ffffff;
67
- background: $ml-blue-color;
66
+ color: $ml-blue-color;
67
+ background: #e0efff;
68
68
  }
69
69
  &.ss-green {
70
- color: #ffffff;
71
- background: $ml-green-color;
70
+ color: $ml-green-color;
71
+ background: #e0f5e8;
72
72
  }
73
73
  &.ss-pink {
74
- color: #ffffff;
75
- background: $ml-pink-color;
74
+ color: $ml-pink-color;
75
+ background: #ffeaec;
76
76
  }
77
77
  &.ss-orange {
78
- color: #ffffff;
79
- background: $ml-orange-color;
78
+ color: $ml-orange-color;
79
+ background: #ffedd6;
80
80
  }
81
81
  &.ss-purple {
82
- color: #ffffff;
83
- background: $ml-purple-color;
82
+ color: $ml-purple-color;
83
+ background: #f2e9ff;
84
84
  }
85
85
  .ml-status-tag-left-icon,
86
86
  .ml-status-tag-right-icon,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mali-applet-ui",
3
- "version": "1.0.42",
3
+ "version": "1.0.45",
4
4
  "description": "码里云小程序组件库",
5
5
  "files": [
6
6
  "lib",
@@ -19,13 +19,14 @@
19
19
  "update": "npm install --legacy-peer-deps",
20
20
  "eslint-fix": "eslint --fix --ext .vue,.js src",
21
21
  "build:custom": "npm run run-before && cross-env NODE_ENV=production uniapp-cli custom",
22
+ "build:mp-alipay": "npm run run-before && cross-env NODE_ENV=production UNI_PLATFORM=mp-alipay vue-cli-service uni-build",
22
23
  "build:mp-dingtalk": "npm run run-before && gulp load_build_dingtalk && cross-env NODE_ENV=production UNI_OUTPUT_DIR=dist/build/mp-dingtalk uniapp-cli custom mp-dingtalk",
23
24
  "build:mp-weixin": "npm run run-before && cross-env NODE_ENV=production UNI_PLATFORM=mp-weixin vue-cli-service uni-build",
24
25
  "serve:custom": "npm run run-before && cross-env NODE_ENV=development uniapp-cli custom",
25
26
  "serve:mp-weixin": "npm run run-before && cross-env NODE_ENV=development UNI_PLATFORM=mp-weixin vue-cli-service uni-build --watch",
27
+ "serve:mp-alipay": "npm run run-before && cross-env NODE_ENV=development UNI_PLATFORM=mp-alipay vue-cli-service uni-build --watch",
26
28
  "serve:mp-dingtalk": "npm run run-before && gulp load_dev_dingtalk && cross-env NODE_ENV=development UNI_OUTPUT_DIR=dist/dev/mp-dingtalk uniapp-cli custom mp-dingtalk",
27
- "run-before": "node script/run-before.js",
28
- "clear": "gulp clear_temp"
29
+ "run-before": "node script/run-before.js"
29
30
  },
30
31
  "devDependencies": {
31
32
  "@dcloudio/uni-app-plus": "^2.0.1-36420220922003",