Skip to content

Commit 073f761

Browse files
committed
调整 demo 模块
1 parent 6a98fa6 commit 073f761

22 files changed

+118
-35
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "front-next-vue3",
3-
"version": "0.1.2",
3+
"version": "0.1.3",
44
"private": true,
55
"scripts": {
66
"serve": "vue-cli-service serve",

public/favicon.ico

61.9 KB
Binary file not shown.

public/index.html

Lines changed: 98 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,99 @@
11
<!DOCTYPE html>
2-
<html lang="">
3-
<head>
4-
<meta charset="utf-8">
5-
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6-
<meta name="viewport" content="width=device-width,initial-scale=1.0">
7-
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
8-
<title><%= htmlWebpackPlugin.options.title %></title>
9-
</head>
10-
<body>
11-
<noscript>
12-
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
13-
</noscript>
14-
<div id="app"></div>
15-
<!-- built files will be auto injected -->
16-
</body>
17-
</html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
6+
<meta name="referer" content="never" />
7+
<meta name="renderer" content="webkit" />
8+
<meta
9+
name="viewport"
10+
content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=0"
11+
/>
12+
<link rel="icon" href="<%= BASE_URL %>favicon.ico" />
13+
<title>COOL-ADMIN</title>
14+
<% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.css) { %>
15+
<link href="<%= htmlWebpackPlugin.options.cdn.css[i] %>" rel="stylesheet" />
16+
<% } %>
17+
<style>
18+
html,
19+
body,
20+
#app {
21+
height: 100%;
22+
margin: 0;
23+
padding: 0;
24+
}
25+
26+
.preload {
27+
display: flex;
28+
flex-direction: column;
29+
height: 100%;
30+
letter-spacing: 1px;
31+
background-color: #2f3447;
32+
}
33+
34+
.preload .container {
35+
display: flex;
36+
justify-content: center;
37+
align-items: center;
38+
flex-direction: column;
39+
width: 100%;
40+
user-select: none;
41+
flex-grow: 1;
42+
}
43+
44+
.preload .name {
45+
font-size: 30px;
46+
color: #fff;
47+
letter-spacing: 5px;
48+
font-weight: bold;
49+
}
50+
51+
.preload .title {
52+
color: #fff;
53+
font-size: 14px;
54+
margin-bottom: 10px;
55+
}
56+
57+
.preload .sub-title {
58+
color: #ababab;
59+
font-size: 12px;
60+
}
61+
62+
.preload .footer {
63+
text-align: center;
64+
padding: 10px 0 20px 0;
65+
}
66+
67+
.preload .footer a {
68+
font-size: 12px;
69+
color: #ababab;
70+
text-decoration: none;
71+
}
72+
</style>
73+
</head>
74+
<body>
75+
<noscript>
76+
<strong
77+
>We're sorry but cool-admin doesn't work properly without JavaScript enabled. Please
78+
enable it to continue.</strong
79+
>
80+
</noscript>
81+
<div id="app">
82+
<div class="preload">
83+
<div class="container">
84+
<p class="name">COOL-ADMIN</p>
85+
<p class="title">正在加载资源...</p>
86+
<p class="sub-title">初次加载资源可能需要较多时间 请耐心等待</p>
87+
</div>
88+
89+
<div class="footer">
90+
<a href="https://cool-js.com/" target="_blank"> https://cool-js.com </a>
91+
</div>
92+
</div>
93+
</div>
94+
95+
<% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.js) { %>
96+
<script src="<%= htmlWebpackPlugin.options.cdn.js[i] %>"></script>
97+
<% } %>
98+
</body>
99+
</html>

src/cool/modules/copy/directives/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,12 @@ function copyboard() {
1818
copyboard();
1919

2020
export default {
21-
inserted: (el: HTMLElement, binding: any) => {
21+
mounted: (el: HTMLElement, binding: any) => {
2222
el.className = el.className + " _copy-btn";
2323
el.setAttribute("data-clipboard-text", binding.value);
2424
},
25-
update: (el: HTMLElement, binding: any) => {
25+
beforeUpdate: (el: HTMLElement, binding: any) => {
26+
console.log(el);
2627
el.setAttribute("data-clipboard-text", binding.value);
2728
}
2829
};
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/cool/modules/demo/views/crud/form.vue renamed to src/cool/modules/demo/components/crud/form.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050

5151
<script lang="ts">
5252
import { defineComponent, ref, resolveComponent, h } from "vue";
53-
import Test from "./components/test.vue";
53+
import Test from "./test.vue";
5454
import { TestService } from "../../utils/service";
5555
import { CrudLoad, FormItem, FormRef } from "@/crud/types";
5656
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)