Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16319 from element-plus/dev
D2M
- Loading branch information
Showing
34 changed files
with
434 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<template> | ||
<el-space direction="vertical"> | ||
<el-space> | ||
<el-input-number v-model="num" /> | ||
<el-input-number v-model="num"> | ||
<template #decrement-icon> | ||
<el-icon> | ||
<ArrowDown /> | ||
</el-icon> | ||
</template> | ||
<template #increase-icon> | ||
<el-icon> | ||
<ArrowUp /> | ||
</el-icon> | ||
</template> | ||
</el-input-number> | ||
</el-space> | ||
<el-space> | ||
<el-input-number v-model="num" controls-position="right" /> | ||
<el-input-number v-model="num" controls-position="right"> | ||
<template #decrement-icon> | ||
<el-icon> | ||
<Minus /> | ||
</el-icon> | ||
</template> | ||
<template #increase-icon> | ||
<el-icon> | ||
<Plus /> | ||
</el-icon> | ||
</template> | ||
</el-input-number> | ||
</el-space> | ||
</el-space> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
import { ref } from 'vue' | ||
import { ArrowDown, ArrowUp, Minus, Plus } from '@element-plus/icons-vue' | ||
const num = ref(1) | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<template> | ||
<el-button :plain="true" @click="open1">Success</el-button> | ||
<el-button :plain="true" @click="open2">Warning</el-button> | ||
<el-button :plain="true" @click="open3">Message</el-button> | ||
<el-button :plain="true" @click="open4">Error</el-button> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
import { ElMessage } from 'element-plus' | ||
const open1 = () => { | ||
ElMessage({ | ||
message: 'Congrats, this is a success message.', | ||
type: 'success', | ||
plain: true, | ||
}) | ||
} | ||
const open2 = () => { | ||
ElMessage({ | ||
message: 'Warning, this is a warning message.', | ||
type: 'warning', | ||
plain: true, | ||
}) | ||
} | ||
const open3 = () => { | ||
ElMessage({ | ||
message: 'This is a message.', | ||
type: 'info', | ||
plain: true, | ||
}) | ||
} | ||
const open4 = () => { | ||
ElMessage({ | ||
message: 'Oops, this is a error message.', | ||
type: 'error', | ||
plain: true, | ||
}) | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<template> | ||
<el-tree style="max-width: 600px" :props="props" :load="loadNode" lazy /> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
import type Node from 'element-plus/es/components/tree/src/model/node' | ||
interface Tree { | ||
name: string | ||
leaf?: boolean | ||
} | ||
const props = { | ||
label: 'name', | ||
children: 'zones', | ||
isLeaf: 'leaf', | ||
} | ||
let time = 0 | ||
const loadNode = ( | ||
node: Node, | ||
resolve: (data: Tree[]) => void, | ||
reject: () => void | ||
) => { | ||
if (node.level === 0) { | ||
return resolve([{ name: 'region' }]) | ||
} | ||
time++ | ||
if (node.level >= 1) { | ||
setTimeout(() => { | ||
if (time > 3) { | ||
return resolve([ | ||
{ name: 'zone1', leaf: true }, | ||
{ name: 'zone2', leaf: true }, | ||
{ name: 'zone3', leaf: true }, | ||
]) | ||
} else { | ||
return reject() | ||
} | ||
}, 3000) | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.