@tplc/business 0.1.5 → 0.1.10

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/CHANGELOG.md CHANGED
@@ -2,6 +2,69 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [0.1.10](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.1.6...v0.1.10) (2024-10-27)
6
+
7
+
8
+ ### ✨ Features | 新功能
9
+
10
+ * nav 颜色调整 ([1f7bba0](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/1f7bba00c2386a85a5bfe3b3973ad160c87efd78))
11
+ * 上传图片 ([5ae5dcb](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/5ae5dcbb018ce5c9bbc53290eb0e3e082985d887))
12
+ * 调整usertop ui ([13daab3](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/13daab39ecd02d313cf9c9c61fa8ab79ba10198f))
13
+
14
+
15
+ ### 🚀 Chore | 构建/工程依赖/工具
16
+
17
+ * **release:** 0.1.7 ([69fbf39](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/69fbf39f9e9f1c7b2daf25aa81d7e508a530fa2b))
18
+ * **release:** 0.1.8 ([0cd2b98](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/0cd2b98488ea39de407df1badedf2554f94190f1))
19
+ * **release:** 0.1.9 ([b1dd896](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/b1dd896c4acc76bfc370b39c7d0a24eb729182eb))
20
+
21
+ ### [0.1.9](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.1.6...v0.1.9) (2024-10-26)
22
+
23
+
24
+ ### ✨ Features | 新功能
25
+
26
+ * nav 颜色调整 ([1f7bba0](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/1f7bba00c2386a85a5bfe3b3973ad160c87efd78))
27
+ * 上传图片 ([5ae5dcb](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/5ae5dcbb018ce5c9bbc53290eb0e3e082985d887))
28
+ * 调整usertop ui ([13daab3](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/13daab39ecd02d313cf9c9c61fa8ab79ba10198f))
29
+
30
+
31
+ ### 🚀 Chore | 构建/工程依赖/工具
32
+
33
+ * **release:** 0.1.7 ([69fbf39](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/69fbf39f9e9f1c7b2daf25aa81d7e508a530fa2b))
34
+ * **release:** 0.1.8 ([0cd2b98](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/0cd2b98488ea39de407df1badedf2554f94190f1))
35
+
36
+ ### [0.1.8](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.1.6...v0.1.8) (2024-10-26)
37
+
38
+
39
+ ### ✨ Features | 新功能
40
+
41
+ * nav 颜色调整 ([1f7bba0](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/1f7bba00c2386a85a5bfe3b3973ad160c87efd78))
42
+ * 上传图片 ([5ae5dcb](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/5ae5dcbb018ce5c9bbc53290eb0e3e082985d887))
43
+ * 调整usertop ui ([13daab3](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/13daab39ecd02d313cf9c9c61fa8ab79ba10198f))
44
+
45
+
46
+ ### 🚀 Chore | 构建/工程依赖/工具
47
+
48
+ * **release:** 0.1.7 ([69fbf39](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/69fbf39f9e9f1c7b2daf25aa81d7e508a530fa2b))
49
+
50
+ ### [0.1.7](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.1.6...v0.1.7) (2024-10-26)
51
+
52
+
53
+ ### ✨ Features | 新功能
54
+
55
+ * nav 颜色调整 ([1f7bba0](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/1f7bba00c2386a85a5bfe3b3973ad160c87efd78))
56
+ * 上传图片 ([5ae5dcb](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/5ae5dcbb018ce5c9bbc53290eb0e3e082985d887))
57
+ * 调整usertop ui ([13daab3](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/13daab39ecd02d313cf9c9c61fa8ab79ba10198f))
58
+
59
+ ### [0.1.6](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.0.48...v0.1.6) (2024-10-26)
60
+
61
+
62
+ ### ✨ Features | 新功能
63
+
64
+ * 修改userTop ([8b7f526](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/8b7f526234f0cdaa509d2252118e25a234ba9db3))
65
+ * 修改用户信息页 ([5983018](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/5983018adc1eb2bd9c56e29365cb2547351e256f))
66
+ * 更新api地址 ([bb2854c](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/bb2854c5ec06d8a2ea449c87d0aaab14daf74769))
67
+
5
68
  ### [0.0.48](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.0.47...v0.0.48) (2024-10-26)
6
69
 
7
70
 
@@ -11,22 +11,21 @@
11
11
  }"
12
12
  >
13
13
  <view class="relative overflow-hidden">
14
- <wd-img
15
- v-if="!!item.url"
16
- :width="`${styleGroup == 3 ? transformValueUnit(imageSize) : '100%'}`"
17
- @click="item.mode == 1 && onClickItem(item)"
18
- :src="item.url"
19
- :enable-preview="enablePreview"
20
- mode="widthFix"
21
- :class="`${styleGroup == 3 ? 'overflow-hidden' : 'overflow-hidden block'}`"
22
- :style="{
23
- borderRadius: transformValueUnit(imageRadius),
24
- display: 'block',
25
- }"
26
- />
27
-
14
+ <lcb-action-view v-bind="item.link" custom-class="w-full" v-if="item.url">
15
+ <wd-img
16
+ :width="`${styleGroup == 3 ? transformValueUnit(imageSize) : '100%'}`"
17
+ :src="item.url"
18
+ :enable-preview="enablePreview"
19
+ mode="widthFix"
20
+ :class="`${styleGroup == 3 ? 'overflow-hidden' : 'overflow-hidden block'}`"
21
+ :style="{
22
+ borderRadius: transformValueUnit(imageRadius),
23
+ display: 'block',
24
+ }"
25
+ />
26
+ </lcb-action-view>
28
27
  <view
