@didaoktv/didaoui-uniapp 1.4.3 → 2.0.0

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 (42) hide show
  1. package/components/dd-action-sheet/dd-action-sheet.vue +4 -3
  2. package/components/dd-alert/dd-alert.vue +4 -3
  3. package/components/dd-backtop/dd-backtop.vue +3 -2
  4. package/components/dd-badge/dd-badge.vue +3 -1
  5. package/components/dd-barcode/dd-barcode.vue +5 -1
  6. package/components/dd-car-keyboard/dd-car-keyboard.vue +0 -2
  7. package/components/dd-cascader/dd-cascader.vue +0 -6
  8. package/components/dd-coupon/dd-coupon.vue +8 -6
  9. package/components/dd-cropper/dd-cropper.vue +19 -8
  10. package/components/dd-date-picker/dd-date-picker.vue +4 -4
  11. package/components/dd-drawer/dd-drawer.vue +4 -3
  12. package/components/dd-dropdown-item/dd-dropdown-item.vue +4 -4
  13. package/components/dd-dropdown-menu/dd-dropdown-menu.vue +9 -10
  14. package/components/dd-goods-card/dd-goods-card.vue +3 -2
  15. package/components/dd-keyboard/dd-keyboard.vue +0 -2
  16. package/components/dd-keyboard/keyboard.js +0 -1
  17. package/components/dd-keyboard/props.js +0 -5
  18. package/components/dd-loading/dd-loading.vue +4 -3
  19. package/components/dd-mini-program-navbar/dd-mini-program-navbar.vue +4 -2
  20. package/components/dd-modal/dd-modal.vue +5 -4
  21. package/components/dd-navigation/dd-navigation.vue +3 -1
  22. package/components/dd-overlay/dd-overlay.vue +3 -3
  23. package/components/dd-picker/dd-picker.vue +4 -4
  24. package/components/dd-popover/dd-popover.vue +4 -5
  25. package/components/dd-popup/dd-popup.vue +6 -7
  26. package/components/dd-poster/dd-poster.vue +10 -8
  27. package/components/dd-pull-refresh/dd-pull-refresh.vue +4 -4
  28. package/components/dd-qrcode/dd-qrcode.vue +1 -8
  29. package/components/dd-room-card/dd-room-card.vue +3 -2
  30. package/components/dd-segmented-tab/dd-segmented-tab.vue +3 -1
  31. package/components/dd-step/dd-step.vue +6 -2
  32. package/components/dd-sticky/dd-sticky.vue +3 -1
  33. package/components/dd-submit-bar/dd-submit-bar.vue +3 -2
  34. package/components/dd-swipe/dd-swipe.vue +3 -2
  35. package/components/dd-swipe-action/dd-swipe-action.vue +5 -5
  36. package/components/dd-tabbar/dd-tabbar.vue +3 -1
  37. package/components/dd-toast/dd-toast.vue +4 -2
  38. package/components/dd-top-navbar/dd-top-navbar.vue +3 -1
  39. package/libs/config/zIndex.d.ts +7 -7
  40. package/libs/config/zIndex.js +13 -20
  41. package/package.json +1 -1
  42. package/scss/_variables.scss +0 -12
@@ -6,6 +6,7 @@
6
6
  'dd-topbar--transparent': transparent,
7
7
  'dd-topbar--border': border && !transparent,
8
8
  }"
9
+ :style="{ zIndex: zIndexConfig.sticky }"
9
10
  >
10
11
  <view
11
12
  v-if="fixed && statusBarHeight > 0"
@@ -39,6 +40,8 @@
39
40
  import { computed } from 'vue'
40
41
  import DdIcon from '../dd-icon/dd-icon.vue'
41
42
  import { getStatusBarHeight, isH5 } from '../../libs/utils'
43
+ // z-index 统一取 libs/config/zIndex.js(fixed 时吸顶层级取 sticky 档;非 fixed 时为 static,z-index 天然失效)
44
+ import zIndexConfig from '../../libs/config/zIndex.js'
42
45
 
