refactor: use raw-loader to import template, update directive usage in demo

This commit is contained in:
Justineo
2021-09-17 19:41:59 +08:00
parent 573407b07a
commit 0a080cf662
23 changed files with 241 additions and 204 deletions

View File

@@ -0,0 +1,11 @@
{
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"semi": false,
"singleQuote": true,
"trailingComma": "none",
"bracketSpacing": true,
"jsxBracketSameLine": false,
"fluid": false
}

View File

@@ -0,0 +1,21 @@
<template>
<main>
<demo/>
</main>
</template>
<script>
import Demo from './Demo'
export default {
components: {
Demo
}
}
</script>
<style scoped>
main {
padding: 24px;
}
</style>

View File

@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="zh-Hans">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<title>VEUI Playground</title>
</head>
<body>
<div id="app"></div>
</body>
</html>

View File

@@ -0,0 +1,33 @@
<!DOCTYPE html>
<html lang="zh-Hans">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<title>VEUI Playground</title>
<style>
* {
box-sizing: border-box;
}
body {
position: relative;
width: 100vw;
height: 100vh;
margin: 0;
background-color: #040404;
}
.loading {
position: absolute;
top: 38.4%;
left: 50%;
transform: translate(-50%, -38.4%);
height: 48px;
font-weight: 400;
color: #fff;
}
</style>
</head>
<body>
{{loading}}
</body>
</html>

View File

@@ -0,0 +1,11 @@
import Vue from 'vue'
import App from './App.vue'
import 'veui-theme-dls/dist/dls.esm'
import 'veui-theme-dls-icons/dist/icons.esm'
import 'veui/dist/locale.{{locale}}.esm'
Vue.config.productionTip = false
new Vue({
render: (h) => h(App)
}).$mount('#app')

View File

@@ -0,0 +1,7 @@
{
"dependencies": {
"veui": "2.1.2",
"veui-theme-dls": "2.1.2",
"vue": "2.6.14"
}
}