el-plus 0.0.114 → 0.0.116
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 +24 -0
- package/README.md +85 -85
- package/dist/index.full.js +41 -9
- 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 +41 -10
- package/docs/CHANGELOG.md +5 -5
- package/docs/api-examples.md +49 -49
- package/docs/components/attachment.md +118 -111
- package/docs/components/buttons.md +179 -179
- package/docs/components/custom-column.md +70 -70
- package/docs/components/date-picker-range.md +61 -61
- package/docs/components/dialog.md +104 -104
- package/docs/components/footer-info.md +101 -101
- package/docs/components/form.md +211 -211
- package/docs/components/header.md +117 -117
- package/docs/components/input.md +111 -111
- package/docs/components/link.md +63 -63
- package/docs/components/search-list-page.md +91 -91
- package/docs/components/select.md +249 -249
- package/docs/components/table.md +145 -145
- package/docs/components/title.md +70 -70
- package/docs/components/use-choose-dialog.md +114 -114
- package/docs/components/use-confirm-dialog.md +86 -86
- package/docs/components/use-form-dialog.md +85 -85
- package/docs/guide/markdown-examples.md +85 -85
- package/docs/hooks/use-navigation.md +131 -131
- package/docs/hooks/use-utils.md +162 -162
- package/docs/index.md +25 -25
- package/docs/overview.md +99 -99
- package/docs/pages/detail.md +66 -66
- package/docs/pages/list.md +74 -74
- package/docs/pages/router.md +151 -151
- package/es/components/attachment/index.d.ts +12 -2
- package/es/components/attachment/index.mjs +1 -1
- package/es/components/attachment/index.mjs.map +1 -1
- package/es/components/attachment/src/attachment.d.ts +6 -0
- package/es/components/attachment/src/attachment.mjs +7 -1
- package/es/components/attachment/src/attachment.mjs.map +1 -1
- package/es/components/attachment/src/attachment.vue.d.ts +5 -1
- package/es/components/attachment/src/attachment.vue2.mjs +7 -4
- package/es/components/attachment/src/attachment.vue2.mjs.map +1 -1
- package/es/components/attachment/src/use-attachment.mjs.map +1 -1
- package/es/components/buttons/index.mjs.map +1 -1
- package/es/components/buttons/src/buttons-vue.mjs.map +1 -1
- package/es/components/buttons/src/buttons.mjs.map +1 -1
- package/es/components/custom-column/index.mjs.map +1 -1
- package/es/components/custom-column/src/custom-column.mjs.map +1 -1
- package/es/components/custom-column/src/custom-column.vue2.mjs.map +1 -1
- package/es/components/date-picker-range/index.mjs.map +1 -1
- package/es/components/date-picker-range/src/date-picker-range.mjs.map +1 -1
- package/es/components/date-picker-range/src/date-picker-range.vue2.mjs.map +1 -1
- package/es/components/footer-info/index.mjs.map +1 -1
- package/es/components/footer-info/src/footer-info.mjs.map +1 -1
- package/es/components/footer-info/src/footer-info.vue2.mjs.map +1 -1
- package/es/components/form/index.mjs.map +1 -1
- package/es/components/form/src/form-item-vue.mjs.map +1 -1
- package/es/components/form/src/form-item.mjs.map +1 -1
- package/es/components/form/src/form.mjs.map +1 -1
- package/es/components/form/src/form.vue2.mjs.map +1 -1
- package/es/components/form/src/hooks/use-form-item.mjs.map +1 -1
- package/es/components/form/src/hooks/use-form.mjs.map +1 -1
- package/es/components/header/index.mjs.map +1 -1
- package/es/components/header/src/header.mjs.map +1 -1
- package/es/components/header/src/header.vue2.mjs.map +1 -1
- package/es/components/header/src/use-header.mjs.map +1 -1
- package/es/components/index.mjs +1 -1
- package/es/components/input/index.mjs.map +1 -1
- package/es/components/input/src/input.mjs.map +1 -1
- package/es/components/input/src/input.vue2.mjs.map +1 -1
- package/es/components/link/index.mjs.map +1 -1
- package/es/components/link/src/link.mjs.map +1 -1
- package/es/components/link/src/link.vue2.mjs.map +1 -1
- package/es/components/search-list-page/index.mjs.map +1 -1
- package/es/components/search-list-page/src/search-list-page.mjs.map +1 -1
- package/es/components/search-list-page/src/search-list-page.vue2.mjs.map +1 -1
- package/es/components/search-list-page/src/use-search-list-page.mjs.map +1 -1
- package/es/components/select/index.mjs.map +1 -1
- package/es/components/select/src/select.mjs.map +1 -1
- package/es/components/select/src/select.vue2.mjs.map +1 -1
- package/es/components/select/src/use-select.mjs.map +1 -1
- package/es/components/table/index.mjs.map +1 -1
- package/es/components/table/src/table.mjs.map +1 -1
- package/es/components/table/src/table.vue2.mjs.map +1 -1
- package/es/components/table/src/use-table.mjs.map +1 -1
- package/es/components/title/index.mjs.map +1 -1
- package/es/components/title/src/title.mjs.map +1 -1
- package/es/components/title/src/title.vue2.mjs.map +1 -1
- package/es/components/title/src/use-title.mjs.map +1 -1
- package/es/components/uni-vue/index.mjs.map +1 -1
- package/es/components/uni-vue/src/uni-vue.mjs.map +1 -1
- package/es/components/uni-vue/src/uni-vue.vue2.mjs.map +1 -1
- package/es/components/uni-vue/src/use-uni-vue.mjs.map +1 -1
- package/es/components.mjs.map +1 -1
- package/es/directives/permission/index.mjs.map +1 -1
- package/es/directives/repeat-click/index.mjs.map +1 -1
- package/es/hooks/dialog/use-choose-dialog.mjs.map +1 -1
- package/es/hooks/dialog/use-confirm-dialog.mjs.map +1 -1
- package/es/hooks/dialog/use-dialog.mjs.map +1 -1
- package/es/hooks/dialog/use-form-dialog.mjs.map +1 -1
- package/es/hooks/use-locale.mjs.map +1 -1
- package/es/hooks/use-navigation.mjs.map +1 -1
- package/es/hooks/use-request.mjs.map +1 -1
- package/es/hooks/use-template-promise.mjs.map +1 -1
- package/es/hooks/use-utils.mjs.map +1 -1
- package/es/index.mjs +1 -1
- package/es/index.mjs.map +1 -1
- package/es/locale/lang/en.mjs.map +1 -1
- package/es/locale/lang/zh-cn.mjs.map +1 -1
- package/es/package.json.mjs +1 -1
- package/es/plugins/globalProperties.mjs.map +1 -1
- package/es/types/global.d.ts +30 -30
- package/es/types/index.d.ts +2 -2
- package/es/types/utils.d.ts +19 -19
- package/es/utils/bem.mjs.map +1 -1
- package/es/utils/cookie.mjs.map +1 -1
- package/es/utils/dom.mjs.map +1 -1
- package/es/utils/env.mjs.map +1 -1
- package/es/utils/file.mjs.map +1 -1
- package/es/utils/http/core/modules/interceptor.d.ts +4 -3
- package/es/utils/http/core/modules/interceptor.mjs +26 -4
- package/es/utils/http/core/modules/interceptor.mjs.map +1 -1
- package/es/utils/http/core/modules/loading.mjs.map +1 -1
- package/es/utils/http/core/preset-interceptors.mjs.map +1 -1
- package/es/utils/http/core/request-client.mjs.map +1 -1
- package/es/utils/http/core/types.d.ts +4 -1
- package/es/utils/http/index.mjs.map +1 -1
- package/es/utils/mitt.mjs.map +1 -1
- package/es/utils/navigation.mjs.map +1 -1
- package/es/utils/props.mjs.map +1 -1
- package/es/utils/time.mjs.map +1 -1
- package/es/utils/utils.mjs.map +1 -1
- package/es/utils/with-install.mjs.map +1 -1
- package/global.d.ts +21 -21
- package/lib/components/attachment/index.d.ts +12 -2
- package/lib/components/attachment/index.js +1 -0
- package/lib/components/attachment/index.js.map +1 -1
- package/lib/components/attachment/src/attachment.d.ts +6 -0
- package/lib/components/attachment/src/attachment.js +7 -0
- package/lib/components/attachment/src/attachment.js.map +1 -1
- package/lib/components/attachment/src/attachment.vue.d.ts +5 -1
- package/lib/components/attachment/src/attachment.vue2.js +6 -3
- package/lib/components/attachment/src/attachment.vue2.js.map +1 -1
- package/lib/components/attachment/src/use-attachment.js.map +1 -1
- package/lib/components/buttons/index.js.map +1 -1
- package/lib/components/buttons/src/buttons-vue.js.map +1 -1
- package/lib/components/buttons/src/buttons.js.map +1 -1
- package/lib/components/custom-column/index.js.map +1 -1
- package/lib/components/custom-column/src/custom-column.js.map +1 -1
- package/lib/components/custom-column/src/custom-column.vue2.js.map +1 -1
- package/lib/components/date-picker-range/index.js.map +1 -1
- package/lib/components/date-picker-range/src/date-picker-range.js.map +1 -1
- package/lib/components/date-picker-range/src/date-picker-range.vue2.js.map +1 -1
- package/lib/components/footer-info/index.js.map +1 -1
- package/lib/components/footer-info/src/footer-info.js.map +1 -1
- package/lib/components/footer-info/src/footer-info.vue2.js.map +1 -1
- package/lib/components/form/index.js.map +1 -1
- package/lib/components/form/src/form-item-vue.js.map +1 -1
- package/lib/components/form/src/form-item.js.map +1 -1
- package/lib/components/form/src/form.js.map +1 -1
- package/lib/components/form/src/form.vue2.js.map +1 -1
- package/lib/components/form/src/hooks/use-form-item.js.map +1 -1
- package/lib/components/form/src/hooks/use-form.js.map +1 -1
- package/lib/components/header/index.js.map +1 -1
- package/lib/components/header/src/header.js.map +1 -1
- package/lib/components/header/src/header.vue2.js.map +1 -1
- package/lib/components/header/src/use-header.js.map +1 -1
- package/lib/components/index.js +1 -0
- package/lib/components/index.js.map +1 -1
- package/lib/components/input/index.js.map +1 -1
- package/lib/components/input/src/input.js.map +1 -1
- package/lib/components/input/src/input.vue2.js.map +1 -1
- package/lib/components/link/index.js.map +1 -1
- package/lib/components/link/src/link.js.map +1 -1
- package/lib/components/link/src/link.vue2.js.map +1 -1
- package/lib/components/search-list-page/index.js.map +1 -1
- package/lib/components/search-list-page/src/search-list-page.js.map +1 -1
- package/lib/components/search-list-page/src/search-list-page.vue2.js.map +1 -1
- package/lib/components/search-list-page/src/use-search-list-page.js.map +1 -1
- package/lib/components/select/index.js.map +1 -1
- package/lib/components/select/src/select.js.map +1 -1
- package/lib/components/select/src/select.vue2.js.map +1 -1
- package/lib/components/select/src/use-select.js.map +1 -1
- package/lib/components/table/index.js.map +1 -1
- package/lib/components/table/src/table.js.map +1 -1
- package/lib/components/table/src/table.vue2.js.map +1 -1
- package/lib/components/table/src/use-table.js.map +1 -1
- package/lib/components/title/index.js.map +1 -1
- package/lib/components/title/src/title.js.map +1 -1
- package/lib/components/title/src/title.vue2.js.map +1 -1
- package/lib/components/title/src/use-title.js.map +1 -1
- package/lib/components/uni-vue/index.js.map +1 -1
- package/lib/components/uni-vue/src/uni-vue.js.map +1 -1
- package/lib/components/uni-vue/src/uni-vue.vue2.js.map +1 -1
- package/lib/components/uni-vue/src/use-uni-vue.js.map +1 -1
- package/lib/components.js.map +1 -1
- package/lib/directives/permission/index.js.map +1 -1
- package/lib/directives/repeat-click/index.js.map +1 -1
- package/lib/hooks/dialog/use-choose-dialog.js.map +1 -1
- package/lib/hooks/dialog/use-confirm-dialog.js.map +1 -1
- package/lib/hooks/dialog/use-dialog.js.map +1 -1
- package/lib/hooks/dialog/use-form-dialog.js.map +1 -1
- package/lib/hooks/use-locale.js.map +1 -1
- package/lib/hooks/use-navigation.js.map +1 -1
- package/lib/hooks/use-request.js.map +1 -1
- package/lib/hooks/use-template-promise.js.map +1 -1
- package/lib/hooks/use-utils.js.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/locale/lang/en.js.map +1 -1
- package/lib/locale/lang/zh-cn.js.map +1 -1
- package/lib/package.json.js +1 -1
- package/lib/plugins/globalProperties.js.map +1 -1
- package/lib/types/global.d.ts +30 -30
- package/lib/types/index.d.ts +2 -2
- package/lib/types/utils.d.ts +19 -19
- package/lib/utils/bem.js.map +1 -1
- package/lib/utils/cookie.js.map +1 -1
- package/lib/utils/dom.js.map +1 -1
- package/lib/utils/env.js.map +1 -1
- package/lib/utils/file.js.map +1 -1
- package/lib/utils/http/core/modules/interceptor.d.ts +4 -3
- package/lib/utils/http/core/modules/interceptor.js +26 -4
- package/lib/utils/http/core/modules/interceptor.js.map +1 -1
- package/lib/utils/http/core/modules/loading.js.map +1 -1
- package/lib/utils/http/core/preset-interceptors.js.map +1 -1
- package/lib/utils/http/core/request-client.js.map +1 -1
- package/lib/utils/http/core/types.d.ts +4 -1
- package/lib/utils/http/index.js.map +1 -1
- package/lib/utils/mitt.js.map +1 -1
- package/lib/utils/navigation.js.map +1 -1
- package/lib/utils/props.js.map +1 -1
- package/lib/utils/time.js.map +1 -1
- package/lib/utils/utils.js.map +1 -1
- package/lib/utils/with-install.js.map +1 -1
- package/package.json +1 -1
- package/theme-chalk/src/attachment.scss +39 -39
- package/theme-chalk/src/base.scss +2 -2
- package/theme-chalk/src/buttons.scss +22 -22
- package/theme-chalk/src/common/common.scss +7 -7
- package/theme-chalk/src/common/transition.scss +9 -9
- package/theme-chalk/src/custom-column.scss +55 -55
- package/theme-chalk/src/dialog.scss +62 -62
- package/theme-chalk/src/footer-info.scss +18 -18
- package/theme-chalk/src/form.scss +80 -80
- package/theme-chalk/src/header.scss +19 -19
- package/theme-chalk/src/index.scss +15 -15
- package/theme-chalk/src/link.scss +5 -5
- package/theme-chalk/src/mixins/config.scss +3 -3
- package/theme-chalk/src/mixins/mixins.scss +37 -37
- package/theme-chalk/src/search-list-page.scss +22 -22
- package/theme-chalk/src/select.scss +10 -10
- package/theme-chalk/src/table.scss +91 -91
- package/theme-chalk/src/tabs.scss +55 -55
- package/theme-chalk/src/title.scss +52 -52
- package/theme-chalk/src/uni-vue.scss +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# el-plus
|
|
2
2
|
|
|
3
|
+
## 0.0.116
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 1
|
|
8
|
+
|
|
9
|
+
## 0.0.115
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 2
|
|
14
|
+
|
|
15
|
+
## 0.0.115
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- 1
|
|
20
|
+
|
|
21
|
+
## 0.1.0
|
|
22
|
+
|
|
23
|
+
### Minor Changes
|
|
24
|
+
|
|
25
|
+
- 1
|
|
26
|
+
|
|
3
27
|
## 0.0.114
|
|
4
28
|
|
|
5
29
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -1,85 +1,85 @@
|
|
|
1
|
-
基于 pnpm workspace + ts + element-plus 开发
|
|
2
|
-
|
|
3
|
-
## 完整引入
|
|
4
|
-
|
|
5
|
-
```bash
|
|
6
|
-
import ElPlus from 'el-plus'
|
|
7
|
-
import 'el-plus/dist/index.css'
|
|
8
|
-
app.use(ElPlus)
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
### Volar 支持
|
|
12
|
-
如果您使用 Volar,请在 tsconfig.json 中通过 compilerOptions.type 指定全局组件类型。
|
|
13
|
-
|
|
14
|
-
```
|
|
15
|
-
{
|
|
16
|
-
"compilerOptions": {
|
|
17
|
-
// ...
|
|
18
|
-
"types": ["el-plus/global"]
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
```
|
|
22
|
-
## 按需导入方式1 (<b style="color:red">简单</b>)
|
|
23
|
-
```js
|
|
24
|
-
// main.ts
|
|
25
|
-
import 'el-plus/dist/index.css' // 引入所有样式
|
|
26
|
-
// xx.vue
|
|
27
|
-
import { ElButtons } from 'el-plus'
|
|
28
|
-
|
|
29
|
-
```
|
|
30
|
-
## 按需导入导入方式2 (待增加)
|
|
31
|
-
您需要使用额外的插件来导入要使用的组件。
|
|
32
|
-
### 自动导入 (<b style="color:red">推荐</b>)
|
|
33
|
-
首先你需要安装[`unplugin-vue-components`](https://github.com/unplugin/unplugin-vue-components#installation) 和 [`unplugin-auto-import`](https://github.com/unplugin/unplugin-auto-import#install)这两款插件
|
|
34
|
-
``` bash
|
|
35
|
-
$ npm install -D unplugin-vue-components unplugin-auto-import
|
|
36
|
-
```
|
|
37
|
-
然后把下列代码插入到你的 Vite 或 Webpack 的配置文件中
|
|
38
|
-
|
|
39
|
-
```js
|
|
40
|
-
import { defineConfig } from 'vite'
|
|
41
|
-
import AutoImport from 'unplugin-auto-import/vite'
|
|
42
|
-
import Components from 'unplugin-vue-components/vite'
|
|
43
|
-
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
|
|
44
|
-
|
|
45
|
-
export default defineConfig({
|
|
46
|
-
// ...
|
|
47
|
-
plugins: [
|
|
48
|
-
// ...
|
|
49
|
-
AutoImport({
|
|
50
|
-
resolvers: [ElementPlusResolver()],
|
|
51
|
-
}),
|
|
52
|
-
Components({
|
|
53
|
-
resolvers: [ElementPlusResolver()],
|
|
54
|
-
}),
|
|
55
|
-
],
|
|
56
|
-
})
|
|
57
|
-
|
|
58
|
-
```
|
|
59
|
-
### 手动导入
|
|
60
|
-
在vue文件中import即可,但需要安装 `unplugin-element-plus` 来导入样式,配置文档参考[docs](https://github.com/element-plus/unplugin-element-plus#readme)
|
|
61
|
-
``` js
|
|
62
|
-
<template>
|
|
63
|
-
<el-button>I am ElButton</el-button>
|
|
64
|
-
</template>
|
|
65
|
-
|
|
66
|
-
<script>
|
|
67
|
-
import { ElButton } from 'element-plus'
|
|
68
|
-
|
|
69
|
-
export default {
|
|
70
|
-
components: { ElButton },
|
|
71
|
-
}
|
|
72
|
-
</script>
|
|
73
|
-
```
|
|
74
|
-
```js
|
|
75
|
-
import { defineConfig } from 'vite'
|
|
76
|
-
import ElementPlus from 'unplugin-element-plus/vite'
|
|
77
|
-
|
|
78
|
-
export default defineConfig({
|
|
79
|
-
// ...
|
|
80
|
-
plugins: [ElementPlus({
|
|
81
|
-
lib:'el-plus'
|
|
82
|
-
})],
|
|
83
|
-
})
|
|
84
|
-
```
|
|
85
|
-
|
|
1
|
+
基于 pnpm workspace + ts + element-plus 开发
|
|
2
|
+
|
|
3
|
+
## 完整引入
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
import ElPlus from 'el-plus'
|
|
7
|
+
import 'el-plus/dist/index.css'
|
|
8
|
+
app.use(ElPlus)
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
### Volar 支持
|
|
12
|
+
如果您使用 Volar,请在 tsconfig.json 中通过 compilerOptions.type 指定全局组件类型。
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
{
|
|
16
|
+
"compilerOptions": {
|
|
17
|
+
// ...
|
|
18
|
+
"types": ["el-plus/global"]
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
```
|
|
22
|
+
## 按需导入方式1 (<b style="color:red">简单</b>)
|
|
23
|
+
```js
|
|
24
|
+
// main.ts
|
|
25
|
+
import 'el-plus/dist/index.css' // 引入所有样式
|
|
26
|
+
// xx.vue
|
|
27
|
+
import { ElButtons } from 'el-plus'
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
## 按需导入导入方式2 (待增加)
|
|
31
|
+
您需要使用额外的插件来导入要使用的组件。
|
|
32
|
+
### 自动导入 (<b style="color:red">推荐</b>)
|
|
33
|
+
首先你需要安装[`unplugin-vue-components`](https://github.com/unplugin/unplugin-vue-components#installation) 和 [`unplugin-auto-import`](https://github.com/unplugin/unplugin-auto-import#install)这两款插件
|
|
34
|
+
``` bash
|
|
35
|
+
$ npm install -D unplugin-vue-components unplugin-auto-import
|
|
36
|
+
```
|
|
37
|
+
然后把下列代码插入到你的 Vite 或 Webpack 的配置文件中
|
|
38
|
+
|
|
39
|
+
```js
|
|
40
|
+
import { defineConfig } from 'vite'
|
|
41
|
+
import AutoImport from 'unplugin-auto-import/vite'
|
|
42
|
+
import Components from 'unplugin-vue-components/vite'
|
|
43
|
+
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
|
|
44
|
+
|
|
45
|
+
export default defineConfig({
|
|
46
|
+
// ...
|
|
47
|
+
plugins: [
|
|
48
|
+
// ...
|
|
49
|
+
AutoImport({
|
|
50
|
+
resolvers: [ElementPlusResolver()],
|
|
51
|
+
}),
|
|
52
|
+
Components({
|
|
53
|
+
resolvers: [ElementPlusResolver()],
|
|
54
|
+
}),
|
|
55
|
+
],
|
|
56
|
+
})
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
### 手动导入
|
|
60
|
+
在vue文件中import即可,但需要安装 `unplugin-element-plus` 来导入样式,配置文档参考[docs](https://github.com/element-plus/unplugin-element-plus#readme)
|
|
61
|
+
``` js
|
|
62
|
+
<template>
|
|
63
|
+
<el-button>I am ElButton</el-button>
|
|
64
|
+
</template>
|
|
65
|
+
|
|
66
|
+
<script>
|
|
67
|
+
import { ElButton } from 'element-plus'
|
|
68
|
+
|
|
69
|
+
export default {
|
|
70
|
+
components: { ElButton },
|
|
71
|
+
}
|
|
72
|
+
</script>
|
|
73
|
+
```
|
|
74
|
+
```js
|
|
75
|
+
import { defineConfig } from 'vite'
|
|
76
|
+
import ElementPlus from 'unplugin-element-plus/vite'
|
|
77
|
+
|
|
78
|
+
export default defineConfig({
|
|
79
|
+
// ...
|
|
80
|
+
plugins: [ElementPlus({
|
|
81
|
+
lib:'el-plus'
|
|
82
|
+
})],
|
|
83
|
+
})
|
|
84
|
+
```
|
|
85
|
+
|
package/dist/index.full.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! ElPlus v0.0.
|
|
1
|
+
/*! ElPlus v0.0.116 */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue'), require('element-plus'), require('@vue/shared'), require('axios'), require('js-cookie'), require('defu'), require('qs'), require('element-plus/es/components/table/src/table/defaults'), require('@element-plus/icons-vue'), require('mitt'), require('lodash-unified'), require('@vueuse/core'), require('vue-router'), require('js-base64'), require('dayjs')) :
|
|
@@ -464,14 +464,36 @@
|
|
|
464
464
|
addRequestInterceptor({
|
|
465
465
|
fulfilled,
|
|
466
466
|
rejected
|
|
467
|
-
} = defaultRequestInterceptorConfig) {
|
|
468
|
-
|
|
467
|
+
} = defaultRequestInterceptorConfig, options) {
|
|
468
|
+
if (options?.prepend) {
|
|
469
|
+
this.prependInterceptor("request", fulfilled, rejected);
|
|
470
|
+
} else {
|
|
471
|
+
this.axiosInstance.interceptors.request.use(fulfilled, rejected);
|
|
472
|
+
}
|
|
469
473
|
}
|
|
470
474
|
addResponseInterceptor({
|
|
471
475
|
fulfilled,
|
|
472
476
|
rejected
|
|
473
|
-
} = defaultResponseInterceptorConfig) {
|
|
474
|
-
|
|
477
|
+
} = defaultResponseInterceptorConfig, options) {
|
|
478
|
+
if (options?.prepend) {
|
|
479
|
+
this.prependInterceptor("response", fulfilled, rejected);
|
|
480
|
+
} else {
|
|
481
|
+
this.axiosInstance.interceptors.response.use(fulfilled, rejected);
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
/**
|
|
485
|
+
* 插入到拦截器链头部(先于已注册的拦截器执行)。
|
|
486
|
+
* axios 拦截器按注册顺序执行且未提供前插 API,
|
|
487
|
+
* 此处直接 unshift 到其内部 handlers 数组,结构与 use() 注册的一致(axios 1.x 稳定结构)
|
|
488
|
+
*/
|
|
489
|
+
prependInterceptor(type, fulfilled, rejected) {
|
|
490
|
+
const manager = this.axiosInstance.interceptors[type];
|
|
491
|
+
manager.handlers.unshift({
|
|
492
|
+
fulfilled,
|
|
493
|
+
rejected,
|
|
494
|
+
synchronous: false,
|
|
495
|
+
runWhen: null
|
|
496
|
+
});
|
|
475
497
|
}
|
|
476
498
|
}
|
|
477
499
|
|
|
@@ -3553,6 +3575,12 @@
|
|
|
3553
3575
|
type: String
|
|
3554
3576
|
}
|
|
3555
3577
|
};
|
|
3578
|
+
const attachmentEmits = {
|
|
3579
|
+
// 确认
|
|
3580
|
+
confirm: (data) => true,
|
|
3581
|
+
// 取消
|
|
3582
|
+
cancel: () => true
|
|
3583
|
+
};
|
|
3556
3584
|
|
|
3557
3585
|
const getFullUrl = (filePath) => {
|
|
3558
3586
|
return filePath.indexOf("hongxinshop.com") > -1 ? filePath : `${window.location.protocol}//${getEnv() === "local" ? `${getLocationEnv()}-hxjf.hongxinshop.com` : window.location.host}/image/${filePath}`;
|
|
@@ -3832,11 +3860,12 @@
|
|
|
3832
3860
|
"modelValue": {},
|
|
3833
3861
|
"modelModifiers": {}
|
|
3834
3862
|
}),
|
|
3835
|
-
emits: ["update:modelValue"],
|
|
3836
|
-
setup(__props, { expose: __expose }) {
|
|
3863
|
+
emits: /* @__PURE__ */ vue.mergeModels(attachmentEmits, ["update:modelValue"]),
|
|
3864
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
3837
3865
|
const { t } = useLocale();
|
|
3838
3866
|
const bem = createNameSpace("attachment");
|
|
3839
3867
|
const props = __props;
|
|
3868
|
+
const emit = __emit;
|
|
3840
3869
|
const modelValue = vue.useModel(__props, "modelValue");
|
|
3841
3870
|
const {
|
|
3842
3871
|
columns,
|
|
@@ -3864,10 +3893,12 @@
|
|
|
3864
3893
|
),
|
|
3865
3894
|
templatePromiseClass: bem.e("promise"),
|
|
3866
3895
|
onConfirm: async (resolve) => {
|
|
3867
|
-
onConfirm(resolve);
|
|
3896
|
+
await onConfirm(resolve);
|
|
3897
|
+
emit("confirm", modelValue.value);
|
|
3868
3898
|
},
|
|
3869
3899
|
onCancel: (resolve) => {
|
|
3870
3900
|
onCancel(resolve);
|
|
3901
|
+
emit("cancel");
|
|
3871
3902
|
}
|
|
3872
3903
|
});
|
|
3873
3904
|
const open = AttachmentDialog.open;
|
|
@@ -4564,7 +4595,7 @@
|
|
|
4564
4595
|
EpFooterInfo
|
|
4565
4596
|
];
|
|
4566
4597
|
|
|
4567
|
-
var version = "0.0.
|
|
4598
|
+
var version = "0.0.116";
|
|
4568
4599
|
|
|
4569
4600
|
var globalProperties = {
|
|
4570
4601
|
install(app) {
|
|
@@ -4732,6 +4763,7 @@
|
|
|
4732
4763
|
exports.EpTable = EpTable;
|
|
4733
4764
|
exports.EpTitle = EpTitle;
|
|
4734
4765
|
exports.EpUniVue = EpUniVue;
|
|
4766
|
+
exports.attachmentEmits = attachmentEmits;
|
|
4735
4767
|
exports.attachmentProps = attachmentProps;
|
|
4736
4768
|
exports.buttonsProps = buttonsProps;
|
|
4737
4769
|
exports.componentType = componentType;
|