asai-vue-designer 0.2.15 → 0.2.16

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.
Files changed (35) hide show
  1. package/README.md +328 -3
  2. package/dist/{AsaiComp-CKjWN9qd.mjs → AsaiComp-DSDtWOdH.mjs} +1 -1
  3. package/dist/{AsaiCss-DyYE0TPc.mjs → AsaiCss-Vi1G0_22.mjs} +1 -1
  4. package/dist/{AsaiDom-BF04TIze.mjs → AsaiDom-D29WldSk.mjs} +1 -1
  5. package/dist/{AsaiEvent-6yBQeDKq.mjs → AsaiEvent-CmKaZzjj.mjs} +1 -1
  6. package/dist/{AsaiPos-BAKXy_ku.mjs → AsaiPos-DO1Fjopa.mjs} +1 -1
  7. package/dist/{AsaiStyle-DwyJ5wCM.mjs → AsaiStyle-CLSR3h3U.mjs} +1 -1
  8. package/dist/{AsaiStyles-CZ34s4VH.mjs → AsaiStyles-B3vm__Lw.mjs} +1 -1
  9. package/dist/ViewDesigner-BjopSOou.mjs +194 -0
  10. package/dist/ViewDesignerAttr-CZET-KMs.mjs +33 -0
  11. package/dist/{ViewDesignerBtns-ra0UsgkV.mjs → ViewDesignerBtns-yOF5C4iY.mjs} +47 -54
  12. package/dist/ViewDesignerIndex-DkKO1N1L.mjs +275 -0
  13. package/dist/ViewDesignerItemArea-B28i1-J-.mjs +164 -0
  14. package/dist/ViewDesignerItemOpt-C4bLVqmZ.mjs +63 -0
  15. package/dist/ViewDesignerLibList-DL7-V-lm.mjs +90 -0
  16. package/dist/ViewDesignerManage-nu720Lly.mjs +137 -0
  17. package/dist/_plugin-vue_export-helper-CHgC5LLL.mjs +9 -0
  18. package/dist/asai-vue-designer.css +1 -1
  19. package/dist/asai-vue-designer.es.js +3 -4
  20. package/dist/asai-vue-designer.umd.js +1 -2
  21. package/dist/components/AsStyle.d.ts +12 -0
  22. package/dist/components/_use/asEvents.d.ts +4 -0
  23. package/dist/components/_use/asEventsLib.d.ts +1 -0
  24. package/dist/components/_use/useCompLoader.d.ts +6 -0
  25. package/dist/components/_use/useDesignerFn.d.ts +4 -0
  26. package/dist/components/_use/useFormAttr.d.ts +6 -0
  27. package/dist/components/_use/useItemManage.d.ts +3 -0
  28. package/dist/components/useDesignerInit.d.ts +12 -0
  29. package/dist/components/useDesignerWc.d.ts +9 -1
  30. package/dist/{index-BeQ75p4c.mjs → index-D-ZCf4WW.mjs} +149 -121
  31. package/dist/index.d.ts +2 -1
  32. package/dist/useItemManage-DfatNjuG.mjs +59 -0
  33. package/package.json +1 -1
  34. package/dist/ViewDesigner-DC7DIZo7.mjs +0 -764
  35. package/dist/ViewDesignerIndex-Dxx_PS7w.mjs +0 -287
package/README.md CHANGED
@@ -1,7 +1,332 @@
1
- # asai-vue-designer
1
+ # asai-vue-designer — HMI 可视化设计器
2
2
 
3
- A simple vue designer for asai development.
3
+ ## 包信息
4
4
 
