Skip to content

Commit e357303

Browse files
committed
doc: update doc
1 parent d91f9b3 commit e357303

File tree

20 files changed

+47
-51
lines changed

20 files changed

+47
-51
lines changed

components/input/demo/group.vue

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Note: You don't need `Col` to control the width in the `compact` mode.
9797
</a-select>
9898
<a-auto-complete
9999
v-model:value="value16"
100-
:data-source="dataSource"
100+
:options="[{ value: 'text 1' }, { value: 'text 2' }]"
101101
style="width: 200px"
102102
placeholder="Email"
103103
/>
@@ -118,7 +118,7 @@ Note: You don't need `Col` to control the width in the `compact` mode.
118118
</div>
119119
</template>
120120
<script lang="ts">
121-
import { defineComponent, ref, watch } from 'vue';
121+
import { defineComponent, ref } from 'vue';
122122
123123
const options = [
124124
{
@@ -174,14 +174,6 @@ export default defineComponent({
174174
const value16 = ref<string>('');
175175
const value17 = ref<string>('Home');
176176
const value18 = ref<string[]>([]);
177-
const dataSource = ref<string[]>([]);
178-
179-
watch(value16, val => {
180-
dataSource.value =
181-
!val || val.indexOf('@') >= 0
182-
? []
183-
: [`${val}@gmail.com`, `${val}@163.com`, `${val}@qq.com`];
184-
});
185177
186178
return {
187179
value1,
@@ -203,7 +195,6 @@ export default defineComponent({
203195
value17,
204196
value18,
205197
options,
206-
dataSource,
207198
};
208199
},
209200
});

components/select/demo/automatic-tokenization.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ Try to copy `Lucy,Jack` to the input. Only available in tags and multiple mode.
2929
</template>
3030
<script lang="ts">
3131
import { defineComponent, ref, watch } from 'vue';
32-
import { SelectTypes } from 'ant-design-vue/es/select';
32+
import type { SelectProps } from 'ant-design-vue';
3333
export default defineComponent({
3434
setup() {
35-
const options = ref<SelectTypes['options']>([
35+
const options = ref<SelectProps['options']>([
3636
{
3737
value: 'a1',
3838
label: 'a1',

components/select/demo/basic.vue

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,17 @@ Basic Usage
4747
:options="options1"
4848
@focus="focus"
4949
@change="handleChange"
50-
>
51-
</a-select>
50+
></a-select>
5251
<a-select v-model:value="value2" style="width: 120px" disabled :options="options2"></a-select>
5352
<a-select v-model:value="value3" style="width: 120px" loading :options="options3"></a-select>
5453
</a-space>
5554
</template>
5655
<script lang="ts">
57-
import { SelectTypes } from 'ant-design-vue/es/select';
56+
import type { SelectProps } from 'ant-design-vue';
5857
import { defineComponent, ref } from 'vue';
5958
export default defineComponent({
6059
setup() {
61-
const options1 = ref<SelectTypes['options']>([
60+
const options1 = ref<SelectProps['options']>([
6261
{
6362
value: 'jack',
6463
label: 'Jack',
@@ -77,13 +76,13 @@ export default defineComponent({
7776
label: 'Yiminghe',
7877
},
7978
]);
80-
const options2 = ref<SelectTypes['options']>([
79+
const options2 = ref<SelectProps['options']>([
8180
{
8281
value: 'lucy',
8382
label: 'Lucy',
8483
},
8584
]);
86-
const options3 = ref<SelectTypes['options']>([
85+
const options3 = ref<SelectProps['options']>([
8786
{
8887
value: 'lucy',
8988
label: 'Lucy',

components/select/demo/label-in-value.vue

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,10 @@ The label of the selected item will be packed as an object for passing to the on
2525
style="width: 120px"
2626
:options="options"
2727
@change="handleChange"
28-
>
29-
</a-select>
28+
></a-select>
3029
</template>
3130
<script lang="ts">
32-
import { SelectTypes } from 'ant-design-vue/es/select';
31+
import type { SelectProps } from 'ant-design-vue';
3332
import { defineComponent, ref } from 'vue';
3433
3534
interface Value {
@@ -39,7 +38,7 @@ interface Value {
3938
4039
export default defineComponent({
4140
setup() {
42-
const options = ref<SelectTypes['options']>([
41+
const options = ref<SelectProps['options']>([
4342
{
4443
value: 'jack',
4544
label: 'Jack (100)',

components/select/demo/optgroup.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Using `OptGroup` or `options.options` to group the options.
4545
<script lang="ts">
4646
import { defineComponent, ref } from 'vue';
4747
import { UserOutlined } from '@ant-design/icons-vue';
48-
import { SelectTypes } from 'ant-design-vue/es/select';
48+
import type { SelectProps } from 'ant-design-vue';
4949
export default defineComponent({
5050
components: {
5151
UserOutlined,
@@ -55,7 +55,7 @@ export default defineComponent({
5555
console.log(`selected ${value}`);
5656
};
5757
58-
const options = ref<SelectTypes['options']>([
58+
const options = ref<SelectProps['options']>([
5959
{
6060
label: 'Manager',
6161
options: [

components/select/demo/search.vue

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,14 @@ Search the options while expanded.
2626
@focus="handleFocus"
2727
@blur="handleBlur"
2828
@change="handleChange"
29-
>
30-
</a-select>
29+
></a-select>
3130
</template>
3231
<script lang="ts">
33-
import { SelectTypes } from 'ant-design-vue/es/select';
32+
import type { SelectProps } from 'ant-design-vue';
3433
import { defineComponent, ref } from 'vue';
3534
export default defineComponent({
3635
setup() {
37-
const options = ref<SelectTypes['options']>([
36+
const options = ref<SelectProps['options']>([
3837
{ value: 'jack', label: 'Jack' },
3938
{ value: 'lucy', label: 'Lucy' },
4039
{ value: 'tom', label: 'Tom' },
@@ -62,4 +61,3 @@ export default defineComponent({
6261
},
6362
});
6463
</script>
65-

components/select/demo/suffix.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Basic Usage
3333
</template>
3434
<script lang="ts">
3535
import { SmileOutlined, MehOutlined } from '@ant-design/icons-vue';
36-
import { SelectTypes } from 'ant-design-vue/es/select';
36+
import type { SelectProps } from 'ant-design-vue';
3737
import { defineComponent, ref } from 'vue';
3838
3939
export default defineComponent({
@@ -46,7 +46,7 @@ export default defineComponent({
4646
console.log(`selected ${value}`);
4747
};
4848
49-
const options1 = ref<SelectTypes['options']>([
49+
const options1 = ref<SelectProps['options']>([
5050
{
5151
value: 'jack',
5252
label: 'Jack',
@@ -65,7 +65,7 @@ export default defineComponent({
6565
label: 'Yiminghe',
6666
},
6767
]);
68-
const options2 = ref<SelectTypes['options']>([
68+
const options2 = ref<SelectProps['options']>([
6969
{
7070
value: 'lucy',
7171
label: 'Lucy',

components/table/demo/colspan-rowspan.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Table cell supports `colSpan` and `rowSpan` that set in render return object. Wh
2929
</template>
3030
<script lang="ts">
3131
import { defineComponent } from 'vue';
32-
import { TableColumnType } from 'ant-design-vue';
32+
import type { TableColumnType } from 'ant-design-vue';
3333
// In the fifth row, other columns are merged into first column
3434
// by setting it's colSpan to be 0
3535
const renderContent = ({ index }: any) => {

components/table/demo/edit-cell.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ Table with editable cells.
4545
</a-table>
4646
</template>
4747
<script lang="ts">
48-
import { computed, defineComponent, reactive, Ref, ref, UnwrapRef } from 'vue';
48+
import { computed, defineComponent, reactive, ref } from 'vue';
49+
import type { Ref, UnwrapRef } from 'vue';
4950
import { CheckOutlined, EditOutlined } from '@ant-design/icons-vue';
5051
import { cloneDeep } from 'lodash-es';
5152

components/transfer/demo/tree-transfer.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ Customize render list with Tree component.
5252
</template>
5353
<script lang="ts">
5454
import { computed, defineComponent, ref } from 'vue';
55-
import { TreeProps } from 'ant-design-vue';
56-
import { AntTreeNodeCheckedEvent } from 'ant-design-vue/es/tree';
55+
import type { TreeProps } from 'ant-design-vue';
56+
import type { AntTreeNodeCheckedEvent } from 'ant-design-vue/es/tree';
5757
const tData: TreeProps['treeData'] = [
5858
{ key: '0-0', title: '0-0' },
5959
{

0 commit comments

Comments
 (0)