Skip to content

Commit c455d05

Browse files
committed
fix(popeditor): add three slot to popeditor
1 parent 084c28e commit c455d05

File tree

2 files changed

+39
-3
lines changed

2 files changed

+39
-3
lines changed

examples/sites/demos/apis/popeditor.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,36 @@ export default {
444444
],
445445
methods: [],
446446
slots: [
447+
{
448+
name: 'title-selection',
449+
defaultValue: '',
450+
desc: {
451+
'zh-CN': '已选择数据标题插槽',
452+
'en-US': ''
453+
},
454+
mode: ['pc'],
455+
pcDemo: ''
456+
},
457+
{
458+
name: 'title-history',
459+
defaultValue: '',
460+
desc: {
461+
'zh-CN': '历史数据标题插槽',
462+
'en-US': ''
463+
},
464+
mode: ['pc'],
465+
pcDemo: ''
466+
},
467+
{
468+
name: 'title-source',
469+
defaultValue: '',
470+
desc: {
471+
'zh-CN': '所有数据标题插槽',
472+
'en-US': ''
473+
},
474+
mode: ['pc'],
475+
pcDemo: ''
476+
},
447477
{
448478
name: 'footer',
449479
defaultValue: '',

packages/vue/src/popeditor/src/pc.vue

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,15 +151,19 @@
151151
'tiny-popeditor__tabs-selected': state.activeName === 'history'
152152
}"
153153
>
154-
<span>{{ t('ui.popeditor.historyLists') }}</span>
154+
<slot name="title-history">
155+
<span>{{ t('ui.popeditor.historyLists') }}</span>
156+
</slot>
155157
</li>
156158
<li
157159
@click="state.activeName = 'source'"
158160
:class="{
159161
'tiny-popeditor__tabs-selected': state.activeName === 'source'
160162
}"
161163
>
162-
<span>{{ t('ui.popeditor.sourceLists') }}</span>
164+
<slot name="title-source">
165+
<span>{{ t('ui.popeditor.sourceLists') }}</span>
166+
</slot>
163167
</li>
164168
</ul>
165169
</div>
@@ -227,7 +231,9 @@
227231
<div class="tiny-popeditor__tabs-head">
228232
<ul>
229233
<li class="tiny-popeditor__tabs-selected">
230-
<span>{{ t('ui.popeditor.selectionLists') }}</span>
234+
<slot name="title-selection">
235+
<span>{{ t('ui.popeditor.selectionLists') }}</span>
236+
</slot>
231237
</li>
232238
</ul>
233239
</div>

0 commit comments

Comments
 (0)