5
+ | 建议 npm 名 | 入口文件 | $fn / 注入键 | 类型 |
6
+ |------------|---------|-------------|------|
7
+ | `@estun/asai-vue-designer` | `src/index.ts` | `AsaiVueDesigner` → `imComp` + hooks | Feature |
8
+
9
+ ## 概述
10
+
11
+ `asai-vue-designer` 为 AsaiWeb 低代码/HMI 场景提供**所见即所得**页面搭建:拖拽布局、属性面板、事件绑定、导入导出与多页面管理。
12
+
13
+ ## 集成方式
14
+
15
+ ```typescript
16
+ // monorepo — 延迟:lib/featurePlugs.ts(非 App.vue 同步 import)
17
+ import AsaiVueDesigner from './plugs/asai-vue-designer/src/index';
18
+ // npm
19
+ // import AsaiVueDesigner from '@estun/asai-vue-designer';
20
+
21
+ const { ViewDesigner, useDesignerInit } = ujt.$fn.AsaiVueDesigner;
22
+ ```
23
+
24
+ ## 独立性约束
25
+
26
+ - **禁止** cross-import 其它 `plugs/*`。
27
+ - 属性面板使用 Host 全局 `AsaiForm`(运行时);业务组件经 `opt.imComp` / `createComponentLoader` 注入。
28
+ - `buildCompMap` 定义于插件内 `components/_use/useCompLoader.ts`(npm 包自包含)。
29
+
30
+ ## 主要 API / 导出
31
+
32
+ | 导出 | 说明 |
33
+ |------|------|
34
+ | `imComp.ViewDesigner` | 画布主视图(async) |
35
+ | `imComp.ViewDesignerIndex` | 设计列表(async) |
36
+ | `imComp.useDesignerInit` | 初始化 `$db.designerdata` |
37
+ | `imComp.useDesignerWc` | 未保存/游戏得分 watch |
38
+ | `imComp.AsStyle` | 内联样式合成 |
39
+
40
+ `designerdata.fn`(useDesignerFn):`readDesignData`, `saveDesignData`, `inDesigner`, `outDesigner` 等。
41
+
42
+ ## 性能说明
43
+
44
+ - **延迟加载**(`featurePlugs`);设计器 chunk 大,仅 cocontrol/HMI 路由需要。
45
+ - `useDesignerInit` 并行加载库 JSON + 列表;`getComp` 缓存 async 组件解析。
46
+ - glob 视图组件 async;`useDesignerWc` 使用 `flush: 'post'`。
47
+ - 业务 `imComp` 建议 `eager: false` + `cacheKey`。
48
+
49
+ ## peerDependencies 建议
50
+
51
+ ```json
52
+ {
53
+ "peerDependencies": {
54
+ "vue": "^3.4.0",
55
+ "@estun/asai-vue-host": "^1.0.0",
56
+ "@estun/asai-vue-host-form": "^1.0.0",
57
+ "@estun/asai-vue-host-popbox": "^1.0.0"
58
+ }
59
+ }
60
+ ```
61
+
62
+ ---
63
+
64
+ 可视化页面设计器插件,为 AsaiWeb 低代码场景提供**所见即所得**的页面搭建能力:拖拽布局、样式编辑、事件绑定、导入导出与多页面管理。
65
+
66
+ ## 快速接入
67
+
68
+ ### 1. 注册插件
69
+
70
+ 在宿主应用入口通过 `$fn` 访问(已由 `featurePlugs` 延迟挂载):
71
+
72
+ ```typescript
73
+ const { useDesignerInit, ViewDesigner } = $fn.AsaiVueDesigner;
74
+ ```
75
+
76
+ ### 2. 顶层初始化(只需一次)
77
+
78
+ ```vue
79
+ <script setup lang="ts">
80
+ const { useDesignerInit } = $fn.AsaiVueDesigner;
81
+
82
+ if (!$db.designerdata?.stat?.lib) {
83
+ useDesignerInit(props, {
84
+ dir: 'cocontrol/robotview/',
85
+ id: 'designer',
86
+ ty: 3,
87
+ fty: 'cocontrol',
88
+ devlevel: 1,
89
+ game: 0,
90
+ simple: 1,
91
+ url: { list: 'cocontrol/robotopt/config/designer/' },
92
+ path: { dbcfg: 'cocontrol/', db: './webdata/webdb/', dbtmp: './webdata/upload/' },
93
+ fns: funEvents,
94
+ });
95
+ }
96
+ </script>
97
+
98
+ <template>
99
+ <slot v-if="$db.designerdata?.stat?.lib" />
100
+ </template>
101
+ ```
102
+
103
+ ### 3. 渲染设计器视图
104
+
105
+ **列表页:**
106
+
107
+ ```vue
108
+ <ViewDesignerIndex :ujt="ujt" :designerdata="$db.designerdata" />
109
+ ```
110
+
111
+ **画布页:**
112
+
113
+ ```vue
114
+ <script setup lang="ts">
115
+ const { ViewDesigner } = $fn.AsaiVueDesigner;
116
+ const { map: imComp, clear } = $fn.createComponentLoader({
117
+ files: import.meta.glob(['./_lib/!(_)*.vue']),
118
+ eager: false,
119
+ cache: true,
120
+ cacheKey: 'mydesigner_',
121
+ });
122
+ onUnmounted(() => clear());
123
+ </script>
124
+
125
+ <template>
126
+ <ViewDesigner :ujt="ujt" :designerdata="$db.designerdata" :opt="{ imComp }" />
127
+ </template>
128
+ ```
129
+
130
+ ### 4. 挂载变更监听
131
+
132
+ ```typescript
133
+ const { useDesignerWc } = $fn.AsaiVueDesigner;
134
+ useDesignerWc(props);
135
+ ```
136
+
137
+ ---
138
+
139
+ ## 架构说明
140
+
141
+ ```
142
+ 宿主业务 (ViewArea / ViewShow)
143
+ useDesignerInit → $db.designerdata
144
+ useDesignerWc → 未保存 / 得分监听
145
+
146
+ 视图层 (_view/) — ViewDesignerIndex / ViewDesigner / 弹窗
147
+
148
+ 逻辑层 (_use/) — useDesignerFn / useFormAttr / asEvents
149
+
150
+ 表单 (_form/) + AsStyle + JSON 持久化
151
+ ```
152
+
153
+ **数据流:**
154
+
155
+ 1. `useDesignerInit` 并行加载组件库 + 设计列表
156
+ 2. Hash 进入页面 → `readDesignData`
157
+ 3. 画布 `<component :is>` 解析业务组件
158
+ 4. deep watch → `stat.datasaved = 0` → 保存 JSON
159
+
160
+ ---
161
+
162
+ ## 目录结构
163
+
164
+ ```
165
+ asai-vue-designer/
166
+ ├── src/index.ts
167
+ └── src/components/
168
+ ├── ViewDesigner.vue / ViewDesignerIndex.vue
169
+ ├── useDesignerInit.ts / useDesignerWc.ts
170
+ ├── AsStyle.ts
171
+ ├── _use/ # useDesignerFn, useFormAttr, useCompLoader …
172
+ ├── _view/ # 工具栏、库、管理、属性
173
+ ├── _form/ # 属性编辑表单组件
174
+ └── _css/
5
175
  ```
