mirror of
https://github.com/lainbo/component-party.git
synced 2026-04-05 04:59:02 +08:00
chore: run formatting
This commit is contained in:
@@ -2,10 +2,10 @@ import { component$, useStore } from "@builder.io/qwik";
|
||||
|
||||
export const Counter = component$(() => {
|
||||
const store = useStore({ count: 0 });
|
||||
|
||||
const incrementCount = $(() => {
|
||||
|
||||
const incrementCount = () => {
|
||||
store.count++;
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
@@ -3,7 +3,7 @@ import { customElement, state, query } from "lit/decorators.js";
|
||||
|
||||
@customElement("input-focused")
|
||||
export class InputFocused extends LitElement {
|
||||
@query('input') inputEl;
|
||||
@query("input") inputEl;
|
||||
|
||||
firstUpdated() {
|
||||
this.inputEl.focus();
|
||||
|
||||
@@ -8,14 +8,15 @@ export class FunnyButton extends LitElement {
|
||||
background: rgba(0, 0, 0, 0.4);
|
||||
color: #fff;
|
||||
padding: 10px 20px;
|
||||
fontSize: 30px;
|
||||
fontsize: 30px;
|
||||
border: 2px solid #fff;
|
||||
margin: 8px;
|
||||
transform: scale(0.9);
|
||||
boxShadow: 4px 4px rgba(0, 0, 0, 0.4);
|
||||
boxshadow: 4px 4px rgba(0, 0, 0, 0.4);
|
||||
transition: transform 0.2s cubic-bezier(0.34, 1.65, 0.88, 0.925) 0s;
|
||||
outline: 0;
|
||||
}`;
|
||||
}
|
||||
`;
|
||||
|
||||
render() {
|
||||
return html`
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<div>
|
||||
<h2>My Profile</h2>
|
||||
<p>Username: {{this.user.username}}</p>
|
||||
<p>Email: {{this.user.email}}</p>
|
||||
<button {{on "click" (fn this.userService.updateUserName "Jane")}}>
|
||||
Update username to Jane
|
||||
</button>
|
||||
<div>
|
||||
<h2>My Profile</h2>
|
||||
<p>Username: {{this.user.username}}</p>
|
||||
<p>Email: {{this.user.email}}</p>
|
||||
<button {{on "click" (fn this.userService.updateUserName "Jane")}}>
|
||||
Update username to Jane
|
||||
</button>
|
||||
</div>
|
||||
@@ -1,10 +1,10 @@
|
||||
import Component from '@glimmer/component';
|
||||
import { service } from '@ember/service';
|
||||
|
||||
export default class UserProfileComponent extends Component {
|
||||
@service userService;
|
||||
|
||||
get user() {
|
||||
return this.userService.user;
|
||||
}
|
||||
}
|
||||
import Component from "@glimmer/component";
|
||||
import { service } from "@ember/service";
|
||||
|
||||
export default class UserProfileComponent extends Component {
|
||||
@service userService;
|
||||
|
||||
get user() {
|
||||
return this.userService.user;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
import Service from '@ember/service';
|
||||
import { tracked } from '@glimmer/tracking';
|
||||
import { action } from '@ember/object';
|
||||
|
||||
export default class UserServiceService extends Service {
|
||||
@tracked id = 1;
|
||||
@tracked username = 'unicorn42';
|
||||
@tracked email = 'unicorn42@example.com';
|
||||
|
||||
get user() {
|
||||
return {
|
||||
id: this.id,
|
||||
username: this.username,
|
||||
email: this.email,
|
||||
};
|
||||
}
|
||||
|
||||
@action
|
||||
updateUserName(newUsername) {
|
||||
this.username = newUsername;
|
||||
}
|
||||
}
|
||||
import Service from "@ember/service";
|
||||
import { tracked } from "@glimmer/tracking";
|
||||
import { action } from "@ember/object";
|
||||
|
||||
export default class UserServiceService extends Service {
|
||||
@tracked id = 1;
|
||||
@tracked username = "unicorn42";
|
||||
@tracked email = "unicorn42@example.com";
|
||||
|
||||
get user() {
|
||||
return {
|
||||
id: this.id,
|
||||
username: this.username,
|
||||
email: this.email,
|
||||
};
|
||||
}
|
||||
|
||||
@action
|
||||
updateUserName(newUsername) {
|
||||
this.username = newUsername;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<body>
|
||||
<app-root></app-root>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<script type="module" src="./main.ts"></script>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<script type="module" src="./app.js"></script>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
||||
@@ -4,6 +4,6 @@
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'App'
|
||||
}
|
||||
</script>
|
||||
name: "App",
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import Vue from 'vue'
|
||||
import App from './App.vue'
|
||||
import Vue from "vue";
|
||||
import App from "./App.vue";
|
||||
|
||||
new Vue({
|
||||
el: '#app',
|
||||
el: "#app",
|
||||
components: { App },
|
||||
template: '<App/>'
|
||||
})
|
||||
template: "<App/>",
|
||||
});
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { createApp } from 'vue'
|
||||
import App from './App.vue'
|
||||
import { createApp } from "vue";
|
||||
import App from "./App.vue";
|
||||
|
||||
createApp(App).mount('#app')
|
||||
createApp(App).mount("#app");
|
||||
|
||||
@@ -3,7 +3,9 @@ import { UseFetchUsers } from "./UseFetchUsers";
|
||||
|
||||
@autoinject()
|
||||
export class App {
|
||||
constructor(private useFetchUsers: UseFetchUsers) { }
|
||||
constructor(private useFetchUsers: UseFetchUsers) {
|
||||
this.useFetchUsers = useFetchUsers;
|
||||
}
|
||||
|
||||
attached() {
|
||||
this.useFetchUsers.fetchData();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
@@ -46,7 +46,8 @@
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: "Mona Sans";
|
||||
src: url("/font/Mona-Sans.woff2") format("woff2 supports variations"),
|
||||
src:
|
||||
url("/font/Mona-Sans.woff2") format("woff2 supports variations"),
|
||||
url("/font/Mona-Sans.woff2") format("woff2-variations");
|
||||
font-weight: 400 800;
|
||||
/* font-weight: 400 500 600 700 800; */
|
||||
|
||||
6893
pnpm-lock.yaml
generated
6893
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user