Skip to content

Commit 2da9527

Browse files
authored
fix(saas-api): hide some props in saas mode (#3842)
1 parent 1e9f471 commit 2da9527

File tree

4 files changed

+49
-22
lines changed

4 files changed

+49
-22
lines changed

examples/sites/demos/apis/select.js

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ export default {
1616
},
1717
mode: ['pc', 'mobile-first'],
1818
pcDemo: 'all-text',
19-
mfDemo: 'all-text'
19+
mfDemo: 'all-text',
20+
hideSaas: true
2021
},
2122
{
2223
name: 'show-all-text-tag',
@@ -29,7 +30,8 @@ export default {
2930
'Specifies whether only the tag specified by all-text is displayed in the text box after the multi-select mode is specified. The default value is <code>false</code>. All options are displayed in the text box cyclically.'
3031
},
3132
mode: ['pc'],
32-
pcDemo: 'all-text'
33+
pcDemo: 'all-text',
34+
hideSaas: true
3335
},
3436
{
3537
name: 'allow-copy',
@@ -93,7 +95,8 @@ export default {
9395
},
9496
mode: ['pc', 'mobile-first'],
9597
pcDemo: 'clear-no-match-value',
96-
mfDemo: 'clear-no-match-value'
98+
mfDemo: 'clear-no-match-value',
99+
hideSaas: true
97100
},
98101
{
99102
name: 'clearable',
@@ -236,7 +239,8 @@ export default {
236239
},
237240
mode: ['pc', 'mobile-first'],
238241
pcDemo: 'input-box-type',
239-
mfDemo: 'input-box-type'
242+
mfDemo: 'input-box-type',
243+
hideSaas: true
240244
},
241245
{
242246
name: 'is-drop-inherit-width',
@@ -285,7 +289,8 @@ export default {
285289
'Default maximum display lines for multiple lines, with automatic hiding option for exceeding lines'
286290
},
287291
mode: ['pc'],
288-
pcDemo: 'collapse-tags'
292+
pcDemo: 'collapse-tags',
293+
hideSaas: true
289294
},
290295
{
291296
name: 'modelValue / v-model',
@@ -507,7 +512,8 @@ export default {
507512
},
508513
mode: ['pc', 'mobile-first'],
509514
pcDemo: 'searchable',
510-
mfDemo: 'searchable'
515+
mfDemo: 'searchable',
516+
hideSaas: true
511517
},
512518
{
513519
name: 'show-alloption',
@@ -531,7 +537,8 @@ export default {
531537
},
532538
mode: ['pc', 'mobile-first'],
533539
pcDemo: 'no-data-text',
534-
mfDemo: 'no-data-text'
540+
mfDemo: 'no-data-text',
541+
hideSaas: true
535542
},
536543
{
537544
name: 'size',
@@ -568,7 +575,8 @@ export default {
568575
},
569576
mode: ['pc', 'mobile-first'],
570577
pcDemo: 'tag-type',
571-
mfDemo: 'tag-type'
578+
mfDemo: 'tag-type',
579+
hideSaas: true
572580
},
573581
{
574582
name: 'max-tag-width',
@@ -582,7 +590,8 @@ export default {
582590
pcDemo: '',
583591
meta: {
584592
stable: '3.22.0'
585-
}
593+
},
594+
hideSaas: true
586595
},
587596
{
588597
name: 'text-field',
@@ -670,7 +679,8 @@ export default {
670679
},
671680
mode: ['pc', 'mobile-first'],
672681
pcDemo: 'collapse-tags',
673-
mfDemo: 'collapse-tags'
682+
mfDemo: 'collapse-tags',
683+
hideSaas: true
674684
},
675685
{
676686
name: 'show-limit-text',
@@ -683,7 +693,8 @@ export default {
683693
'Display the proportion of the number of selected items and the total number of items in the multiple-choice box'
684694
},
685695
mode: ['pc'],
686-
pcDemo: 'multiple'
696+
pcDemo: 'multiple',
697+
hideSaas: true
687698
},
688699
{
689700
name: 'init-label',
@@ -905,7 +916,8 @@ export default {
905916
},
906917
mode: ['pc', 'mobile-first'],
907918
pcDemo: 'slot-reference',
908-
mfDemo: 'slot-reference'
919+
mfDemo: 'slot-reference',
920+
hideSaas: true
909921
}
910922
]
911923
},

