tutor-pro-ui-vue 1.0.4-beta → 1.0.7-beta

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.
@@ -0,0 +1,9 @@
1
+ import { CommonButton } from './components/index';
2
+ /**
3
+ * 按需引入
4
+ */
5
+ export { CommonButton };
6
+ declare const _default: {
7
+ install: any;
8
+ };
9
+ export default _default;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("vue"),l=(e,t)=>(e.install=c=>{for(const s of[e,...Object.values({})])c.component(s.name,s)},e),i=o.defineComponent({name:"CommonButton",render(){return o.createVNode(o.resolveComponent("el-button"),{type:"primary"},{default:()=>[o.createTextVNode("s")]})}}),r=l(i),n={CommonButton:r},d=e=>{for(const t in n)e.component(t,n[t])},u=e=>{d(e)};typeof window<"u"&&window.Vue&&u(window.Vue);const m={install:u,...n};exports.CommonButton=r;exports.default=m;
@@ -0,0 +1,6 @@
1
+ export * from './index'
2
+ export {}
3
+ import TutorProUiVue from './index'
4
+ export default TutorProUiVue
5
+ export * from './index'
6
+ export {}
@@ -0,0 +1,31 @@
1
+ import { defineComponent as c, createVNode as m, resolveComponent as l, createTextVNode as a } from "vue";
2
+ const d = (o, n) => (o.install = (r) => {
3
+ for (const e of [o, ...Object.values({})])
4
+ r.component(e.name, e);
5
+ }, o), i = /* @__PURE__ */ c({
6
+ name: "CommonButton",
7
+ render() {
8
+ return m(l("el-button"), {
9
+ type: "primary"
10
+ }, {
11
+ default: () => [a("s")]
12
+ });
13
+ }
14
+ }), p = d(i), t = {
15
+ CommonButton: p
16
+ }, u = (o) => {
17
+ for (const n in t)
18
+ o.component(n, t[n]);
19
+ }, s = (o) => {
20
+ u(o);
21
+ };
22
+ typeof window < "u" && window.Vue && s(window.Vue);
23
+ const w = {
24
+ // 导出的对象必须具有 install,才能被 Vue.use() 方法安装
25
+ install: s,
26
+ ...t
27
+ };
28
+ export {
29
+ p as CommonButton,
30
+ w as default
31
+ };
@@ -0,0 +1 @@
1
+ (function(e,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e["tutor-pro-ui-vue"]={},e.Vue))})(this,function(e,t){"use strict";const i=((n,u)=>(n.install=c=>{for(const d of[n,...Object.values({})])c.component(d.name,d)},n))(t.defineComponent({name:"CommonButton",render(){return t.createVNode(t.resolveComponent("el-button"),{type:"primary"},{default:()=>[t.createTextVNode("s")]})}})),o={CommonButton:i},r=n=>{for(const u in o)n.component(u,o[u])},s=n=>{r(n)};typeof window<"u"&&window.Vue&&s(window.Vue);const f={install:s,...o};e.CommonButton=i,e.default=f,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/dist/vite.svg ADDED
@@ -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="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
@@ -1,31 +1,31 @@
1
1
  {
2
- "hash": "61aaf2a0",
2
+ "hash": "9f2621d2",
3
3
  "configHash": "4d499218",
4
- "lockfileHash": "11010412",
5
- "browserHash": "eb2a1a27",
4
+ "lockfileHash": "667a61af",
5
+ "browserHash": "9585d207",
6
6
  "optimized": {
7
7
  "vue": {
8
8
  "src": "../../../../node_modules/vue/dist/vue.runtime.esm-bundler.js",
9
9
  "file": "vue.js",
10
- "fileHash": "f764793c",
10
+ "fileHash": "e7cf1366",
11
11
  "needsInterop": false
12
12
  },
13
13
  "vitepress > @vue/devtools-api": {
14
14
  "src": "../../../../node_modules/vitepress/node_modules/@vue/devtools-api/dist/index.js",
15
15
  "file": "vitepress___@vue_devtools-api.js",
16
- "fileHash": "fbc3111c",
16
+ "fileHash": "c22198cc",
17
17
  "needsInterop": false
18
18
  },
19
19
  "vitepress > @vueuse/core": {
20
20
  "src": "../../../../node_modules/@vueuse/core/index.mjs",
21
21
  "file": "vitepress___@vueuse_core.js",
22
- "fileHash": "2c6c81dd",
22
+ "fileHash": "ec3032b9",
23
23
  "needsInterop": false
24
24
  },
25
25
  "@theme/index": {
26
26
  "src": "../../../../node_modules/vitepress/dist/client/theme-default/index.js",
27
27
  "file": "@theme_index.js",
28
- "fileHash": "9d449756",
28
+ "fileHash": "71365745",
29
29
  "needsInterop": false
30
30
  }
31
31
  },
@@ -3,20 +3,15 @@
3
3
  - 增加点击操作 - 弹出提示框
4
4
  - 增加点击操作 - 弹出模态框
5
5
 
6
- ## 使用
6
+ ### 基础用法
7
7
 
8
- <script setup lang='ts'>
9
- import { ref, h} from 'vue'
10
- const count = ref(0)
8
+ <script setup>
9
+ import CommonButtonEx from './examples/common-button/index.vue'
11
10
  </script>
12
-
13
- <template>
14
- </template>
11
+ <CommonButtonEx />
15
12
 
16
13
  ## Markdown Content
17
14
 
18
- The count is: {{ count }}
19
-
20
15
  <style module>
21
16
  .button {
22
17
  color: red;
@@ -1,6 +1,7 @@
1
1
  <template>
2
+ sss
2
3
  <CommonButton />
3
4
  </template>
4
5
  <script setup lang="ts">
5
- import { CommonButton } from 'tutor-pro-ui-vue';
6
+ import { CommonButton } from '../../../dist/tutor-pro-ui-vue.js';
6
7
  </script>
package/package.json CHANGED
@@ -1,8 +1,10 @@
1
1
  {
2
2
  "name": "tutor-pro-ui-vue",
3
3
  "private": false,
4
- "version": "1.0.4-beta",
4
+ "version": "1.0.7-beta",
5
5
  "type": "module",
6
+ "main": "dist/tutor-pro-ui-vue.umd.cjs",
7
+ "module": "dist/tutor-pro-ui-vue.umd.cjs",
6
8
  "scripts": {
7
9
  "dev": "vite",
8
10
  "build": "vue-tsc -b && vite build",
@@ -12,7 +14,7 @@
12
14
  "docs:dev": "vitepress dev docs",
13
15
  "docs:build": "vitepress build docs",
14
16
  "docs:preview": "vitepress preview docs",
15
- "publish": "npm publish"
17
+ "release": "npm publish"
16
18
  },
17
19
  "dependencies": {
18
20
  "@types/node": "^22.10.1",
package/src/index.ts CHANGED
@@ -11,7 +11,7 @@ const installComponents: any = (app: App) => {
11
11
  }
12
12
  };
13
13
 
14
- const install: any = (app: any) => {
14
+ const install: any = (app: App) => {
15
15
  installComponents(app);
16
16
  };
17
17
  // @ts-ignore
package/tsconfig.app.json CHANGED
@@ -36,5 +36,10 @@
36
36
  "@views/*": ["src/views/*"]
37
37
  }
38
38
  },
39
- "include": ["./src/**/*.ts", "./src/**/*.tsx", "./src/**/*.vue"]
39
+ "include": [
40
+ "./src/components/*.ts",
41
+ "./src/components/*.tsx",
42
+ "./src/components/*.vue"
43
+ ],
44
+ "exclude": ["node_modules", "dist", "**/*.md"]
40
45
  }
package/vite.config.ts CHANGED
@@ -4,7 +4,7 @@ import vueJsx from '@vitejs/plugin-vue-jsx';
4
4
  import dts from 'vite-plugin-dts';
5
5
 
6
6
  // 需要下载@types/node
7
- import path from 'path';
7
+ import path, { resolve } from 'path';
8
8
 
9
9
  // https://vite.dev/config/
10
10
  export default defineConfig({
@@ -12,7 +12,15 @@ export default defineConfig({
12
12
  port: 8084,
13
13
  host: '0.0.0.0',
14
14
  },
15
- plugins: [vue(), vueJsx(), dts()],
15
+ plugins: [
16
+ vue(),
17
+ vueJsx(),
18
+ dts({
19
+ insertTypesEntry: true,
20
+ copyDtsFiles: true,
21
+ tsconfigPath: path.resolve(__dirname, 'tsconfig.json'),
22
+ }),
23
+ ],
16
24
  build: {
17
25
  outDir: 'dist',
18
26
  // cssCodeSplit: true, // 强制内联CSS
@@ -27,11 +35,11 @@ export default defineConfig({
27
35
  },
28
36
  },
29
37
  lib: {
30
- // entry: resolve(__dirname, 'packages/index.ts'),
31
- entry: './src/index.ts',
38
+ // entry: './src/index.ts',
39
+ entry: resolve(__dirname, 'src/index.ts'),
32
40
  name: 'tutor-pro-ui-vue',
33
41
  // formats: ['es', 'cjs'],
34
- // formats: ['es', 'umd', 'cjs'],
42
+ formats: ['es', 'umd', 'cjs'],
35
43
  fileName: 'tutor-pro-ui-vue',
36
44
  },
37
45
  },