@ebiz/designer-components 0.1.41 → 0.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ebiz/designer-components",
3
- "version": "0.1.41",
3
+ "version": "0.1.43",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -191,7 +191,7 @@ const computedData = computed(() => {
191
191
  })
192
192
 
193
193
 
194
- const defaultFormData = ref({ ...JSON.parse(JSON.stringify(props.formData)) })
194
+ const defaultFormData = ref({ ...JSON.parse(JSON.stringify(props?.formData || {})) })
195
195
  const searchValue = ref('')
196
196
 
197
197
  const loadData = async () => {
@@ -236,13 +236,10 @@ const handleSearch = (context) => {
236
236
 
237
237
  // 重置
238
238
  const handleReset = (context) => {
239
- const result = emit('reset', context)
240
- if (result === false) {
241
- return
242
- }
239
+ console.log("handleReset", context)
243
240
 
244
241
  console.log("handleReset", defaultFormData.value)
245
- emit('update:formData', { ...defaultFormData.value })
242
+ formDataValue.value = { ...defaultFormData.value }
246
243
  currentPage.value = 1
247
244
  setTimeout(() => {
248
245
  loadData()
@@ -259,7 +256,7 @@ const innerFormData = ref({ ...props.formData })
259
256
 
260
257
  const formDataValue = computed({
261
258
  get: () => {
262
- if( props.formData == undefined ){
259
+ if (props.formData == undefined) {
263
260
  return innerFormData.value
264
261
  }
265
262
  return props.formData
@@ -5,6 +5,11 @@
5
5
  open: openDialog
6
6
  }"></slot>
7
7
  </div>
8
+ <div v-else-if="showTriggerButton">
9
+ <t-button :theme="buttonTheme" :size="buttonSize" @click="openDialog">
10
+ {{ buttonText }}
11
+ </t-button>
12
+ </div>
8
13
  <t-dialog v-model:visible="dialogVisible" :header="title || computedTitle" :width="dialogWidth" :top="dialogTop"
9
14
  :attach="dialogAttach" :destroy-on-close="dialogDestroyOnClose" :mode="dialogMode" :placement="dialogPlacement"
10
15
  :show-overlay="dialogShowOverlay" :close-on-esc-keydown="dialogCloseOnEscKeydown"
@@ -53,7 +58,7 @@
53
58
 
54
59
  <script setup>
55
60
  import { ref, computed, watch } from 'vue'
56
- import { Dialog as TDialog, MessagePlugin, Icon as TIcon, Form as TForm } from 'tdesign-vue-next'
61
+ import { Dialog as TDialog, MessagePlugin, Icon as TIcon, Form as TForm, Button as TButton } from 'tdesign-vue-next'
57
62
  import dataService from '../../../apiService/simpleDataService'
58
63
 
59
64
  const props = defineProps({
@@ -76,6 +81,10 @@ const props = defineProps({
76
81
  default: ''
77
82
  },
78
83
  // 按钮样式属性
84
+ showTriggerButton:{
85
+ type: Boolean,
86
+ default: false
87
+ },
79
88
  buttonTheme: {
80
89
  type: String,
81
90
  default: ''