examples/sites/demos/pc/app/select/webdoc/select.js

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export default {
2828
'zh-CN': `
2929
通过 <code>multiple</code> 属性启用多选功能,此时 <code>v-model</code> 的值为当前选中值所组成的数组。默认选中值会以标签(Tag 组件)展示。<br>
3030
通过 <code>multiple-limit</code> 属性限制最多可选择的个数,默认为 0 不限制。<br>
31-
通过 <code>show-limit-text</code> 属性限制最多可选择的个数,默认为 0 不限制<br>
31+
通过 <code>show-limit-text</code> 属性限制最多可选择的个数,默认为 flase 不限制,非saas属性<br>
3232
多选时,通过给 option 标签配置 <code>required</code> 或者在 options 配置项中添加 <code>required</code> 属性,来设置必选选项。<br>
3333
通过 <code>dropdown-icon</code> 属性可自定义下拉图标,<code>drop-style</code> 属性可自定义下拉选项样式。<br>
3434
`,
@@ -50,7 +50,7 @@ export default {
5050
},
5151
desc: {
5252
'zh-CN':
53-
'<p>通过 <code>collapse-tags</code> 属性设置选中多个选项时,多个标签缩略展示。设置 <code>show-proportion</code> 可展示当前选中条数和总条数占比,默认值为 <code>false</code> 。设置 <code>hover-expand</code> 为 <code>true</code> ,默认折叠标签,<code>hover</code> 时展示所有标签。标签内容超长时超出省略,<code>hover</code> 标签时展示 <code>tooltip</code> 。</p>\n',
53+
'<p>通过 <code>collapse-tags</code> 属性设置选中多个选项时,多个标签缩略展示。设置 <code>show-proportion</code> 可展示当前选中条数和总条数占比,默认值为 <code>false</code>,非saas属性 。设置 <code>hover-expand</code> 为 <code>true</code> ,默认折叠标签,<code>hover</code> 时展示所有标签。标签内容超长时超出省略,<code>hover</code> 标签时展示 <code>tooltip</code> 。</p>\n',
5454
'en-US':
5555
'<p>When multiple options are selected through the <code>collapse-tags</code> attribute settings, multiple tags are displayed in a thumbnail. Set <code>show-proportion</code> to display the current number of selected items and the proportion of total items, with a default value of <code>false</code> . By setting <code>hover-expand</code> to <code>true</code> , the tags are collapsed by default, and all tags are displayed when hovering. If the content of the tag is too long, it should be omitted. When hovering the tag, a <code>tooltip</code> should be displayed</p>'
5656
},
@@ -86,7 +86,8 @@ export default {
8686
'en-US':
8787
'<p>Set the label type through the <code>tag-type</code> attribute, which is the same as the type attribute of the Tag component. Optional values: success/info/warning/danger.</p>\n'
8888
},
89-
codeFiles: ['tag-type.vue']
89+
codeFiles: ['tag-type.vue'],
90+
hideSaas: true
9091
},
9192
{
9293
demoId: 'size',
@@ -178,7 +179,8 @@ export default {
178179
'en-US':
179180
'<p>The search box is displayed through the <code>searchable</code> attribute setting drop-down panel, which is not displayed by default. </p>\n'
180181
},
181-
codeFiles: ['searchable.vue']
182+
codeFiles: ['searchable.vue'],
183+
hideSaas: true
182184
},
183185
{
184186
demoId: 'allow-create',
@@ -232,7 +234,8 @@ export default {
232234
'en-US':
233235
'The <p>Set the input box type through the <code>input-box-type</code> attribute. Optional values: input / underline. </p>\n'
234236
},
235-
codeFiles: ['input-box-type.vue']
237+
codeFiles: ['input-box-type.vue'],
238+
hideSaas: true
236239
},
237240
{
238241
demoId: 'show-alloption',
@@ -259,7 +262,8 @@ export default {
259262
'en-US':
260263
'<p>By setting the value of the v-model through the <code>clear-no-match-value</code>attribute, if a matching value cannot be found in the options, it will be automatically cleared and will not be cleared by default.</p>\n'
261264
},
262-
codeFiles: ['clear-no-match-value.vue']
265+
codeFiles: ['clear-no-match-value.vue'],
266+
hideSaas: true
263267
},
264268
{
265269
demoId: 'optimization',
@@ -351,7 +355,7 @@ export default {
351355
},
352356
desc: {
353357
'zh-CN':
354-
'<p>通过 <code>no-data-text</code> 属性设置选项为空时显示的文本,<code>show-empty-image</code> 属性设置是否显示空数据图片,默认不显示。</p>\n',
358+
'<p>通过 <code>no-data-text</code> 属性设置选项为空时显示的文本,<code>show-empty-image</code> 属性设置是否显示空数据图片,默认不显示,非saas属性。</p>\n',
355359
'en-US':
356360
'<p>By setting the<code>no-data-text</code> attribute to display text when the option is empty, and by setting the <code>show-empty-image</code> attribute to display empty data images, it is not displayed by default.</p>\n'
357361
},
@@ -616,7 +620,8 @@ export default {
616620
'zh-CN': '<p>通过 <code>reference</code> 插槽自定义触发源的 HTML 模板。</p>\n',
617621
'en-US': '<p>Customize the HTML template of the trigger source through the <code>reference</code> slot.</p>'
618622
},
619-
codeFiles: ['slot-reference.vue']
623+
codeFiles: ['slot-reference.vue'],
624+
hideSaas: true
620625
},
621626
{
622627
demoId: 'slot-label',
@@ -647,7 +652,8 @@ export default {
647652
If <code>show-all-text-tag</code> is set to <code>true</code> and all is selected, only the tag specified by <code>all-text</code> is displayed in the text box. The default value is <code>false</code>.
648653
`
649654
},
650-
codeFiles: ['all-text.vue']
655+
codeFiles: ['all-text.vue'],
656+
hideSaas: true
651657
},
652658
{
653659
demoId: 'events',

examples/sites/demos/saas/menus.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,21 @@ const noSaasComponents = [
66
'ActionMenu',
77
'ColorPicker',
88
'ColorSelectPanel',
9+
'DatePanel',
910
'DatePickerMobileFirst',
1011
'MindMap',
1112
'QrCode',
1213
'RichTextEditor',
1314
'TimelineItem',
1415
'Watermark',
15-
'Statistic'
16+
'Statistic',
17+
'Space',
18+
'BaseSelect',
19+
'FluentEditor',
20+
'TreeSelect',
21+
'GridSelect',
22+
'ConfigProvider',
23+
'Skeleton'
1624
]
1725

1826
// mobile-first上所有分类,pc上都有,因此可以用pc端menu分类进行合并

packages/vue/src/select/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,7 @@ export default defineComponent({
368368
type: [String, Number],
369369
default: null
370370
},
371+
// 专门为saas增加,只有一个项时,自动选中
371372
autoSelect: {
372373
type: Boolean,
373374
default: false

0 commit comments

Comments
 (0)