mali-applet-ui 1.0.42 → 1.0.43

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
  深圳叮当科技技术有限公司
@@ -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>
@@ -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>
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.43",
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",