master
yutent 2023-12-29 15:49:55 +08:00
parent 5f273fce15
commit d5b081c7ca
5 changed files with 97 additions and 16 deletions

5
dist/router.js vendored
View File

@ -3,6 +3,7 @@ import { createRouter, createWebHistory } from 'wkitd'
import './views/home.js' import './views/home.js'
import './views/detail.js' import './views/detail.js'
import './views/login.js' import './views/login.js'
import './views/deliver.js'
const router = createRouter({ const router = createRouter({
history: createWebHistory(), history: createWebHistory(),
@ -19,6 +20,10 @@ const router = createRouter({
path: '/view/:id', path: '/view/:id',
name: 'wc-detail' name: 'wc-detail'
}, },
{
path: '/deliver',
name: 'wc-deliver'
},
{ {
path: '/login', path: '/login',
name: 'wc-login' name: 'wc-login'

3
dist/store.js vendored
View File

@ -24,6 +24,7 @@ export default createStore({
{ name: '系统工具', icon: 'setting', path: '/cate/system' }, { name: '系统工具', icon: 'setting', path: '/cate/system' },
{ name: '股票网银', icon: 'chart', path: '/cate/stock' }, { name: '股票网银', icon: 'chart', path: '/cate/stock' },
{ name: '剪辑工具', icon: 'cut', path: '/cate/cut' }, { name: '剪辑工具', icon: 'cut', path: '/cate/cut' },
{ name: '桌面美化', icon: 'color', path: '/cate/theme' } { name: '桌面美化', icon: 'color', path: '/cate/theme' },
{ name: '其他', icon: 'menu-dot', path: '/cate/other' }
] ]
}) })

57
dist/views/deliver.js vendored Normal file
View File

@ -0,0 +1,57 @@
/**
* {}
* @author yutent<yutent.io@gmail.com>
* @date 2023/12/19 16:53:27
*/
import { html, css, Component, range } from 'wkit'
import { watch } from 'wkitd'
import '../components/titlebar.js'
class Deliver extends Component {
static styles = [
css`
:host {
display: flex;
position: fixed;
left: calc(50vw - 512px);
top: calc(50vh - 380px);
z-index: 2;
width: 1024px;
height: 760px;
font-size: 14px;
color: var(--color-dark-1);
-webkit-user-select: none;
user-select: none;
}
.container {
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
border-radius: 8px;
background: rgba(233, 233, 233, 0.9);
box-shadow: 0 0 12px rgba(0, 0, 0, 0.1);
--titlebar-background: #fff;
}
ul,
menu,
li {
list-style: none;
}
`
]
render() {
return html`
<div class="container">
<wc-titlebar minimize></wc-titlebar>
</div>
`
}
}
Deliver.reg('deliver')

40
dist/views/detail.js vendored
View File

@ -1,18 +1,25 @@
import { html, css, Component } from 'wkit' /**
* {}
* @author yutent<yutent.io@gmail.com>
* @date 2023/12/19 16:53:27
*/
import { html, css, Component, range } from 'wkit'
import { watch } from 'wkitd' import { watch } from 'wkitd'
import '../components/titlebar.js'
class Detail extends Component { class Detail extends Component {
static props = { result: '', decrypt: '' }
static styles = [ static styles = [
css` css`
:host { :host {
display: flex; display: flex;
position: fixed; position: fixed;
left: calc(50vw - 360px); left: calc(50vw - 512px);
top: calc(50vh - 280px); top: calc(50vh - 380px);
z-index: 2; z-index: 2;
width: 720px; width: 1024px;
height: 560px; height: 760px;
font-size: 14px; font-size: 14px;
color: var(--color-dark-1); color: var(--color-dark-1);
-webkit-user-select: none; -webkit-user-select: none;
@ -24,19 +31,26 @@ class Detail extends Component {
flex-direction: column; flex-direction: column;
width: 100%; width: 100%;
height: 100%; height: 100%;
padding: 32px;
border-radius: 8px; border-radius: 8px;
background: rgba(255, 255, 255, 0.93); background: rgba(233, 233, 233, 0.9);
box-shadow: 0 0 12px rgba(0, 0, 0, 0.1); box-shadow: 0 0 12px rgba(0, 0, 0, 0.1);
backdrop-filter: blur(6px);
--titlebar-background: #fff;
}
ul,
menu,
li {
list-style: none;
} }
` `
] ]
async mounted() {}
render() { render() {
return html` <div class="container"></div> ` return html`
<div class="container">
<wc-titlebar minimize></wc-titlebar>
</div>
`
} }
} }

8
dist/views/home.js vendored
View File

@ -108,6 +108,8 @@ class Home extends Component {
padding-bottom: 16px; padding-bottom: 16px;
border-bottom: 1px solid var(--color-plain-1); border-bottom: 1px solid var(--color-plain-1);
--wc-icon-size: 14px;
wc-tag { wc-tag {
cursor: pointer; cursor: pointer;
} }
@ -157,8 +159,10 @@ class Home extends Component {
size="small" size="small"
type=${it.path === path ? 'info' : ''} type=${it.path === path ? 'info' : ''}
@click=${ev => this.$router.push({ path: it.path })} @click=${ev => this.$router.push({ path: it.path })}
>${it.name}</wc-tag >
> ` <wc-icon name=${it.icon}></wc-icon>
${it.name}
</wc-tag> `
)} )}
</menu> </menu>
`} `}