🎉 Initial commit

master
KaKi87 6 months ago
commit 8891ad07a6
  1. 14
      app.js
  2. 3
      components/App.css
  3. 16
      components/App.js
  4. 15
      components/AppMain.js
  5. 3
      components/AppMainMessage.css
  6. 15
      components/AppMainMessage.js

@ -0,0 +1,14 @@
import App from './components/App.js';
export const createMyApp = ({ createApp }) => {
const app = createApp(App);
app.mixin({
'mounted': function(){
if(this.style && !document.adoptedStyleSheets.includes(this.style))
document.adoptedStyleSheets.push(this.style);
}
});
return app;
};

@ -0,0 +1,3 @@
.App {
font-family: sans-serif;
}

@ -0,0 +1,16 @@
import AppMain from './AppMain.js';
import style from './App.css' assert { type: 'css' };
export default {
components: {
AppMain
},
'data': () => ({
style
}),
template: `
<AppMain>
</AppMain>
`
}

@ -0,0 +1,15 @@
import AppMainMessage from './AppMainMessage.js';
export default {
components: {
AppMainMessage
},
'data': () => ({
message: 'Hello, World !'
}),
template: `
<AppMainMessage
:message="message"
></AppMainMessage>
`
};

@ -0,0 +1,3 @@
.App__Main__Message {
font-style: italic;
}

@ -0,0 +1,15 @@
import style from './AppMainMessage.css' assert { type: 'css' };
export default {
props: {
message: String
},
'data': () => ({
style
}),
template: `
<p class="App__Main__Message">
{{ message }}
</p>
`
};
Loading…
Cancel
Save