el-plus 0.0.38 → 0.0.40
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/CHANGELOG.md +12 -0
- package/dist/index.css +1 -1
- package/dist/index.full.js +206 -30
- package/dist/index.full.min.js +1 -1
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +1 -1
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +203 -28
- package/es/components/index.d.ts +1 -0
- package/es/components/index.mjs +2 -0
- package/es/components/index.mjs.map +1 -1
- package/es/components/search-list-page/index.d.ts +12 -12
- package/es/components/search-list-page/src/search-list-page.d.ts +1 -1
- package/es/components/search-list-page/src/search-list-page.vue.d.ts +5 -5
- package/es/components/search-list-page/src/use-search-list-page.d.ts +3 -3
- package/es/components/search-list-page/src/use-search-list-page.mjs +4 -1
- package/es/components/search-list-page/src/use-search-list-page.mjs.map +1 -1
- package/es/components/select/index.d.ts +3 -3
- package/es/components/select/src/select.d.ts +1 -1
- package/es/components/select/src/select.vue.d.ts +2 -2
- package/es/components/table/index.d.ts +3 -3
- package/es/components/table/src/table.d.ts +1 -1
- package/es/components/table/src/table.vue.d.ts +2 -2
- package/es/components/uni-vue/index.d.ts +24 -0
- package/es/components/uni-vue/index.mjs +8 -0
- package/es/components/uni-vue/index.mjs.map +1 -0
- package/es/components/uni-vue/src/uni-vue.d.ts +7 -0
- package/es/components/uni-vue/src/uni-vue.mjs +10 -0
- package/es/components/uni-vue/src/uni-vue.mjs.map +1 -0
- package/es/components/uni-vue/src/uni-vue.vue.d.ts +9 -0
- package/es/components/uni-vue/src/uni-vue.vue.mjs +6 -0
- package/es/components/uni-vue/src/uni-vue.vue.mjs.map +1 -0
- package/es/components/uni-vue/src/uni-vue.vue2.mjs +40 -0
- package/es/components/uni-vue/src/uni-vue.vue2.mjs.map +1 -0
- package/es/components/uni-vue/src/use-uni-vue.d.ts +3 -0
- package/es/components/uni-vue/src/use-uni-vue.mjs +138 -0
- package/es/components/uni-vue/src/use-uni-vue.mjs.map +1 -0
- package/es/components/uni-vue/style/css.d.ts +2 -0
- package/es/components/uni-vue/style/css.mjs +5 -0
- package/es/components/uni-vue/style/css.mjs.map +1 -0
- package/es/components/uni-vue/style/index.d.ts +2 -0
- package/es/components/uni-vue/style/index.mjs +5 -0
- package/es/components/uni-vue/style/index.mjs.map +1 -0
- package/es/components.mjs +3 -1
- package/es/components.mjs.map +1 -1
- package/es/index.mjs +2 -0
- package/es/index.mjs.map +1 -1
- package/es/package.json.mjs +1 -1
- package/es/types/global.d.ts +5 -0
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.js +5 -0
- package/lib/components/index.js.map +1 -1
- package/lib/components/search-list-page/index.d.ts +12 -12
- package/lib/components/search-list-page/src/search-list-page.d.ts +1 -1
- package/lib/components/search-list-page/src/search-list-page.vue.d.ts +5 -5
- package/lib/components/search-list-page/src/use-search-list-page.d.ts +3 -3
- package/lib/components/search-list-page/src/use-search-list-page.js +4 -1
- package/lib/components/search-list-page/src/use-search-list-page.js.map +1 -1
- package/lib/components/select/index.d.ts +3 -3
- package/lib/components/select/src/select.d.ts +1 -1
- package/lib/components/select/src/select.vue.d.ts +2 -2
- package/lib/components/table/index.d.ts +3 -3
- package/lib/components/table/src/table.d.ts +1 -1
- package/lib/components/table/src/table.vue.d.ts +2 -2
- package/lib/components/uni-vue/index.d.ts +24 -0
- package/lib/components/uni-vue/index.js +15 -0
- package/lib/components/uni-vue/index.js.map +1 -0
- package/lib/components/uni-vue/src/uni-vue.d.ts +7 -0
- package/lib/components/uni-vue/src/uni-vue.js +13 -0
- package/lib/components/uni-vue/src/uni-vue.js.map +1 -0
- package/lib/components/uni-vue/src/uni-vue.vue.d.ts +9 -0
- package/lib/components/uni-vue/src/uni-vue.vue.js +10 -0
- package/lib/components/uni-vue/src/uni-vue.vue.js.map +1 -0
- package/lib/components/uni-vue/src/uni-vue.vue2.js +44 -0
- package/lib/components/uni-vue/src/uni-vue.vue2.js.map +1 -0
- package/lib/components/uni-vue/src/use-uni-vue.d.ts +3 -0
- package/lib/components/uni-vue/src/use-uni-vue.js +140 -0
- package/lib/components/uni-vue/src/use-uni-vue.js.map +1 -0
- package/lib/components/uni-vue/style/css.d.ts +2 -0
- package/lib/components/uni-vue/style/css.js +7 -0
- package/lib/components/uni-vue/style/css.js.map +1 -0
- package/lib/components/uni-vue/style/index.d.ts +2 -0
- package/lib/components/uni-vue/style/index.js +7 -0
- package/lib/components/uni-vue/style/index.js.map +1 -0
- package/lib/components.js +3 -1
- package/lib/components.js.map +1 -1
- package/lib/index.js +11 -6
- package/lib/index.js.map +1 -1
- package/lib/package.json.js +1 -1
- package/lib/types/global.d.ts +5 -0
- package/package.json +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/index.scss +2 -1
- package/theme-chalk/src/uni-vue.scss +11 -0
- package/theme-chalk/uni-vue.css +1 -0
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var vue = require('vue');
|
|
4
|
+
var index = require('../../../utils/http/index.js');
|
|
5
|
+
var Vue2 = require('vue2/dist/vue.min.js');
|
|
6
|
+
var VueRouter3 = require('vue-router3');
|
|
7
|
+
var uniVue = require('./uni-vue.js');
|
|
8
|
+
var axios = require('axios');
|
|
9
|
+
var elementPlus = require('element-plus');
|
|
10
|
+
|
|
11
|
+
const useUniVue = (props) => {
|
|
12
|
+
const uniVue$1 = vue.useTemplateRef("uniVue");
|
|
13
|
+
const { type } = props;
|
|
14
|
+
const loading = vue.ref(true);
|
|
15
|
+
const isAddress = type === "address";
|
|
16
|
+
const isBpm = type === "bpm";
|
|
17
|
+
const isLoadStatic = uniVue.componentType.indexOf(type) > -1;
|
|
18
|
+
const attrs = vue.useAttrs();
|
|
19
|
+
const setupWindow = () => {
|
|
20
|
+
Vue2.use(VueRouter3);
|
|
21
|
+
if (!window.Vue) {
|
|
22
|
+
window.Vue = Vue2;
|
|
23
|
+
}
|
|
24
|
+
if (isAddress) {
|
|
25
|
+
if (!window.axios) {
|
|
26
|
+
window.axios = axios;
|
|
27
|
+
}
|
|
28
|
+
if (!window.ElementUI) {
|
|
29
|
+
window.ElementUI = {
|
|
30
|
+
Message: elementPlus.ElMessage,
|
|
31
|
+
Loading: elementPlus.ElLoading
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
setupWindow();
|
|
37
|
+
const prepareVueAttributes = () => {
|
|
38
|
+
const events = {};
|
|
39
|
+
const _props = {};
|
|
40
|
+
Object.keys(attrs).forEach((key) => {
|
|
41
|
+
if (key.startsWith("on")) {
|
|
42
|
+
let eventName = key.slice(2);
|
|
43
|
+
eventName = eventName.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
44
|
+
eventName = eventName.slice(1);
|
|
45
|
+
events[eventName] = attrs[key];
|
|
46
|
+
} else {
|
|
47
|
+
_props[key] = attrs[key];
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
return {
|
|
51
|
+
on: events,
|
|
52
|
+
props: _props
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
const cdn = "//j01.hongxinshop.com/";
|
|
56
|
+
const getStaticJsUrl = () => {
|
|
57
|
+
switch (type) {
|
|
58
|
+
case "bpm":
|
|
59
|
+
return `${cdn}bpm-common/common/index.umd.min.js`;
|
|
60
|
+
case "address":
|
|
61
|
+
return `${cdn}address/static/hx-address-full.js`;
|
|
62
|
+
default:
|
|
63
|
+
return "";
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
const getStaticCssUrl = () => {
|
|
67
|
+
switch (type) {
|
|
68
|
+
case "bpm":
|
|
69
|
+
return `/bpm-common/common/index.css`;
|
|
70
|
+
case "address":
|
|
71
|
+
return `/address/static/hx-address.css`;
|
|
72
|
+
default:
|
|
73
|
+
return "";
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
const hasLoadStaticJsResource = () => {
|
|
77
|
+
let globalName;
|
|
78
|
+
if (isAddress) {
|
|
79
|
+
globalName = "hxAddress";
|
|
80
|
+
}
|
|
81
|
+
if (isBpm) {
|
|
82
|
+
globalName = "index";
|
|
83
|
+
}
|
|
84
|
+
if (window[globalName]) return true;
|
|
85
|
+
return false;
|
|
86
|
+
};
|
|
87
|
+
const loadStaticJsResource = async () => {
|
|
88
|
+
return new Promise((resolve, reject) => {
|
|
89
|
+
if (hasLoadStaticJsResource()) return resolve("");
|
|
90
|
+
const script = document.createElement("script");
|
|
91
|
+
script.src = getStaticJsUrl();
|
|
92
|
+
script.onload = resolve;
|
|
93
|
+
script.onerror = reject;
|
|
94
|
+
document.body.appendChild(script);
|
|
95
|
+
});
|
|
96
|
+
};
|
|
97
|
+
const loadStaticCssResource = async () => {
|
|
98
|
+
const { data: css } = await index.http.request(getStaticCssUrl(), {
|
|
99
|
+
responseReturn: "raw"
|
|
100
|
+
});
|
|
101
|
+
return css;
|
|
102
|
+
};
|
|
103
|
+
const setupInstance = async () => {
|
|
104
|
+
if (undefined) return;
|
|
105
|
+
const el = uniVue$1.value;
|
|
106
|
+
const shadowRoot = el.attachShadow({ mode: "open" });
|
|
107
|
+
const container = document.createElement("div");
|
|
108
|
+
if (isLoadStatic) {
|
|
109
|
+
try {
|
|
110
|
+
loading.value = true;
|
|
111
|
+
const [_res1, css] = await Promise.all([
|
|
112
|
+
loadStaticJsResource(),
|
|
113
|
+
loadStaticCssResource()
|
|
114
|
+
]);
|
|
115
|
+
const style = document.createElement("style");
|
|
116
|
+
style.textContent = css;
|
|
117
|
+
shadowRoot.appendChild(style);
|
|
118
|
+
} catch (error) {
|
|
119
|
+
console.log(error);
|
|
120
|
+
} finally {
|
|
121
|
+
loading.value = false;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
shadowRoot.appendChild(container);
|
|
125
|
+
new Vue2({
|
|
126
|
+
el: container,
|
|
127
|
+
router: new VueRouter3(),
|
|
128
|
+
render: (h) => h(props.name, prepareVueAttributes())
|
|
129
|
+
});
|
|
130
|
+
};
|
|
131
|
+
vue.onMounted(() => {
|
|
132
|
+
setupInstance();
|
|
133
|
+
});
|
|
134
|
+
return {
|
|
135
|
+
loading
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
exports.useUniVue = useUniVue;
|
|
140
|
+
//# sourceMappingURL=use-uni-vue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-uni-vue.js","sources":["../../../../../../packages/components/uni-vue/src/use-uni-vue.ts"],"sourcesContent":["import { onMounted, ref, useAttrs, useTemplateRef } from 'vue'\nimport { http } from '@el-plus/utils/http'\nimport Vue2 from 'vue2/dist/vue.min.js'\nimport VueRouter3 from 'vue-router3'\nimport { componentType } from './uni-vue'\nimport axios from 'axios'\nimport { ElMessage, ElLoading } from 'element-plus'\nexport const useUniVue = (props) => {\n const uniVue = useTemplateRef<HTMLElement>('uniVue')\n const { type } = props\n const loading = ref(true)\n const isAddress = type === 'address'\n const isBpm = type === 'bpm'\n // 是否需要加载静态资源\n const isLoadStatic = componentType.indexOf(type) > -1\n const attrs = useAttrs()\n const setupWindow = () => {\n Vue2.use(VueRouter3)\n if (!window.Vue) {\n window.Vue = Vue2\n }\n // 地址\n if (isAddress) {\n if (!window.axios) {\n window.axios = axios\n }\n if (!window.ElementUI) {\n window.ElementUI = {\n Message: ElMessage,\n Loading: ElLoading,\n }\n }\n }\n }\n setupWindow()\n const prepareVueAttributes = () => {\n const events = {}\n const _props = {}\n Object.keys(attrs).forEach((key) => {\n // 如果key以on开头,就是事件,转换为下划线\n if (key.startsWith('on')) {\n let eventName = key.slice(2) // 去掉 'on' 前缀\n // 将驼峰命名转换为下划线命名\n eventName = eventName.replace(/([A-Z])/g, '-$1').toLowerCase()\n // 删除第一位的-\n eventName = eventName.slice(1)\n events[eventName] = attrs[key]\n } else {\n _props[key] = attrs[key]\n }\n })\n return {\n on: events,\n props: _props,\n }\n }\n\n const cdn = '//j01.hongxinshop.com/'\n const getStaticJsUrl = () => {\n switch (type) {\n case 'bpm':\n return `${cdn}bpm-common/common/index.umd.min.js`\n case 'address':\n return `${cdn}address/static/hx-address-full.js`\n default:\n return ''\n }\n }\n const getStaticCssUrl = () => {\n switch (type) {\n case 'bpm':\n return `/bpm-common/common/index.css`\n case 'address':\n return `/address/static/hx-address.css`\n default:\n return ''\n }\n }\n const hasLoadStaticJsResource = () => {\n let globalName\n if (isAddress) {\n globalName = 'hxAddress'\n }\n if (isBpm) {\n globalName = 'index'\n }\n if (window[globalName]) return true\n return false\n }\n const loadStaticJsResource = async () => {\n return new Promise((resolve, reject) => {\n if (hasLoadStaticJsResource()) return resolve('')\n const script = document.createElement('script')\n script.src = getStaticJsUrl()\n script.onload = resolve\n script.onerror = reject\n document.body.appendChild(script)\n })\n }\n const loadStaticCssResource = async () => {\n const { data: css } = await http.request<string>(getStaticCssUrl(), {\n responseReturn: 'raw',\n })\n return css\n }\n const setupInstance = async () => {\n if (import.meta.hot) return // 每次热更新都会执行,在这里阻止,防止每次热更新页面都会重复插入组件\n const el = uniVue.value // 选择一个宿主元素\n const shadowRoot = el!.attachShadow({ mode: 'open' }) // 创建一个开放模式的 shadow root\n const container = document.createElement('div')\n if (isLoadStatic) {\n try {\n loading.value = true\n const [_res1, css] = await Promise.all([\n loadStaticJsResource(),\n loadStaticCssResource(),\n ])\n const style = document.createElement('style')\n style.textContent = css\n shadowRoot.appendChild(style)\n } catch (error) {\n console.log(error)\n } finally {\n loading.value = false\n }\n }\n shadowRoot.appendChild(container)\n new Vue2({\n el: container,\n router: new VueRouter3(),\n render: (h) => h(props.name, prepareVueAttributes()),\n })\n }\n onMounted(() => {\n setupInstance()\n })\n return {\n loading,\n }\n}\n"],"names":["uniVue","useTemplateRef","ref","componentType","useAttrs","ElMessage","ElLoading","http","onMounted"],"mappings":";;;;;;;;;;AAOO,MAAM,SAAA,GAAY,CAAC,KAAA,KAAU;AAClC,EAAA,MAAMA,QAAA,GAASC,mBAA4B,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AA,EAAO;AACd,QAAA,OAAA,CAAQ,IAAI,KAAK,CAAA;AAAA,MACnB,CAAA,SAAE;AACA,QAAA,OAAA,CAAQ,KAAA,GAAQ,KAAA;AAAA,MAClB;AAAA,IACF;AACA,IAAA,UAAA,CAAW,YAAY,SAAS,CAAA;AAChC,IAAA,IAAI,IAAA,CAAK;AAAA,MACP,EAAA,EAAI,SAAA;AAAA,MACJ,MAAA,EAAQ,IAAI,UAAA,EAAW;AAAA,MACvB,QAAQ,CAAC,CAAA,KAAM,EAAE,KAAA,CAAM,IAAA,EAAM,sBAAsB;AAAA,KACpD,CAAA;AAAA,EACH,CAAA;AACA,EAAAQ,aAAA,CAAU,MAAM;AACd,IAAA,aAAA,EAAc;AAAA,EAChB,CAAC,CAAA;AACD,EAAA,OAAO;AAAA,IACL;AAAA,GACF;AACF;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
package/lib/components.js
CHANGED
|
@@ -14,6 +14,7 @@ var index$8 = require('./components/date-picker-range/index.js');
|
|
|
14
14
|
var index$9 = require('./components/custom-column/index.js');
|
|
15
15
|
var index$a = require('./components/link/index.js');
|
|
16
16
|
var index$b = require('./components/attachment/index.js');
|
|
17
|
+
var index$c = require('./components/uni-vue/index.js');
|
|
17
18
|
|
|
18
19
|
var components = [
|
|
19
20
|
index.EpButtons,
|
|
@@ -27,7 +28,8 @@ var components = [
|
|
|
27
28
|
index$8.EpDatePickerRange,
|
|
28
29
|
index$9.EpCustomColumn,
|
|
29
30
|
index$a.EpLink,
|
|
30
|
-
index$b.EpAttachment
|
|
31
|
+
index$b.EpAttachment,
|
|
32
|
+
index$c.EpUniVue
|
|
31
33
|
];
|
|
32
34
|
|
|
33
35
|
exports.default = components;
|
package/lib/components.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.js","sources":["../../../packages/el-plus/components.ts"],"sourcesContent":["import type { Plugin } from 'vue'\nimport Buttons from '@el-plus/components/buttons'\nimport Form from '@el-plus/components/form'\nimport Input from '@el-plus/components/input'\nimport SearchListPage from '@el-plus/components/search-list-page'\nimport Select from '@el-plus/components/select'\nimport Table from '@el-plus/components/table'\nimport Title from '@el-plus/components/title'\nimport Header from '@el-plus/components/header'\nimport DatePickerRange from '@el-plus/components/date-picker-range'\nimport CustomColumn from '@el-plus/components/custom-column'\nimport Link from '@el-plus/components/link'\nimport Attachment from '@el-plus/components/attachment'\n\nexport default [\n Buttons,\n Form,\n Input,\n SearchListPage,\n Select,\n Table,\n Title,\n Header,\n DatePickerRange,\n CustomColumn,\n Link,\n Attachment,\n] as Plugin[]\n"],"names":["Buttons","Form","Input","SearchListPage","Select","Table","Title","Header","DatePickerRange","CustomColumn","Link","Attachment"],"mappings":"
|
|
1
|
+
{"version":3,"file":"components.js","sources":["../../../packages/el-plus/components.ts"],"sourcesContent":["import type { Plugin } from 'vue'\nimport Buttons from '@el-plus/components/buttons'\nimport Form from '@el-plus/components/form'\nimport Input from '@el-plus/components/input'\nimport SearchListPage from '@el-plus/components/search-list-page'\nimport Select from '@el-plus/components/select'\nimport Table from '@el-plus/components/table'\nimport Title from '@el-plus/components/title'\nimport Header from '@el-plus/components/header'\nimport DatePickerRange from '@el-plus/components/date-picker-range'\nimport CustomColumn from '@el-plus/components/custom-column'\nimport Link from '@el-plus/components/link'\nimport Attachment from '@el-plus/components/attachment'\nimport UniVue from '@el-plus/components/uni-vue'\n\nexport default [\n Buttons,\n Form,\n Input,\n SearchListPage,\n Select,\n Table,\n Title,\n Header,\n DatePickerRange,\n CustomColumn,\n Link,\n Attachment,\n UniVue,\n] as Plugin[]\n"],"names":["Buttons","Form","Input","SearchListPage","Select","Table","Title","Header","DatePickerRange","CustomColumn","Link","Attachment","UniVue"],"mappings":";;;;;;;;;;;;;;;;;;AAeA,iBAAe;AAAA,EACbA,eAAA;AAAA,EACAC,cAAA;AAAA,EACAC,eAAA;AAAA,EACAC,wBAAA;AAAA,EACAC,gBAAA;AAAA,EACAC,eAAA;AAAA,EACAC,eAAA;AAAA,EACAC,gBAAA;AAAA,EACAC,yBAAA;AAAA,EACAC,sBAAA;AAAA,EACAC,cAAA;AAAA,EACAC,oBAAA;AAAA,EACAC;AACF,CAAA;;;;"}
|
package/lib/index.js
CHANGED
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var components = require('./components.js');
|
|
6
6
|
var _package = require('./package.json.js');
|
|
7
|
-
var index$
|
|
8
|
-
var index$
|
|
9
|
-
var index$
|
|
7
|
+
var index$f = require('./plugins/index.js');
|
|
8
|
+
var index$d = require('./directives/repeat-click/index.js');
|
|
9
|
+
var index$e = require('./directives/permission/index.js');
|
|
10
10
|
var buttons = require('./components/buttons/src/buttons.js');
|
|
11
11
|
var index = require('./components/buttons/index.js');
|
|
12
12
|
var form = require('./components/form/src/form.js');
|
|
@@ -33,6 +33,8 @@ var link = require('./components/link/src/link.js');
|
|
|
33
33
|
var index$a = require('./components/link/index.js');
|
|
34
34
|
var attachment = require('./components/attachment/src/attachment.js');
|
|
35
35
|
var index$b = require('./components/attachment/index.js');
|
|
36
|
+
var uniVue = require('./components/uni-vue/src/uni-vue.js');
|
|
37
|
+
var index$c = require('./components/uni-vue/index.js');
|
|
36
38
|
var useRequest = require('./hooks/use-request.js');
|
|
37
39
|
var useTemplatePromise = require('./hooks/use-template-promise.js');
|
|
38
40
|
var useDialog = require('./hooks/dialog/use-dialog.js');
|
|
@@ -46,15 +48,15 @@ const install = (app, options) => {
|
|
|
46
48
|
if (app[INSTALLED_KEY]) return;
|
|
47
49
|
app[INSTALLED_KEY] = true;
|
|
48
50
|
components.default.forEach((c) => app.use(c));
|
|
49
|
-
Object.values(index$
|
|
51
|
+
Object.values(index$f).forEach((p) => app.use(p));
|
|
50
52
|
};
|
|
51
53
|
const plugin = {
|
|
52
54
|
install,
|
|
53
55
|
version: _package.version
|
|
54
56
|
};
|
|
55
57
|
|
|
56
|
-
exports.vRepeatClick = index$
|
|
57
|
-
exports.vPermission = index$
|
|
58
|
+
exports.vRepeatClick = index$d.default;
|
|
59
|
+
exports.vPermission = index$e.default;
|
|
58
60
|
exports.buttonsProps = buttons.buttonsProps;
|
|
59
61
|
exports.EpButtons = index.EpButtons;
|
|
60
62
|
exports.expandFormPropsKeys = form.expandFormPropsKeys;
|
|
@@ -98,6 +100,9 @@ exports.linkProps = link.linkProps;
|
|
|
98
100
|
exports.EpLink = index$a.EpLink;
|
|
99
101
|
exports.attachmentProps = attachment.attachmentProps;
|
|
100
102
|
exports.EpAttachment = index$b.EpAttachment;
|
|
103
|
+
exports.componentType = uniVue.componentType;
|
|
104
|
+
exports.uniVueProps = uniVue.uniVueProps;
|
|
105
|
+
exports.EpUniVue = index$c.EpUniVue;
|
|
101
106
|
exports.useRequest = useRequest.useRequest;
|
|
102
107
|
exports.useTemplatePromise = useTemplatePromise.useTemplatePromise;
|
|
103
108
|
exports.useDialog = useDialog.useDialog;
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../packages/el-plus/index.ts"],"sourcesContent":["import type { App, Plugin } from 'vue'\nimport components from './components'\nimport { version } from './package.json'\nimport * as plugins from './plugins'\n// import type { RouteRecordRaw } from 'vue-router'\n\nconst INSTALLED_KEY = Symbol('INSTALLED_KEY')\nconst provideGlobalConfig = (config, app) => {}\nexport type EpOptions = {\n // routes?: RouteRecordRaw\n}\nexport const install = (app: App, options?: EpOptions) => {\n if (app[INSTALLED_KEY]) return // 防止多次use导致重复安装注册,控制台警告\n app[INSTALLED_KEY] = true\n components.forEach((c) => app.use(c))\n Object.values(plugins).forEach((p) => app.use(p))\n if (options) {\n provideGlobalConfig(options, app)\n }\n}\n\nconst plugin: Plugin & { version: string } = {\n install,\n version,\n}\nexport default plugin\nexport * from '@el-plus/components/index'\nexport * from '@el-plus/hooks'\nexport * from '@el-plus/directives'\n"],"names":["components","plugins","version"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../packages/el-plus/index.ts"],"sourcesContent":["import type { App, Plugin } from 'vue'\nimport components from './components'\nimport { version } from './package.json'\nimport * as plugins from './plugins'\n// import type { RouteRecordRaw } from 'vue-router'\n\nconst INSTALLED_KEY = Symbol('INSTALLED_KEY')\nconst provideGlobalConfig = (config, app) => {}\nexport type EpOptions = {\n // routes?: RouteRecordRaw\n}\nexport const install = (app: App, options?: EpOptions) => {\n if (app[INSTALLED_KEY]) return // 防止多次use导致重复安装注册,控制台警告\n app[INSTALLED_KEY] = true\n components.forEach((c) => app.use(c))\n Object.values(plugins).forEach((p) => app.use(p))\n if (options) {\n provideGlobalConfig(options, app)\n }\n}\n\nconst plugin: Plugin & { version: string } = {\n install,\n version,\n}\nexport default plugin\nexport * from '@el-plus/components/index'\nexport * from '@el-plus/hooks'\nexport * from '@el-plus/directives'\n"],"names":["components","plugins","version"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,MAAM,aAAA,0BAAuB,eAAe,CAAA;AAKrC,MAAM,OAAA,GAAU,CAAC,GAAA,EAAU,OAAA,KAAwB;AACxD,EAAA,IAAI,GAAA,CAAI,aAAa,CAAA,EAAG;AACxB,EAAA,GAAA,CAAI,aAAa,CAAA,GAAI,IAAA;AACrB,EAAAA,kBAAA,CAAW,QAAQ,CAAC,CAAA,KAAM,GAAA,CAAI,GAAA,CAAI,CAAC,CAAC,CAAA;AACpC,EAAA,MAAA,CAAO,MAAA,CAAOC,OAAO,CAAA,CAAE,OAAA,CAAQ,CAAC,CAAA,KAAM,GAAA,CAAI,GAAA,CAAI,CAAC,CAAC,CAAA;AAIlD;AAEA,MAAM,MAAA,GAAuC;AAAA,EAC3C,OAAA;AAAA,WACAC;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/lib/package.json.js
CHANGED
package/lib/types/global.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { NavigationConfig } from '@el-plus/utils'
|
|
2
|
+
import type { AxiosStatic } from 'axios'
|
|
2
3
|
|
|
3
4
|
declare global {
|
|
4
5
|
interface Window {
|
|
@@ -10,5 +11,9 @@ declare global {
|
|
|
10
11
|
selectedRouterTags?: any[]
|
|
11
12
|
closeTag?: (tag: any) => void
|
|
12
13
|
currentRouterTagIndex?: number
|
|
14
|
+
Vue: any
|
|
15
|
+
hxLangPluginInstall: () => void
|
|
16
|
+
axios: AxiosStatic
|
|
17
|
+
ElementUI: any
|
|
13
18
|
}
|
|
14
19
|
}
|
package/package.json
CHANGED
package/theme-chalk/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.fade-enter-active,.fade-leave-active{transition:opacity .3s ease}.fade-enter-from,.fade-leave-to{opacity:0}body{-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}.ep-form{position:relative}.ep-form__fold{bottom:23px;color:#367ef5;cursor:pointer;font-size:14px;position:absolute;right:0;text-align:center;width:70px}.ep-form__fold:hover{text-decoration:underline}.ep-form.is-fold{padding-right:70px}.ep-form .el-form-item--small{margin-bottom:18px}.ep-form .el-form-item--small .el-form-item__label{display:block;height:32px;line-height:32px;overflow:hidden;padding-left:18px;padding-right:6px;text-overflow:ellipsis;white-space:nowrap}.ep-form .el-form-item--small .el-form-item__content{font-size:13px;line-height:32px}.ep-form .el-form-item--small .el-form-item__content .el-input{font-size:13px;height:32px}.ep-form .el-form-item--small .el-form-item__content .el-textarea__inner{font-size:13px!important}.ep-form .el-form-item--small .el-form-item__content .el-select__wrapper{font-size:13px;line-height:32px;min-height:32px}.ep-form .el-form-item--small .el-form-item__content .el-date-editor .el-range-input{font-size:13px}.ep-table__action-buttons{white-space:nowrap}.ep-table .table-column-link .el-form-item{display:inline-block}.ep-table .table-column-link .el-form-item .el-form-item__label{display:none}.ep-table .el-table{font-size:13px}.ep-table .el-table .el-table__cell .is-edit{cursor:pointer}.ep-table .el-table .el-table__cell .is-edit:hover{color:#409eff}.ep-table .el-table .el-table__cell .is-edit .el-icon{vertical-align:-2px}.ep-table .el-table .cell{line-height:30px}.ep-table .el-table thead tr th{height:42px}.ep-table .el-table td,.ep-table .el-table th{padding:3px 0}.ep-table .el-form-item__error{position:unset;text-align:left}.ep-table .el-form-item{margin-bottom:0}.ep-table .el-form-item .el-form-item__label{padding:0}.ep-table .el-pagination{margin-top:12px;--el-pagination-font-size:13px}.ep-table .el-pagination .el-select{--el-select-font-size:13px}.ep-table .el-pagination .el-select .el-select__wrapper{font-size:13px}.ep-button{height:auto;padding:9px 15px}.ep-button.el-button--text{padding:0}.ep-button.el-button+.el-button{margin-left:10px}.ep-search-list-page #middle{overflow:hidden}.ep-search-list-page__middle-left{float:left}.ep-search-list-page__middle-left>.el-button{margin:16px 0}.ep-search-list-page__middle-right{float:right}.ep-search-list-page__middle-right .el-button{margin:16px 0}.ep-title__header{line-height:50px;overflow:hidden}.ep-title__title{float:left;font-size:15px;font-weight:500}.ep-title__toggle{color:#409eff;cursor:pointer;display:inline-block;font-size:14px;font-weight:400;margin-left:10px;white-space:nowrap}.ep-title__toggle .el-icon{transition:transform .3s;vertical-align:-2px}.ep-title.is-expanded .ep-title__toggle .el-icon{transform:rotate(-180deg)}.ep-title__buttons{float:right}.ep-title__content{overflow:hidden;transition:max-height .3s ease-in-out}.ep-header{display:flex;margin-bottom:10px}.ep-header .el-page-header .el-page-header__left{margin-right:-10px;margin-top:4px}.ep-template-promise{position:relative;z-index:8888888888888888}.ep-dialog{padding:20px 25px 40px}.ep-dialog .el-dialog__headerbtn{height:56px}.ep-dialog .el-dialog__headerbtn .el-dialog__close{transform:scale(1.3)}.ep-dialog .el-dialog__header{text-align:center}.ep-dialog .el-dialog__header .el-dialog__title{color:#505050;font-size:16px;font-weight:600;line-height:24px;margin:4px}.ep-dialog .el-dialog__body{padding:25px 0 0}.ep-dialog__footer{padding:14px 0 0}.ep-dialog__footer button{font-size:12px}.ep-choose-dialog__selected-count{color:#409eff;float:left;font-size:16px;line-height:32px}.ep-custom-column__dialog .el-dialog__body{text-align:center}.ep-custom-column__dialog .el-transfer{display:inline-block}.ep-custom-column__dialog .el-transfer-panel__footer{border-bottom:0;height:0}.ep-custom-column__dialog .el-transfer-panel{overflow:visible}.ep-custom-column__operate{position:absolute;right:-100%;top:50%;transform:translate(calc(25% - 52px),32px)}.ep-link{font-size:13px}
|
|
1
|
+
.fade-enter-active,.fade-leave-active{transition:opacity .3s ease}.fade-enter-from,.fade-leave-to{opacity:0}body{-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}.ep-form{position:relative}.ep-form__fold{bottom:23px;color:#367ef5;cursor:pointer;font-size:14px;position:absolute;right:0;text-align:center;width:70px}.ep-form__fold:hover{text-decoration:underline}.ep-form.is-fold{padding-right:70px}.ep-form .el-form-item--small{margin-bottom:18px}.ep-form .el-form-item--small .el-form-item__label{display:block;height:32px;line-height:32px;overflow:hidden;padding-left:18px;padding-right:6px;text-overflow:ellipsis;white-space:nowrap}.ep-form .el-form-item--small .el-form-item__content{font-size:13px;line-height:32px}.ep-form .el-form-item--small .el-form-item__content .el-input{font-size:13px;height:32px}.ep-form .el-form-item--small .el-form-item__content .el-textarea__inner{font-size:13px!important}.ep-form .el-form-item--small .el-form-item__content .el-select__wrapper{font-size:13px;line-height:32px;min-height:32px}.ep-form .el-form-item--small .el-form-item__content .el-date-editor .el-range-input{font-size:13px}.ep-table__action-buttons{white-space:nowrap}.ep-table .table-column-link .el-form-item{display:inline-block}.ep-table .table-column-link .el-form-item .el-form-item__label{display:none}.ep-table .el-table{font-size:13px}.ep-table .el-table .el-table__cell .is-edit{cursor:pointer}.ep-table .el-table .el-table__cell .is-edit:hover{color:#409eff}.ep-table .el-table .el-table__cell .is-edit .el-icon{vertical-align:-2px}.ep-table .el-table .cell{line-height:30px}.ep-table .el-table thead tr th{height:42px}.ep-table .el-table td,.ep-table .el-table th{padding:3px 0}.ep-table .el-form-item__error{position:unset;text-align:left}.ep-table .el-form-item{margin-bottom:0}.ep-table .el-form-item .el-form-item__label{padding:0}.ep-table .el-pagination{margin-top:12px;--el-pagination-font-size:13px}.ep-table .el-pagination .el-select{--el-select-font-size:13px}.ep-table .el-pagination .el-select .el-select__wrapper{font-size:13px}.ep-button{height:auto;padding:9px 15px}.ep-button.el-button--text{padding:0}.ep-button.el-button+.el-button{margin-left:10px}.ep-search-list-page #middle{overflow:hidden}.ep-search-list-page__middle-left{float:left}.ep-search-list-page__middle-left>.el-button{margin:16px 0}.ep-search-list-page__middle-right{float:right}.ep-search-list-page__middle-right .el-button{margin:16px 0}.ep-title__header{line-height:50px;overflow:hidden}.ep-title__title{float:left;font-size:15px;font-weight:500}.ep-title__toggle{color:#409eff;cursor:pointer;display:inline-block;font-size:14px;font-weight:400;margin-left:10px;white-space:nowrap}.ep-title__toggle .el-icon{transition:transform .3s;vertical-align:-2px}.ep-title.is-expanded .ep-title__toggle .el-icon{transform:rotate(-180deg)}.ep-title__buttons{float:right}.ep-title__content{overflow:hidden;transition:max-height .3s ease-in-out}.ep-header{display:flex;margin-bottom:10px}.ep-header .el-page-header .el-page-header__left{margin-right:-10px;margin-top:4px}.ep-template-promise{position:relative;z-index:8888888888888888}.ep-dialog{padding:20px 25px 40px}.ep-dialog .el-dialog__headerbtn{height:56px}.ep-dialog .el-dialog__headerbtn .el-dialog__close{transform:scale(1.3)}.ep-dialog .el-dialog__header{text-align:center}.ep-dialog .el-dialog__header .el-dialog__title{color:#505050;font-size:16px;font-weight:600;line-height:24px;margin:4px}.ep-dialog .el-dialog__body{padding:25px 0 0}.ep-dialog__footer{padding:14px 0 0}.ep-dialog__footer button{font-size:12px}.ep-choose-dialog__selected-count{color:#409eff;float:left;font-size:16px;line-height:32px}.ep-custom-column__dialog .el-dialog__body{text-align:center}.ep-custom-column__dialog .el-transfer{display:inline-block}.ep-custom-column__dialog .el-transfer-panel__footer{border-bottom:0;height:0}.ep-custom-column__dialog .el-transfer-panel{overflow:visible}.ep-custom-column__operate{position:absolute;right:-100%;top:50%;transform:translate(calc(25% - 52px),32px)}.ep-link{font-size:13px}.ep-uni-vue{background:#fff}.ep-uni-vue__skeleton .el-skeleton__item{margin-top:10px}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ep-uni-vue{background:#fff}.ep-uni-vue__skeleton .el-skeleton__item{margin-top:10px}
|