el-plus 0.0.76 → 0.0.78
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 +112 -71
- package/dist/index.full.min.js +4 -4
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +4 -4
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +113 -72
- package/es/components/attachment/index.d.ts +24 -0
- package/es/components/attachment/src/attachment.d.ts +8 -0
- package/es/components/attachment/src/attachment.mjs +8 -0
- package/es/components/attachment/src/attachment.mjs.map +1 -1
- package/es/components/attachment/src/attachment.vue.d.ts +15 -0
- package/es/components/attachment/src/attachment.vue2.mjs +10 -5
- package/es/components/attachment/src/attachment.vue2.mjs.map +1 -1
- package/es/components/attachment/src/use-attachment.d.ts +14 -105
- package/es/components/attachment/src/use-attachment.mjs +31 -30
- package/es/components/attachment/src/use-attachment.mjs.map +1 -1
- package/es/components/header/index.d.ts +6 -0
- package/es/components/header/src/header.vue.d.ts +2 -0
- package/es/components/search-list-page/index.d.ts +42 -15
- package/es/components/search-list-page/src/search-list-page.vue.d.ts +14 -5
- package/es/components/search-list-page/src/use-search-list-page.d.ts +14 -5
- package/es/components/table/index.d.ts +15 -3
- package/es/components/table/src/table.d.ts +4 -1
- package/es/components/table/src/table.mjs +4 -0
- package/es/components/table/src/table.mjs.map +1 -1
- package/es/components/table/src/table.vue.d.ts +9 -2
- package/es/components/table/src/table.vue2.mjs +17 -6
- package/es/components/table/src/table.vue2.mjs.map +1 -1
- package/es/components/table/src/use-table.mjs +1 -1
- package/es/components/table/src/use-table.mjs.map +1 -1
- package/es/components/uni-vue/index.d.ts +23 -3
- package/es/components/uni-vue/src/uni-vue.vue.d.ts +10 -2
- package/es/components/uni-vue/src/uni-vue.vue2.mjs +4 -2
- package/es/components/uni-vue/src/uni-vue.vue2.mjs.map +1 -1
- package/es/components/uni-vue/src/use-uni-vue.d.ts +1 -1
- package/es/components/uni-vue/src/use-uni-vue.mjs +39 -27
- package/es/components/uni-vue/src/use-uni-vue.mjs.map +1 -1
- package/es/package.json.mjs +1 -1
- package/lib/components/attachment/index.d.ts +24 -0
- package/lib/components/attachment/src/attachment.d.ts +8 -0
- package/lib/components/attachment/src/attachment.js +8 -0
- package/lib/components/attachment/src/attachment.js.map +1 -1
- package/lib/components/attachment/src/attachment.vue.d.ts +15 -0
- package/lib/components/attachment/src/attachment.vue2.js +11 -6
- package/lib/components/attachment/src/attachment.vue2.js.map +1 -1
- package/lib/components/attachment/src/use-attachment.d.ts +14 -105
- package/lib/components/attachment/src/use-attachment.js +31 -30
- package/lib/components/attachment/src/use-attachment.js.map +1 -1
- package/lib/components/header/index.d.ts +6 -0
- package/lib/components/header/src/header.vue.d.ts +2 -0
- package/lib/components/search-list-page/index.d.ts +42 -15
- package/lib/components/search-list-page/src/search-list-page.vue.d.ts +14 -5
- package/lib/components/search-list-page/src/use-search-list-page.d.ts +14 -5
- package/lib/components/table/index.d.ts +15 -3
- package/lib/components/table/src/table.d.ts +4 -1
- package/lib/components/table/src/table.js +4 -0
- package/lib/components/table/src/table.js.map +1 -1
- package/lib/components/table/src/table.vue.d.ts +9 -2
- package/lib/components/table/src/table.vue2.js +17 -6
- package/lib/components/table/src/table.vue2.js.map +1 -1
- package/lib/components/table/src/use-table.js +1 -1
- package/lib/components/table/src/use-table.js.map +1 -1
- package/lib/components/uni-vue/index.d.ts +23 -3
- package/lib/components/uni-vue/src/uni-vue.vue.d.ts +10 -2
- package/lib/components/uni-vue/src/uni-vue.vue2.js +4 -2
- package/lib/components/uni-vue/src/uni-vue.vue2.js.map +1 -1
- package/lib/components/uni-vue/src/use-uni-vue.d.ts +1 -1
- package/lib/components/uni-vue/src/use-uni-vue.js +38 -26
- package/lib/components/uni-vue/src/use-uni-vue.js.map +1 -1
- package/lib/package.json.js +1 -1
- package/package.json +1 -1
- package/theme-chalk/header.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/header.scss +8 -1
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
2
|
readonly name: StringConstructor;
|
|
3
3
|
readonly type: import("vue").PropType<typeof import("./uni-vue").componentType[number]>;
|
|
4
|
-
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
4
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
5
|
+
"update:modelValue": (...args: any[]) => void;
|
|
6
|
+
"update:dialogFormData": (...args: any[]) => void;
|
|
7
|
+
"update:visible": (...args: any[]) => void;
|
|
8
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
5
9
|
readonly name: StringConstructor;
|
|
6
10
|
readonly type: import("vue").PropType<typeof import("./uni-vue").componentType[number]>;
|
|
7
|
-
}>> & Readonly<{
|
|
11
|
+
}>> & Readonly<{
|
|
12
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
13
|
+
"onUpdate:dialogFormData"?: ((...args: any[]) => any) | undefined;
|
|
14
|
+
"onUpdate:visible"?: ((...args: any[]) => any) | undefined;
|
|
15
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
8
16
|
declare const _default: typeof __VLS_export;
|
|
9
17
|
export default _default;
|
|
@@ -16,10 +16,12 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
16
16
|
},
|
|
17
17
|
__name: "uni-vue",
|
|
18
18
|
props: uniVue.uniVueProps,
|
|
19
|
-
|
|
19
|
+
emits: ["update:modelValue", "update:dialogFormData", "update:visible"],
|
|
20
|
+
setup(__props, { emit: __emit }) {
|
|
20
21
|
const bem$1 = bem.createNameSpace("uni-vue");
|
|
21
22
|
const props$1 = __props;
|
|
22
|
-
const
|
|
23
|
+
const emit = __emit;
|
|
24
|
+
const { loading } = useUniVue.useUniVue(props$1, emit);
|
|
23
25
|
return (_ctx, _cache) => {
|
|
24
26
|
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
25
27
|
vue.createVNode(vue.unref(elementPlus.ElSkeleton), {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uni-vue.vue2.js","sources":["../../../../../../packages/components/uni-vue/src/uni-vue.vue"],"sourcesContent":["<template>\n <el-skeleton\n :class=\"bem.e('skeleton')\"\n :loading=\"loading\"\n style=\"background: #fff; padding: 5px 15px\"\n :rows=\"1\"\n />\n <div\n ref=\"uniVue\"\n :class=\"`${bem.b()} ${prepareClassNames()}`\"\n :style=\"{\n ...prepareStyles(),\n }\"\n />\n</template>\n<script setup lang=\"ts\">\nimport { createNameSpace } from '@el-plus/utils/bem'\nimport { uniVueProps } from './uni-vue'\nimport { prepareClassNames, prepareStyles } from '@el-plus/utils/props'\nimport { ElSkeleton } from 'element-plus'\nimport { useUniVue } from './use-uni-vue'\ndefineOptions({\n name: 'EpUniVue',\n inheritAttrs: false,\n})\nconst bem = createNameSpace('uni-vue')\nconst props = defineProps(uniVueProps)\nconst { loading } = useUniVue(props)\n</script>\n"],"names":["bem","createNameSpace","props","useUniVue","_createVNode","_unref","ElSkeleton","_normalizeClass","_createElementVNode","prepareClassNames","_normalizeStyle","prepareStyles"],"mappings":"
|
|
1
|
+
{"version":3,"file":"uni-vue.vue2.js","sources":["../../../../../../packages/components/uni-vue/src/uni-vue.vue"],"sourcesContent":["<template>\n <el-skeleton\n :class=\"bem.e('skeleton')\"\n :loading=\"loading\"\n style=\"background: #fff; padding: 5px 15px\"\n :rows=\"1\"\n />\n <div\n ref=\"uniVue\"\n :class=\"`${bem.b()} ${prepareClassNames()}`\"\n :style=\"{\n ...prepareStyles(),\n }\"\n />\n</template>\n<script setup lang=\"ts\">\nimport { createNameSpace } from '@el-plus/utils/bem'\nimport { uniVueProps } from './uni-vue'\nimport { prepareClassNames, prepareStyles } from '@el-plus/utils/props'\nimport { ElSkeleton } from 'element-plus'\nimport { useUniVue } from './use-uni-vue'\ndefineOptions({\n name: 'EpUniVue',\n inheritAttrs: false,\n})\nconst bem = createNameSpace('uni-vue')\nconst props = defineProps(uniVueProps)\n// const emit = defineEmits<{\n// (e: `update:${string}`, value: any): void\n// }>()\nconst emit = defineEmits(['update:modelValue', 'update:dialogFormData', 'update:visible'])\nconst { loading } = useUniVue(props, emit)\n\n</script>\n"],"names":["bem","createNameSpace","props","useUniVue","_createVNode","_unref","ElSkeleton","_normalizeClass","_createElementVNode","prepareClassNames","_normalizeStyle","prepareStyles"],"mappings":";;;;;;;;;;;;;;;;;;;;AAyBA,IAAA,MAAMA,KAAA,GAAMC,oBAAgB,SAAS,CAAA;AACrC,IAAA,MAAMC,OAAA,GAAQ,OAAA;AAId,IAAA,MAAM,IAAA,GAAO,MAAA;AACb,IAAA,MAAM,EAAE,OAAA,EAAQ,GAAIC,mBAAA,CAAUD,SAAO,IAAI,CAAA;;;QA9BvCE,eAAA,CAKEC,SAAA,CAAAC,sBAAA,CAAA,EAAA;AAAA,UAJC,OAAKC,kBAAA,CAAEF,SAAA,CAAAL,KAAA,CAAA,CAAI,CAAA,CAAC,UAAA,CAAA,CAAA;AAAA,UACZ,OAAA,EAASK,UAAA,OAAA,CAAA;AAAA,UACV,KAAA,EAAA,EAAA,YAAA,EAAA,MAAA,EAAA,WAAA,UAAA,EAAA;AAAA,UACC,IAAA,EAAM;AAAA;QAETG,uBAME,KAAA,EAAA;AAAA,UALA,GAAA,EAAI,QAAA;AAAA,UACH,KAAA,EAAKD,kBAAA,CAAA,CAAA,EAAKF,SAAA,CAAAL,KAAA,CAAA,CAAI,CAAA,MAAOK,SAAA,CAAAI,uBAAA,CAAA,EAAiB,CAAA,CAAA,CAAA;AAAA,UACtC,OAAKC,kBAAA,CAAA;AAAA,eAAaL,SAAA,CAAAM,mBAAA,CAAA;AAAa;;;;;;;;;"}
|
|
@@ -8,7 +8,7 @@ var uniVue = require('./uni-vue.js');
|
|
|
8
8
|
var axios = require('axios');
|
|
9
9
|
var elementPlus = require('element-plus');
|
|
10
10
|
|
|
11
|
-
const useUniVue = (props) => {
|
|
11
|
+
const useUniVue = (props, emit) => {
|
|
12
12
|
const uniVue$1 = vue.useTemplateRef("uniVue");
|
|
13
13
|
const { type } = props;
|
|
14
14
|
const loading = vue.ref(true);
|
|
@@ -42,7 +42,7 @@ const useUniVue = (props) => {
|
|
|
42
42
|
let eventName = key.slice(2);
|
|
43
43
|
if (eventName.startsWith("Update:")) {
|
|
44
44
|
eventName = "update:" + eventName.slice(7);
|
|
45
|
-
if (eventName === "update:
|
|
45
|
+
if (eventName === "update:modelValue") {
|
|
46
46
|
eventName = "input";
|
|
47
47
|
}
|
|
48
48
|
} else {
|
|
@@ -51,10 +51,13 @@ const useUniVue = (props) => {
|
|
|
51
51
|
}
|
|
52
52
|
events[eventName] = attrs[key];
|
|
53
53
|
} else {
|
|
54
|
-
|
|
54
|
+
if (key === "modelValue") {
|
|
55
|
+
_props.value = attrs[key];
|
|
56
|
+
} else {
|
|
57
|
+
_props[key] = attrs[key];
|
|
58
|
+
}
|
|
55
59
|
}
|
|
56
60
|
});
|
|
57
|
-
console.log(events, _props, 9999);
|
|
58
61
|
return {
|
|
59
62
|
on: events,
|
|
60
63
|
props: _props
|
|
@@ -66,7 +69,7 @@ const useUniVue = (props) => {
|
|
|
66
69
|
case "bpm":
|
|
67
70
|
return `${cdn}bpm-common/common/index.umd.min.js`;
|
|
68
71
|
case "address":
|
|
69
|
-
return
|
|
72
|
+
return `http://localhost:8001/dist/hx-address.js`;
|
|
70
73
|
default:
|
|
71
74
|
return "";
|
|
72
75
|
}
|
|
@@ -158,6 +161,22 @@ const useUniVue = (props) => {
|
|
|
158
161
|
}
|
|
159
162
|
}
|
|
160
163
|
shadowRoot.appendChild(container);
|
|
164
|
+
console.log(prepareVueAttributes());
|
|
165
|
+
const baseEvents = {
|
|
166
|
+
...prepareVueAttributes().on,
|
|
167
|
+
"input": (newVal) => {
|
|
168
|
+
console.log(newVal, "input", props.name);
|
|
169
|
+
emit("update:modelValue", newVal);
|
|
170
|
+
},
|
|
171
|
+
"update:dialogFormData": (newVal) => {
|
|
172
|
+
console.log(newVal, "update:dialogFormData");
|
|
173
|
+
emit("update:dialogFormData", newVal);
|
|
174
|
+
},
|
|
175
|
+
"update:visible": (newVal) => {
|
|
176
|
+
console.log(newVal, "update:visible");
|
|
177
|
+
emit("update:visible", newVal);
|
|
178
|
+
}
|
|
179
|
+
};
|
|
161
180
|
instance = new Vue2({
|
|
162
181
|
el: container,
|
|
163
182
|
// @ts-expect-error 缺少类型定义
|
|
@@ -166,38 +185,31 @@ const useUniVue = (props) => {
|
|
|
166
185
|
props: {
|
|
167
186
|
...prepareVueAttributes().props
|
|
168
187
|
},
|
|
169
|
-
on:
|
|
170
|
-
...prepareVueAttributes().on,
|
|
171
|
-
// 'update:dialogFormData': (newVal) => {
|
|
172
|
-
// console.log(newVal, 'update:dialogFormData');
|
|
173
|
-
// },
|
|
174
|
-
// 'update:visible': (newVal) => {
|
|
175
|
-
// console.log(newVal, 'update:visible');
|
|
176
|
-
// },
|
|
177
|
-
"input": (newVal) => {
|
|
178
|
-
console.log(newVal, "input");
|
|
179
|
-
}
|
|
180
|
-
}
|
|
188
|
+
on: baseEvents
|
|
181
189
|
})
|
|
182
190
|
});
|
|
183
191
|
};
|
|
184
192
|
Object.keys(attrs).forEach((key) => {
|
|
185
|
-
|
|
186
|
-
|
|
193
|
+
console.log(key, 8);
|
|
194
|
+
if (!key.startsWith("on")) {
|
|
187
195
|
vue.watch(
|
|
188
|
-
() => attrs[
|
|
196
|
+
() => attrs[key],
|
|
189
197
|
(newVal) => {
|
|
190
|
-
|
|
198
|
+
vue.nextTick(() => {
|
|
191
199
|
try {
|
|
192
|
-
console.log(newVal, "
|
|
193
|
-
|
|
200
|
+
console.log(props.name, newVal, "watch", key, instance);
|
|
201
|
+
let vue2Prop = key;
|
|
202
|
+
if (key === "modelValue") {
|
|
203
|
+
vue2Prop = "value";
|
|
204
|
+
}
|
|
205
|
+
instance.$children[0][vue2Prop] = newVal;
|
|
194
206
|
} catch (e) {
|
|
195
207
|
}
|
|
196
|
-
}
|
|
208
|
+
});
|
|
197
209
|
},
|
|
198
210
|
{
|
|
199
|
-
|
|
200
|
-
|
|
211
|
+
deep: true,
|
|
212
|
+
immediate: true
|
|
201
213
|
}
|
|
202
214
|
);
|
|
203
215
|
}
|
|
@@ -1 +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, watch } from 'vue'\nimport { http } from '@el-plus/utils/http'\nimport Vue2 from 'vue2'\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 const modelProps = {}\n // console.log(attrs)\n\n Object.keys(attrs).forEach((key) => {\n if (key.startsWith('on')) {\n let eventName = key.slice(2) // 去掉 'on' 前缀\n if (eventName.startsWith('Update:')) {\n // 处理 v-model:xxx 事件,转换为 update:xxx\n // 例如:onUpdate:modelValue -> update:modelValue、onUpdate:dialogFormData -> update:dialogFormData\n eventName = 'update:' + eventName.slice(7)\n \n // 如果是v-model:value, 转换为input\n if (eventName === 'update:value') {\n eventName = 'input'\n }\n } else {\n // 将驼峰命名转换为短横线命名\n // 例如: onInitComplete-> init-complete (因为测试发现用initComplete不生效)\n eventName = eventName.replace(/([A-Z])/g, '-$1').toLowerCase()\n // 删除第一位的-\n eventName = eventName.slice(1)\n }\n events[eventName] = attrs[key]\n } else {\n _props[key] = attrs[key]\n }\n })\n console.log(events, _props, 9999)\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 `./hx-address.js`\n return `${cdn}address/static/hx-address.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 loadStaticJsResource = async () => {\n const promises: Promise<void>[] = []\n\n // 检查并加载element-ui.js(非bpm类型)\n if (!isBpm && !window.ElementUIComponents) {\n await new Promise((resolve, reject) => {\n const script = document.createElement('script')\n script.src = '/element-ui.js'\n script.onload = resolve\n script.onerror = reject\n document.body.appendChild(script)\n })\n }\n\n // 检查并加载原有的JS资源\n let globalName\n if (isAddress) {\n globalName = 'hxAddress'\n }\n if (isBpm) {\n globalName = 'index'\n }\n\n if (globalName && !window[globalName]) {\n promises.push(\n new Promise((resolve, reject) => {\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 }\n\n return Promise.all(promises)\n }\n const loadStaticCssResource = async () => {\n const cssPromises: Promise<string>[] = []\n\n // 为非bpm类型加载element-ui.css\n if (!isBpm) {\n cssPromises.push(\n http\n .request<string>('/element-ui.css', {\n responseReturn: 'raw',\n baseURL: '',\n })\n .then((res) => res.data),\n )\n }\n\n // 加载原有的CSS资源\n const staticCssUrl = getStaticCssUrl()\n if (staticCssUrl) {\n cssPromises.push(\n http\n .request<string>(staticCssUrl, {\n responseReturn: 'raw',\n })\n .then((res) => res.data),\n )\n }\n\n const cssContents = await Promise.all(cssPromises)\n return cssContents.join('\\n')\n }\n let instance\n const setupInstance = async () => {\n if (instance) {\n return\n }\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 // console.log( prepareVueAttributes());\n\n instance = new Vue2({\n el: container,\n // @ts-expect-error 缺少类型定义\n router: new VueRouter3(),\n render: (h) => h(props.name, {\n props: {\n ...prepareVueAttributes().props,\n },\n on: {\n ...prepareVueAttributes().on,\n // 'update:dialogFormData': (newVal) => {\n // console.log(newVal, 'update:dialogFormData');\n // },\n // 'update:visible': (newVal) => {\n // console.log(newVal, 'update:visible');\n // },\n 'input': (newVal) => {\n console.log(newVal, 'input');\n },\n }\n }),\n })\n }\n\n // 监听 attrs中通过v-model绑定的数据(onUpdate:)变化,更新 Vue 2 组件\n Object.keys(attrs).forEach((key) => {\n if (key.startsWith('onUpdate:')) {\n const propName = key.slice(9)\n watch(\n () => attrs[propName],\n (newVal) => {\n \n if (instance) {\n try {\n console.log(newVal, 'newVal', propName, instance);\n instance.$children[0][propName] = newVal\n } catch (e) {\n // 忽略更新异常\n }\n }\n },\n {\n immediate: true,\n deep: true,\n },\n )\n }\n })\n\n onMounted(() => {\n setupInstance()\n })\n\n return {\n loading,\n }\n}\n"],"names":["uniVue","useTemplateRef","ref","componentType","useAttrs","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,IAAI;AACA,cAAA,OAAA,CAAQ,GAAA,CAAI,MAAA,EAAQ,QAAA,EAAU,QAAA,EAAU,QAAQ,CAAA;AAChD,cAAA,QAAA,CAAS,SAAA,CAAU,CAAC,CAAA,CAAE,QAAQ,CAAA,GAAI,MAAA;AAAA,YACpC,SAAS,CAAA,EAAG;AAAA,YAEZ;AAAA,UACF;AAAA,QACJ,CAAA;AAAA,QACA;AAAA,UACE,SAAA,EAAW,IAAA;AAAA,UACX,IAAA,EAAM;AAAA;AACR,OACF;AAAA,IACF;AAAA,EACF,CAAC,CAAA;AAED,EAAAC,aAAA,CAAU,MAAM;AACd,IAAA,aAAA,EAAc;AAAA,EAChB,CAAC,CAAA;AAED,EAAA,OAAO;AAAA,IACL;AAAA,GACF;AACF;;;;"}
|
|
1
|
+
{"version":3,"file":"use-uni-vue.js","sources":["../../../../../../packages/components/uni-vue/src/use-uni-vue.ts"],"sourcesContent":["import { onMounted, ref, useAttrs,nextTick, useTemplateRef, watch } from 'vue'\nimport { http } from '@el-plus/utils/http'\nimport Vue2 from 'vue2'\nimport VueRouter3 from 'vue-router3'\nimport { componentType } from './uni-vue'\nimport axios from 'axios'\nimport { ElMessage, ElLoading } from 'element-plus'\n\nexport const useUniVue = (props, emit) => {\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 = {} as Record<string, any>\n Object.keys(attrs).forEach((key) => {\n if (key.startsWith('on')) {\n let eventName = key.slice(2) // 去掉 'on' 前缀\n if (eventName.startsWith('Update:')) {\n // 处理 v-model:xxx 事件,转换为 update:xxx\n // 例如:onUpdate:modelValue -> update:modelValue、onUpdate:dialogFormData -> update:dialogFormData\n eventName = 'update:' + eventName.slice(7)\n\n // 如果是v-model, 转换为vue2对应的input\n if (eventName === 'update:modelValue') {\n eventName = 'input'\n }\n } else {\n // 将驼峰命名转换为短横线命名\n // 例如: onInitComplete-> init-complete (因为测试发现用initComplete不生效)\n eventName = eventName.replace(/([A-Z])/g, '-$1').toLowerCase()\n // 删除第一位的-\n eventName = eventName.slice(1)\n }\n events[eventName] = attrs[key]\n } else {\n if (key === 'modelValue') {\n // 处理 v-model转换为vue2的value\n _props.value = attrs[key] // eslint-disable-line\n } else {\n _props[key] = attrs[key]\n\n }\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 `http://localhost:8001/dist/hx-address.js`\n return `./hx-address.js`\n return `${cdn}address/static/hx-address.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 loadStaticJsResource = async () => {\n const promises: Promise<void>[] = []\n\n // 检查并加载element-ui.js(非bpm类型)\n if (!isBpm && !window.ElementUIComponents) {\n await new Promise((resolve, reject) => {\n const script = document.createElement('script')\n script.src = '/element-ui.js'\n script.onload = resolve\n script.onerror = reject\n document.body.appendChild(script)\n })\n }\n\n // 检查并加载原有的JS资源\n let globalName\n if (isAddress) {\n globalName = 'hxAddress'\n }\n if (isBpm) {\n globalName = 'index'\n }\n\n if (globalName && !window[globalName]) {\n promises.push(\n new Promise((resolve, reject) => {\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 }\n\n return Promise.all(promises)\n }\n const loadStaticCssResource = async () => {\n const cssPromises: Promise<string>[] = []\n\n // 为非bpm类型加载element-ui.css\n if (!isBpm) {\n cssPromises.push(\n http\n .request<string>('/element-ui.css', {\n responseReturn: 'raw',\n baseURL: '',\n })\n .then((res) => res.data),\n )\n }\n\n // 加载原有的CSS资源\n const staticCssUrl = getStaticCssUrl()\n if (staticCssUrl) {\n cssPromises.push(\n http\n .request<string>(staticCssUrl, {\n responseReturn: 'raw',\n })\n .then((res) => res.data),\n )\n }\n\n const cssContents = await Promise.all(cssPromises)\n return cssContents.join('\\n')\n }\n let instance\n const setupInstance = async () => {\n if (instance) {\n return\n }\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 console.log(prepareVueAttributes());\n\n // 准备基础事件处理\n const baseEvents = {\n ...prepareVueAttributes().on,\n 'input': (newVal) => {\n console.log(newVal, 'input', props.name);\n emit('update:modelValue', newVal)\n },\n 'update:dialogFormData': (newVal) => {\n console.log(newVal, 'update:dialogFormData');\n emit('update:dialogFormData', newVal)\n },\n 'update:visible': (newVal) => {\n console.log(newVal, 'update:visible');\n emit('update:visible', newVal)\n },\n }\n\n // 创建Vue2实例\n instance = new Vue2({\n el: container,\n // @ts-expect-error 缺少类型定义\n router: new VueRouter3(),\n render: (h) => h(props.name, {\n props: {\n ...prepareVueAttributes().props,\n },\n on: baseEvents\n }),\n })\n\n // // 监听所有可能的update:事件\n // instance.$on(/^update:/, (eventName, newVal) => {\n // console.log(eventName, newVal, 'dynamic update event');\n // emit(eventName, newVal)\n // })\n }\n\n // 监听 attrs中非事件属性的变化,更新 Vue 2 组件\n Object.keys(attrs).forEach((key) => {\n console.log(key, 8);\n if (!key.startsWith('on')) {\n watch(\n () => attrs[key],\n (newVal) => {\n // if (instance) {\n nextTick(() => {\n try {\n console.log(props.name, newVal, 'watch', key, instance);\n // v-model转换为vue2的value\n let vue2Prop = key\n if (key === 'modelValue') {\n vue2Prop = 'value'\n }\n instance.$children[0][vue2Prop] = newVal\n } catch (e) {\n // 忽略更新异常\n }\n })\n // }\n },\n {\n deep: true,\n immediate: true,\n },\n )\n }\n })\n\n onMounted(() => {\n setupInstance()\n })\n\n return {\n loading,\n }\n}\n"],"names":["uniVue","useTemplateRef","ref","componentType","useAttrs","ElMessage","ElLoading","http","watch","nextTick","onMounted"],"mappings":";;;;;;;;;;AAQO,MAAM,SAAA,GAAY,CAAC,KAAA,EAAO,IAAA,KAAS;AACxC,EAAA,MAAMA,QAAA,GAASC,mBAA4B,QAAQ,CAAA;AACnD,EAAA,MAAM,EAAE,MAAK,GAAI,KAAA;AACjB,EAAA,MAAM,OAAA,GAAUC,QAAI,IAAI,CAAA;AACxB,EAAA,MAAM,YAAY,IAAA,KAAS,SAAA;AAC3B,EAAA,MAAM,QAAQ,IAAA,KAAS,KAAA;AAEvB,EAAA,MAAM,YAAA,GAAeC,oBAAA,CAAc,OAAA,CAAQ,IAAI,CAAA,GAAI,EAAA;AACnD,EAAA,MAAM,QAAQC,YAAA,EAAS;AACvB,EAAA,MAAM,cAAc,MAAM;AACxB,IAAA,IAAA,CAAK,IAAI,UAAU,CAAA;AACnB,IAAA,IAAI,CAAC,OAAO,GAAA,EAAK;AACf,MAAA,MAAA,CAAO,GAAA,GAAM,IAAA;AAAA,IACf;AAEA,IAAA,IAAI,SAAA,EAAW;AACb,MAAA,IAAI,CAAC,OAAO,KAAA,EAAO;AACjB,QAAA,MAAA,CAAO,KAAA,G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AW,OAAA;AAAA,cACb;AACA,cAAA,QAAA,CAAS,SAAA,CAAU,CAAC,CAAA,CAAE,QAAQ,CAAA,GAAI,MAAA;AAAA,YACpC,SAAS,CAAA,EAAG;AAAA,YAEZ;AAAA,UACF,CAAC,CAAA;AAAA,QAEH,CAAA;AAAA,QACA;AAAA,UACE,IAAA,EAAM,IAAA;AAAA,UACN,SAAA,EAAW;AAAA;AACb,OACF;AAAA,IACF;AAAA,EACF,CAAC,CAAA;AAED,EAAAC,aAAA,CAAU,MAAM;AACd,IAAA,aAAA,EAAc;AAAA,EAChB,CAAC,CAAA;AAED,EAAA,OAAO;AAAA,IACL;AAAA,GACF;AACF;;;;"}
|
package/lib/package.json.js
CHANGED
package/package.json
CHANGED
package/theme-chalk/header.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.ep-header{display:flex;margin-bottom:10px}.ep-header .el-page-header .el-page-header__left{margin-right:-10px;margin-top:4px}
|
|
1
|
+
.ep-header{display:flex;lex-wrap:wrap}.ep-header>.el-button{margin-bottom:10px}.ep-header .el-page-header .el-page-header__left{margin-right:-10px;margin-top:4px}.ep-header .el-page-header .el-page-header__title{white-space:nowrap}
|
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.is-hide-label .el-form-item__label{display:none}.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 .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 .el-table__cell.is-center .el-link{margin:0 auto;text-align:center}.ep-table .el-table .cell{line-height:30px}.ep-table .el-table thead tr th{height:42px}.ep-table .el-table thead tr th .cell{line-height:20px}.ep-table .el-table thead tr th .el-checkbox__inner{height:14px;width:14px}.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:32px;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 30px}.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 button{font-size:12px}.ep-choose-dialog__selected-count{color:#409eff;float:left;font-size:16px;line-height:32px}.ep-confirm-dialog{padding-bottom:20px}.ep-confirm-dialog .ep-dialog__footer{padding-top:0}.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__dialog .el-transfer__buttons button{width:100px}.ep-custom-column__dialog .el-transfer__buttons button span{font-size:13px}.ep-custom-column__operate{position:absolute;right:-100%;top:50%;transform:translate(calc(25% - 12px),32px)}.ep-custom-column__operate button{width:100px}.ep-custom-column__operate button span{font-size:13px}.no-cn__operate{transform:translate(calc(25% - 520px),32px)}.ep-link{font-size:13px}.ep-uni-vue{background:#fff}.ep-uni-vue__skeleton .el-skeleton__item{margin-top:10px}.ep-attachment__dialog--normal{background:none;position:static!important}.ep-attachment__dialog--normal .el-overlay-dialog{position:static}.ep-attachment__dialog--normal .el-overlay-dialog .el-dialog{margin:0;padding:0;width:auto!important}.ep-attachment__dialog--normal .el-overlay-dialog .el-dialog .el-dialog__header{display:none}.ep-attachment__dialog--normal .el-overlay-dialog .el-dialog .el-dialog__body{padding:0}.ep-attachment__handler{height:32px;padding:9px 15px}.ep-attachment__handler.el-button--text{padding:0}
|
|
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.is-hide-label .el-form-item__label{display:none}.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 .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 .el-table__cell.is-center .el-link{margin:0 auto;text-align:center}.ep-table .el-table .cell{line-height:30px}.ep-table .el-table thead tr th{height:42px}.ep-table .el-table thead tr th .cell{line-height:20px}.ep-table .el-table thead tr th .el-checkbox__inner{height:14px;width:14px}.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:32px;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;lex-wrap:wrap}.ep-header>.el-button{margin-bottom:10px}.ep-header .el-page-header .el-page-header__left{margin-right:-10px;margin-top:4px}.ep-header .el-page-header .el-page-header__title{white-space:nowrap}.ep-template-promise{position:relative;z-index:8888888888888888}.ep-dialog{padding:20px 25px 30px}.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 button{font-size:12px}.ep-choose-dialog__selected-count{color:#409eff;float:left;font-size:16px;line-height:32px}.ep-confirm-dialog{padding-bottom:20px}.ep-confirm-dialog .ep-dialog__footer{padding-top:0}.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__dialog .el-transfer__buttons button{width:100px}.ep-custom-column__dialog .el-transfer__buttons button span{font-size:13px}.ep-custom-column__operate{position:absolute;right:-100%;top:50%;transform:translate(calc(25% - 12px),32px)}.ep-custom-column__operate button{width:100px}.ep-custom-column__operate button span{font-size:13px}.no-cn__operate{transform:translate(calc(25% - 520px),32px)}.ep-link{font-size:13px}.ep-uni-vue{background:#fff}.ep-uni-vue__skeleton .el-skeleton__item{margin-top:10px}.ep-attachment__dialog--normal{background:none;position:static!important}.ep-attachment__dialog--normal .el-overlay-dialog{position:static}.ep-attachment__dialog--normal .el-overlay-dialog .el-dialog{margin:0;padding:0;width:auto!important}.ep-attachment__dialog--normal .el-overlay-dialog .el-dialog .el-dialog__header{display:none}.ep-attachment__dialog--normal .el-overlay-dialog .el-dialog .el-dialog__body{padding:0}.ep-attachment__handler{height:32px;padding:9px 15px}.ep-attachment__handler.el-button--text{padding:0}
|
|
@@ -3,11 +3,18 @@
|
|
|
3
3
|
|
|
4
4
|
@include b(header) {
|
|
5
5
|
display: flex;
|
|
6
|
-
margin-bottom: 10px;
|
|
6
|
+
// margin-bottom: 10px;
|
|
7
|
+
lex-wrap: wrap;
|
|
8
|
+
>.el-button{
|
|
9
|
+
margin-bottom: 10px;
|
|
10
|
+
}
|
|
7
11
|
.el-page-header{
|
|
8
12
|
.el-page-header__left{
|
|
9
13
|
margin-right: -10px;
|
|
10
14
|
margin-top:4px
|
|
11
15
|
}
|
|
16
|
+
.el-page-header__title{
|
|
17
|
+
white-space: nowrap;
|
|
18
|
+
}
|
|
12
19
|
}
|
|
13
20
|
}
|