diff --git a/package/vitevui/package.json b/package/vitevui/package.json
index ad5ead1..7a6eba9 100644
--- a/package/vitevui/package.json
+++ b/package/vitevui/package.json
@@ -1,6 +1,6 @@
{
"name": "vitevui",
- "version": "1.0.0-beta.11",
+ "version": "1.0.0-beta.12",
"description": "vue3.0 ui",
"main": "lib/index.js",
"homepage": "https://bhabgs.github.io/vite-vui-docs/",
@@ -36,7 +36,8 @@
"less": "^3.12.2",
"rollup-plugin-postcss": "^3.1.8",
"typescript": "^4.0.3",
- "mitt": "2.1.0"
+ "mitt": "2.1.0",
+ "element-plus": "1.0.2-beta.37"
},
"devDependencies": {
"@rollup/plugin-alias": "^3.1.1",
diff --git a/package/vitevui/src/index.ts b/package/vitevui/src/index.ts
index ed79d3f..0867ca1 100644
--- a/package/vitevui/src/index.ts
+++ b/package/vitevui/src/index.ts
@@ -4,10 +4,11 @@
* @Author: bhabgs
* @Date: 2021-01-05 14:05:58
* @LastEditors: bhabgs
- * @LastEditTime: 2021-04-08 13:31:11
+ * @LastEditTime: 2021-04-08 17:41:08
*/
import type { App } from 'vue';
-import mitt from '../src/mitt';
+import { setupElement } from './setup/element';
+import mitt from './util/mitt';
import directive from './directive';
import type { baseObject } from './types';
import viLayout from './layout/lay';
@@ -19,6 +20,7 @@ import button from './button';
import menu from './menu';
import viteTabs from './tabs';
import viteTabsPage from './tabsPage';
+import upload from './upload';
import { getTabCurrentDetail } from './tabsPage/tabsHooks';
import './style/index.less';
@@ -32,6 +34,7 @@ const COMPS: baseObject = {
viteTabs,
viteTabsPage,
menu,
+ upload,
};
const VERSION: string = '0.0.1';
@@ -41,6 +44,7 @@ const install = (app: App) => {
for (const key in COMPS) {
app.use(COMPS[key]);
}
+ setupElement(app);
};
export {
@@ -53,6 +57,8 @@ export {
menu,
viteTabsPage,
viteTabs,
+ upload,
+ setupElement,
getTabCurrentDetail,
};
diff --git a/package/vitevui/src/setup/element/index.ts b/package/vitevui/src/setup/element/index.ts
new file mode 100644
index 0000000..5f6409e
--- /dev/null
+++ b/package/vitevui/src/setup/element/index.ts
@@ -0,0 +1,23 @@
+/*
+ * @abstract: JianJie
+ * @version: 0.0.1
+ * @Author: bhabgs
+ * @Date: 2021-04-08 17:38:21
+ * @LastEditors: bhabgs
+ * @LastEditTime: 2021-04-08 17:39:36
+ */
+import 'element-plus/lib/theme-chalk/index.css';
+import { ElTable, ElTableColumn } from 'element-plus';
+import { App } from '@vue/runtime-core';
+
+const components = [ElTable, ElTableColumn];
+
+export const setupElement = (app: App, options = {}) => {
+ // global register components
+ components.forEach((component) => {
+ app.component(component.name, component);
+ });
+
+ // set global options
+ app.config.globalProperties.$ELEMENT = options;
+};
diff --git a/package/vitevui/src/upload/index.tsx b/package/vitevui/src/upload/index.tsx
new file mode 100644
index 0000000..1765c7c
--- /dev/null
+++ b/package/vitevui/src/upload/index.tsx
@@ -0,0 +1,25 @@
+/*
+ * @abstract: JianJie
+ * @version: 0.0.1
+ * @Author: bhabgs
+ * @Date: 2021-04-08 15:57:51
+ * @LastEditors: bhabgs
+ * @LastEditTime: 2021-04-08 17:33:58
+ */
+import { defineComponent, App } from 'vue';
+import { setStyleClass } from '../util';
+
+const viteUploadProp = {};
+
+const viteUpload = defineComponent({
+ name: 'viteUpload',
+ props: viteUploadProp,
+ setup(props, context) {
+ const classes = setStyleClass(['upload']);
+ return () =>
viviteUpload
;
+ },
+});
+viteUpload.install = (app: App) => {
+ app.component(viteUpload.name, viteUpload);
+};
+export default viteUpload;
diff --git a/package/vitevui/src/util/mitt/index.ts b/package/vitevui/src/util/mitt/index.ts
new file mode 100644
index 0000000..17e3453
--- /dev/null
+++ b/package/vitevui/src/util/mitt/index.ts
@@ -0,0 +1,11 @@
+/*
+ * @abstract: JianJie
+ * @version: 0.0.1
+ * @Author: bhabgs
+ * @Date: 2021-04-07 11:07:16
+ * @LastEditors: bhabgs
+ * @LastEditTime: 2021-04-07 14:05:49
+ */
+import mitt from 'mitt';
+
+export default mitt();
diff --git a/src/components/test.tsx b/src/components/test.tsx
index a7da65e..614ee73 100644
--- a/src/components/test.tsx
+++ b/src/components/test.tsx
@@ -4,7 +4,7 @@
* @Author: bhabgs
* @Date: 2021-04-06 16:21:03
* @LastEditors: bhabgs
- * @LastEditTime: 2021-04-08 14:09:43
+ * @LastEditTime: 2021-04-08 15:52:57
*/
import { defineComponent, getCurrentInstance } from 'vue';
import { getTabCurrentDetail } from '../../package/vitevui';
diff --git a/src/components/upload.tsx b/src/components/upload.tsx
new file mode 100644
index 0000000..65eef38
--- /dev/null
+++ b/src/components/upload.tsx
@@ -0,0 +1,20 @@
+/*
+ * @abstract: JianJie
+ * @version: 0.0.1
+ * @Author: bhabgs
+ * @Date: 2021-04-06 16:21:03
+ * @LastEditors: bhabgs
+ * @LastEditTime: 2021-04-08 17:41:37
+ */
+import { defineComponent } from 'vue';
+
+export default defineComponent({
+ setup(Prop, context) {
+ return () => (
+
+
+
+
+ );
+ },
+});
diff --git a/src/lay.tsx b/src/lay.tsx
index df0db8e..dc33afc 100644
--- a/src/lay.tsx
+++ b/src/lay.tsx
@@ -4,7 +4,7 @@
* @Author: bhabgs
* @Date: 2021-02-21 15:42:58
* @LastEditors: bhabgs
- * @LastEditTime: 2021-04-08 10:44:52
+ * @LastEditTime: 2021-04-08 15:54:34
*/
import {
defineComponent,
@@ -16,6 +16,7 @@ import {
import test from './components/test';
import test1 from './components/test1';
import test2 from './components/test2';
+import upload from './components/upload';
const menus = [
{ name: 'deng', key: 'deng' },
@@ -32,7 +33,7 @@ const tabsItem = ref([
icon: 'sss',
hasClosed: false,
disabled: false,
- component: test,
+ component: upload,
id: 'aaaa',
},
{
diff --git a/src/registered.ts b/src/registered.ts
index b3fbcca..38c92b5 100644
--- a/src/registered.ts
+++ b/src/registered.ts
@@ -4,11 +4,11 @@
* @Author: bhabgs
* @Date: 2020-11-30 09:53:41
* @LastEditors: bhabgs
- * @LastEditTime: 2021-04-07 16:15:57
+ * @LastEditTime: 2021-04-08 15:43:45
*/
import { App } from 'vue';
-// import vui from '../package/vitevui/src/index';
-import vui from '../package/vitevui';
+import vui from '../package/vitevui/src/index';
+// import vui from '../package/vitevui';
import vitevuu from '../package/vitevuu';
export default {
diff --git a/yarn.lock b/yarn.lock
index 15dccd3..86a9b0d 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -430,6 +430,11 @@
resolved "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.11.tgz#aeb16f50649a91af79dbe36574b66d0f9e4d9f71"
integrity sha512-3NsZsJIA/22P3QUyrEDNA2D133H4j224twJrdipXN38dpnIOzAbUDtOwkcJ5pXmn75w7LSQDjA4tO9dm1XlqlA==
+"@popperjs/core@^2.4.4":
+ version "2.9.2"
+ resolved "https://registry.npm.taobao.org/@popperjs/core/download/@popperjs/core-2.9.2.tgz?cache=0&sync_timestamp=1617290098226&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40popperjs%2Fcore%2Fdownload%2F%40popperjs%2Fcore-2.9.2.tgz#adea7b6953cbb34651766b0548468e743c6a2353"
+ integrity sha1-rep7aVPLs0ZRdmsFSEaOdDxqI1M=
+
"@rollup/plugin-alias@^3.1.1":
version "3.1.2"
resolved "https://registry.npmjs.org/@rollup/plugin-alias/-/plugin-alias-3.1.2.tgz#c585b05be4a7782d269c69d13def56f44e417772"
@@ -524,6 +529,11 @@
resolved "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f"
integrity sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==
+"@types/lodash@^4.14.161":
+ version "4.14.168"
+ resolved "https://registry.npm.taobao.org/@types/lodash/download/@types/lodash-4.14.168.tgz#fe24632e79b7ade3f132891afff86caa5e5ce008"
+ integrity sha1-/iRjLnm3rePxMoka//hsql5c4Ag=
+
"@types/minimist@^1.2.0":
version "1.2.1"
resolved "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.1.tgz#283f669ff76d7b8260df8ab7a4262cc83d988256"
@@ -862,6 +872,11 @@ assign-symbols@^1.0.0:
resolved "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367"
integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=
+async-validator@^3.4.0:
+ version "3.5.1"
+ resolved "https://registry.npm.taobao.org/async-validator/download/async-validator-3.5.1.tgz?cache=0&sync_timestamp=1605751734916&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fasync-validator%2Fdownload%2Fasync-validator-3.5.1.tgz#cd62b9688b2465f48420e27adb47760ab1b5559f"
+ integrity sha1-zWK5aIskZfSEIOJ620d2CrG1VZ8=
+
at-least-node@^1.0.0:
version "1.0.0"
resolved "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2"
@@ -1773,6 +1788,11 @@ dateformat@^3.0.0:
resolved "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae"
integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==
+dayjs@1.x:
+ version "1.10.4"
+ resolved "https://registry.npm.taobao.org/dayjs/download/dayjs-1.10.4.tgz#8e544a9b8683f61783f570980a8a80eaf54ab1e2"
+ integrity sha1-jlRKm4aD9heD9XCYCoqA6vVKseI=
+
debug@2.6.9, debug@^2.2.0, debug@^2.3.3:
version "2.6.9"
resolved "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
@@ -1965,6 +1985,20 @@ electron-to-chromium@^1.3.649:
resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.671.tgz#8feaed6eae42d279fa4611f58c42a5a1eb81b2a0"
integrity sha512-RTD97QkdrJKaKwRv9h/wGAaoR2lGxNXEcBXS31vjitgTPwTWAbLdS7cEsBK68eEQy7p6YyT8D5BxBEYHu2SuwQ==
+element-plus@1.0.2-beta.37:
+ version "1.0.2-beta.37"
+ resolved "https://registry.npm.taobao.org/element-plus/download/element-plus-1.0.2-beta.37.tgz?cache=0&sync_timestamp=1617873908132&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Felement-plus%2Fdownload%2Felement-plus-1.0.2-beta.37.tgz#48cf0e1f69da653a85beae758b5d8db3ac672019"
+ integrity sha1-SM8OH2naZTqFvq51i12Ns6xnIBk=
+ dependencies:
+ "@popperjs/core" "^2.4.4"
+ "@types/lodash" "^4.14.161"
+ async-validator "^3.4.0"
+ dayjs "1.x"
+ lodash "^4.17.20"
+ mitt "^2.1.0"
+ normalize-wheel "^1.0.1"
+ resize-observer-polyfill "^1.5.1"
+
emojis-list@^3.0.0:
version "3.0.0"
resolved "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz#5570662046ad29e2e916e71aae260abdff4f6a78"
@@ -3606,7 +3640,7 @@ minimist@1.2.5, minimist@^1.1.3, minimist@^1.2.0, minimist@^1.2.5:
resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602"
integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==
-mitt@2.1.0:
+mitt@2.1.0, mitt@^2.1.0:
version "2.1.0"
resolved "https://registry.npm.taobao.org/mitt/download/mitt-2.1.0.tgz?cache=0&sync_timestamp=1594823602623&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmitt%2Fdownload%2Fmitt-2.1.0.tgz#f740577c23176c6205b121b2973514eade1b2230"
integrity sha1-90BXfCMXbGIFsSGylzUU6t4bIjA=
@@ -3727,6 +3761,11 @@ normalize-url@^3.0.0:
resolved "https://registry.npmjs.org/normalize-url/-/normalize-url-3.3.0.tgz#b2e1c4dc4f7c6d57743df733a4f5978d18650559"
integrity sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg==
+normalize-wheel@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.npm.taobao.org/normalize-wheel/download/normalize-wheel-1.0.1.tgz#aec886affdb045070d856447df62ecf86146ec45"
+ integrity sha1-rsiGr/2wRQcNhWRH32Ls+GFG7EU=
+
nth-check@^1.0.2:
version "1.0.2"
resolved "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz#b2bd295c37e3dd58a3bf0700376663ba4d9cf05c"
@@ -4661,6 +4700,11 @@ repeating@^2.0.0:
dependencies:
is-finite "^1.0.0"
+resize-observer-polyfill@^1.5.1:
+ version "1.5.1"
+ resolved "https://registry.npm.taobao.org/resize-observer-polyfill/download/resize-observer-polyfill-1.5.1.tgz#0e9020dd3d21024458d4ebd27e23e40269810464"
+ integrity sha1-DpAg3T0hAkRY1OvSfiPkAmmBBGQ=
+
resolve-dir@^1.0.0, resolve-dir@^1.0.1:
version "1.0.1"
resolved "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz#79a40644c362be82f26effe739c9bb5382046f43"