@ebiz/designer-components 0.1.94 → 0.1.96

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.94",
3
+ "version": "0.1.96",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -8,6 +8,7 @@
8
8
  @click="openTalkDialog"
9
9
  ></ebiz-tdesign-button>
10
10
  <ebiz-dialog
11
+ v-if="state.showTalkBox"
11
12
  width="800"
12
13
  header="员工访谈"
13
14
  body="对话框内容"
@@ -25,20 +26,19 @@
25
26
  <template #default>
26
27
  <ebiz-tabs theme="normal" placement="top" size="medium" class="component-base-style" v-model="state.actTab">
27
28
  <ebiz-tab-panel value="add" label="添加访谈" style="padding-top: 12px" @change="tabChange">
28
- <ebiz-s-form
29
+ <t-form
29
30
  layout="vertical"
30
31
  labelAlign="right"
31
32
  labelWidth="100px"
32
33
  :showSubmitButton="false"
33
34
  :showCancelButton="false"
34
35
  ref="form"
35
- :scrollToFirstError="true"
36
36
  :showButtons="true"
37
37
  class="component-base-style"
38
38
  :data="state.interviewFormData"
39
39
  :rules="state.interviewFormRules"
40
40
  >
41
- <template #default="{ formData }">
41
+ <template #default="{ }">
42
42
  <ebiz-s-form-item
43
43
  label="访谈时间"
44
44
  name="interview_time"
@@ -115,7 +115,7 @@
115
115
  </div>
116
116
  </div>
117
117
  </div></div></template
118
- ></ebiz-s-form>
118
+ ></t-form>
119
119
  <div
120
120
  v-if="state.actTab == 'add'"
121
121
  style="display: flex; justify-content: flex-end; gap: 10px"
@@ -195,7 +195,7 @@
195
195
  </template>
196
196
 
197
197
  <script setup lang="jsx">
198
- import { Table as Ttable} from 'tdesign-vue-next';
198
+ import { Table as Ttable, Form as TForm} from 'tdesign-vue-next';
199
199
  import EbizRemoteSelect from './EbizRemoteSelect.vue'
200
200
  import EbizSwitch from './EbizSwitch.vue'
201
201
  import EbizTabs from './EbizTabs.vue'
@@ -25,34 +25,37 @@
25
25
  </template>
26
26
 
27
27
  <template #body>
28
- <div v-if="dialogType === 'normal'">
29
- <slot name="body"></slot>
30
- <slot></slot>
31
- </div>
32
- <div v-else-if="dialogType === 'add'">
33
- <t-form ref="formRef" :loading="apiLoading" :colon="colon" :data="localFormData" :disabled="disabled"
34
- :label-align="labelAlign" :label-width="labelWidth" :layout="layout" :reset-type="resetType"
35
- :reset-on-semi-controlled="resetOnSemiControlled" :rules="rules" :show-error-message="showErrorMessage"
36
- :status-icon="statusIcon" :style="customStyle" @reset="handleReset" @submit="handleSubmit"
37
- @validate="handleValidate">
38
- <slot name="body" :formData="localFormData"></slot>
39
- </t-form>
40
- </div>
41
- <div v-else-if="dialogType === 'edit'">
42
- <t-form ref="formRef" :loading="apiLoading" :colon="colon" :data="localFormData" :disabled="disabled"
43
- :label-align="labelAlign" :label-width="labelWidth" :layout="layout" :reset-type="resetType"
44
- :reset-on-semi-controlled="resetOnSemiControlled" :rules="rules" :show-error-message="showErrorMessage"
45
- :status-icon="statusIcon" :style="customStyle" @reset="handleReset" @submit="handleSubmit"
46
- @validate="handleValidate">
47
- <slot name="body" :formData="localFormData"></slot>
48
- </t-form>
49
- </div>
50
- <slot v-else-if="dialogType === 'delete'" name="body">
51
- <div class="delete-confirm-content">
52
- <t-icon name="error-circle" size="large" class="delete-icon" />
53
- <p class="delete-message">{{ deleteConfirmMessage }}</p>
28
+ <div v-if="dialogVisible">
29
+ <div v-if="dialogType === 'normal'">
30
+ <slot name="body"></slot>
31
+ <slot></slot>
54
32
  </div>
55
- </slot>
33
+ <div v-else-if="dialogType === 'add'">
34
+ <t-form ref="formRef" :loading="apiLoading" :colon="colon" :data="localFormData" :disabled="disabled"
35
+ :label-align="labelAlign" :label-width="labelWidth" :layout="layout" :reset-type="resetType"
36
+ :reset-on-semi-controlled="resetOnSemiControlled" :rules="rules" :show-error-message="showErrorMessage"
37
+ :status-icon="statusIcon" :style="customStyle" @reset="handleReset" @submit="handleSubmit"
38
+ @validate="handleValidate">
39
+ <slot name="body" :formData="localFormData"></slot>
40
+ </t-form>
41
+ </div>
42
+ <div v-else-if="dialogType === 'edit'">
43
+ <t-form ref="formRef" :loading="apiLoading" :colon="colon" :data="localFormData" :disabled="disabled"
44
+ :label-align="labelAlign" :label-width="labelWidth" :layout="layout" :reset-type="resetType"
45
+ :reset-on-semi-controlled="resetOnSemiControlled" :rules="rules" :show-error-message="showErrorMessage"
46
+ :status-icon="statusIcon" :style="customStyle" @reset="handleReset" @submit="handleSubmit"
47
+ @validate="handleValidate">
48
+ <slot name="body" :formData="localFormData"></slot>
49
+ </t-form>
50
+ </div>
51
+ <slot v-else-if="dialogType === 'delete'" name="body">
52
+ <div class="delete-confirm-content">
53
+ <t-icon name="error-circle" size="large" class="delete-icon" />
54
+ <p class="delete-message">{{ deleteConfirmMessage }}</p>
55
+ </div>
56
+ </slot>
57
+ </div>
58
+
56
59
  </template>
57
60
  </t-dialog>
58
61
  </div>
@@ -445,7 +448,7 @@ const callApi = async (config = props.apiConfig) => {
445
448
  // 弹窗确认事件
446
449
  const handleDialogConfirm = async (e) => {
447
450
  emit('dialog-confirm', e)
448
- if(apiLoading.value) return
451
+ if (apiLoading.value) return
449
452
  // 对于非普通类型的弹窗,总是尝试调用API
450
453
  if (props.dialogType !== 'normal') {
451
454
  if (props.apiConfig) {