anytrek-front-public-component 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.html ADDED
@@ -0,0 +1,13 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <link rel="icon" href="/favicon.ico">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>AnyFleet | Anytrek Management System</title>
8
+ </head>
9
+ <body>
10
+ <div id="app"></div>
11
+ <script type="module" src="/src/main.ts"></script>
12
+ </body>
13
+ </html>
package/package.json CHANGED
@@ -1,11 +1,28 @@
1
1
  {
2
2
  "name": "anytrek-front-public-component",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "some common component",
5
- "main": "index.js",
5
+ "main": "src/plugin/index.ts",
6
6
  "scripts": {
7
- "test": "echo \"Error: no test specified\" && exit 1"
7
+ "dev": "vite",
8
+ "build": "vite build",
9
+ "preview": "vite preview"
8
10
  },
9
11
  "author": "xbin_liao@anytrek.cn",
10
- "license": "ISC"
12
+ "keywords": [
13
+ "vue",
14
+ "vue3",
15
+ "plugin"
16
+ ],
17
+ "license": "ISC",
18
+ "dependencies": {
19
+ "vue": "^3.5.12"
20
+ },
21
+ "devDependencies": {
22
+ "@vitejs/plugin-vue": "^5.1.4",
23
+ "sass": "^1.80.4",
24
+ "typescript": "~5.6.2",
25
+ "vite": "^5.4.9",
26
+ "vue-tsc": "^2.1.6"
27
+ }
11
28
  }
Binary file
package/src/App.vue ADDED
@@ -0,0 +1,14 @@
1
+ <script setup lang="ts">
2
+ import anytrekTimepick from './plugin/component/anytrekTimepick.vue';
3
+ </script>
4
+
5
+ <template>
6
+ <anytrekTimepick msg="Vite + Vue" />
7
+ </template>
8
+
9
+ <style scoped lang="scss">
10
+ body {
11
+ margin: 0;
12
+ padding: 0;
13
+ }
14
+ </style>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="37.07" height="36" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 198"><path fill="#41B883" d="M204.8 0H256L128 220.8L0 0h97.92L128 51.2L157.44 0h47.36Z"></path><path fill="#41B883" d="m0 0l128 220.8L256 0h-51.2L128 132.48L50.56 0H0Z"></path><path fill="#35495E" d="M50.56 0L128 133.12L204.8 0h-47.36L128 51.2L97.92 0H50.56Z"></path></svg>
package/src/main.ts ADDED
@@ -0,0 +1,4 @@
1
+ import { createApp } from 'vue'
2
+ import App from './App.vue'
3
+
4
+ createApp(App).mount('#app')
@@ -0,0 +1,17 @@
1
+ <template>
2
+ <div>
3
+ <h2>Hello from MyComponent!</h2>
4
+ </div>
5
+ </template>
6
+
7
+ <script>
8
+ export default {
9
+ name: 'MyComponent'
10
+ };
11
+ </script>
12
+
13
+ <style scoped lang="scss">
14
+ h2 {
15
+ color: #42b983;
16
+ }
17
+ </style>
@@ -0,0 +1,10 @@
1
+ import anytrekTimepick from './component/anytrekTimepick.vue';
2
+
3
+ const frontPublicComponent = {
4
+ install(app: any) {
5
+ // 注册全局组件
6
+ app.component('anytrekTimepick', anytrekTimepick);
7
+ }
8
+ };
9
+
10
+ export default frontPublicComponent;
@@ -0,0 +1 @@
1
+ /// <reference types="vite/client" />
@@ -0,0 +1,25 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2020",
4
+ "useDefineForClassFields": true,
5
+ "module": "ESNext",
6
+ "lib": ["ES2020", "DOM", "DOM.Iterable"],
7
+ "skipLibCheck": true,
8
+
9
+ /* Bundler mode */
10
+ "moduleResolution": "Bundler",
11
+ "allowImportingTsExtensions": true,
12
+ "isolatedModules": true,
13
+ "moduleDetection": "force",
14
+ "noEmit": true,
15
+ "jsx": "preserve",
16
+
17
+ /* Linting */
18
+ "strict": true,
19
+ "noUnusedLocals": true,
20
+ "noUnusedParameters": true,
21
+ "noFallthroughCasesInSwitch": true,
22
+ "noUncheckedSideEffectImports": true
23
+ },
24
+ "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"]
25
+ }
@@ -0,0 +1 @@
1
+ {"root":["./src/main.ts","./src/vite-env.d.ts","./src/plugin/index.ts","./src/app.vue","./src/plugin/component/anytrektimepick.vue"],"errors":true,"version":"5.6.3"}
package/tsconfig.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "files": [],
3
+ "references": [
4
+ { "path": "./tsconfig.app.json" },
5
+ { "path": "./tsconfig.node.json" }
6
+ ]
7
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "lib": ["ES2023"],
5
+ "module": "ESNext",
6
+ "skipLibCheck": true,
7
+
8
+ /* Bundler mode */
9
+ "moduleResolution": "Bundler",
10
+ "allowImportingTsExtensions": true,
11
+ "isolatedModules": true,
12
+ "moduleDetection": "force",
13
+ "noEmit": true,
14
+
15
+ /* Linting */
16
+ "strict": true,
17
+ "noUnusedLocals": true,
18
+ "noUnusedParameters": true,
19
+ "noFallthroughCasesInSwitch": true,
20
+ "noUncheckedSideEffectImports": true
21
+ },
22
+ "include": ["vite.config.ts"]
23
+ }
@@ -0,0 +1 @@
1
+ {"root":["./vite.config.ts"],"version":"5.6.3"}
package/vite.config.ts ADDED
@@ -0,0 +1,7 @@
1
+ import { defineConfig } from 'vite'
2
+ import vue from '@vitejs/plugin-vue'
3
+
4
+ // https://vite.dev/config/
5
+ export default defineConfig({
6
+ plugins: [vue()],
7
+ })
package/index.js DELETED
@@ -1 +0,0 @@
1
- console.log('test');