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']
|
||||
NConfigProvider: typeof import('naive-ui')['NConfigProvider']
|
||||
NFlex: typeof import('naive-ui')['NFlex']
|
||||
NLayout: typeof import('naive-ui')['NLayout']
|
||||
NLayoutHeader: typeof import('naive-ui')['NLayoutHeader']
|
||||
NSplit: typeof import('naive-ui')['NSplit']
|
||||
NTab: typeof import('naive-ui')['NTab']
|
||||
NTabPane: typeof import('naive-ui')['NTabPane']
|
||||
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']
|
||||
}
|
||||
}
|
||||
|
||||
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>
|
||||
</n-flex>
|
||||
</template>
|
||||
<n-flex vertical class="wrapper">
|
||||
<n-flex size="large" vertical class="wrapper">
|
||||
<n-flex align="center">
|
||||
<span class="label">重置</span>
|
||||
<n-button @click="reset('html')">HTML</n-button>
|
||||
@@ -59,6 +59,11 @@
|
||||
</n-button>
|
||||
</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-tab-pane>
|
||||
</n-tabs>
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
<template>
|
||||
<div>
|
||||
<n-flex align="center" justify="space-between" class="pane">
|
||||
<n-text class="preview">预览</n-text>
|
||||
<n-flex>
|
||||
<n-button>提交</n-button>
|
||||
</n-flex>
|
||||
</n-flex>
|
||||
<iframe class="iframe" ref="iframe"></iframe>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
@@ -23,6 +27,7 @@ function preview() {
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<style>${css.value}</style>
|
||||
<link rel="stylesheet" href="/normalize.min.css" />
|
||||
<script src="/jquery.min.js"><\/script>
|
||||
</head>
|
||||
<body>
|
||||
${html.value}
|
||||
@@ -35,6 +40,14 @@ watchDebounced([html, css, js], preview, { debounce: 500, maxWait: 1000 })
|
||||
onMounted(preview)
|
||||
</script>
|
||||
<style scoped>
|
||||
.pane {
|
||||
height: 46px;
|
||||
background-color: rgb(247, 247, 250);
|
||||
padding: 0 20px;
|
||||
}
|
||||
.preview {
|
||||
font-size: 16px;
|
||||
}
|
||||
.iframe {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
Reference in New Issue
Block a user