6
- npm i asai-vue-designer -g
176
+
177
+ ---
178
+
179
+ ## 核心数据模型
180
+
181
+ ### `$db.designerdata` 主要字段
182
+
183
+ | 字段 | 说明 |
184
+ |------|------|
185
+ | `id` / `dir` / `ty` | 实例 id、路由前缀、hash 段索引 |
186
+ | `path` | `dbcfg` / `db` / `dbtmp` |
187
+ | `stat` | `lib`/`data` 加载态,`listsaved`/`datasaved` |
188
+ | `list` | `cfg` + `list` |
189
+ | `lib` | type / comps / events / style / css |
190
+ | `data` | 当前页 `cfg` + `data[]` |
191
+ | `ux` | `isedit` / `cur` / `ok` / `do` |
192
+ | `fn` | useDesignerFn 方法集 |
193
+
194
+ ### 设计项 `data.data[i]` 示例
195
+
196
+ ```json
197
+ {
198
+ "id": "ds-xxxx",
199
+ "label": "按钮-1234",
200
+ "comp": "MyButton",
201
+ "pos": { "x": 100, "y": 80, "w": 120, "h": 48 },
202
+ "events": ["fndownclick", { "typedrop": 0, "domev": [], "api": "" }],
203
+ "styles": { "styleok": "color:red;", "cssok": {} }
204
+ }
205
+ ```
206
+
207
+ ---
208
+
209
+ ## API 参考
210
+
211
+ ### `useDesignerInit(props, cfg?)`
212
+
213
+ 初始化 `$db.designerdata` 并并行加载库与列表。
214
+
215
+ ### `useDesignerWc(props)`
216
+
217
+ - 页面数据变更 → `stat.datasaved = 0`
218
+ - 列表变更 → `stat.listsaved = 0`
219
+ - 游戏得分达标 → 提示
220
+
221
+ ### `useDesignerFn`(`designerdata.fn`)
222
+
223
+ | 方法 | 说明 |
224
+ |------|------|
225
+ | `initDesignLib` | 加载 5 类库 JSON |
226
+ | `readDesignList` / `saveDesignList` | 列表 CRUD |
227
+ | `readDesignData` / `saveDesignData` | 当前页 CRUD |
228
+ | `inDesigner` / `outDesigner` | zip 导入导出 |
229
+
230
+ ### `AsStyle`
231
+
232
+ | 方法 | 说明 |
233
+ |------|------|
234
+ | `renderStyle(props, type, itemdata)` | 合成 style + css 内联 |
235
+ | `getStyleByCss(cssdata)` | 模板 → CSS 字符串 |
236
+
237
+ ---
238
+
239
+ ## 视图组件
240
+
241
+ | 组件 | 用途 |
242
+ |------|------|
243
+ | `ViewDesignerIndex` | 方案列表、maps、批量导入导出 |
244
+ | `ViewDesigner` | 画布主区域 |
245
+ | `ViewDesignerItemArea` / `ViewDesignerItemOpt` | 单项容器与操作条 |
246
+ | `ViewDesignerBtns` | 浮动工具栏 |
247
+ | `ViewDesignerLibList` / `ViewDesignerManage` / `ViewDesignerAttr` | 库、管理、属性弹窗 |
248
+
249
+ ---
250
+
251
+ ## 表单编辑组件(_form/)
252
+
253
+ | 组件 | 编辑内容 |
254
+ |------|----------|
255
+ | `AsaiComp` | 业务组件选择 |
256
+ | `AsaiPos` | x/y/w/h |
257
+ | `AsaiStyle` / `AsaiStyles` | 原子样式 |
258
+ | `AsaiCss` | CSS 模板参数 |
259
+ | `AsaiEvent` / `AsaiDom` | 事件与 DOM 目标 |
260
+
261
+ ---
262
+
263
+ ## 事件系统
264
+
265
+ **解析优先级(`asEvents.getfn`):**
266
+
267
+ 1. `designerdata.fns[name]` — 业务自定义
268
+ 2. `asEvents[name]` — 内置
269
+
270
+ | 内置 | 行为 |
271
+ |------|------|
272
+ | `fndownclick` | 游戏模式标记完成 |
273
+ | `fndownarrclick` / `fndragup` | evAction 状态机 |
274
+ | `fndownapi` | WS API |
275
+ | `fndownstyle` | 追加内联样式 |
276
+
277
+ ---
278
+
279
+ ## 持久化路径
280
+
281
+ ```
282
+ webdata/webdb/{id}/
283
+ ├── designerlist.json
284
+ ├── designer-{pageId}/design.json
285
+ └── lib/designertype.json …
7
286
  ```
