@tplc/business 0.0.2 → 0.0.4

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.
@@ -28,7 +28,7 @@
28
28
  }"
29
29
  >
30
30
  <div v-if="iconType === 0" class="flex justify-center items-center">
31
- <wd-icon class-prefix="iconfont" :name="item.icon" size="36" />
31
+ <wd-icon class-prefix="iconfont" :name="item.icon!" size="36" />
32
32
  </div>
33
33
  </div>
34
34
  <view class="title">{{ item.title }}</view>
@@ -3,6 +3,7 @@
3
3
  class="customNavigation"
4
4
  :class="{
5
5
  immersiveTop: topStyle === 2,
6
+ paddingTop,
6
7
  }"
7
8
  >
8
9
  <view
@@ -24,7 +25,6 @@
24
25
  <view class="images mr-2" v-if="logoImg">
25
26
  <img :src="logoImg" />
26
27
  </view>
27
-
28
28
  <view class="title">{{ title }}</view>
29
29
  </view>
30
30
  <view class="images" v-else>
@@ -50,6 +50,10 @@
50
50
  </template>
51
51
 
52
52
  <script setup lang="ts">
53
+ import { addUnit } from '@tplc/wot/components/common/util'
54
+ import { computed } from 'vue'
55
+
56
+ const { statusBarHeight } = uni.getSystemInfoSync()
53
57
  defineOptions({
54
58
  name: 'FinalNav',
55
59
  options: {
@@ -100,12 +104,15 @@ withDefaults(defineProps<NanProps>(), {
100
104
  logoImg: '',
101
105
  searchText: '搜索',
102
106
  })
107
+
108
+ const paddingTop = computed(() => {
109
+ return addUnit(statusBarHeight || 0)
110
+ })
103
111
  </script>
104
112
  <style lang="scss" scoped>
105
113
  .customNavigation {
106
114
  position: relative;
107
115
  width: 100%;
108
- height: 88px;
109
116
 
110
117
  .header {
111
118
  position: absolute;
@@ -113,7 +120,6 @@ withDefaults(defineProps<NanProps>(), {
113
120
  left: 0px;
114
121
  width: 100%;
115
122
  height: 100%;
116
- background-image: url(https://cdn2.weimob.com/saas/@assets/saas-fe-basis-web-stc/cms/h5/topNavBlack_new.png);
117
123
  background-repeat: no-repeat;
118
124
  background-position: 50%;
119
125
  background-position-x: 50%;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "keywords": [
5
5
  "业务组件i"
6
6
  ],
@@ -10,7 +10,7 @@
10
10
  },
11
11
  "peerDependencies": {
12
12
  "vue": ">=3.2.47",
13
- "@tplc/wot": "0.1.1"
13
+ "@tplc/wot": "0.1.2"
14
14
  },
15
15
  "engines": {
16
16
  "node": ">=18",
@@ -0,0 +1,88 @@
1
+ interface LcbImgNavProps {
2
+ /** 模式 1.单行 2.多行 */
3
+ styleGroup?: 1 | 2;
4
+ /** 文字颜色 #212121 */
5
+ textColor?: string;
6
+ /** 背景颜色 #ffffff */
7
+ bgColor?: string;
8
+ /** 背景图片 */
9
+ bgImg?: string;
10
+ /** 图标颜色 #212121 */
11
+ iconColor?: string;
12
+ /** 图标类型 0.系统 1.自定义 */
13
+ iconType?: 0 | 1;
14
+ /** 数据内容 */
15
+ items?: {
16
+ title: string;
17
+ icon?: string;
18
+ link: string;
19
+ img?: string;
20
+ }[];
21
+ /** 上边距 */
22
+ topMargin?: 0 | 24 | 36;
23
+ /** 下边距 */
24
+ bottomMargin?: 0 | 24 | 36;
25
+ /** 排布方式每行几个 */
26
+ pictureDistribution?: 3 | 4 | 5;
27
+ /** 左右间距 */
28
+ leftRightMargin?: number;
29
+ /** 图标尺寸 0.小40px 2.大50px */
30
+ iconSize?: number;
31
+ /** 图标圆角 默认 0 */
32
+ iconRadius?: number;
33
+ /** 文字与图标距离 */
34
+ iconTextMargin?: number;
35
+ }
36
+ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<LcbImgNavProps>, {
37
+ bgColor: string;
38
+ textColor: string;
39
+ iconColor: string;
40
+ iconRadius: number;
41
+ topMargin: number;
42
+ bottomMargin: number;
43
+ iconSize: number;
44
+ leftRightMargin: number;
45
+ iconTextMargin: number;
46
+ pictureDistribution: number;
47
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<LcbImgNavProps>, {
48
+ bgColor: string;
49
+ textColor: string;
50
+ iconColor: string;
51
+ iconRadius: number;
52
+ topMargin: number;
53
+ bottomMargin: number;
54
+ iconSize: number;
55
+ leftRightMargin: number;
56
+ iconTextMargin: number;
57
+ pictureDistribution: number;
58
+ }>>>, {
59
+ textColor: string;
60
+ bgColor: string;
61
+ iconColor: string;
62
+ topMargin: 0 | 24 | 36;
63
+ bottomMargin: 0 | 24 | 36;
64
+ pictureDistribution: 3 | 4 | 5;
65
+ leftRightMargin: number;
66
+ iconSize: number;
67
+ iconRadius: number;
68
+ iconTextMargin: number;
69
+ }, {}>;
70
+ export default _default;
71
+
72
+ type __VLS_WithDefaults<P, D> = {
73
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
74
+ default: D[K];
75
+ }> : P[K];
76
+ };
77
+ type __VLS_Prettify<T> = {
78
+ [K in keyof T]: T[K];
79
+ } & {};
80
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
81
+ type __VLS_TypePropsToOption<T> = {
82
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
83
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
84
+ } : {
85
+ type: import('vue').PropType<T[K]>;
86
+ required: true;
87
+ };
88
+ };
@@ -0,0 +1,85 @@
1
+ interface NanProps {
2
+ /** 模式 1.标题 2.搜索 3.导航 4.沉浸式 */
3
+ styleGroup?: 1 | 2 | 3 | 4;
4
+ /** 方位 */
5
+ titleLocation?: 'left' | 'center';
6
+ /** 是否沉浸式状态栏 */
7
+ topStyle?: 1 | 2;
8
+ /** 标题 */
9
+ title?: string;
10
+ /** 图片 */
11
+ logoImg?: string;
12
+ /** 背景图片 */
13
+ backgroundImage?: string;
14
+ /** 模式 */
15
+ titleMode?: 'text' | 'img';
16
+ /** 颜色模式 */
17
+ colorMode?: 'custom' | 'default';
18
+ /** 背景颜色 */
19
+ backColor?: string;
20
+ /** 背景样式 */
21
+ backgroundType?: 'img' | 'color';
22
+ /** 内容颜色 */
23
+ contentColor?: string;
24
+ searchText?: string;
25
+ typographyTextBackground?: string;
26
+ }
27
+ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<NanProps>, {
28
+ styleGroup: number;
29
+ titleLocation: string;
30
+ topStyle: number;
31
+ title: string;
32
+ titleMode: string;
33
+ backgroundType: string;
34
+ colorMode: string;
35
+ backColor: string;
36
+ contentColor: string;
37
+ logoImg: string;
38
+ searchText: string;
39
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
40
+ search: () => void;
41
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<NanProps>, {
42
+ styleGroup: number;
43
+ titleLocation: string;
44
+ topStyle: number;
45
+ title: string;
46
+ titleMode: string;
47
+ backgroundType: string;
48
+ colorMode: string;
49
+ backColor: string;
50
+ contentColor: string;
51
+ logoImg: string;
52
+ searchText: string;
53
+ }>>> & {
54
+ onSearch?: (() => any) | undefined;
55
+ }, {
56
+ styleGroup: 1 | 2 | 3 | 4;
57
+ title: string;
58
+ titleLocation: "left" | "center";
59
+ topStyle: 1 | 2;
60
+ logoImg: string;
61
+ titleMode: "text" | "img";
62
+ colorMode: "custom" | "default";
63
+ backColor: string;
64
+ backgroundType: "img" | "color";
65
+ contentColor: string;
66
+ searchText: string;
67
+ }, {}>;
68
+ export default _default;
69
+ type __VLS_WithDefaults<P, D> = {
70
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
71
+ default: D[K];
72
+ }> : P[K];
73
+ };
74
+ type __VLS_Prettify<T> = {
75
+ [K in keyof T]: T[K];
76
+ } & {};
77
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
78
+ type __VLS_TypePropsToOption<T> = {
79
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
80
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
81
+ } : {
82
+ type: import('vue').PropType<T[K]>;
83
+ required: true;
84
+ };
85
+ };
package/tsconfig.json DELETED
@@ -1,25 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ESNext",
4
- "useDefineForClassFields": true,
5
- "noImplicitAny": false, // 隐式具有“any”类型
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
- "skipLibCheck": true,
16
- "declaration": true,
17
- "declarationDir": "./types",
18
- "emitDeclarationOnly": true,
19
- "baseUrl": ".",
20
- "types": ["@dcloudio/types", "miniprogram-api-typings", "mini-types", "node"],
21
- "lib": ["ESNext", "DOM"]
22
- },
23
- "include": ["components/**/*.vue"],
24
- "exclude": ["node_modules"]
25
- }