29
- v-if="!item.url"
28
+ v-else
30
29
  class="flex justify-center items-center bg-light color-gray overflow-hidden"
31
30
  :style="{
32
31
  height: transformValueUnit(styleGroup == 3 ? 300 : 400),
@@ -57,16 +56,6 @@
57
56
  import { LcbImageProps } from '../types'
58
57
  import { transformValueUnit } from '../../../utils/transform'
59
58
 
60
- // defineProps<LcbImageProps>() @click="onClickItem(each.urlObj)"
61
-
62
- function onClickItem(item: any) {
63
- if (item?.link) {
64
- uni.navigateTo({
65
- url: item.link,
66
- })
67
- }
68
- }
69
-
70
59
  const props = withDefaults(defineProps<LcbImageProps>(), {
71
60
  imageMargin: 0,
72
61
  })
@@ -305,7 +305,7 @@ const toBack = () => {
305
305
  background: transparent;
306
306
 
307
307
  .navbar-header {
308
- color: rgb(0, 0, 0) !important;
308
+ color: rgb(0, 0, 0);
309
309
  background-repeat: no-repeat;
310
310
  background-size: contain;
311
311
  }
@@ -42,7 +42,7 @@
42
42
  <view class="text-32rpx font-#333 font-bold mb-20rpx">
43
43
  {{ userStore?.userInfo?.nickName || '微信用户' }}
44
44
  </view>
45
- <view class="flex">
45
+ <view class="flex" @click="toEdit">
46
46
  <view
47
47
  class="flex flex-content-center flex-items-center mt-5px border-style-solid"
48
48
  :style="{
@@ -153,6 +153,11 @@ const onAvatar = (headImgUrl) => {
153
153
  headImgUrl,
154
154
  })
155
155
  }
156
+ const toEdit = () => {
157
+ uni.navigateTo({
158
+ url: '/pages/user/edit',
159
+ })
160
+ }
156
161
  </script>
157
162
  <style lang="scss" scoped>
158
163
  .userPlace {
@@ -28,8 +28,7 @@ export default function useUpload(onSuccess?: (url: string) => void) {
28
28
  count: 1,
29
29
  success: (res) => {
30
30
  const name = res.tempFiles[0].name
31
- const file = res.tempFiles[0]
32
- uploadFile({ data, name, file, onSuccess })
31
+ uploadFile({ data, name, filePath: res.tempFilePaths[0], onSuccess })
33
32
  },
34
33
  fail: (err) => {
35
34
  console.error('uni.chooseImage err->', err)
@@ -43,13 +42,11 @@ export default function useUpload(onSuccess?: (url: string) => void) {
43
42
 
44
43
  export async function uploadFile({
45
44
  filePath,
46
- file,
47
45
  data,
48
46
  name,
49
47
  onSuccess,
50
48
  }: {
51
- filePath?: string
52
- file?: File
49
+ filePath: string
53
50
  data?: Ref<string>
54
51
  name: string
55
52
  onSuccess?: (url: string) => void
@@ -86,7 +83,7 @@ export async function uploadFile({
86
83
  })
87
84
  }
88
85
  // #ifdef H5
89
- fun(file)
86
+ fun(await (await fetch(filePath)).arrayBuffer())
90
87
  // #endif
91
88
 
92
89
  // #ifndef H5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.1.5",
3
+ "version": "0.1.10",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],
package/tsconfig.json ADDED
@@ -0,0 +1,24 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ESNext",
4
+ "useDefineForClassFields": true,
5
+ "noImplicitAny": false,
6
+ "module": "ESNext",
7
+ "moduleResolution": "Node",
8
+ "strict": true,
9
+ "jsx": "preserve",
10
+ "allowSyntheticDefaultImports": true,
11
+ "sourceMap": true,
12
+ "resolveJsonModule": true,
13
+ "isolatedModules": true,
14
+ "esModuleInterop": true,
15
+ "lib": ["ESNext", "DOM"],
16
+ "baseUrl": "./",
17
+ "paths": {
18
+ "@/*": ["./src/*"]
19
+ },
20
+ "types": ["@dcloudio/types", "node", "@tplc/wot/global.d.ts"],
21
+ "skipLibCheck": true
22
+ },
23
+ "exclude": ["node_modules", "scripts"]
24
+ }
@@ -10,13 +10,11 @@ export default function useUpload(onSuccess?: (url: string) => void): {
10
10
  }
11
11
  export declare function uploadFile({
12
12
  filePath,
13
- file,
14
13
  data,
15
14
  name,
16
15
  onSuccess,
17
16
  }: {
18
- filePath?: string
19
- file?: File
17
+ filePath: string
20
18
  data?: Ref<string>
21
19
  name: string
22
20
  onSuccess?: (url: string) => void