npmapps 1.0.15 → 1.0.16
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/app/element-plus-gh-pages.rar +0 -0
- package/app/jsx/com.vue +44 -0
- package/app/jsx/dialog.jsx +66 -0
- package/app/jsx/index.vue +65 -0
- package/app/jsx/props.vue +33 -0
- package/app.md +1 -0
- package/package.json +12 -12
- package/README.md +0 -16
- package/app/1k.ico +0 -0
- package/app/AutoHotkey_2.0.19_setup.exe +0 -0
- package/app/my.ahk +0 -54
- package/app/rcajqkyd11fhxdks2wmyveq0hcocivbr.upxs +0 -0
|
Binary file
|
package/app/jsx/com.vue
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<script lang="jsx">
|
|
2
|
+
import { defineComponent, Fragment } from 'vue'
|
|
3
|
+
import { ElButton } from 'element-plus'
|
|
4
|
+
import { useRouter, useRoute } from 'vue-router'
|
|
5
|
+
|
|
6
|
+
export default defineComponent({
|
|
7
|
+
name: 'ComView',
|
|
8
|
+
setup(props, { slots, emit ,attrs}) {
|
|
9
|
+
console.log(props, 'props');
|
|
10
|
+
console.log(attrs, 'attrs');
|
|
11
|
+
const router = useRouter()
|
|
12
|
+
console.log(router, 'router');
|
|
13
|
+
const goHome = () => {
|
|
14
|
+
router.push('/')
|
|
15
|
+
}
|
|
16
|
+
const route = useRoute()
|
|
17
|
+
console.log(route, 'route');
|
|
18
|
+
|
|
19
|
+
return () => (
|
|
20
|
+
<>
|
|
21
|
+
<div>ComView</div>
|
|
22
|
+
<div>props: {attrs.count}</div>
|
|
23
|
+
<ElButton
|
|
24
|
+
type="primary"
|
|
25
|
+
onClick={() => {
|
|
26
|
+
attrs.dialog.close()
|
|
27
|
+
}}
|
|
28
|
+
>
|
|
29
|
+
close dialog
|
|
30
|
+
</ElButton>
|
|
31
|
+
<ElButton
|
|
32
|
+
type="primary"
|
|
33
|
+
onClick={() => {
|
|
34
|
+
goHome()
|
|
35
|
+
attrs.dialog.close()
|
|
36
|
+
}}
|
|
37
|
+
>
|
|
38
|
+
go home
|
|
39
|
+
</ElButton>
|
|
40
|
+
</>
|
|
41
|
+
)
|
|
42
|
+
}
|
|
43
|
+
})
|
|
44
|
+
</script>
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { defineComponent, ref, h, render } from 'vue'
|
|
2
|
+
import { ElDialog, ElButton } from 'element-plus'
|
|
3
|
+
|
|
4
|
+
export const openDialog = (options = {}, appContext) => {
|
|
5
|
+
const {
|
|
6
|
+
props = {},
|
|
7
|
+
events = {},
|
|
8
|
+
slots = {}
|
|
9
|
+
} = options
|
|
10
|
+
|
|
11
|
+
const container = document.createElement('div')
|
|
12
|
+
document.body.appendChild(container)
|
|
13
|
+
|
|
14
|
+
let vnode
|
|
15
|
+
const visible = ref(true)
|
|
16
|
+
const DialogHost = defineComponent({
|
|
17
|
+
name: 'FunctionDialogHost',
|
|
18
|
+
setup(props,{expose}) {
|
|
19
|
+
const handleSlot = () => {
|
|
20
|
+
const slotList = {}
|
|
21
|
+
for (const slotName in slots) {
|
|
22
|
+
if (slots.hasOwnProperty(slotName)) {
|
|
23
|
+
const slot = slots[slotName]
|
|
24
|
+
if (slot) {
|
|
25
|
+
slotList[slotName] = slot()
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return slotList
|
|
30
|
+
}
|
|
31
|
+
const cleanup = () => {
|
|
32
|
+
try {
|
|
33
|
+
render(null, container)
|
|
34
|
+
} catch {}
|
|
35
|
+
if (container && container.parentNode) {
|
|
36
|
+
container.parentNode.removeChild(container)
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// 返回 JSX 渲染函数
|
|
41
|
+
return () => (
|
|
42
|
+
<ElDialog
|
|
43
|
+
modelValue={visible.value}
|
|
44
|
+
onUpdate:modelValue={(v) => { visible.value = v }}
|
|
45
|
+
{...props}
|
|
46
|
+
{...events}
|
|
47
|
+
destroyOnClose={true}
|
|
48
|
+
onClosed={cleanup}
|
|
49
|
+
>
|
|
50
|
+
{handleSlot()}
|
|
51
|
+
</ElDialog>
|
|
52
|
+
)
|
|
53
|
+
}
|
|
54
|
+
})
|
|
55
|
+
vnode = h(DialogHost)
|
|
56
|
+
if (appContext) vnode.appContext = appContext
|
|
57
|
+
render(vnode, container)
|
|
58
|
+
const close = () => {
|
|
59
|
+
visible.value = false
|
|
60
|
+
}
|
|
61
|
+
return {
|
|
62
|
+
close,
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export default openDialog
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
<script lang="jsx">
|
|
2
|
+
import { defineComponent, ref, h, Fragment, getCurrentInstance } from "vue";
|
|
3
|
+
import PropsView from "./props.vue";
|
|
4
|
+
import openDialog from "./dialog.jsx";
|
|
5
|
+
import ComView from "./com.vue";
|
|
6
|
+
|
|
7
|
+
export default defineComponent({
|
|
8
|
+
name: "JsxView",
|
|
9
|
+
setup() {
|
|
10
|
+
const count = ref(0);
|
|
11
|
+
const propsViewRef = ref(null);
|
|
12
|
+
const countAdd = () => {
|
|
13
|
+
propsViewRef.value.countAdd();
|
|
14
|
+
};
|
|
15
|
+
const comCount = ref(0);
|
|
16
|
+
const open = () => {
|
|
17
|
+
const { appContext } = getCurrentInstance() || {};
|
|
18
|
+
let dialog = {};
|
|
19
|
+
const options = {
|
|
20
|
+
props: {
|
|
21
|
+
title: "hello dialog",
|
|
22
|
+
},
|
|
23
|
+
events: {
|
|
24
|
+
onClose: () => {
|
|
25
|
+
console.log("close11");
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
slots: {
|
|
29
|
+
default: () => <ComView count={comCount.value} dialog={dialog} />,
|
|
30
|
+
title: () => <div>title slot</div>,
|
|
31
|
+
footer: () => <div>footer slot</div>,
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
dialog.close = openDialog(options, appContext).close;
|
|
35
|
+
};
|
|
36
|
+
return () => (
|
|
37
|
+
<>
|
|
38
|
+
<div class="mb-4">
|
|
39
|
+
123
|
|
40
|
+
<span>
|
|
41
|
+
<el-button type="primary" onClick={open}>
|
|
42
|
+
open dialog
|
|
43
|
+
</el-button>
|
|
44
|
+
<el-button type="primary" onClick={countAdd}>
|
|
45
|
+
props countAdd
|
|
46
|
+
</el-button>
|
|
47
|
+
<div>count: {count.value}</div>
|
|
48
|
+
<PropsView
|
|
49
|
+
ref={propsViewRef}
|
|
50
|
+
msg="hello props"
|
|
51
|
+
onMyEvent={() => {
|
|
52
|
+
count.value++;
|
|
53
|
+
}}
|
|
54
|
+
>
|
|
55
|
+
{{
|
|
56
|
+
default: () => <div>default slot</div>,
|
|
57
|
+
}}
|
|
58
|
+
</PropsView>
|
|
59
|
+
</span>
|
|
60
|
+
</div>
|
|
61
|
+
</>
|
|
62
|
+
);
|
|
63
|
+
},
|
|
64
|
+
});
|
|
65
|
+
</script>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<script lang="jsx">
|
|
2
|
+
import { defineComponent, ref, h, Fragment } from 'vue'
|
|
3
|
+
|
|
4
|
+
export default defineComponent({
|
|
5
|
+
name: 'PropsView',
|
|
6
|
+
emits: ['myEvent'],
|
|
7
|
+
setup(props, { attrs, emit ,slots ,expose }) {
|
|
8
|
+
console.log(props, 'props');
|
|
9
|
+
console.log(attrs, 'attrs');
|
|
10
|
+
console.log(emit, 'emit');
|
|
11
|
+
console.log(slots, 'slots');
|
|
12
|
+
console.log(expose, 'expose');
|
|
13
|
+
const count = ref(0);
|
|
14
|
+
const countAdd = () => {
|
|
15
|
+
count.value++;
|
|
16
|
+
}
|
|
17
|
+
expose({
|
|
18
|
+
countAdd,
|
|
19
|
+
})
|
|
20
|
+
return () => <>
|
|
21
|
+
<div>
|
|
22
|
+
{attrs.msg}
|
|
23
|
+
<div>props count: {count.value}</div>
|
|
24
|
+
{slots.default()}
|
|
25
|
+
<el-button type="primary" onClick={() => {
|
|
26
|
+
console.log('myEvent');
|
|
27
|
+
|
|
28
|
+
emit('myEvent')
|
|
29
|
+
}}>countAdd</el-button>
|
|
30
|
+
</div></>
|
|
31
|
+
}
|
|
32
|
+
})
|
|
33
|
+
</script>
|
package/app.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1.0.16 vue3 jsx element-plus文档
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "npmapps",
|
|
3
|
+
"version": "1.0.16",
|
|
4
|
+
"main": "index.js",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
7
|
+
},
|
|
8
|
+
"keywords": [],
|
|
9
|
+
"author": "",
|
|
10
|
+
"license": "ISC",
|
|
11
|
+
"description": ""
|
|
12
|
+
}
|
package/README.md
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
1.0.0 VSCodeUserSetup-x64-1.96.4.exe
|
|
2
|
-
1.0.1 HeidiSQL_12.10.0.7000_Setup.7z
|
|
3
|
-
1.0.2 v-fullScreen.browser.text
|
|
4
|
-
1.0.3 ehcarts-3dpie
|
|
5
|
-
1.0.4 EllTable
|
|
6
|
-
1.0.5 dialogFnJsx
|
|
7
|
-
1.0.6 calendar
|
|
8
|
-
1.0.7 employeeSchedulingManagement
|
|
9
|
-
1.0.8 snippet
|
|
10
|
-
1.0.9 watchNginxConfig
|
|
11
|
-
1.0.10 nginxManagement
|
|
12
|
-
1.0.11 nginxManagement
|
|
13
|
-
1.0.12 nginxManagement
|
|
14
|
-
1.0.13 nginxManagement
|
|
15
|
-
1.0.14 nginxManagement
|
|
16
|
-
1.0.15 AutoHotkey
|
package/app/1k.ico
DELETED
|
Binary file
|
|
Binary file
|
package/app/my.ahk
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
#Requires AutoHotkey v2.0
|
|
2
|
-
TraySetIcon("C:\Users\w1768\Documents\wk\web\sanjiaozhou\1k.ico")
|
|
3
|
-
; 是否运行中
|
|
4
|
-
global isRunning := false
|
|
5
|
-
; 最大运行次数
|
|
6
|
-
global maxCount := 10 * 6
|
|
7
|
-
; 当前运行次数
|
|
8
|
-
global currentCount := 0
|
|
9
|
-
|
|
10
|
-
; 随机时间
|
|
11
|
-
global time1 := Random(2000, 4000) ; 1-2秒之间的随机数
|
|
12
|
-
|
|
13
|
-
F12::
|
|
14
|
-
{
|
|
15
|
-
global isRunning
|
|
16
|
-
global currentCount
|
|
17
|
-
global maxCount
|
|
18
|
-
|
|
19
|
-
if (isRunning || currentCount >= maxCount) {
|
|
20
|
-
isRunning := false
|
|
21
|
-
currentCount := 0
|
|
22
|
-
ToolTip("已停止")
|
|
23
|
-
setTimer(() => ToolTip(), -1000)
|
|
24
|
-
|
|
25
|
-
return
|
|
26
|
-
}
|
|
27
|
-
ToolTip("已启动", 0 ,0 )
|
|
28
|
-
; setTimer(() => ToolTip(),-1000)
|
|
29
|
-
isRunning := true
|
|
30
|
-
setTimer(action, -1000 * 10 * 6)
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
action() {
|
|
35
|
-
global isRunning
|
|
36
|
-
global currentCount
|
|
37
|
-
global time1
|
|
38
|
-
|
|
39
|
-
if (!isRunning) {
|
|
40
|
-
ToolTip("请先启动F12")
|
|
41
|
-
setTimer(() => ToolTip(), -1000)
|
|
42
|
-
return
|
|
43
|
-
}
|
|
44
|
-
currentCount++
|
|
45
|
-
MouseMove(700, 500)
|
|
46
|
-
Sleep(time1)
|
|
47
|
-
MouseClick()
|
|
48
|
-
|
|
49
|
-
Sleep(time1)
|
|
50
|
-
Send('{Down}')
|
|
51
|
-
|
|
52
|
-
setTimer(action, -1000 * 10 * 6)
|
|
53
|
-
|
|
54
|
-
}
|
|
Binary file
|