287
+
288
+ ---
289
+
290
+ ## 性能优化(已实现)
291
+
292
+ | 优化 | 效果 |
293
+ |------|------|
294
+ | 并行 init | 缩短首屏 |
295
+ | `getComp` 缓存 | 避免 v-for 重复 defineAsyncComponent |
296
+ | okSet O(1) | 游戏完成态 |
297
+ | useCompLoader | 插件内 glob → async 组件 |
298
+
299
+ ---
300
+
301
+ ## 扩展指南
302
+
303
+ ### 新业务组件
304
+
305
+ 1. `_lib/MyWidget.vue`
306
+ 2. `createComponentLoader` 注册到 `opt.imComp`
307
+ 3. `designertype.json` 增加模板
308
+
309
+ ### 自定义事件
310
+
311
+ ```typescript
312
+ useDesignerInit(props, {
313
+ fns: { myCustomEvent(props, ev, evd) { /* … */ } },
314
+ });
315
+ ```
316
+
317
+ ### 仅预览
318
+
319
+ ```vue
320
+ <ViewDesigner :opt="{ isview: 1, imComp }" … />
321
+ ```
322
+
323
+ ---
324
+
325
+ ## 典型集成参考
326
+
327
+ - `webclient/src/cocontrol/views/cocontrol/robotview/designer/_comps/ViewArea.vue`
328
+ - `webclient/src/cocontrol/views/cocontrol/robotview/designer/_comps/ViewShow.vue`
329
+
330
+ ## 技术栈
331
+
332
+ Vue 3 + TS + Vite glob + SCSS + AsaiForm
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as C, reactive as L, watch as O, computed as b, onBeforeUnmount as B, resolveComponent as V, createElementBlock as f, openBlock as m, createElementVNode as d, createCommentVNode as A, Fragment as J, renderList as U, normalizeClass as $, toDisplayString as g, unref as y, createVNode as u, createBlock as q, withCtx as D, createTextVNode as p } from "vue";
2
- import { _ as h } from "./ViewDesignerBtns-ra0UsgkV.mjs";
2
+ import { _ as h } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
3
3
  const E = { class: "asf-add-area asfselectarea" }, I = { class: "asf-add asfselectarea" }, z = { class: "asf-add-li" }, T = ["title"], G = { class: "val" }, H = {
4
4
  key: 0,
5
5
  class: "asf-add-add"
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as N, reactive as F, watch as I, computed as L, onBeforeUnmount as q, resolveComponent as g, createElementBlock as d, openBlock as n, createElementVNode as s, createCommentVNode as h, Fragment as k, renderList as j, toDisplayString as V, unref as p, createVNode as y, createBlock as D, withCtx as J, createTextVNode as O } from "vue";
2
- import { _ as T } from "./ViewDesignerBtns-ra0UsgkV.mjs";
2
+ import { _ as T } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
3
3
  const z = { class: "asf-add-area asfselectarea" }, G = { class: "asf-add asfselectarea" }, H = { class: "asf-add-li" }, K = {
4
4
  key: 0,
5
5
  class: "opt"
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as j, reactive as S, watch as O, computed as B, onBeforeUnmount as J, resolveComponent as _, createElementBlock as m, openBlock as d, createElementVNode as n, createCommentVNode as $, Fragment as b, renderList as x, toDisplayString as v, createVNode as w, createBlock as F, withCtx as L, createTextVNode as g } from "vue";
2
- import { _ as C } from "./ViewDesignerBtns-ra0UsgkV.mjs";
2
+ import { _ as C } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
3
3
  const U = { class: "asf-add-area asfselectarea" }, q = { class: "asf-add asfselectarea" }, E = { class: "asf-add-li" }, I = { class: "opt" }, T = ["onClick"], z = ["title"], G = {
4
4
  key: 0,
5
5
  class: "asf-add-add"
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as h, reactive as F, watch as L, computed as O, onBeforeUnmount as B, resolveComponent as v, createElementBlock as m, openBlock as f, createElementVNode as d, createCommentVNode as w, Fragment as J, renderList as b, normalizeClass as U, toDisplayString as V, unref as y, createVNode as u, createBlock as $, withCtx as q, createTextVNode as A } from "vue";
2
- import { _ as C } from "./ViewDesignerBtns-ra0UsgkV.mjs";
2
+ import { _ as C } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
3
3
  const D = { class: "asf-add-area asfselectarea" }, I = { class: "asf-add asfselectarea" }, z = { class: "asf-add-li" }, T = ["title"], G = { class: "val" }, H = {
4
4
  key: 0,
5
5
  class: "asf-add-add"
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as r, resolveComponent as e, createBlock as s, openBlock as f, withCtx as n, createTextVNode as o, createElementVNode as c, toDisplayString as m, createVNode as l } from "vue";
2
- import { _ as u } from "./ViewDesignerBtns-ra0UsgkV.mjs";
2
+ import { _ as u } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
3
3
  const y = { class: "asf-add-list" }, k = /* @__PURE__ */ r({
4
4
  __name: "AsaiPos",
5
5
  props: {
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as U, reactive as F, watch as I, computed as L, onBeforeUnmount as q, resolveComponent as v, createElementBlock as c, openBlock as i, createElementVNode as s, createCommentVNode as k, Fragment as D, renderList as E, toDisplayString as j, unref as O, createVNode as y, createBlock as V, withCtx as T, createTextVNode as S } from "vue";
2
- import { _ as z } from "./ViewDesignerBtns-ra0UsgkV.mjs";
2
+ import { _ as z } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
3
3
  const G = { class: "asf-add-area asfselectarea" }, H = { class: "asf-add asfselectarea" }, J = { class: "asf-add-li" }, K = {
4
4
  key: 0,
5
5
  class: "opt"
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as w, reactive as L, watch as x, computed as B, onBeforeUnmount as E, resolveComponent as k, createElementBlock as r, openBlock as i, createElementVNode as l, createCommentVNode as m, Fragment as p, renderList as $, createVNode as V, createBlock as U, withCtx as W, createTextVNode as A, toDisplayString as C } from "vue";
2
- import { _ as q } from "./ViewDesignerBtns-ra0UsgkV.mjs";
2
+ import { _ as q } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
3
3
  const D = { class: "asf-add-area asfselectarea" }, J = { class: "asf-add asfselectarea" }, _ = {
4
4
  key: 0,
5
5
  class: "asf-add-li"
@@ -0,0 +1,194 @@
1
+ import { computed as h, reactive as B, defineComponent as E, defineAsyncComponent as m, resolveComponent as L, createElementBlock as k, createCommentVNode as u, openBlock as p, createBlock as g, createVNode as A, Fragment as N, renderList as P, unref as l, withCtx as y, createElementVNode as _, resolveDynamicComponent as $ } from "vue";
2
+ import { g as H, r as w } from "./index-D-ZCf4WW.mjs";
3
+ const O = (e) => {
4
+ const { $db: i, $global: s } = e.ujt, f = /* @__PURE__ */ Object.assign({ "../_form/AsaiComp.vue": () => import("./AsaiComp-DSDtWOdH.mjs"), "../_form/AsaiCss.vue": () => import("./AsaiCss-Vi1G0_22.mjs"), "../_form/AsaiDom.vue": () => import("./AsaiDom-D29WldSk.mjs"), "../_form/AsaiEvent.vue": () => import("./AsaiEvent-CmKaZzjj.mjs"), "../_form/AsaiHidden.vue": () => import("./AsaiHidden-Dw0VpjRy.mjs"), "../_form/AsaiPos.vue": () => import("./AsaiPos-DO1Fjopa.mjs"), "../_form/AsaiStyle.vue": () => import("./AsaiStyle-CLSR3h3U.mjs"), "../_form/AsaiStyles.vue": () => import("./AsaiStyles-B3vm__Lw.mjs") }), j = {};
5
+ for (const t in f)
6
+ j[H(t) || t] = f[t];
7
+ const v = h(() => {
8
+ const t = s.pop.popdesignattr?.data?.item?.id;
9
+ return e.designerdata.data.data.map((d) => [d.id, d.label || d.comp]).filter((d) => d[0] != t);
10
+ }), a = B({
11
+ comp: j,
12
+ ic: 0,
13
+ eq: 0,
14
+ lang: s.lang.designersys.attrs,
15
+ rule: {
16
+ id: { comp: "AsaiHidden" },
17
+ lim: { comp: "AsaiHidden" },
18
+ events: { nolabel: 1, comp: "AsaiEvent" },
19
+ typedrop: {
20
+ comp: "AsaiInput",
21
+ type: "checkbox",
22
+ typedropdata: {
23
+ 1: s.lang.designersys.attrs.place,
24
+ 2: s.lang.designersys.attrs.return
25
+ }
26
+ },
27
+ typesort: {
28
+ comp: "AsaiInput",
29
+ type: "checkbox",
30
+ typesortdata: {
31
+ 1: s.lang.designersys.attrs.unordered,
32
+ 2: s.lang.designersys.attrs.ordered
33
+ }
34
+ },
35
+ domev: {
36
+ nolabel: 1,
37
+ comp: "AsaiDom",
38
+ opt: { selectdata: v }
39
+ },
40
+ comps: { nolabel: 1, comp: "AsaiComp" },
41
+ img: { comp: "AsaiUploadImg" },
42
+ pos: { nolabel: 1, comp: "AsaiPos" },
43
+ fnsdown: { comp: "AsaiSelect", fnsdowndata: s.lang.designersys.fn },
44
+ fnsdragup: { comp: "AsaiSelect", fnsdragupdata: s.lang.designersys.fn },
45
+ styles: { nolabel: 1, comp: "AsaiStyles" },
46
+ styleok: { nolabel: 1, comp: "AsaiStyle" },
47
+ stylearea: { nolabel: 1, comp: "AsaiStyle" },
48
+ style: { nolabel: 1, comp: "AsaiStyle" },
49
+ cssok: { nolabel: 1, comp: "AsaiCss" },
50
+ cssarea: { nolabel: 1, comp: "AsaiCss" },
51
+ css: { nolabel: 1, comp: "AsaiCss" }
52
+ }
53
+ });
54
+ return a.rule.comps.opt = {
55
+ compsdata: i.designerdata.lib.compsdata,
56
+ selectdata: i.designerdata.lib.selectcompsdata
57
+ }, a.rule.events.opt = {
58
+ eventsdata: i.designerdata.lib.eventsdata,
59
+ selectdata: i.designerdata.lib.selecteventsdata
60
+ }, a.rule.styles.opt = {
61
+ stylesdata: s.lang.designersys?.styleslist,
62
+ selectdata: Object.entries(s.lang.designersys?.styleslist || {})
63
+ }, a.rule.style.opt = {
64
+ styledata: i.designerdata.lib.styledata,
65
+ selectdata: i.designerdata.lib.selectstyledata
66
+ }, a.rule.styleok.opt = a.rule.stylearea.opt = a.rule.style.opt, a.rule.css.opt = {
67
+ cssdata: i.designerdata.lib.cssdata,
68
+ selectdata: i.designerdata.lib.selectcssdata
69
+ }, a.rule.cssok.opt = a.rule.cssarea.opt = a.rule.css.opt, { rfAttrData: a };
70
+ }, F = {
71
+ key: 0,
72
+ id: "asdesignarea"
73
+ }, M = { class: "as-design-comp" }, U = /* @__PURE__ */ E({
74
+ __name: "ViewDesigner",
75
+ props: {
76
+ ujt: {},
77
+ designerdata: {},
78
+ opt: {}
79
+ },
80
+ setup(e) {
81
+ const i = m(() => import("./ViewDesignerLibList-DL7-V-lm.mjs")), s = m(() => import("./ViewDesignerAttr-CZET-KMs.mjs")), f = m(() => import("./ViewDesignerBtns-yOF5C4iY.mjs")), j = m(() => import("./ViewDesignerItemOpt-C4bLVqmZ.mjs")), v = m(() => import("./ViewDesignerItemArea-B28i1-J-.mjs")), a = m(() => import("./ViewDesignerManage-nu720Lly.mjs")), t = e, { $global: d, $db: V } = t.ujt, { rfAttrData: S } = O(t);
82
+ t.designerdata.rfAttrData = S;
83
+ const b = /* @__PURE__ */ new Map();
84
+ t.designerdata.lib.getComp = D;
85
+ function D(o) {
86
+ const c = String(o || "default");
87
+ if (b.has(c))
88
+ return b.get(c);
89
+ try {
90
+ let r = t.opt?.imComp?.[c];
91
+ r || (r = t.opt?.imComp?.default);
92
+ const n = w(r);
93
+ return b.set(c, n), n;
94
+ } catch {
95
+ const r = t.opt?.imComp?.default, n = w(r);
96
+ return b.set(c, n), n;
97
+ }
98
+ }
99
+ function x(o) {
100
+ if (o = o || d.location?.hasharr?.[V.designerdata?.ty || 0], o) {
101
+ if (t.designerdata?.list?.list[o])
102
+ return o;
103
+ if (t.designerdata.list.cfg?.maps?.[o] && t.designerdata?.list?.list?.[t.designerdata.list.cfg?.maps?.[o]])
104
+ return t.designerdata.list.cfg?.maps?.[o];
105
+ }
106
+ return t.designerdata.list.cfg?.maps?.default;
107
+ }
108
+ t.designerdata.dataid = x(t.opt?.id), t.designerdata.fn.readDesignData(), t.opt?.isview && t.designerdata?.ux?.isedit && (t.designerdata.ux.isedit = 0);
109
+ const I = h(() => t.designerdata.data?.data || []);
110
+ return (o, c) => {
111
+ const r = L("PopBox");
112
+ return t.designerdata.stat.data ? (p(), k("div", F, [
113
+ (p(!0), k(N, null, P(I.value, (n, C) => (p(), g(l(v), {
114
+ key: "box-" + n.id,
115
+ ujt: e.ujt,
116
+ designerdata: t.designerdata,
117
+ opt: t.opt,
118
+ itemdata: { item: n, index: C }
119
+ }, {
120
+ item: y(() => [
121
+ _("div", M, [
122
+ (p(), g($(D(n?.comps?.[0])), {
123
+ ujt: e.ujt,
124
+ designerdata: t.designerdata,
125
+ opt: t.opt,
126
+ itemdata: { item: n, index: C }
127
+ }, null, 8, ["ujt", "designerdata", "opt", "itemdata"]))
128
+ ])
129
+ ]),
130
+ opt: y(() => [
131
+ A(l(j), {
132
+ ujt: e.ujt,
133
+ designerdata: t.designerdata,
134
+ opt: t.opt,
135
+ itemdata: { item: n, index: C }
136
+ }, null, 8, ["ujt", "designerdata", "opt", "itemdata"])
137
+ ]),
138
+ _: 2
139
+ }, 1032, ["ujt", "designerdata", "opt", "itemdata"]))), 128)),
140
+ t.opt?.isview ? u("", !0) : (p(), g(l(f), {
141
+ key: 0,
142
+ ujt: e.ujt,
143
+ designerdata: t.designerdata,
144
+ opt: t.opt
145
+ }, null, 8, ["ujt", "designerdata", "opt"])),
146
+ A(r, {
147
+ ujt: e.ujt,
148
+ id: "popdesignlib"
149
+ }, {
150
+ default: y(() => [
151
+ l(d).pop.popdesignlib.stat ? (p(), g(l(i), {
152
+ key: 0,
153
+ ujt: e.ujt,
154
+ designerdata: t.designerdata,
155
+ opt: t.opt
156
+ }, null, 8, ["ujt", "designerdata", "opt"])) : u("", !0)
157
+ ]),
158
+ _: 1
159
+ }, 8, ["ujt"]),
160
+ A(r, {
161
+ ujt: e.ujt,
162
+ id: "popdropdesignarea"
163
+ }, {
164
+ default: y(() => [
165
+ l(d).pop.popdropdesignarea.stat ? (p(), g(l(a), {
166
+ key: 0,
167
+ ujt: e.ujt,
168
+ opt: t.opt,
169
+ designerdata: t.designerdata
170
+ }, null, 8, ["ujt", "opt", "designerdata"])) : u("", !0)
171
+ ]),
172
+ _: 1
173
+ }, 8, ["ujt"]),
174
+ A(r, {
175
+ ujt: e.ujt,
176
+ id: "popdesignattr"
177
+ }, {
178
+ default: y(() => [
179
+ l(d).pop.popdesignattr.stat ? (p(), g(l(s), {
180
+ key: 0,
181
+ ujt: e.ujt,
182
+ designerdata: t.designerdata,
183
+ opt: t.opt
184
+ }, null, 8, ["ujt", "designerdata", "opt"])) : u("", !0)
185
+ ]),
186
+ _: 1
187
+ }, 8, ["ujt"])
188
+ ])) : u("", !0);
189
+ };
190
+ }
191
+ });
192
+ export {
193
+ U as default
194
+ };
@@ -0,0 +1,33 @@
1
+ import { defineComponent as i, resolveComponent as d, createElementBlock as c, openBlock as p, createElementVNode as e, createVNode as l, withModifiers as m, unref as n, toDisplayString as _ } from "vue";
2
+ import { _ as g } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
3
+ const u = { class: "as-designattr-area" }, f = { class: "as-designattr-main" }, v = { class: "as-btn-area" }, A = /* @__PURE__ */ i({
4
+ __name: "ViewDesignerAttr",
5
+ props: {
6
+ ujt: {},
7
+ designerdata: {},
8
+ opt: {}
9
+ },
10
+ setup(s) {
11
+ const t = s, { $global: a } = t.ujt;
12
+ return t.designerdata.rfAttrData.data = a.pop.popdesignattr?.data?.item, (j, o) => {
13
+ const r = d("AsaiForm");
14
+ return p(), c("div", u, [
15
+ e("div", f, [
16
+ l(r, {
17
+ ujt: s.ujt,
18
+ asaidata: t.designerdata.rfAttrData
19
+ }, null, 8, ["ujt", "asaidata"])
20
+ ]),
21
+ e("div", v, [
22
+ e("div", {
23
+ class: "as-btn-cur",
24
+ onClick: o[0] || (o[0] = m((D) => n(a).pop.popdesignattr?.fn?.(), ["stop"]))
25
+ }, _(n(a).lang.asai.save), 1)
26
+ ])
27
+ ]);
28
+ };
29
+ }
30
+ }), h = /* @__PURE__ */ g(A, [["__scopeId", "data-v-338ca4b5"]]);
31
+ export {
32
+ h as default
33
+ };