@es-plus/vue2 1.0.0 → 1.0.2
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 +46 -0
- package/README.md +156 -156
- package/dist/components/es-form/es-form.vue.d.ts +4 -1
- package/dist/components/es-form/es-form.vue.d.ts.map +1 -1
- package/dist/components/es-table/component.vue.d.ts +66 -2
- package/dist/components/es-table/component.vue.d.ts.map +1 -1
- package/dist/components/es-table/table-btns.vue.d.ts.map +1 -1
- package/dist/composables/use-form-layout.d.ts +5 -9
- package/dist/composables/use-form-layout.d.ts.map +1 -1
- package/dist/es-plus-vue2.js +567 -571
- package/dist/es-plus-vue2.js.map +1 -1
- package/dist/es-plus-vue2.umd.cjs +1 -1
- package/dist/es-plus-vue2.umd.cjs.map +1 -1
- package/dist/style.css +1 -1
- package/dist/vue-compat.d.ts +11 -13
- package/dist/vue-compat.d.ts.map +1 -1
- package/package.json +87 -86
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# @es-plus/vue2
|
|
2
|
+
|
|
3
|
+
## 1.0.0 — First stable release
|
|
4
|
+
|
|
5
|
+
This release promotes @es-plus/vue2 from beta (0.9.x) to GA. The component
|
|
6
|
+
behavior has been frozen against the `es-eui` reference docs site for several
|
|
7
|
+
weeks; all components (EsForm / EsTable / EsDialog / EsCrudPage) share their
|
|
8
|
+
JSON config schema 1:1 with @es-plus/vue3, so the same `formItemList` /
|
|
9
|
+
`columns` / `options` / `CrudPageSchema` definitions work in both targets.
|
|
10
|
+
|
|
11
|
+
### Changes vs 0.9.0
|
|
12
|
+
|
|
13
|
+
- **Stable API contract**: the four core components + `useDialog` + the
|
|
14
|
+
install function are considered stable. No breaking changes will land
|
|
15
|
+
without a major bump.
|
|
16
|
+
- **Added** unit smoke tests for the install function, the legacy es-eui
|
|
17
|
+
options-shape normalizer, and the export shape — drift between
|
|
18
|
+
`package.json#version` and the runtime default-export version now fails CI.
|
|
19
|
+
- **Verified** by the end-to-end harness in the monorepo
|
|
20
|
+
(`__tests__/e2e/scripts/run-e2e.mjs`): for every CRUD generator mode
|
|
21
|
+
(schema / sfc) the produced SFC compiles cleanly in a fresh Vite + Vue 2.7
|
|
22
|
+
+ Element UI project against `@es-plus/vue2@1.0.0`.
|
|
23
|
+
|
|
24
|
+
### Limitations carried forward from 0.9.x
|
|
25
|
+
|
|
26
|
+
- `tableOptions.virtual: true` is silently ignored (Element UI has no
|
|
27
|
+
`el-table-v2` equivalent). Use server-side pagination for large datasets.
|
|
28
|
+
- `scrollToRow` instance method is a no-op on this renderer.
|
|
29
|
+
- JSX in `<script setup lang="jsx">` requires the project to set up
|
|
30
|
+
`@vue/babel-preset-jsx` — Vite + `@vitejs/plugin-vue2` handles this
|
|
31
|
+
transparently.
|
|
32
|
+
|
|
33
|
+
### Upgrading from `es-eui`
|
|
34
|
+
|
|
35
|
+
`@es-plus/vue2` is the official successor to the `es-eui` demo package. To
|
|
36
|
+
migrate:
|
|
37
|
+
|
|
38
|
+
```diff
|
|
39
|
+
-import esEui from 'es-eui'
|
|
40
|
+
-Vue.use(esEui, { EsTable: { methods: { $httpRequest: ... } } })
|
|
41
|
+
+import ESPlus from '@es-plus/vue2'
|
|
42
|
+
+Vue.use(ESPlus, { EsTable: { methods: { $httpRequest: ... } } })
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
The install function preserves the legacy `{ methods: { ... } }` nested
|
|
46
|
+
options shape, so no JS changes are required beyond the import.
|
package/README.md
CHANGED
|
@@ -1,156 +1,156 @@
|
|
|
1
|
-
# @es-plus/vue2
|
|
2
|
-
|
|
3
|
-
> Vue 2 + Element UI renderer for the **es-plus** ecosystem — sharing the same JSON-schema CRUD configuration as the Vue 3 renderer ([`@es-plus/vue3`](https://www.npmjs.com/package/@es-plus/vue3)).
|
|
4
|
-
|
|
5
|
-
[](https://www.npmjs.com/package/@es-plus/vue2)
|
|
6
|
-
[](https://v2.vuejs.org/)
|
|
7
|
-
[](https://element.eleme.io/)
|
|
8
|
-
[](./LICENSE)
|
|
9
|
-
|
|
10
|
-
## Why @es-plus/vue2
|
|
11
|
-
|
|
12
|
-
- **Same config, two frameworks** — a single `columns` / `formItemList` definition powers both Vue 2 and Vue 3 deployments. No rewrites when migrating, no divergence between teams on different stacks.
|
|
13
|
-
- **AI-friendly schema-driven CRUD** — built around a stable JSON Schema, ideal for code-gen, MCP tools, and LLM workflows.
|
|
14
|
-
- **Element UI parity** — bundles `EsForm`, `EsTable`, `EsDialog`, `EsCrudPage`, `useDialog`, plus the same `httpRequest` / permission / global-config plumbing.
|
|
15
|
-
|
|
16
|
-
## Compatibility
|
|
17
|
-
|
|
18
|
-
| Dependency | Supported |
|
|
19
|
-
| --- | --- |
|
|
20
|
-
| Vue | `^2.6.14` (Vue 2.7's native Composition API is preferred) |
|
|
21
|
-
| `@vue/composition-api` | `^1.7.0` (required only on Vue ≤ 2.6) |
|
|
22
|
-
| Element UI | `^2.15.0` |
|
|
23
|
-
| `@es-plus/core` | `^1.0.0` |
|
|
24
|
-
|
|
25
|
-
## Install
|
|
26
|
-
|
|
27
|
-
```bash
|
|
28
|
-
# Vue 2.7+ (recommended — no extra plugin needed)
|
|
29
|
-
npm install @es-plus/vue2 element-ui vue@^2.7
|
|
30
|
-
|
|
31
|
-
# Vue 2.6.x (needs @vue/composition-api)
|
|
32
|
-
npm install @es-plus/vue2 element-ui @vue/composition-api vue@^2.6
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
## Setup
|
|
36
|
-
|
|
37
|
-
```js
|
|
38
|
-
import Vue from 'vue'
|
|
39
|
-
import ElementUI from 'element-ui'
|
|
40
|
-
import 'element-ui/lib/theme-chalk/index.css'
|
|
41
|
-
|
|
42
|
-
// Vue 2.6 only — skip on Vue 2.7+
|
|
43
|
-
import VueCompositionAPI from '@vue/composition-api'
|
|
44
|
-
Vue.use(VueCompositionAPI)
|
|
45
|
-
|
|
46
|
-
import EsPlus from '@es-plus/vue2'
|
|
47
|
-
import '@es-plus/vue2/dist/style.css'
|
|
48
|
-
|
|
49
|
-
import { configureEsPlus } from '@es-plus/core/config'
|
|
50
|
-
|
|
51
|
-
Vue.use(ElementUI)
|
|
52
|
-
Vue.use(EsPlus)
|
|
53
|
-
|
|
54
|
-
configureEsPlus({
|
|
55
|
-
httpRequest: async ({ url, method, data }) => {
|
|
56
|
-
return fetch(url, { method, body: JSON.stringify(data) }).then(r => r.json())
|
|
57
|
-
},
|
|
58
|
-
configTableOut: (res) => ({ list: res.data.records, total: res.data.total }),
|
|
59
|
-
permission: (code) => store.state.permissions.includes(code),
|
|
60
|
-
})
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
## Quick example
|
|
64
|
-
|
|
65
|
-
```vue
|
|
66
|
-
<template>
|
|
67
|
-
<es-table
|
|
68
|
-
:columns="columns"
|
|
69
|
-
:api-params="apiParams"
|
|
70
|
-
:btn-config="btnConfig"
|
|
71
|
-
:form-item-list="searchForm"
|
|
72
|
-
/>
|
|
73
|
-
</template>
|
|
74
|
-
|
|
75
|
-
<script>
|
|
76
|
-
export default {
|
|
77
|
-
data: () => ({
|
|
78
|
-
apiParams: { url: '/api/users', method: 'GET' },
|
|
79
|
-
columns: [
|
|
80
|
-
{ prop: 'name', label: '姓名', width: 120 },
|
|
81
|
-
{ prop: 'status', label: '状态', formatter: row => row.status === 1 ? '启用' : '禁用' },
|
|
82
|
-
{ label: '操作', btnList: [
|
|
83
|
-
{ name: '编辑', click: (row) => this.edit(row) },
|
|
84
|
-
{ name: '删除', type: 'danger', click: (row) => this.remove(row) },
|
|
85
|
-
] },
|
|
86
|
-
],
|
|
87
|
-
searchForm: [
|
|
88
|
-
{ prop: 'keyword', label: '关键词', formtype: 'Input' },
|
|
89
|
-
{ prop: 'status', label: '状态', formtype: 'Select', options: [
|
|
90
|
-
{ label: '启用', value: 1 }, { label: '禁用', value: 0 },
|
|
91
|
-
] },
|
|
92
|
-
],
|
|
93
|
-
btnConfig: [
|
|
94
|
-
{ name: '新增', type: 'primary', code: 1, click: () => this.create() },
|
|
95
|
-
],
|
|
96
|
-
}),
|
|
97
|
-
}
|
|
98
|
-
</script>
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
The same `columns` / `searchForm` / `btnConfig` arrays work unchanged in `@es-plus/vue3` — only `Vue.use()` and the import path differ.
|
|
102
|
-
|
|
103
|
-
## Components
|
|
104
|
-
|
|
105
|
-
| Component | Purpose |
|
|
106
|
-
| --- | --- |
|
|
107
|
-
| `EsForm` | Configuration-driven form with row/col layout, fold/unfold, validation |
|
|
108
|
-
| `EsTable` | Configuration-driven table with toolbar, pagination, search form, cross-page selection |
|
|
109
|
-
| `EsDialog` | Programmable dialog used by `useDialog` |
|
|
110
|
-
| `EsCrudPage` | Schema-driven CRUD page assembling `EsTable` + `EsForm` + `useDialog` |
|
|
111
|
-
| `useDialog` | Imperative dialog API (`open`, `close`, `confirm`) |
|
|
112
|
-
|
|
113
|
-
## Sharing the same config across Vue 2 and Vue 3
|
|
114
|
-
|
|
115
|
-
The `columns` / `formItemList` / `btnConfig` / `apiParams` shapes live in [`@es-plus/core`](https://www.npmjs.com/package/@es-plus/core). Use them as the single source of truth for configs that ship to both renderers:
|
|
116
|
-
|
|
117
|
-
```ts
|
|
118
|
-
// shared/employee.config.ts
|
|
119
|
-
import type { ColumnConfig, FormItemConfig } from '@es-plus/core/types'
|
|
120
|
-
|
|
121
|
-
export const employeeColumns: ColumnConfig[] = [/* ... */]
|
|
122
|
-
export const employeeForm: FormItemConfig[] = [/* ... */]
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
```ts
|
|
126
|
-
// vue3/EmployeePage.vue AND vue2/EmployeePage.vue
|
|
127
|
-
import { employeeColumns, employeeForm } from '@/shared/employee.config'
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
## Differences vs @es-plus/vue3
|
|
131
|
-
|
|
132
|
-
| Feature | Vue 3 (`@es-plus/vue3`) | Vue 2 (`@es-plus/vue2`) |
|
|
133
|
-
| --- | --- | --- |
|
|
134
|
-
| Virtual scrolling (`virtual: true`) | Yes (`el-table-v2`) | **Not supported** — Element UI has no `el-table-v2` |
|
|
135
|
-
| `ElConfigProvider` locale/size injection | Yes | Use Element UI's global `Vue.use(ElementUI, { locale, size })` |
|
|
136
|
-
| Icons | Element Plus icon components | Element UI class strings (`el-icon-edit`) — converted automatically when needed |
|
|
137
|
-
| Default size | `default` (Element Plus) | `mini` — matches Element UI v2 visual density |
|
|
138
|
-
|
|
139
|
-
`size` values written for Vue 3 (`large` / `default` / `small`) are auto-mapped into Element UI's (`medium` / `small` / `mini`) so configs remain portable.
|
|
140
|
-
|
|
141
|
-
## Migration from Vue 3
|
|
142
|
-
|
|
143
|
-
You generally don't migrate — you target both. If you do:
|
|
144
|
-
|
|
145
|
-
1. Replace `import EsPlus from '@es-plus/vue3'` with `import EsPlus from '@es-plus/vue2'`.
|
|
146
|
-
2. Swap `vue@3 + element-plus` for `vue@2 + element-ui` (and `@vue/composition-api` if on 2.6).
|
|
147
|
-
3. Drop `virtual: true` on tables (or keep it — it's silently ignored).
|
|
148
|
-
4. `<script setup>` and `<el-icon><Delete/></el-icon>` aren't Vue 2 syntax — convert to Options API / template strings as appropriate.
|
|
149
|
-
|
|
150
|
-
## Repository
|
|
151
|
-
|
|
152
|
-
Monorepo: [github.com/liujiaao/es-plus](https://github.com/liujiaao/es-plus)
|
|
153
|
-
|
|
154
|
-
## License
|
|
155
|
-
|
|
156
|
-
[MIT](./LICENSE) © liujiaao
|
|
1
|
+
# @es-plus/vue2
|
|
2
|
+
|
|
3
|
+
> Vue 2 + Element UI renderer for the **es-plus** ecosystem — sharing the same JSON-schema CRUD configuration as the Vue 3 renderer ([`@es-plus/vue3`](https://www.npmjs.com/package/@es-plus/vue3)).
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@es-plus/vue2)
|
|
6
|
+
[](https://v2.vuejs.org/)
|
|
7
|
+
[](https://element.eleme.io/)
|
|
8
|
+
[](./LICENSE)
|
|
9
|
+
|
|
10
|
+
## Why @es-plus/vue2
|
|
11
|
+
|
|
12
|
+
- **Same config, two frameworks** — a single `columns` / `formItemList` definition powers both Vue 2 and Vue 3 deployments. No rewrites when migrating, no divergence between teams on different stacks.
|
|
13
|
+
- **AI-friendly schema-driven CRUD** — built around a stable JSON Schema, ideal for code-gen, MCP tools, and LLM workflows.
|
|
14
|
+
- **Element UI parity** — bundles `EsForm`, `EsTable`, `EsDialog`, `EsCrudPage`, `useDialog`, plus the same `httpRequest` / permission / global-config plumbing.
|
|
15
|
+
|
|
16
|
+
## Compatibility
|
|
17
|
+
|
|
18
|
+
| Dependency | Supported |
|
|
19
|
+
| --- | --- |
|
|
20
|
+
| Vue | `^2.6.14` (Vue 2.7's native Composition API is preferred) |
|
|
21
|
+
| `@vue/composition-api` | `^1.7.0` (required only on Vue ≤ 2.6) |
|
|
22
|
+
| Element UI | `^2.15.0` |
|
|
23
|
+
| `@es-plus/core` | `^1.0.0` |
|
|
24
|
+
|
|
25
|
+
## Install
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
# Vue 2.7+ (recommended — no extra plugin needed)
|
|
29
|
+
npm install @es-plus/vue2 element-ui vue@^2.7
|
|
30
|
+
|
|
31
|
+
# Vue 2.6.x (needs @vue/composition-api)
|
|
32
|
+
npm install @es-plus/vue2 element-ui @vue/composition-api vue@^2.6
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Setup
|
|
36
|
+
|
|
37
|
+
```js
|
|
38
|
+
import Vue from 'vue'
|
|
39
|
+
import ElementUI from 'element-ui'
|
|
40
|
+
import 'element-ui/lib/theme-chalk/index.css'
|
|
41
|
+
|
|
42
|
+
// Vue 2.6 only — skip on Vue 2.7+
|
|
43
|
+
import VueCompositionAPI from '@vue/composition-api'
|
|
44
|
+
Vue.use(VueCompositionAPI)
|
|
45
|
+
|
|
46
|
+
import EsPlus from '@es-plus/vue2'
|
|
47
|
+
import '@es-plus/vue2/dist/style.css'
|
|
48
|
+
|
|
49
|
+
import { configureEsPlus } from '@es-plus/core/config'
|
|
50
|
+
|
|
51
|
+
Vue.use(ElementUI)
|
|
52
|
+
Vue.use(EsPlus)
|
|
53
|
+
|
|
54
|
+
configureEsPlus({
|
|
55
|
+
httpRequest: async ({ url, method, data }) => {
|
|
56
|
+
return fetch(url, { method, body: JSON.stringify(data) }).then(r => r.json())
|
|
57
|
+
},
|
|
58
|
+
configTableOut: (res) => ({ list: res.data.records, total: res.data.total }),
|
|
59
|
+
permission: (code) => store.state.permissions.includes(code),
|
|
60
|
+
})
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Quick example
|
|
64
|
+
|
|
65
|
+
```vue
|
|
66
|
+
<template>
|
|
67
|
+
<es-table
|
|
68
|
+
:columns="columns"
|
|
69
|
+
:api-params="apiParams"
|
|
70
|
+
:btn-config="btnConfig"
|
|
71
|
+
:form-item-list="searchForm"
|
|
72
|
+
/>
|
|
73
|
+
</template>
|
|
74
|
+
|
|
75
|
+
<script>
|
|
76
|
+
export default {
|
|
77
|
+
data: () => ({
|
|
78
|
+
apiParams: { url: '/api/users', method: 'GET' },
|
|
79
|
+
columns: [
|
|
80
|
+
{ prop: 'name', label: '姓名', width: 120 },
|
|
81
|
+
{ prop: 'status', label: '状态', formatter: row => row.status === 1 ? '启用' : '禁用' },
|
|
82
|
+
{ label: '操作', btnList: [
|
|
83
|
+
{ name: '编辑', click: (row) => this.edit(row) },
|
|
84
|
+
{ name: '删除', type: 'danger', click: (row) => this.remove(row) },
|
|
85
|
+
] },
|
|
86
|
+
],
|
|
87
|
+
searchForm: [
|
|
88
|
+
{ prop: 'keyword', label: '关键词', formtype: 'Input' },
|
|
89
|
+
{ prop: 'status', label: '状态', formtype: 'Select', options: [
|
|
90
|
+
{ label: '启用', value: 1 }, { label: '禁用', value: 0 },
|
|
91
|
+
] },
|
|
92
|
+
],
|
|
93
|
+
btnConfig: [
|
|
94
|
+
{ name: '新增', type: 'primary', code: 1, click: () => this.create() },
|
|
95
|
+
],
|
|
96
|
+
}),
|
|
97
|
+
}
|
|
98
|
+
</script>
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
The same `columns` / `searchForm` / `btnConfig` arrays work unchanged in `@es-plus/vue3` — only `Vue.use()` and the import path differ.
|
|
102
|
+
|
|
103
|
+
## Components
|
|
104
|
+
|
|
105
|
+
| Component | Purpose |
|
|
106
|
+
| --- | --- |
|
|
107
|
+
| `EsForm` | Configuration-driven form with row/col layout, fold/unfold, validation |
|
|
108
|
+
| `EsTable` | Configuration-driven table with toolbar, pagination, search form, cross-page selection |
|
|
109
|
+
| `EsDialog` | Programmable dialog used by `useDialog` |
|
|
110
|
+
| `EsCrudPage` | Schema-driven CRUD page assembling `EsTable` + `EsForm` + `useDialog` |
|
|
111
|
+
| `useDialog` | Imperative dialog API (`open`, `close`, `confirm`) |
|
|
112
|
+
|
|
113
|
+
## Sharing the same config across Vue 2 and Vue 3
|
|
114
|
+
|
|
115
|
+
The `columns` / `formItemList` / `btnConfig` / `apiParams` shapes live in [`@es-plus/core`](https://www.npmjs.com/package/@es-plus/core). Use them as the single source of truth for configs that ship to both renderers:
|
|
116
|
+
|
|
117
|
+
```ts
|
|
118
|
+
// shared/employee.config.ts
|
|
119
|
+
import type { ColumnConfig, FormItemConfig } from '@es-plus/core/types'
|
|
120
|
+
|
|
121
|
+
export const employeeColumns: ColumnConfig[] = [/* ... */]
|
|
122
|
+
export const employeeForm: FormItemConfig[] = [/* ... */]
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
```ts
|
|
126
|
+
// vue3/EmployeePage.vue AND vue2/EmployeePage.vue
|
|
127
|
+
import { employeeColumns, employeeForm } from '@/shared/employee.config'
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## Differences vs @es-plus/vue3
|
|
131
|
+
|
|
132
|
+
| Feature | Vue 3 (`@es-plus/vue3`) | Vue 2 (`@es-plus/vue2`) |
|
|
133
|
+
| --- | --- | --- |
|
|
134
|
+
| Virtual scrolling (`virtual: true`) | Yes (`el-table-v2`) | **Not supported** — Element UI has no `el-table-v2` |
|
|
135
|
+
| `ElConfigProvider` locale/size injection | Yes | Use Element UI's global `Vue.use(ElementUI, { locale, size })` |
|
|
136
|
+
| Icons | Element Plus icon components | Element UI class strings (`el-icon-edit`) — converted automatically when needed |
|
|
137
|
+
| Default size | `default` (Element Plus) | `mini` — matches Element UI v2 visual density |
|
|
138
|
+
|
|
139
|
+
`size` values written for Vue 3 (`large` / `default` / `small`) are auto-mapped into Element UI's (`medium` / `small` / `mini`) so configs remain portable.
|
|
140
|
+
|
|
141
|
+
## Migration from Vue 3
|
|
142
|
+
|
|
143
|
+
You generally don't migrate — you target both. If you do:
|
|
144
|
+
|
|
145
|
+
1. Replace `import EsPlus from '@es-plus/vue3'` with `import EsPlus from '@es-plus/vue2'`.
|
|
146
|
+
2. Swap `vue@3 + element-plus` for `vue@2 + element-ui` (and `@vue/composition-api` if on 2.6).
|
|
147
|
+
3. Drop `virtual: true` on tables (or keep it — it's silently ignored).
|
|
148
|
+
4. `<script setup>` and `<el-icon><Delete/></el-icon>` aren't Vue 2 syntax — convert to Options API / template strings as appropriate.
|
|
149
|
+
|
|
150
|
+
## Repository
|
|
151
|
+
|
|
152
|
+
Monorepo: [github.com/liujiaao/es-plus](https://github.com/liujiaao/es-plus)
|
|
153
|
+
|
|
154
|
+
## License
|
|
155
|
+
|
|
156
|
+
[MIT](./LICENSE) © liujiaao
|
|
@@ -55,6 +55,9 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
55
55
|
labelKey?: string;
|
|
56
56
|
formtype?: import('@es-plus/core').FormType;
|
|
57
57
|
span?: number;
|
|
58
|
+
placeholder?: string;
|
|
59
|
+
clearable?: boolean;
|
|
60
|
+
disabled?: boolean;
|
|
58
61
|
attrs?: Record<string, unknown>;
|
|
59
62
|
props?: Record<string, unknown>;
|
|
60
63
|
on?: Record<string, unknown>;
|
|
@@ -73,7 +76,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
73
76
|
isInitRun?: boolean;
|
|
74
77
|
callOptionListFormat?: (data: unknown[]) => unknown[];
|
|
75
78
|
httpRequest?: (params: Record<string, unknown>) => Promise<unknown>;
|
|
76
|
-
listenToCallBack?:
|
|
79
|
+
listenToCallBack?: import('@es-plus/core').ListenToCallBack;
|
|
77
80
|
required?: boolean;
|
|
78
81
|
rules?: Array<Record<string, unknown>>;
|
|
79
82
|
formItemOptions?: Record<string, unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"es-form.vue.d.ts","sourceRoot":"","sources":["../../../src/components/es-form/es-form.vue"],"names":[],"mappings":"AAqIA;AAEA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAkF,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAMhI,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;;IAmDtF,kBAAkB;;cACO,QAAQ,CAAC,SAAS,CAAC;;;IAC5C,aAAa;;cACkB,QAAQ,CAAC,cAAc,EAAE,CAAC;;;IACzD,WAAW;;cACwB,QAAQ,CAAC,eAAe,CAAC;;;IAC5D,YAAY;;cACgB,QAAQ,CAAC,SAAS,EAAE,CAAC;;;IACjD,iBAAiB;;cACyB,QAAQ,CAAC,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,cAAc,EAAE,EAAE,CAAC,EAAE,QAAQ,KAAK,OAAO,CAAC,GAAG,OAAO,CAAC;;;IAC/I,kBAAkB;;;;;IAElB,WAAW;;cACc,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;;;IAC1D,eAAe;;cACuB,QAAQ,CAAC,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC
|
|
1
|
+
{"version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AAK,OAAO;;;iCAMzE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;;AAnB/G,wBA2aE"}
|
|
@@ -30,6 +30,8 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
30
30
|
size?: import('@es-plus/core').EsTableSize;
|
|
31
31
|
headerCellStyle?: Record<string, unknown>;
|
|
32
32
|
highlightCurrentRow?: boolean;
|
|
33
|
+
showHeader?: boolean;
|
|
34
|
+
emptyText?: string;
|
|
33
35
|
multiSelect?: boolean;
|
|
34
36
|
expand?: boolean;
|
|
35
37
|
snIndex?: boolean;
|
|
@@ -43,11 +45,41 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
43
45
|
row: import('@es-plus/core').ModelData;
|
|
44
46
|
rowIndex: number;
|
|
45
47
|
}) => string);
|
|
48
|
+
rowStyle?: Record<string, unknown> | ((params: {
|
|
49
|
+
row: import('@es-plus/core').ModelData;
|
|
50
|
+
rowIndex: number;
|
|
51
|
+
}) => Record<string, unknown>);
|
|
52
|
+
defaultSort?: {
|
|
53
|
+
prop: string;
|
|
54
|
+
order: "ascending" | "descending";
|
|
55
|
+
};
|
|
56
|
+
spanMethod?: (data: {
|
|
57
|
+
row: import('@es-plus/core').ModelData;
|
|
58
|
+
column: unknown;
|
|
59
|
+
rowIndex: number;
|
|
60
|
+
columnIndex: number;
|
|
61
|
+
}) => [number, number];
|
|
62
|
+
cellClassName?: string | ((data: {
|
|
63
|
+
row: import('@es-plus/core').ModelData;
|
|
64
|
+
column: unknown;
|
|
65
|
+
rowIndex: number;
|
|
66
|
+
columnIndex: number;
|
|
67
|
+
}) => string);
|
|
68
|
+
cellStyle?: Record<string, unknown> | ((data: {
|
|
69
|
+
row: import('@es-plus/core').ModelData;
|
|
70
|
+
column: unknown;
|
|
71
|
+
rowIndex: number;
|
|
72
|
+
columnIndex: number;
|
|
73
|
+
}) => Record<string, unknown>);
|
|
74
|
+
headerCellClassName?: string | ((data: {
|
|
75
|
+
column: unknown;
|
|
76
|
+
rowIndex: number;
|
|
77
|
+
}) => string);
|
|
46
78
|
isInitRun?: boolean;
|
|
47
79
|
actionUrl?: string;
|
|
48
80
|
apiParams?: import('@es-plus/core').ApiParams;
|
|
49
81
|
httpRequest?: (params: Record<string, unknown>) => Promise<unknown>;
|
|
50
|
-
listenToCallBack?:
|
|
82
|
+
listenToCallBack?: import('@es-plus/core').ListenToCallBack;
|
|
51
83
|
configTableOut?: import('@es-plus/core').ConfigTableOut;
|
|
52
84
|
entryQuery?: Record<string, unknown>;
|
|
53
85
|
configBtn?: import('@es-plus/core').BtnConfig[];
|
|
@@ -182,6 +214,8 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
182
214
|
size?: import('@es-plus/core').EsTableSize;
|
|
183
215
|
headerCellStyle?: Record<string, unknown>;
|
|
184
216
|
highlightCurrentRow?: boolean;
|
|
217
|
+
showHeader?: boolean;
|
|
218
|
+
emptyText?: string;
|
|
185
219
|
multiSelect?: boolean;
|
|
186
220
|
expand?: boolean;
|
|
187
221
|
snIndex?: boolean;
|
|
@@ -195,11 +229,41 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
195
229
|
row: import('@es-plus/core').ModelData;
|
|
196
230
|
rowIndex: number;
|
|
197
231
|
}) => string);
|
|
232
|
+
rowStyle?: Record<string, unknown> | ((params: {
|
|
233
|
+
row: import('@es-plus/core').ModelData;
|
|
234
|
+
rowIndex: number;
|
|
235
|
+
}) => Record<string, unknown>);
|
|
236
|
+
defaultSort?: {
|
|
237
|
+
prop: string;
|
|
238
|
+
order: "ascending" | "descending";
|
|
239
|
+
};
|
|
240
|
+
spanMethod?: (data: {
|
|
241
|
+
row: import('@es-plus/core').ModelData;
|
|
242
|
+
column: unknown;
|
|
243
|
+
rowIndex: number;
|
|
244
|
+
columnIndex: number;
|
|
245
|
+
}) => [number, number];
|
|
246
|
+
cellClassName?: string | ((data: {
|
|
247
|
+
row: import('@es-plus/core').ModelData;
|
|
248
|
+
column: unknown;
|
|
249
|
+
rowIndex: number;
|
|
250
|
+
columnIndex: number;
|
|
251
|
+
}) => string);
|
|
252
|
+
cellStyle?: Record<string, unknown> | ((data: {
|
|
253
|
+
row: import('@es-plus/core').ModelData;
|
|
254
|
+
column: unknown;
|
|
255
|
+
rowIndex: number;
|
|
256
|
+
columnIndex: number;
|
|
257
|
+
}) => Record<string, unknown>);
|
|
258
|
+
headerCellClassName?: string | ((data: {
|
|
259
|
+
column: unknown;
|
|
260
|
+
rowIndex: number;
|
|
261
|
+
}) => string);
|
|
198
262
|
isInitRun?: boolean;
|
|
199
263
|
actionUrl?: string;
|
|
200
264
|
apiParams?: import('@es-plus/core').ApiParams;
|
|
201
265
|
httpRequest?: (params: Record<string, unknown>) => Promise<unknown>;
|
|
202
|
-
listenToCallBack?:
|
|
266
|
+
listenToCallBack?: import('@es-plus/core').ListenToCallBack;
|
|
203
267
|
configTableOut?: import('@es-plus/core').ConfigTableOut;
|
|
204
268
|
entryQuery?: Record<string, unknown>;
|
|
205
269
|
configBtn?: import('@es-plus/core').BtnConfig[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.vue.d.ts","sourceRoot":"","sources":["../../../src/components/es-table/component.vue"],"names":[],"mappings":"AAwIA;AA6BA,OAAO,
|
|
1
|
+
{"version":3,"file":"component.vue.d.ts","sourceRoot":"","sources":["../../../src/components/es-table/component.vue"],"names":[],"mappings":"AAwIA;AA6BA,OAAO,EAKL,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EAClB,MAAM,eAAe,CAAA;;;;;;;cAgGqB,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;;;;;;cAK5D,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE;;;;cAI/B,MAAM,WAAW,EAAE;;;;cAIlB,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAIlB,MAAM,gBAAgB;;;;;;kCAufH,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;;;wBA0GtC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gEA9d3B,CAAA,gBAAgB,CAAC,gBAAiB,CAAA;;;;;uBAIH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAxEF,WAAW,GAAG,IAAI;sCAmSR,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE;8BAkOjC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;6BArBxB,MAAM;6BAWN,MAAM;;;;;;;cA3kBC,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;;;;;;cAK5D,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE;;;;cAI/B,MAAM,WAAW,EAAE;;;;cAIlB,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAIlB,MAAM,gBAAgB;;;;;;;;;;;;AAzB5C,wBA0qBE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-btns.vue.d.ts","sourceRoot":"","sources":["../../../src/components/es-table/table-btns.vue"],"names":[],"mappings":"AAyDA;AAoBA,OAAO,
|
|
1
|
+
{"version":3,"file":"table-btns.vue.d.ts","sourceRoot":"","sources":["../../../src/components/es-table/table-btns.vue"],"names":[],"mappings":"AAyDA;AAoBA,OAAO,EAAsC,KAAK,SAAS,EAAE,MAAM,eAAe,CAAA;AAIlF;;;;;;;GAOG;AACH,KAAK,aAAa,GAAG;IACnB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAA;IACpC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC,CAAA;IACtD,MAAM,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAA;IACxC,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,CAAA;CACb,CAAA;;;;;;;cA0BoB,MAAM,SAAS,EAAE;;;;cAIhB,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;;;;;6BAsDf,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAG,OAAO;kCAO5B,MAAM;;;;;0BAUd,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;2BAoBtB;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,KAAG,MAAM;;;;;;;cA/FvC,MAAM,SAAS,EAAE;;;;cAIhB,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;;;;;;AAVnD,wBAqHE"}
|
|
@@ -12,14 +12,7 @@ export declare function useFormLayout(props: UseFormLayoutProps): {
|
|
|
12
12
|
type: string;
|
|
13
13
|
gutter: number;
|
|
14
14
|
}>;
|
|
15
|
-
formLayout: import('vue').ComputedRef<
|
|
16
|
-
isBtnHidden?: boolean;
|
|
17
|
-
minFoldRows?: number;
|
|
18
|
-
btnColSpan?: number;
|
|
19
|
-
labelBtnWidth?: string | number;
|
|
20
|
-
labelWidth?: string | number;
|
|
21
|
-
size?: import('@es-plus/core').EsButtonSize;
|
|
22
|
-
}>;
|
|
15
|
+
formLayout: import('vue').ComputedRef<Record<string, unknown>>;
|
|
23
16
|
getSetOptionsStatus: import('vue').ComputedRef<boolean>;
|
|
24
17
|
getRowColsAlgorithm: import('vue').ComputedRef<FormLayoutResult>;
|
|
25
18
|
isFold: import('vue').ComputedRef<boolean>;
|
|
@@ -31,6 +24,9 @@ export declare function useFormLayout(props: UseFormLayoutProps): {
|
|
|
31
24
|
labelKey?: string;
|
|
32
25
|
formtype?: import('@es-plus/core').FormType;
|
|
33
26
|
span?: number;
|
|
27
|
+
placeholder?: string;
|
|
28
|
+
clearable?: boolean;
|
|
29
|
+
disabled?: boolean;
|
|
34
30
|
attrs?: Record<string, unknown>;
|
|
35
31
|
props?: Record<string, unknown>;
|
|
36
32
|
on?: Record<string, unknown>;
|
|
@@ -49,7 +45,7 @@ export declare function useFormLayout(props: UseFormLayoutProps): {
|
|
|
49
45
|
isInitRun?: boolean;
|
|
50
46
|
callOptionListFormat?: (data: unknown[]) => unknown[];
|
|
51
47
|
httpRequest?: (params: Record<string, unknown>) => Promise<unknown>;
|
|
52
|
-
listenToCallBack?:
|
|
48
|
+
listenToCallBack?: import('@es-plus/core').ListenToCallBack;
|
|
53
49
|
required?: boolean;
|
|
54
50
|
rules?: Array<Record<string, unknown>>;
|
|
55
51
|
formItemOptions?: Record<string, unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-form-layout.d.ts","sourceRoot":"","sources":["../../src/composables/use-form-layout.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,
|
|
1
|
+
{"version":3,"file":"use-form-layout.d.ts","sourceRoot":"","sources":["../../src/composables/use-form-layout.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAGL,KAAK,gBAAgB,EACtB,MAAM,eAAe,CAAA;AACtB,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAEpE,MAAM,WAAW,kBAAkB;IACjC,eAAe,CAAC,EAAE,eAAe,CAAA;IACjC,mEAAmE;IACnE,YAAY,EAAE,cAAc,EAAE,CAAA;CAC/B;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAiFzB,CAAC;oBAA2B,CAAC;;;;;;;;;;;;;;;;;;;EAgC1D"}
|