This is an automated email from the ASF dual-hosted git repository.

ovilia pushed a commit to branch refactor
in repository https://gitbox.apache.org/repos/asf/echarts-theme-builder.git

commit 84e7b869285cbd936008da634aa0bb47b729b0a7
Author: Ovilia <zwl.s...@gmail.com>
AuthorDate: Mon Mar 21 19:16:41 2022 +0800

    feat: element ui
---
 .prettierrc                   |   7 +++++++
 src/App.vue                   |  28 +++++++++++++++++++++++++---
 src/components/EConfig.vue    |  21 +++++++++++++++++++++
 src/components/HelloWorld.vue |  34 ----------------------------------
 src/element-style.css         |   1 +
 src/fonts/element-icons.ttf   | Bin 0 -> 55956 bytes
 src/fonts/element-icons.woff  | Bin 0 -> 28200 bytes
 src/main.ts                   |  21 ++++++++++-----------
 8 files changed, 64 insertions(+), 48 deletions(-)

diff --git a/.prettierrc b/.prettierrc
new file mode 100644
index 0000000..3410e80
--- /dev/null
+++ b/.prettierrc
@@ -0,0 +1,7 @@
+{
+  "tabWidth": 2,
+  "semi": true,
+  "singleQuote": true,
+  "trailingComma": "none",
+  "printWidth": 80
+}
diff --git a/src/App.vue b/src/App.vue
index 932d5bd..60d1f7b 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -1,13 +1,15 @@
 <template>
   <el-container>
-    <el-aside>
-      <h3>Side Nav</h3>
+    <el-aside width="500px">
+      <EConfig></EConfig>
     </el-aside>
     <el-main> </el-main>
   </el-container>
 </template>
 
-<script lang="ts" setup></script>
+<script lang="ts" setup>
+import EConfig from './components/EConfig.vue';
+</script>
 
 <style scoped lang="scss">
 #echarts-spa-app {
@@ -22,5 +24,25 @@
   right: 0;
   top: 0;
   bottom: 0;
+  font-size: 14px;
+}
+
+.el-aside {
+  padding: 0 15px;
+  height: calc(100vh - 50px);
+  overflow: auto;
+}
+
+.el-main {
+  padding: 5px;
+}
+
+.text-base {
+  font-size: 1.5rem;
+  font-weight: bold;
+}
+
+.text-sm {
+  font-size: 1.4rem;
 }
 </style>
diff --git a/src/components/EConfig.vue b/src/components/EConfig.vue
new file mode 100644
index 0000000..3eae175
--- /dev/null
+++ b/src/components/EConfig.vue
@@ -0,0 +1,21 @@
+<template>
+  <el-collapse>
+    <el-collapse-item title="基本功能" name="basic">
+      <el-button-group>
+        <el-button type="primary">
+          <i class="el-icon-download"></i>
+          下载主题
+        </el-button>
+        <el-button icon="el-icon-bottom-right">
+          导入配置
+        </el-button>
+        <el-button icon="el-icon-top-right">导出配置</el-button>
+      </el-button-group>
+    </el-collapse-item>
+  </el-collapse>
+</template>
+
+<script setup lang="ts">
+import { ref } from 'vue';
+import { useI18n } from 'vue-i18n';
+</script>
diff --git a/src/components/HelloWorld.vue b/src/components/HelloWorld.vue
deleted file mode 100644
index 6583f4b..0000000
--- a/src/components/HelloWorld.vue
+++ /dev/null
@@ -1,34 +0,0 @@
-<template>
-<h1>{{msg}}</h1>
-<el-input-number v-model="count"></el-input-number>
-<p>Input Number: {{count}}</p>
-</template>
-
-<script lang="ts" setup>
-import { ref, defineProps } from 'vue';
-
-defineProps({
-    msg: {
-        type: String,
-        required: true
-    }
-});
-
-const count = ref(10);
-</script>
-
-<style scoped lang="scss">
-a {
-    color: #42b983;
-}
-label {
-    margin: 0 0.5em;
-    font-weight: bold;
-}
-code {
-    background-color: #eee;
-    padding: 2px 4px;
-    border-radius: 4px;
-    color: #304455;
-}
-</style>
\ No newline at end of file
diff --git a/src/element-style.css b/src/element-style.css
new file mode 100644
index 0000000..68befaf
--- /dev/null
+++ b/src/element-style.css
@@ -0,0 +1 @@
+@charset 
"UTF-8";.fade-in-linear-enter-active,.fade-in-linear-leave-active{-webkit-transition:opacity
 .2s linear;transition:opacity .2s 
linear}.fade-in-linear-enter,.fade-in-linear-leave,.fade-in-linear-leave-active{opacity:0}.el-fade-in-linear-enter-active,.el-fade-in-linear-leave-active{-webkit-transition:opacity
 .2s linear;transition:opacity .2s 
linear}.el-fade-in-linear-enter,.el-fade-in-linear-leave,.el-fade-in-linear-leave-active{opacity:0}.el-fade-in-enter-active,.el-fade-in-leave
 [...]
\ No newline at end of file
diff --git a/src/fonts/element-icons.ttf b/src/fonts/element-icons.ttf
new file mode 100644
index 0000000..91b74de
Binary files /dev/null and b/src/fonts/element-icons.ttf differ
diff --git a/src/fonts/element-icons.woff b/src/fonts/element-icons.woff
new file mode 100644
index 0000000..02b9a25
Binary files /dev/null and b/src/fonts/element-icons.woff differ
diff --git a/src/main.ts b/src/main.ts
index c1f9d5d..a3f9c46 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -1,30 +1,29 @@
 import { createApp } from 'vue';
-import { createI18n } from 'vue-i18n'
+import { createI18n } from 'vue-i18n';
 import zh from './i18n/zh-CN';
 import en from './i18n/en-US';
 
 import ElementPlus from 'element-plus';
-import 'element-plus/lib/theme-chalk/index.css';
+import './element-style.css';
 import App from './App.vue';
 
-
 // @ts-ignore
 const locale: string = window.ECHARTS_WEBSITE_LANGUAGE;
 
 if (typeof locale === 'undefined') {
-    console.error('Can\'t find environment variable ECHARTS_WEBSITE_LANGUAGE');
+  console.error("Can't find environment variable ECHARTS_WEBSITE_LANGUAGE");
 }
 
 const i18n = createI18n({
-    locale,
-    messages: {
-        en,
-        zh
-    }
-})
+  locale,
+  messages: {
+    en,
+    zh
+  }
+});
 
 const app = createApp(App);
 app.use(ElementPlus);
 app.use(i18n);
 
-app.mount('#echarts-spa-app');
\ No newline at end of file
+app.mount('#echarts-spa-app');

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org
For additional commands, e-mail: commits-h...@echarts.apache.org

Reply via email to