@ebiz/designer-components 0.1.25 → 0.1.26

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.25",
3
+ "version": "0.1.26",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -1,7 +1,9 @@
1
1
  <template>
2
2
  <div class="ebiz-tdesign-button-dialog">
3
- <div v-if="$slots.trigger" @click="openDialog">
4
- <slot name="trigger"></slot>
3
+ <div v-if="$slots.trigger">
4
+ <slot name="trigger" :event="{
5
+ open: openDialog
6
+ }"></slot>
5
7
  </div>
6
8
  <t-dialog v-model:visible="dialogVisible" :header="title || computedTitle" :width="dialogWidth" :top="dialogTop"
7
9
  :attach="dialogAttach" :destroy-on-close="dialogDestroyOnClose" :mode="dialogMode" :placement="dialogPlacement"
@@ -4,7 +4,6 @@
4
4
 
5
5
  <div class="demo-section">
6
6
  <h3>1. 标准弹窗</h3>
7
- <t-button @click="openNormalDialog">打开标准弹窗</t-button>
8
7
  <EbizSDialog ref="normalDialogRef" dialogType="normal" title="标准弹窗示例">
9
8
  <template #body>
10
9
  <div class="dialog-content">
@@ -12,6 +11,9 @@
12
11
  <p>可以通过ref调用openDialog和closeDialog方法来控制弹窗的显示和隐藏。</p>
13
12
  </div>
14
13
  </template>
14
+ <template #trigger="{ event }">
15
+ <t-button @click="event.open">打开标准弹窗</t-button>
16
+ </template>
15
17
  </EbizSDialog>
16
18
  </div>
17
19
 
@@ -49,13 +51,13 @@
49
51
  </template>
50
52
  </t-table>
51
53
 
52
- <EbizSDialog ref="deleteDialogRef" :apiConfig="mockDeleteApiConfig" dialogType="delete" deleteConfirmMessage="确定要删除该用户吗?此操作不可恢复!"
53
- @dialog-confirm="handleDelete">
54
+ <EbizSDialog ref="deleteDialogRef" :apiConfig="mockDeleteApiConfig" dialogType="delete"
55
+ deleteConfirmMessage="确定要删除该用户吗?此操作不可恢复!" @dialog-confirm="handleDelete">
54
56
  </EbizSDialog>
55
57
 
56
58
  <EbizSDialog ref="editDialogRef" dialogType="edit" title="编辑用户" :rules="formRules" layout="vertical"
57
- labelWidth="100px" :detailApiConfig="mockDetailApiConfig" :apiConfig="mockApiConfig" @detail-loaded="handleDetailLoaded"
58
- @dialog-confirm="handleEditSubmit">
59
+ labelWidth="100px" :detailApiConfig="mockDetailApiConfig" :apiConfig="mockApiConfig"
60
+ @detail-loaded="handleDetailLoaded" @dialog-confirm="handleEditSubmit">
59
61
  <template #body>
60
62
  <t-form-item label="用户名" name="username">
61
63
  <t-input v-model="editUsername" placeholder="请输入用户名"></t-input>