tenghui-ui 1.0.1
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/README.md +11 -0
- package/dist/favicon.ico +0 -0
- package/dist/style.css +0 -0
- package/dist/tenghui-ui.es.js +101 -0
- package/dist/tenghui-ui.es.js.map +1 -0
- package/dist/tenghui-ui.umd.js +2 -0
- package/dist/tenghui-ui.umd.js.map +1 -0
- package/package.json +39 -0
package/README.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Vue 3 + Typescript + Vite
|
|
2
|
+
|
|
3
|
+
This template should help get you started developing with Vue 3 and Typescript 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.
|
|
4
|
+
|
|
5
|
+
## Recommended IDE Setup
|
|
6
|
+
|
|
7
|
+
- [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.volar)
|
|
8
|
+
|
|
9
|
+
## Type Support For `.vue` Imports in TS
|
|
10
|
+
|
|
11
|
+
Since TypeScript cannot handle type information for `.vue` imports, they are shimmed to be a generic Vue component type by default. In most cases this is fine if you don't really care about component prop types outside of templates. However, if you wish to get actual prop types in `.vue` imports (for example to get props validation when using manual `h(...)` calls), you can enable Volar's `.vue` type support plugin by running `Volar: Switch TS Plugin on/off` from VSCode command palette.
|
package/dist/favicon.ico
ADDED
|
Binary file
|
package/dist/style.css
ADDED
|
File without changes
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
var render = function() {
|
|
2
|
+
var _vm = this;
|
|
3
|
+
var _h = _vm.$createElement;
|
|
4
|
+
var _c = _vm._self._c || _h;
|
|
5
|
+
return _c("div", { staticClass: "ui-template" }, [_c("h1", [_vm._v(_vm._s(_vm.msg))])]);
|
|
6
|
+
};
|
|
7
|
+
var staticRenderFns = [];
|
|
8
|
+
var index_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
9
|
+
function normalizeComponent(scriptExports, render2, staticRenderFns2, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) {
|
|
10
|
+
var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports;
|
|
11
|
+
if (render2) {
|
|
12
|
+
options.render = render2;
|
|
13
|
+
options.staticRenderFns = staticRenderFns2;
|
|
14
|
+
options._compiled = true;
|
|
15
|
+
}
|
|
16
|
+
if (functionalTemplate) {
|
|
17
|
+
options.functional = true;
|
|
18
|
+
}
|
|
19
|
+
if (scopeId) {
|
|
20
|
+
options._scopeId = "data-v-" + scopeId;
|
|
21
|
+
}
|
|
22
|
+
var hook;
|
|
23
|
+
if (moduleIdentifier) {
|
|
24
|
+
hook = function(context) {
|
|
25
|
+
context = context || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext;
|
|
26
|
+
if (!context && typeof __VUE_SSR_CONTEXT__ !== "undefined") {
|
|
27
|
+
context = __VUE_SSR_CONTEXT__;
|
|
28
|
+
}
|
|
29
|
+
if (injectStyles) {
|
|
30
|
+
injectStyles.call(this, context);
|
|
31
|
+
}
|
|
32
|
+
if (context && context._registeredComponents) {
|
|
33
|
+
context._registeredComponents.add(moduleIdentifier);
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
options._ssrRegister = hook;
|
|
37
|
+
} else if (injectStyles) {
|
|
38
|
+
hook = shadowMode ? function() {
|
|
39
|
+
injectStyles.call(this, (options.functional ? this.parent : this).$root.$options.shadowRoot);
|
|
40
|
+
} : injectStyles;
|
|
41
|
+
}
|
|
42
|
+
if (hook) {
|
|
43
|
+
if (options.functional) {
|
|
44
|
+
options._injectStyles = hook;
|
|
45
|
+
var originalRender = options.render;
|
|
46
|
+
options.render = function renderWithStyleInjection(h, context) {
|
|
47
|
+
hook.call(context);
|
|
48
|
+
return originalRender(h, context);
|
|
49
|
+
};
|
|
50
|
+
} else {
|
|
51
|
+
var existing = options.beforeCreate;
|
|
52
|
+
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
exports: scriptExports,
|
|
57
|
+
options
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
const __vue2_script = {
|
|
61
|
+
name: "ComTemplate",
|
|
62
|
+
data() {
|
|
63
|
+
return {
|
|
64
|
+
msg: "\u6D4B\u8BD5\u7EC4\u4EF6"
|
|
65
|
+
};
|
|
66
|
+
},
|
|
67
|
+
methods: {}
|
|
68
|
+
};
|
|
69
|
+
const __cssModules = {};
|
|
70
|
+
var __component__ = /* @__PURE__ */ normalizeComponent(__vue2_script, render, staticRenderFns, false, __vue2_injectStyles, "1f6eab87", null, null);
|
|
71
|
+
function __vue2_injectStyles(context) {
|
|
72
|
+
for (let o in __cssModules) {
|
|
73
|
+
this[o] = __cssModules[o];
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
var ComTemplate = /* @__PURE__ */ function() {
|
|
77
|
+
return __component__.exports;
|
|
78
|
+
}();
|
|
79
|
+
ComTemplate.install = (app) => {
|
|
80
|
+
app.component(ComTemplate.name, ComTemplate);
|
|
81
|
+
};
|
|
82
|
+
const InComTemplate = ComTemplate;
|
|
83
|
+
const components = [
|
|
84
|
+
InComTemplate
|
|
85
|
+
];
|
|
86
|
+
const install = (Vue, ops = { config: {} }) => {
|
|
87
|
+
components.forEach((component) => Vue.component(component.name, component));
|
|
88
|
+
Vue.prototype.$UICONFIG = ops.config;
|
|
89
|
+
};
|
|
90
|
+
const defaultConfig = {
|
|
91
|
+
version: "dev",
|
|
92
|
+
install,
|
|
93
|
+
ComTemplate: InComTemplate
|
|
94
|
+
};
|
|
95
|
+
try {
|
|
96
|
+
defaultConfig.version = require("../package.json").version;
|
|
97
|
+
} catch (e) {
|
|
98
|
+
console.log("no require");
|
|
99
|
+
}
|
|
100
|
+
export { defaultConfig as default };
|
|
101
|
+
//# sourceMappingURL=tenghui-ui.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tenghui-ui.es.js","sources":["../packages/template/src/index.vue?vue&type=template&lang.js","../packages/template/src/index.vue","../packages/template/index.ts","../src/main.ts"],"sourcesContent":["\n<div class=\"ui-template\">\n <h1>{{msg}}</h1>\n</div>\n","<template>\r\n <div class=\"ui-template\">\r\n <h1>{{msg}}</h1>\r\n </div>\r\n</template>\r\n\r\n<script>\r\n export default {\r\n name: \"ComTemplate\",\r\n data() {\r\n return {\r\n msg: '测试组件'\r\n }\r\n },\r\n methods: {\r\n }\r\n }\r\n</script>\r\n\r\n<style scoped>\r\n</style>","import Vue from 'vue';\r\nimport ComTemplate from './src/index.vue';\r\n\r\ntype SFCWithInstall<T> = T & { install(app: typeof Vue): void }; // vue 安装\r\n\r\n// 安装\r\nComTemplate.install = (app: typeof Vue) => {\r\n app.component(ComTemplate.name, ComTemplate);\r\n};\r\nconst InComTemplate: SFCWithInstall<typeof ComTemplate> = ComTemplate; // 增加类型\r\nexport default InComTemplate;","import ComTemplate from '../packages/template';\r\n\r\n\r\nconst components:any[] = [\r\n ComTemplate\r\n];\r\n\r\n/**\r\n * @param { App }\r\n * @returns { Void }\r\n */\r\nconst install = (Vue:any, ops:any = { config: {} }) => {\r\n components.forEach(component => Vue.component(component.name, component));\r\n\r\n // 注册组件时可以带入UI库配置\r\n Vue.prototype.$UICONFIG = ops.config;\r\n}\r\n\r\n\r\nconst defaultConfig = {\r\n version: 'dev',\r\n install,\r\n ComTemplate,\r\n};\r\n\r\ntry {\r\n defaultConfig.version = require('../package.json').version;\r\n} catch(e) {\r\n console.log('no require');\r\n}\r\n\r\nexport default defaultConfig;"],"names":["ComTemplate"],"mappings":"AAAA,IAAI,SAAS,WAAY;AAAC,MAAI,MAAI;AAAK,MAAI,KAAG,IAAI;AAAe,MAAI,KAAG,IAAI,MAAM,MAAI;AAAG,SAAO,GAAG,OAAM,EAAC,aAAY,iBAAe,CAAC,GAAG,MAAK,CAAC,IAAI,GAAG,IAAI,GAAG,IAAI;AAAA;AACjK,IAAI,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACMtB;;;;;;;;;;;;;;;;;;;ACDA,YAAY,UAAU,CAAC,QAAoB;MACnC,UAAU,YAAY,MAAM;AAAA;AAEpC,MAAM,gBAAoD;ACN1D,MAAM,aAAmB;AAAA,EACrBA;AAAAA;AAOJ,MAAM,UAAU,CAAC,KAAS,MAAU,EAAE,QAAQ,SAAS;aACxC,QAAQ,eAAa,IAAI,UAAU,UAAU,MAAM;MAG1D,UAAU,YAAY,IAAI;AAAA;MAI5B,gBAAgB;AAAA,EAClB,SAAS;AAAA,EACT;AAAA,eACAA;AAAAA;AAGJ,IAAI;gBACc,UAAU,QAAQ,mBAAmB;AAAA,SAC/C;UACI,IAAI;AAAA;;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
(function(s,a){typeof exports=="object"&&typeof module!="undefined"?module.exports=a():typeof define=="function"&&define.amd?define(a):(s=typeof globalThis!="undefined"?globalThis:s||self,s["tenghui-ui"]=a())})(this,function(){"use strict";var s=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"ui-template"},[r("h1",[e._v(e._s(e.msg))])])},a=[],F="";function h(e,t,r,y,_,c,p,R){var n=typeof e=="function"?e.options:e;t&&(n.render=t,n.staticRenderFns=r,n._compiled=!0),y&&(n.functional=!0),c&&(n._scopeId="data-v-"+c);var i;if(p?(i=function(o){o=o||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!o&&typeof __VUE_SSR_CONTEXT__!="undefined"&&(o=__VUE_SSR_CONTEXT__),_&&_.call(this,o),o&&o._registeredComponents&&o._registeredComponents.add(p)},n._ssrRegister=i):_&&(i=R?function(){_.call(this,(n.functional?this.parent:this).$root.$options.shadowRoot)}:_),i)if(n.functional){n._injectStyles=i;var b=n.render;n.render=function(E,m){return i.call(m),b(E,m)}}else{var v=n.beforeCreate;n.beforeCreate=v?[].concat(v,i):[i]}return{exports:e,options:n}}const C={name:"ComTemplate",data(){return{msg:"\u6D4B\u8BD5\u7EC4\u4EF6"}},methods:{}},l={};var g=h(C,s,a,!1,T,"1f6eab87",null,null);function T(e){for(let t in l)this[t]=l[t]}var f=function(){return g.exports}();f.install=e=>{e.component(f.name,f)};const u=f,$=[u],d={version:"dev",install:(e,t={config:{}})=>{$.forEach(r=>e.component(r.name,r)),e.prototype.$UICONFIG=t.config},ComTemplate:u};try{d.version=require("../package.json").version}catch{console.log("no require")}return d});
|
|
2
|
+
//# sourceMappingURL=tenghui-ui.umd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tenghui-ui.umd.js","sources":["../packages/template/src/index.vue?vue&type=template&lang.js","../packages/template/src/index.vue","../packages/template/index.ts","../src/main.ts"],"sourcesContent":["\n<div class=\"ui-template\">\n <h1>{{msg}}</h1>\n</div>\n","<template>\r\n <div class=\"ui-template\">\r\n <h1>{{msg}}</h1>\r\n </div>\r\n</template>\r\n\r\n<script>\r\n export default {\r\n name: \"ComTemplate\",\r\n data() {\r\n return {\r\n msg: '测试组件'\r\n }\r\n },\r\n methods: {\r\n }\r\n }\r\n</script>\r\n\r\n<style scoped>\r\n</style>","import Vue from 'vue';\r\nimport ComTemplate from './src/index.vue';\r\n\r\ntype SFCWithInstall<T> = T & { install(app: typeof Vue): void }; // vue 安装\r\n\r\n// 安装\r\nComTemplate.install = (app: typeof Vue) => {\r\n app.component(ComTemplate.name, ComTemplate);\r\n};\r\nconst InComTemplate: SFCWithInstall<typeof ComTemplate> = ComTemplate; // 增加类型\r\nexport default InComTemplate;","import ComTemplate from '../packages/template';\r\n\r\n\r\nconst components:any[] = [\r\n ComTemplate\r\n];\r\n\r\n/**\r\n * @param { App }\r\n * @returns { Void }\r\n */\r\nconst install = (Vue:any, ops:any = { config: {} }) => {\r\n components.forEach(component => Vue.component(component.name, component));\r\n\r\n // 注册组件时可以带入UI库配置\r\n Vue.prototype.$UICONFIG = ops.config;\r\n}\r\n\r\n\r\nconst defaultConfig = {\r\n version: 'dev',\r\n install,\r\n ComTemplate,\r\n};\r\n\r\ntry {\r\n defaultConfig.version = require('../package.json').version;\r\n} catch(e) {\r\n console.log('no require');\r\n}\r\n\r\nexport default defaultConfig;"],"names":["ComTemplate"],"mappings":"gPAAA,GAAI,GAAS,UAAY,CAAC,GAAI,GAAI,KAAS,EAAG,EAAI,eAAmB,EAAG,EAAI,MAAM,IAAI,EAAG,MAAO,GAAG,MAAM,CAAC,YAAY,eAAe,CAAC,EAAG,KAAK,CAAC,EAAI,GAAG,EAAI,GAAG,EAAI,WAC7J,EAAkB,mvBCMtB,oNCDA,EAAY,QAAU,AAAC,GAAoB,GACnC,UAAU,EAAY,KAAM,IAEpC,KAAM,GAAoD,ECNpD,EAAmB,CACrBA,GAeE,EAAgB,CAClB,QAAS,MACT,QAVY,CAAC,EAAS,EAAU,CAAE,OAAQ,MAAS,GACxC,QAAQ,GAAa,EAAI,UAAU,EAAU,KAAM,MAG1D,UAAU,UAAY,EAAI,oBAO9BA,GAGJ,GAAI,GACc,QAAU,QAAQ,mBAAmB,sBAE3C,IAAI"}
|
package/package.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "tenghui-ui",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "vue 2x, tenghui-ui",
|
|
5
|
+
"files": [
|
|
6
|
+
"dist"
|
|
7
|
+
],
|
|
8
|
+
"main": "./dist/tenghui-ui.umd.js",
|
|
9
|
+
"module": "./dist/tenghui-ui.es.js",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"import": "./dist/tenghui-ui.es.js",
|
|
13
|
+
"require": "./dist/tenghui-ui.umd.js"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"scripts": {
|
|
17
|
+
"dev": "vite",
|
|
18
|
+
"build": "vite build",
|
|
19
|
+
"preview": "vite preview"
|
|
20
|
+
},
|
|
21
|
+
"devDependencies": {
|
|
22
|
+
"@types/node": "^16.11.12",
|
|
23
|
+
"@vue/composition-api": "^1.4.1",
|
|
24
|
+
"less": "^4.1.3",
|
|
25
|
+
"typescript": "^4.4.4",
|
|
26
|
+
"vite": "^2.7.2",
|
|
27
|
+
"vite-plugin-vue2": "^1.9.0",
|
|
28
|
+
"vue-loader": "^13.7.3",
|
|
29
|
+
"vue-template-compiler": "^2.6.11",
|
|
30
|
+
"vue-tsc": "^0.29.8"
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"element-ui": "^2.15.9",
|
|
34
|
+
"vue": "^2.6.11",
|
|
35
|
+
"vue-router": "^3.0.1",
|
|
36
|
+
"vuedraggable": "^2.24.3",
|
|
37
|
+
"vuex": "^3.6.2"
|
|
38
|
+
}
|
|
39
|
+
}
|