@stonecrop/atable 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +82 -0
- package/dist/atable.js +775 -0
- package/dist/atable.js.map +1 -0
- package/dist/atable.umd.cjs +2 -0
- package/dist/atable.umd.cjs.map +1 -0
- package/dist/style.css +1 -0
- package/package.json +66 -0
- package/src/components/ACell.vue +213 -0
- package/src/components/AExpansionRow.vue +88 -0
- package/src/components/ARow.vue +116 -0
- package/src/components/ATable.vue +210 -0
- package/src/components/ATableHeader.vue +60 -0
- package/src/components/ATableModal.vue +50 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div ref="amodal" class="amodal" tabindex="-1" @click="handleInput" @input="handleInput">
|
|
3
|
+
<slot />
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script setup lang="ts">
|
|
8
|
+
import { inject } from 'vue'
|
|
9
|
+
|
|
10
|
+
import TableDataStore from '.'
|
|
11
|
+
|
|
12
|
+
const props = defineProps<{
|
|
13
|
+
colIndex?: number
|
|
14
|
+
rowIndex?: number
|
|
15
|
+
tableid?: string
|
|
16
|
+
}>()
|
|
17
|
+
|
|
18
|
+
const tableData = inject<TableDataStore>(props.tableid)
|
|
19
|
+
|
|
20
|
+
const handleInput = (event: Event) => {
|
|
21
|
+
event.stopPropagation()
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// const cellBackgroundColor = computed(() => {
|
|
25
|
+
// if (tableData.modal.parent) {
|
|
26
|
+
// let computedstyle = window.getComputedStyle(tableData.modal.parent)
|
|
27
|
+
// return 'blue'
|
|
28
|
+
// } else {
|
|
29
|
+
// return 'inherit'
|
|
30
|
+
// }
|
|
31
|
+
// })
|
|
32
|
+
</script>
|
|
33
|
+
|
|
34
|
+
<style scoped>
|
|
35
|
+
@import url('@stonecrop/themes/default/default.css');
|
|
36
|
+
div {
|
|
37
|
+
z-index: 100;
|
|
38
|
+
position: absolute;
|
|
39
|
+
background-color: var(--row-color-zebra-dark);
|
|
40
|
+
/* margin: 0px;
|
|
41
|
+
outline: none;
|
|
42
|
+
box-shadow: none;
|
|
43
|
+
color: var(--cell-text-color);
|
|
44
|
+
text-overflow: ellipsis;
|
|
45
|
+
overflow: hidden;
|
|
46
|
+
padding-left: 0.5ch;
|
|
47
|
+
padding-right: 0.5ch;
|
|
48
|
+
font-size: var(--table-font-size); */
|
|
49
|
+
}
|
|
50
|
+
</style>
|