♻️ Move 'src' directory to git submodule
parent
ea5997e462
commit
d7bd5f69a9
|
@ -0,0 +1,3 @@
|
|||
[submodule "src"]
|
||||
path = src
|
||||
url = https://git.kaki87.net/KaKi87/template-vue3-src.git
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 8891ad07a6b411b6e79e8d785722e486e2f7e1ae
|
14
src/app.js
14
src/app.js
|
@ -1,14 +0,0 @@
|
|||
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;
|
||||
};
|
|
@ -1,3 +0,0 @@
|
|||
.App {
|
||||
font-family: sans-serif;
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
import AppMain from './AppMain.js';
|
||||
|
||||
import style from './App.css' assert { type: 'css' };
|
||||
|
||||
export default {
|
||||
components: {
|
||||
AppMain
|
||||
},
|
||||
'data': () => ({
|
||||
style
|
||||
}),
|
||||
template: `
|
||||
<AppMain>
|
||||
</AppMain>
|
||||
`
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
import AppMainMessage from './AppMainMessage.js';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
AppMainMessage
|
||||
},
|
||||
'data': () => ({
|
||||
message: 'Hello, World !'
|
||||
}),
|
||||
template: `
|
||||
<AppMainMessage
|
||||
:message="message"
|
||||
></AppMainMessage>
|
||||
`
|
||||
};
|
|
@ -1,3 +0,0 @@
|
|||
.App__Main__Message {
|
||||
font-style: italic;
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
import style from './AppMainMessage.css' assert { type: 'css' };
|
||||
|
||||
export default {
|
||||
props: {
|
||||
message: String
|
||||
},
|
||||
'data': () => ({
|
||||
style
|
||||
}),
|
||||
template: `
|
||||
<p class="App__Main__Message">
|
||||
{{ message }}
|
||||
</p>
|
||||
`
|
||||
};
|
Loading…
Reference in New Issue