add jQuery
This commit is contained in:
5
components.d.ts
vendored
5
components.d.ts
vendored
@@ -13,9 +13,14 @@ declare module 'vue' {
|
|||||||
NButton: typeof import('naive-ui')['NButton']
|
NButton: typeof import('naive-ui')['NButton']
|
||||||
NConfigProvider: typeof import('naive-ui')['NConfigProvider']
|
NConfigProvider: typeof import('naive-ui')['NConfigProvider']
|
||||||
NFlex: typeof import('naive-ui')['NFlex']
|
NFlex: typeof import('naive-ui')['NFlex']
|
||||||
|
NLayout: typeof import('naive-ui')['NLayout']
|
||||||
|
NLayoutHeader: typeof import('naive-ui')['NLayoutHeader']
|
||||||
NSplit: typeof import('naive-ui')['NSplit']
|
NSplit: typeof import('naive-ui')['NSplit']
|
||||||
|
NTab: typeof import('naive-ui')['NTab']
|
||||||
NTabPane: typeof import('naive-ui')['NTabPane']
|
NTabPane: typeof import('naive-ui')['NTabPane']
|
||||||
NTabs: typeof import('naive-ui')['NTabs']
|
NTabs: typeof import('naive-ui')['NTabs']
|
||||||
|
NTag: typeof import('naive-ui')['NTag']
|
||||||
|
NText: typeof import('naive-ui')['NText']
|
||||||
Preview: typeof import('./src/components/Preview.vue')['default']
|
Preview: typeof import('./src/components/Preview.vue')['default']
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
2
public/jquery.min.js
vendored
Normal file
2
public/jquery.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -40,7 +40,7 @@
|
|||||||
<span>选项</span>
|
<span>选项</span>
|
||||||
</n-flex>
|
</n-flex>
|
||||||
</template>
|
</template>
|
||||||
<n-flex vertical class="wrapper">
|
<n-flex size="large" vertical class="wrapper">
|
||||||
<n-flex align="center">
|
<n-flex align="center">
|
||||||
<span class="label">重置</span>
|
<span class="label">重置</span>
|
||||||
<n-button @click="reset('html')">HTML</n-button>
|
<n-button @click="reset('html')">HTML</n-button>
|
||||||
@@ -59,6 +59,11 @@
|
|||||||
</n-button>
|
</n-button>
|
||||||
</n-flex>
|
</n-flex>
|
||||||
</n-flex>
|
</n-flex>
|
||||||
|
<n-flex align="center">
|
||||||
|
<span class="label">预加载</span>
|
||||||
|
<n-tag type="success">Normalize.css</n-tag>
|
||||||
|
<n-tag type="success">jQuery</n-tag>
|
||||||
|
</n-flex>
|
||||||
</n-flex>
|
</n-flex>
|
||||||
</n-tab-pane>
|
</n-tab-pane>
|
||||||
</n-tabs>
|
</n-tabs>
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<n-flex align="center" justify="space-between" class="pane">
|
||||||
<iframe class="iframe" ref="iframe"></iframe>
|
<n-text class="preview">预览</n-text>
|
||||||
</div>
|
<n-flex>
|
||||||
|
<n-button>提交</n-button>
|
||||||
|
</n-flex>
|
||||||
|
</n-flex>
|
||||||
|
<iframe class="iframe" ref="iframe"></iframe>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
@@ -23,6 +27,7 @@ function preview() {
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<style>${css.value}</style>
|
<style>${css.value}</style>
|
||||||
<link rel="stylesheet" href="/normalize.min.css" />
|
<link rel="stylesheet" href="/normalize.min.css" />
|
||||||
|
<script src="/jquery.min.js"><\/script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
${html.value}
|
${html.value}
|
||||||
@@ -35,6 +40,14 @@ watchDebounced([html, css, js], preview, { debounce: 500, maxWait: 1000 })
|
|||||||
onMounted(preview)
|
onMounted(preview)
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
.pane {
|
||||||
|
height: 46px;
|
||||||
|
background-color: rgb(247, 247, 250);
|
||||||
|
padding: 0 20px;
|
||||||
|
}
|
||||||
|
.preview {
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
.iframe {
|
.iframe {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|||||||
Reference in New Issue
Block a user