adtec-core-package 0.1.2 → 0.1.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adtec-core-package",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "scripts": {
package/src/App.vue CHANGED
@@ -1,82 +1,9 @@
1
1
  <script setup lang="ts">
2
- import { RouterLink, RouterView } from 'vue-router'
3
2
  </script>
4
3
 
5
4
  <template>
6
- <header>
7
- <img alt="Vue logo" class="logo" src="@/assets/logo.svg" width="125" height="125" />
8
5
 
9
- <div class="wrapper">
10
- <nav>
11
- <RouterLink to="/">Home</RouterLink>
12
- <RouterLink to="/about">About</RouterLink>
13
- </nav>
14
- </div>
15
- </header>
16
-
17
- <RouterView />
18
6
  </template>
19
7
 
20
8
  <style scoped>
21
- header {
22
- line-height: 1.5;
23
- max-height: 100vh;
24
- }
25
-
26
- .logo {
27
- display: block;
28
- margin: 0 auto 2rem;
29
- }
30
-
31
- nav {
32
- width: 100%;
33
- font-size: 12px;
34
- text-align: center;
35
- margin-top: 2rem;
36
- }
37
-
38
- nav a.router-link-exact-active {
39
- color: var(--color-text);
40
- }
41
-
42
- nav a.router-link-exact-active:hover {
43
- background-color: transparent;
44
- }
45
-
46
- nav a {
47
- display: inline-block;
48
- padding: 0 1rem;
49
- border-left: 1px solid var(--color-border);
50
- }
51
-
52
- nav a:first-of-type {
53
- border: 0;
54
- }
55
-
56
- @media (min-width: 1024px) {
57
- header {
58
- display: flex;
59
- place-items: center;
60
- padding-right: calc(var(--section-gap) / 2);
61
- }
62
-
63
- .logo {
64
- margin: 0 2rem 0 0;
65
- }
66
-
67
- header .wrapper {
68
- display: flex;
69
- place-items: flex-start;
70
- flex-wrap: wrap;
71
- }
72
-
73
- nav {
74
- text-align: left;
75
- margin-left: -1rem;
76
- font-size: 1rem;
77
-
78
- padding: 1rem 0;
79
- margin-top: 1rem;
80
- }
81
- }
82
9
  </style>
