wui-components-v2 1.2.17 → 1.2.18

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.
@@ -4,7 +4,12 @@ import { useRouter } from 'uni-mini-router'
4
4
  defineOptions({
5
5
  name: 'ListTopButtons',
6
6
  })
7
- const props = defineProps<{ mainCode: string, buttons: string[], sourceId: string, id?: string, pageTitle: string, pageType?: string, addEvent?: string, config?: any }>()
7
+ const props = withDefaults(
8
+ defineProps<{ mainCode: string, buttons: string[], sourceId: string, id?: string, pageTitle: string, pageType?: string, addEvent?: string, config?: any, showButtons?: boolean }>(),
9
+ {
10
+ showButtons: true,
11
+ }
12
+ )
8
13
  const router = useRouter()
9
14
  // 跳转添加页面
10
15
  function gotoAddPage() {
@@ -13,7 +18,7 @@ function gotoAddPage() {
13
18
  </script>
14
19
 
15
20
  <template>
16
- <view class="flex justify-end gap-1 py-2 px-2 bg-white dark:bg-[var(--wot-dark-background)]">
21
+ <view v-if="showButtons" class="flex justify-end gap-1 py-2 px-2 bg-white dark:bg-[var(--wot-dark-background)]">
17
22
  <wd-button class="flex-1" v-if="buttons.includes('dtmplAdd')" type="primary" @click="gotoAddPage" icon="plus">{{ props.config?.editBtnTitle || '新增' }}</wd-button>
18
23
  </view>
19
24
  </template>
@@ -24,10 +24,16 @@ withDefaults(
24
24
  * 不传时默认 2;传 0 表示只显示标题、不展示任何字段数据。
25
25
  */
26
26
  collapseNum?: number
27
+ /**
28
+ * 顶部操作按钮区(新增等)是否显示,默认显示。
29
+ */
30
+ showTopButtons?: boolean
27
31
  }>(),
28
32
  {
29
33
  // 操作按钮区域(编辑/删除/morebutns)默认显示
30
34
  isShowAction: true,
35
+ // 顶部操作按钮区默认显示
36
+ showTopButtons: true,
31
37
  }
32
38
  )
33
39
 
@@ -206,6 +212,7 @@ function tabSearchClick(data: any) {
206
212
  :page-title="pageTitle"
207
213
  :page-type="pageType"
208
214
  :config="config"
215
+ :show-buttons="showTopButtons"
209
216
  />
210
217
  </view>
211
218
  <!-- 自定义tab搜索 -->
@@ -32,7 +32,7 @@ const { currentThemeColor } = useManualTheme()
32
32
  </script>
33
33
 
34
34
  <template>
35
- <view class="h-[calc(100vh-44px)] flex flex-col" :style="{ backgroundColor: currentThemeColor.primary }">
35
+ <view class="wui-custom-login flex flex-col" :style="{ backgroundColor: currentThemeColor.primary }">
36
36
  <!-- <view class="flex flex-col items-center justify-center pa-3 pb-5">
37
37
  <wd-img :width="100" :height="100" round :src="loginlog" />
38
38
  <view class="text-center">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wui-components-v2",
3
- "version": "1.2.17",
3
+ "version": "1.2.18",
4
4
  "description": "wui 组件库",
5
5
  "author": "wgxshh",
6
6
  "license": "MIT",