-
Notifications
You must be signed in to change notification settings - Fork 184
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 #344 from ecaps1038/monorepo-dev
v0.0.13
- Loading branch information
Showing
95 changed files
with
796 additions
and
616 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
68 changes: 58 additions & 10 deletions
68
packages/yike-design-demo/src/examples/table/table-custom.vue
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 |
---|---|---|
@@ -1,27 +1,75 @@ | ||
<template> | ||
<yk-table :data="dataList" @selection-change="handleSelectionChange"> | ||
<yk-table | ||
ref="tableRef" | ||
:data="dataList" | ||
@selection-change="handleSelectionChange" | ||
> | ||
<yk-table-column type="selection"></yk-table-column> | ||
<yk-table-column property="name" label="用户名"></yk-table-column> | ||
<yk-table-column property="email" label="邮箱"></yk-table-column> | ||
<yk-table-column property="bir" label="生日"></yk-table-column> | ||
<yk-table-column property="desc" label="操作"> | ||
<yk-button type="secondary" status="primary">添加</yk-button> | ||
<yk-button type="outline" status="primary" style="margin-left: 8px"> | ||
删除 | ||
</yk-button> | ||
<template #default="{ row, index }"> | ||
<yk-button type="secondary" status="primary" @click="handleAdd(row)"> | ||
添加 | ||
</yk-button> | ||
<yk-button | ||
type="outline" | ||
status="primary" | ||
style="margin-left: 8px" | ||
@click="handleDelete(index)" | ||
> | ||
删除 | ||
</yk-button> | ||
</template> | ||
</yk-table-column> | ||
</yk-table> | ||
</template> | ||
<script setup lang="ts"> | ||
const dataList = [] | ||
for (let index = 0; index < 5; index++) { | ||
dataList.push({ | ||
import { reactive , ref } from 'vue' | ||
const tableRef = ref(null) | ||
const dataList = reactive([ | ||
{ | ||
name: '浩哥看沟通', | ||
email: '[email protected]', | ||
bir: '1994.03.12', | ||
}, | ||
{ | ||
name: 'Line2', | ||
email: '', | ||
bir: '1994.03.12', | ||
}, | ||
{ | ||
name: 'DF的删除测试', | ||
email: 'xx', | ||
bir: '2052.1.1', | ||
// desc: '这句话不知道 当讲不当讲,反正就是想讲一讲的', | ||
}) | ||
} | ||
}, | ||
{ | ||
name: 'DF的编辑测试', | ||
email: 'nn', | ||
bir: '2052.1.1', | ||
// desc: '这句话不知道 当讲不当讲,反正就是想讲一讲的', | ||
}, | ||
{ | ||
name: 'DFIndex测试', | ||
email: 'tt', | ||
bir: '2052.1.1', | ||
// desc: '这句话不知道 当讲不当讲,反正就是想讲一讲的', | ||
}, | ||
]) | ||
const handleSelectionChange = (val) => { | ||
console.log(val) | ||
} | ||
const handleAdd = (e) => { | ||
console.log('🚀 Add ~ e:', e) | ||
} | ||
const handleDelete = (index) => { | ||
console.log('🚀 Delete ~ e:', index) | ||
dataList.splice(index, 1) | ||
console.log('🚀 ~ handleDelete ~ dataList:', dataList) | ||
} | ||
</script> |
43 changes: 43 additions & 0 deletions
43
packages/yike-design-demo/src/examples/table/table-tbody.vue
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> | ||
<yk-table :data="dataList"> | ||
<yk-table-column property="name" label="用户名"></yk-table-column> | ||
<yk-table-column property="email" label="邮箱"></yk-table-column> | ||
<yk-table-column property="bir" label="生日"></yk-table-column> | ||
<yk-table-column property="desc" label="简介"></yk-table-column> | ||
<yk-table-column | ||
property="manage" | ||
label="操作" | ||
align="right" | ||
></yk-table-column> | ||
<template #tbody> | ||
<tr v-for="(item, index) in dataList" :key="index" class="yk-table__row"> | ||
<td class="yk-table__cell"> | ||
<yk-input v-model="item.name" /> | ||
</td> | ||
<td class="yk-table__cell"> | ||
{{ item.email }} | ||
</td> | ||
<td class="yk-table__cell"> | ||
{{ item.bir }} | ||
</td> | ||
<td class="yk-table__cell"> | ||
{{ item.desc }} | ||
</td> | ||
<td class="yk-table__cell text-right"> | ||
<yk-text type="primary" style="cursor: pointer">删除</yk-text> | ||
</td> | ||
</tr> | ||
</template> | ||
</yk-table> | ||
</template> | ||
<script setup lang="ts"> | ||
const dataList = [] | ||
for (let index = 0; index < 5; index++) { | ||
dataList.push({ | ||
name: '浩哥看沟通', | ||
email: '[email protected]', | ||
bir: '1994.03.12', | ||
desc: '这句话不知道 当讲不当讲,反正就是想讲一讲的', | ||
}) | ||
} | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
### 安装方式 | ||
|
||
``` | ||
```ts | ||
npm install --save-dev @yike-design/ui | ||
``` | ||
|
||
|
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
@import '../../styles/color/colors.less'; | ||
@import '../../styles/basis.less'; | ||
.modal { | ||
&-enter { | ||
&-from { | ||
|
Oops, something went wrong.