@@ -0,0 +1,93 @@
1
+ /**
2
+ * Create by丁盼
3
+ * 说明: v-keydown
4
+ * 创建时间: 2024/12/12 15:51
5
+ * 修改时间: 2024/12/12 15:51
6
+ */
7
+ import { useEventBus } from '@vueuse/core'
8
+ const vKeydown = {
9
+ beforeMount: (el: HTMLElement) => {
10
+ el.addEventListener('keydown', (e) => {
11
+ if (e.key === 'Tab') {
12
+ const el = e.target as HTMLElement
13
+ if (el.tagName === 'INPUT' || el.tagName === 'TEXTAREA') {
14
+ //查找上级DIV 节点 取消编辑
15
+ let b = true
16
+ let i = 0
17
+ let parent: any = el
18
+ while (b) {
19
+ parent = parent.parentElement
20
+ if (parent.className.indexOf('el-table-column-edit') > -1) {
21
+ b = false
22
+ } else {
23
+ i++
24
+ if (i > 5) {
25
+ b = false
26
+ }
27
+ }
28
+ }
29
+ const bus = useEventBus<string>(parent.id)
30
+ bus.emit()
31
+ //寻找下一个编辑的单元格
32
+ //找到el-table__cell' 节点
33
+ b = true
34
+ i = 0
35
+ while (b) {
36
+ parent = parent.parentElement
37
+ if (parent.className.indexOf('el-table__cell') > -1) {
38
+ b = false
39
+ } else {
40
+ i++
41
+ if (i > 5) {
42
+ b = false
43
+ }
44
+ }
45
+ }
46
+ b = true
47
+ i = 0
48
+ while (b) {
49
+ if (parent.nextElementSibling) {
50
+ const input = parent.nextElementSibling.getElementsByClassName('el-table-column-edit')
51
+ if (input.length > 0) {
52
+ setTimeout(() => {
53
+ input[0].click()
54
+ }, 10)
55
+ b = false
56
+ e.stopPropagation()
57
+ return false
58
+ } else {
59
+ parent = parent.nextElementSibling
60
+ i++
61
+ if (i > 5) {
62
+ b = false
63
+ }
64
+ }
65
+ } else {
66
+ b = false
67
+ }
68
+ }
69
+ //如果当前行结束判断下一行数据
70
+ const tr = parent.parentNode.nextElementSibling
71
+ try {
72
+ for (let j = 0; j < tr.children.length; j++) {
73
+ const input = tr.children[j].getElementsByClassName('el-table-column-edit')
74
+ if (input.length > 0) {
75
+ setTimeout(() => {
76
+ input[0].click()
77
+ e.stopPropagation()
78
+ }, 10)
79
+ break
80
+ }
81
+ }
82
+ } catch {
83
+ /* empty */
84
+ }
85
+ }
86
+ }
87
+ })
88
+ },
89
+ unmounted: (el: HTMLElement) => {
90
+ el.removeEventListener('keydown', () => {})
91
+ },
92
+ }
93
+ export default vKeydown
@@ -0,0 +1,29 @@
1
+ /**
2
+ * 创建人:丁盼
3
+ * 说明: 全局混入
4
+ * 创建时间: 2024/8/29 下午2:31
5
+ * 修改时间: 2024/8/29 下午2:31
6
+ */
7
+ import operationAuth from '../components/OperationAuth/operationAuth.vue'
8
+ import ElFlex from '../components/ElFlex/ElFlex.vue'
9
+ import ElSearch from '../components/Search/ElSearch.vue'
10
+ import ElTitle from '../components/Title/ElTitle.vue'
11
+ import ElIcons from '../components/icon/ElIcons.vue'
12
+ import ElIconBtn from '../components/icon/ElIconBtn.vue'
13
+ import ElIconSearch from '../components/Search/ElIconSearch.vue'
14
+ import vKeydown from '../directives/vKeydown'
15
+ //@ts-ignore
16
+ export const globalMixin = {
17
+ components: {
18
+ operationAuth,
19
+ ElFlex,
20
+ ElSearch,
21
+ ElTitle,
22
+ ElIcons,
23
+ ElIconBtn,
24
+ ElIconSearch,
25
+ },
26
+ directives:{
27
+ "keydown":vKeydown
28
+ }
29
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Create by丁盼
3
+ * 说明: plugins
4
+ * 创建时间: 2025/1/14 17:53
5
+ * 修改时间: 2025/1/14 17:53
6
+ */
7
+ import { globalMixin } from '../mixin/globalMixin'
8
+ export default {
9
+ install(Vue: any) {
10
+ Vue.mixin(globalMixin)
11
+ }
12
+ }
@@ -1 +0,0 @@
1
- .icon[data-v-0af0286e]{width:1em;height:1em;vertical-align:-.15em;fill:currentColor;overflow:hidden}.icon-btn[data-v-55560fd8]{cursor:pointer;margin:0 0 0 8px;--el-button-hover-bg-color: var(--el-color-primary-light-3)}.icon-btn[data-v-55560fd8]:hover{color:var(--el-button-hover-bg-color)}.icon-btn--disabled[data-v-55560fd8]{color:var(--el-color-disabled-text-color);cursor:not-allowed!important}.icon-btn--size-large[data-v-55560fd8]{font-size:var(--el-font-size-large)}.icon-btn--size-default[data-v-55560fd8]{font-size:var(--el-font-size-base)}.icon-btn--size-small[data-v-55560fd8]{font-size:var(--el-font-size-small)}.icon-btn--primary[data-v-55560fd8]{--el-button-hover-bg-color: var(--el-color-primary-light-3);--el-button-disabled-bg-color: var(--el-color-primary-light-5);color:var(--el-color-primary)}.icon-btn--success[data-v-55560fd8]{--el-button-hover-bg-color: var(--el-color-success-light-3);--el-button-disabled-bg-color: var(--el-color-success-light-5);color:var(--el-color-success)}.icon-btn--warning[data-v-55560fd8]{--el-button-hover-bg-color: var(--el-color-warning-light-3);--el-button-disabled-bg-color: var(--el-color-warning-light-5);color:var(--el-color-warning)}.icon-btn--danger[data-v-55560fd8]{--el-button-hover-bg-color: var(--el-color-danger-light-3);--el-button-disabled-bg-color: var(--el-color-danger-light-5);color:var(--el-color-danger)}.icon-btn--info[data-v-55560fd8]{--el-button-hover-bg-color: var(--el-color-info-light-3);--el-button-disabled-bg-color: var(--el-color-info-light-5);color:var(--el-color-info)}.elementSelect[data-v-e090fb7f]{border:2px dashed #1a67f8!important}.demo-form-inline .el-input[data-v-e090fb7f]{--el-input-width: 220px}.demo-form-inline .el-select[data-v-e090fb7f]{--el-select-width: 220px}.icon-btn[data-v-870f2e96]{margin-right:5px;cursor:pointer;--el-button-hover-bg-color: var(--el-color-primary-light-3)}.icon-btn[data-v-870f2e96]:hover{color:var(--el-button-hover-bg-color)}.icon-btn--disabled[data-v-870f2e96]{color:var(--el-color-disabled-text-color);cursor:not-allowed!important}.icon-btn--size-large[data-v-870f2e96]{font-size:var(--el-font-size-large)}.icon-btn--size-default[data-v-870f2e96]{font-size:var(--el-font-size-base)}.icon-btn--size-small[data-v-870f2e96]{font-size:var(--el-font-size-small)}.icon-btn--primary[data-v-870f2e96]{--el-button-hover-bg-color: var(--el-color-primary-light-3);--el-button-disabled-bg-color: var(--el-color-primary-light-5);color:var(--el-color-primary)}.icon-btn--success[data-v-870f2e96]{--el-button-hover-bg-color: var(--el-color-success-light-3);--el-button-disabled-bg-color: var(--el-color-success-light-5);color:var(--el-color-success)}.icon-btn--warning[data-v-870f2e96]{--el-button-hover-bg-color: var(--el-color-warning-light-3);--el-button-disabled-bg-color: var(--el-color-warning-light-5);color:var(--el-color-warning)}.icon-btn--danger[data-v-870f2e96]{--el-button-hover-bg-color: var(--el-color-danger-light-3);--el-button-disabled-bg-color: var(--el-color-danger-light-5);color:var(--el-color-danger)}.icon-btn--info[data-v-870f2e96]{--el-button-hover-bg-color: var(--el-color-info-light-3);--el-button-disabled-bg-color: var(--el-color-info-light-5);color:var(--el-color-info)}