调整 demo 模块

This commit is contained in:
icssoa 2021-03-31 09:54:59 +08:00
parent 6a98fa6cca
commit 073f761fb9
22 changed files with 118 additions and 35 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "front-next-vue3", "name": "front-next-vue3",
"version": "0.1.2", "version": "0.1.3",
"private": true, "private": true,
"scripts": { "scripts": {
"serve": "vue-cli-service serve", "serve": "vue-cli-service serve",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 66 KiB

View File

@ -1,17 +1,99 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang=""> <html lang="en">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width,initial-scale=1.0"> <meta name="referer" content="never" />
<link rel="icon" href="<%= BASE_URL %>favicon.ico"> <meta name="renderer" content="webkit" />
<title><%= htmlWebpackPlugin.options.title %></title> <meta
name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=0"
/>
<link rel="icon" href="<%= BASE_URL %>favicon.ico" />
<title>COOL-ADMIN</title>
<% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.css) { %>
<link href="<%= htmlWebpackPlugin.options.cdn.css[i] %>" rel="stylesheet" />
<% } %>
<style>
html,
body,
#app {
height: 100%;
margin: 0;
padding: 0;
}
.preload {
display: flex;
flex-direction: column;
height: 100%;
letter-spacing: 1px;
background-color: #2f3447;
}
.preload .container {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
width: 100%;
user-select: none;
flex-grow: 1;
}
.preload .name {
font-size: 30px;
color: #fff;
letter-spacing: 5px;
font-weight: bold;
}
.preload .title {
color: #fff;
font-size: 14px;
margin-bottom: 10px;
}
.preload .sub-title {
color: #ababab;
font-size: 12px;
}
.preload .footer {
text-align: center;
padding: 10px 0 20px 0;
}
.preload .footer a {
font-size: 12px;
color: #ababab;
text-decoration: none;
}
</style>
</head> </head>
<body> <body>
<noscript> <noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong> <strong
>We're sorry but cool-admin doesn't work properly without JavaScript enabled. Please
enable it to continue.</strong
>
</noscript> </noscript>
<div id="app"></div> <div id="app">
<!-- built files will be auto injected --> <div class="preload">
<div class="container">
<p class="name">COOL-ADMIN</p>
<p class="title">正在加载资源...</p>
<p class="sub-title">初次加载资源可能需要较多时间 请耐心等待</p>
</div>
<div class="footer">
<a href="https://cool-js.com/" target="_blank"> https://cool-js.com </a>
</div>
</div>
</div>
<% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.js) { %>
<script src="<%= htmlWebpackPlugin.options.cdn.js[i] %>"></script>
<% } %>
</body> </body>
</html> </html>

View File

@ -18,11 +18,12 @@ function copyboard() {
copyboard(); copyboard();
export default { export default {
inserted: (el: HTMLElement, binding: any) => { mounted: (el: HTMLElement, binding: any) => {
el.className = el.className + " _copy-btn"; el.className = el.className + " _copy-btn";
el.setAttribute("data-clipboard-text", binding.value); el.setAttribute("data-clipboard-text", binding.value);
}, },
update: (el: HTMLElement, binding: any) => { beforeUpdate: (el: HTMLElement, binding: any) => {
console.log(el);
el.setAttribute("data-clipboard-text", binding.value); el.setAttribute("data-clipboard-text", binding.value);
} }
}; };

View File

@ -50,7 +50,7 @@
<script lang="ts"> <script lang="ts">
import { defineComponent, ref, resolveComponent, h } from "vue"; import { defineComponent, ref, resolveComponent, h } from "vue";
import Test from "./components/test.vue"; import Test from "./test.vue";
import { TestService } from "../../utils/service"; import { TestService } from "../../utils/service";
import { CrudLoad, FormItem, FormRef } from "@/crud/types"; import { CrudLoad, FormItem, FormRef } from "@/crud/types";

View File

@ -32,13 +32,13 @@
import { defineComponent } from "vue"; import { defineComponent } from "vue";
import { CrudLoad } from "@/crud/types"; import { CrudLoad } from "@/crud/types";
import { TestService } from "../utils/service"; import { TestService } from "../utils/service";
import Dialog from "./crud/dialog.vue"; import Dialog from "../components/crud/dialog.vue";
import ContextMenu from "./crud/context-menu.vue"; import ContextMenu from "../components/crud/context-menu.vue";
import Query from "./crud/query.vue"; import Query from "../components/crud/query.vue";
import AdvSearch from "./crud/adv-search.vue"; import AdvSearch from "../components/crud/adv-search.vue";
import Table from "./crud/table.vue"; import Table from "../components/crud/table.vue";
import Upsert from "./crud/upsert.vue"; import Upsert from "../components/crud/upsert.vue";
import Form from "./crud/form.vue"; import Form from "../components/crud/form.vue";
export default defineComponent({ export default defineComponent({
name: "crud", name: "crud",

View File

@ -9,14 +9,14 @@
</template> </template>
<script> <script>
import BClUpload from "./components/b-cl-upload"; import BClUpload from "../components/demo/b-cl-upload";
import BVCopy from "./components/b-v-copy"; import BVCopy from "../components/demo/b-v-copy";
import BIconSvg from "./components/b-icon-svg"; import BIconSvg from "../components/demo/b-icon-svg";
import BClCrud from "./components/b-cl-crud"; import BClCrud from "../components/demo/b-cl-crud";
import BClForm from "./components/b-cl-form"; import BClForm from "../components/demo/b-cl-form";
import BClContextMenu from "./components/b-cl-context-menu"; import BClContextMenu from "../components/demo/b-cl-context-menu";
import BErrorPage from "./components/b-error-page"; import BErrorPage from "../components/demo/b-error-page";
import BClEditorQuill from "./components/b-cl-editor-quill"; import BClEditorQuill from "../components/demo/b-cl-editor-quill";
export default { export default {
name: "demo", name: "demo",