43
46
  interface Props {
44
47
  title?: string
@@ -102,7 +105,6 @@ function onBack() {
102
105
  top: 0;
103
106
  left: 0;
104
107
  right: 0;
105
- z-index: $dd-z-index-sticky;
106
108
  }
107
109
 
108
110
  &--transparent {
@@ -1,14 +1,14 @@
1
1
  // libs/config/zIndex.js 的类型声明(该库多为 JS 文件,allowJs 未开启,TS 侧导入需要此声明)
2
2
  declare const zIndex: {
3
- toast: number
4
- noNetwork: number
3
+ base: number
4
+ sticky: number
5
+ overlay: number
5
6
  popup: number
6
- mask: number
7
7
  dialogMask: number
8
8
  dialog: number
9
- navbar: number
10
- topTips: number
11
- sticky: number
12
- indexListSticky: number
9
+ noNetwork: number
10
+ cropper: number
11
+ loading: number
12
+ toast: number
13
13
  }
14
14
  export default zIndex
@@ -1,23 +1,16 @@
1
- // uniapp在H5中各API的z-index值如下:
2
- /**
3
- * actionsheet: 999
4
- * modal: 999
5
- * navigate: 998
6
- * tabbar: 998
7
- * toast: 999
8
- */
1
+ // z-index 唯一真源档位表(ADR 0013):组件只准选档或档内 +1 派生,禁止魔数。
2
+ // uniapp 在 H5 中各 API 的 z-index 平台事实(页面层必须低于它们):
3
+ // actionsheet: 999 / modal: 999 / toast: 999 / navigate: 998 / tabbar: 998
9
4
 
10
5
  export default {
11
- toast: 10090,
12
- noNetwork: 10080,
13
- // popup包含popup,actionsheet,keyboard,picker的值
14
- popup: 10075,
15
- mask: 10070,
16
- // dialog 独立于 popup 体系:弹窗需压在 popup 面板(popup+1)之上,又不遮住 noNetwork/toast
17
- dialogMask: 10077,
18
- dialog: 10078,
19
- navbar: 980,
20
- topTips: 975,
21
- sticky: 970,
22
- indexListSticky: 965
6
+ base: 1, // 普通层内叠放
7
+ sticky: 100, // 页面内吸顶/吸底/导航族/浮钮(H5 须低于平台弹层 998)
8
+ overlay: 2000, // 遮罩
9
+ popup: 2001, // 弹层面板(overlay+1)
10
+ dialogMask: 2010, // 对话框遮罩
11
+ dialog: 2011, // 对话框面板(dialogMask+1)
12
+ noNetwork: 2020, // 断网提示
13
+ cropper: 2025, // 全屏裁剪工作界面(非提示类,须低于 loading/toast)
14
+ loading: 2030, // 全屏加载
15
+ toast: 2040, // 提示(最高)
23
16
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@didaoktv/didaoui-uniapp",
3
- "version": "1.4.3",
3
+ "version": "2.0.0",
4
4
  "description": "帝到KTV UniApp 组件库",
5
5
  "main": "index.ts",
6
6
  "types": "index.ts",
@@ -359,15 +359,3 @@ $dd-popup-duration: 0.3s !default;
359
359
  $dd-popover-offset: 8px !default;
360
360
  $dd-step-inactive-color: $dd-neutral-500 !default;
361
361
  $dd-step-active-color: $dd-primary-500 !default;
362
-
363
- // === z-index 层级 ===
364
- $dd-z-index-base: 1 !default;
365
- $dd-z-index-sticky: 100 !default;
366
- $dd-z-index-fixed: 1000 !default;
367
- $dd-z-index-overlay: 2000 !default;
368
- $dd-z-index-popup: 2001 !default;
369
- $dd-z-index-modal: 3000 !default;
370
- $dd-z-index-toast: 4000 !default;
371
- $dd-z-index-loading: 5000 !default;
372
- // 全屏裁剪覆盖层:三画布 + 操作条需压过全部全局层级
373
- $dd-z-index-cropper: 100000 !default;