[feat]:[A2UI Vue 2 Renderer - Render A2UI components using Vue 2.6 wi…#442
[feat]:[A2UI Vue 2 Renderer - Render A2UI components using Vue 2.6 wi…#442zoulx-0717 wants to merge 4 commits intogoogle:mainfrom
Conversation
paullewis
left a comment
There was a problem hiding this comment.
Firstly, thank you for this huge contribution. I've left a couple of notes, but they apply across the PR and boil down to:
- Can we remove
(this as any)and match the base types more closely? - Can we align the styles to the Angular/Lit implementations? There seem to be some styles applied per component that aren't exactly the same, e.g., the divider.
Again, thank you for the PR!
|
|
||
| if (!target || !path) return; | ||
|
|
||
| (this as any).setData(path, target.checked); |
There was a problem hiding this comment.
Is there any way to type this more cleanly than dropping to an any?
| flex: var(--weight); | ||
| margin: 0; | ||
| border: none; | ||
| background-color: currentColor; |
There was a problem hiding this comment.
Some of these styles differ from the Angular/Lit counterparts. Can we align them?
There was a problem hiding this comment.
4 workflows awaiting approval,can you deal this problem?
|
Hi Paul, Thank you for the thorough review! I've addressed both of your
concerns: 1. Removed (this as any) casts I've introduced a typed Vue
constructor DynamicComponentVue that properly types all mixin methods and
injected properties. All components now use DynamicComponentVue.extend()
instead of Vue.extend(), which provides proper typing for:
resolvePrimitive(), sendAction(), getUniqueId(), setData()
Injected processor and theme properties
2. Aligned divider styles with Angular/Lit implementations Updated the
divider component to match the reference implementations:
Changed from background-color: currentColor; opacity: 0.2; to background:
#ccc;
Added wrapper div with host-equivalent styles (display: block; min-height:
0; overflow: auto;)
Simplified hr styles to height: 1px; background: #ccc; border: none;
Both npm run type-check and npm run build pass successfully. Let me know if
you'd like any further adjustments!
Paul Lewis ***@***.***> 于2026年1月6日周二 18:10写道:
… ***@***.**** requested changes on this pull request.
Firstly, thank you for this huge contribution. I've left a couple of
notes, but they apply across the PR and boil down to:
1. Can we remove (this as any) and match the base types more closely?
2. Can we align the styles to the Angular/Lit implementations? There
seem to be some styles applied per component that aren't exactly the same,
e.g., the divider.
Again, thank you for the PR!
------------------------------
In renderers/vue2/src/lib/catalog/checkbox.vue
<#442 (comment)>:
> + return (this as any).resolvePrimitive(this.label);
+ },
+ },
+
+ created() {
+ this.inputId = (this as any).getUniqueId('a2ui-checkbox');
+ },
+
+ methods: {
+ handleChange(event: Event) {
+ const path = this.value?.path;
+ const target = event.target as HTMLInputElement;
+
+ if (!target || !path) return;
+
+ (this as any).setData(path, target.checked);
Is there any way to type this more cleanly than dropping to an any?
------------------------------
In renderers/vue2/src/lib/catalog/divider.vue
<#442 (comment)>:
> + },
+
+ computed: {
+ axisClass(): string {
+ return `a2ui-divider--${this.axis || 'horizontal'}`;
+ },
+ },
+});
+</script>
+
+<style>
+.a2ui-divider {
+ flex: var(--weight);
+ margin: 0;
+ border: none;
+ background-color: currentColor;
Some of these styles differ from the Angular/Lit counterparts. Can we
align them?
—
Reply to this email directly, view it on GitHub
<#442 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIPHCGZGYZLHMLN5AZGLSXD4FOCX3AVCNFSM6AAAAACQZRTSISVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZTMMZQGI4DSNZTGI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
|
4 workflows awaiting approval,who can deal this problem? |
|
Thanks for building a Vue 2 renderer, @zoulx-0717! It's great to see the community exploring different framework implementations. 🙏 Vue 2 reached end-of-life in December 2023, which makes it a risky foundation for a new renderer. The project is currently focused on Vue 3 (which was explored in #591 but closed as stale). If you're interested in contributing a Vue renderer, starting fresh with Vue 3 against the current v0.9 API would have much better prospects. Closing this as it targets an EOL framework. |
A2UI Vue 2 Renderer - Render A2UI components using Vue 2.6 with Options API