Browse Source

初始化项目

wangzhihui 4 năm trước cách đây
mục cha
commit
c08f19ea84

+ 6 - 2
README.md

@@ -1,3 +1,7 @@
-# JiangYunPhotosAgent_WebApp
+# Vue 3 + Vite
 
-江运随手拍-货主前端
+This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
+
+## Recommended IDE Setup
+
+- [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.volar)

+ 13 - 0
index.html

@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <link rel="icon" href="/favicon.ico" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>Vite App</title>
+  </head>
+  <body>
+    <div id="app"></div>
+    <script type="module" src="/src/main.js"></script>
+  </body>
+</html>

+ 20 - 0
package.json

@@ -0,0 +1,20 @@
+{
+  "name": "jiangyunphotosagent",
+  "version": "0.0.0",
+  "scripts": {
+    "dev": "vite",
+    "build": "vite build",
+    "serve": "vite preview"
+  },
+  "dependencies": {
+    "element3": "^0.0.40",
+    "vue": "^3.2.16",
+    "axios": "^0.21.1",
+    "vue-router": "^4.0.4"
+
+  },
+  "devDependencies": {
+    "@vitejs/plugin-vue": "^1.9.3",
+    "vite": "^2.6.4"
+  }
+}

BIN
public/favicon.ico


+ 13 - 0
src/App.vue

@@ -0,0 +1,13 @@
+<template>
+  <router-view></router-view>
+</template>
+
+<script>
+export default {
+  data() {
+    return {};
+  },
+};
+</script>
+
+<style></style>

BIN
src/assets/logo.png


BIN
src/images/顺发999.png


+ 7 - 0
src/main.js

@@ -0,0 +1,7 @@
+import "element3/lib/theme-chalk/index.css";
+import { createApp } from "vue";
+import Element3 from "element3";
+import App from "./App.vue";
+import router from "./router";
+
+createApp(App).use(router).use(Element3).mount("#app");

+ 28 - 0
src/router/index.js

@@ -0,0 +1,28 @@
+import {
+  createWebHistory,
+  createMemoryHistory,
+  createRouter,
+} from "vue-router";
+
+const router = createRouter({
+  history: createWebHistory(),
+  routes: [
+    {
+      path: "/",
+      name: "index",
+      component: () => import("../views/index/Index.vue"),
+    },
+    {
+      path: "/login",
+      name: "login",
+      component: () => import("../views/index/Login.vue"),
+    },
+    {
+      path: "/test",
+      name: "test",
+      component: () => import("../views/test/test.vue"),
+    },
+  ],
+});
+
+export default router;

+ 99 - 0
src/views/index/Index.vue

@@ -0,0 +1,99 @@
+<template>
+  <div
+    class="block"
+    style="
+      width: 60vw;
+      margin: 0 auto;
+      height: 800px;
+      overflow: auto;
+      border: 1px solid grey;
+    "
+  >
+    <el-timeline>
+      <el-timeline-item timestamp="2018/4/2" placement="top">
+        <el-card>
+          <div style="display: flex; justify-content: space-around">
+            <div>
+              <h2>船名:顺发999</h2>
+              <h3>MMSI:410888292</h3>
+              <h3>拍摄时间:2021/04/02 09:46</h3>
+              <h3>经度:31.2323</h3>
+              <h3>纬度:132.998</h3>
+              <h3></h3>
+            </div>
+            <div>
+              <img
+                style="width: 300px; height: 200px; border: 1px solid red"
+                src="../../images/顺发999.png"
+                alt=""
+              />
+            </div>
+          </div>
+        </el-card>
+      </el-timeline-item>
+      <el-timeline-item timestamp="2018/4/2" placement="top">
+        <el-card>
+          <div style="display: flex; justify-content: space-around">
+            <div>
+              <h2>船名:顺发999</h2>
+              <h3>MMSI:410888292</h3>
+              <h3>拍摄时间:2021/04/02 09:46</h3>
+              <h3>经度:31.2323</h3>
+              <h3>纬度:132.998</h3>
+              <h3></h3>
+            </div>
+            <div>
+              <img
+                style="width: 300px; height: 200px; border: 1px solid grey"
+                src="../../images/顺发999.png"
+                alt=""
+              />
+            </div>
+          </div>
+        </el-card>
+      </el-timeline-item>
+      <el-timeline-item timestamp="2018/4/2" placement="top">
+        <el-card>
+          <div style="display: flex; justify-content: space-around">
+            <div>
+              <h2>船名:顺发999</h2>
+              <h3>MMSI:410888292</h3>
+              <h3>拍摄时间:2021/04/02 09:46</h3>
+              <h3>经度:31.2323</h3>
+              <h3>纬度:132.998</h3>
+              <h3></h3>
+            </div>
+            <div>
+              <img
+                style="width: 300px; height: 200px; border: 1px solid red"
+                src="../../images/顺发999.png"
+                alt=""
+              />
+            </div>
+          </div>
+        </el-card>
+      </el-timeline-item>
+      <el-timeline-item timestamp="2018/4/2" placement="top">
+        <el-card>
+          <div style="display: flex; justify-content: space-around">
+            <div>
+              <h2>船名:顺发999</h2>
+              <h3>MMSI:410888292</h3>
+              <h3>拍摄时间:2021/04/02 09:46</h3>
+              <h3>经度:31.2323</h3>
+              <h3>纬度:132.998</h3>
+              <h3></h3>
+            </div>
+            <div>
+              <img
+                style="width: 300px; height: 200px; border: 1px solid red"
+                src="../../images/顺发999.png"
+                alt=""
+              />
+            </div>
+          </div>
+        </el-card>
+      </el-timeline-item>
+    </el-timeline>
+  </div>
+</template>

+ 1 - 0
src/views/index/Login.vue

@@ -0,0 +1 @@
+<template>login</template>

+ 1 - 0
src/views/test/Test.vue

@@ -0,0 +1 @@
+<template>test</template>

+ 7 - 0
vite.config.js

@@ -0,0 +1,7 @@
+import { defineConfig } from 'vite'
+import vue from '@vitejs/plugin-vue'
+
+// https://vitejs.dev/config/
+export default defineConfig({
+  plugins: [vue()]
+})