Skip to content

Commit

Permalink
wip(uvue): setup
Browse files Browse the repository at this point in the history
  • Loading branch information
fxy060608 committed Dec 25, 2023
1 parent 713f83e commit 508cd94
Show file tree
Hide file tree
Showing 17 changed files with 1,151 additions and 210 deletions.
14 changes: 7 additions & 7 deletions packages/uni-app-uts/__tests__/android/codegen.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ describe('compiler:codegen', () => {
assert(
`<view/>`,
`
function PagesIndexIndexRender(): VNode | null {\nconst _ctx = this\nconst _cache = this.$.renderCache\n return createElementVNode("view")\n}`,
function PagesIndexIndexRender(): any | null {\nconst _ctx = this\nconst _cache = this.$.renderCache\n return createElementVNode("view")\n}`,
{
mode: 'module',
}
Expand All @@ -45,7 +45,7 @@ function PagesIndexIndexRender(): VNode | null {\nconst _ctx = this\nconst _cach
test(`UTSComponents`, () => {
assert(
`<view><uts-hello/><uts-hello/></view>`,
`import { UtsHelloElement } from 'uts.sdk.modules.utsHello';\nfunction PagesIndexIndexRender(): VNode | null {\nconst _ctx = this\nconst _cache = this.$.renderCache\n return createElementVNode("view", null, [\n createElementVNode(uts.sdk.modules.utsHello.UtsHelloComponent.name),\n createElementVNode(uts.sdk.modules.utsHello.UtsHelloComponent.name)\n ])\n}`,
`import { UtsHelloElement } from 'uts.sdk.modules.utsHello';\nfunction PagesIndexIndexRender(): any | null {\nconst _ctx = this\nconst _cache = this.$.renderCache\n return createElementVNode("view", null, [\n createElementVNode(uts.sdk.modules.utsHello.UtsHelloComponent.name),\n createElementVNode(uts.sdk.modules.utsHello.UtsHelloComponent.name)\n ])\n}`,
{
mode: 'module',
parseUTSComponent(name) {
Expand All @@ -61,7 +61,7 @@ function PagesIndexIndexRender(): VNode | null {\nconst _ctx = this\nconst _cach
)
assert(
`<view><uts-hello/><uts-hello/><uts-hello1/></view>`,
`import { UtsHelloElement } from 'uts.sdk.modules.utsHello';import { UtsHello1Element } from 'uts.sdk.modules.utsHello';\nfunction PagesIndexIndexRender(): VNode | null {\nconst _ctx = this\nconst _cache = this.$.renderCache\n return createElementVNode("view", null, [\n createElementVNode(uts.sdk.modules.utsHello.UtsHelloComponent.name),\n createElementVNode(uts.sdk.modules.utsHello.UtsHelloComponent.name),\n createElementVNode(uts.sdk.modules.utsHello.UtsHello1Component.name)\n ])\n}`,
`import { UtsHelloElement } from 'uts.sdk.modules.utsHello';import { UtsHello1Element } from 'uts.sdk.modules.utsHello';\nfunction PagesIndexIndexRender(): any | null {\nconst _ctx = this\nconst _cache = this.$.renderCache\n return createElementVNode("view", null, [\n createElementVNode(uts.sdk.modules.utsHello.UtsHelloComponent.name),\n createElementVNode(uts.sdk.modules.utsHello.UtsHelloComponent.name),\n createElementVNode(uts.sdk.modules.utsHello.UtsHello1Component.name)\n ])\n}`,
{
mode: 'module',
parseUTSComponent(name) {
Expand Down Expand Up @@ -89,7 +89,7 @@ function PagesIndexIndexRender(): VNode | null {\nconst _ctx = this\nconst _cach
import _easycom_custom from '@/components/custom/custom.vue'
import _easycom_custom1 from '@/components/custom1/custom1.vue'
import _easycom_index from '@/components/index/index.vue'
function PagesIndexIndexRender(): VNode | null {
function PagesIndexIndexRender(): any | null {
const _ctx = this
const _cache = this.$.renderCache
const _component_custom = resolveEasyComponent("custom",_easycom_custom)
Expand Down Expand Up @@ -117,7 +117,7 @@ const _component_index1 = resolveComponent("index1")
assert(
`<index/>`,
`
function PagesIndexIndexRender(): VNode | null {
function PagesIndexIndexRender(): any | null {
const _ctx = this
const _cache = this.$.renderCache
const _component_index = resolveComponent("index", true)
Expand All @@ -136,7 +136,7 @@ const _component_index = resolveComponent("index", true)
import _easycom_custom from '@/components/custom/custom.vue'
import _easycom_custom1 from '@/components/custom1/custom1.vue'
import _easycom_index from '@/components/index/index.vue'
function PagesIndexIndexRender(): VNode | null {
function PagesIndexIndexRender(): any | null {
const _ctx = this
const _cache = this.$.renderCache
const _component_custom = resolveEasyComponent("custom",_easycom_custom)
Expand Down Expand Up @@ -179,7 +179,7 @@ const _component_index1 = resolveComponent("index1")
`
import _imports_0 from './logo.png'
function PagesIndexIndexRender(): VNode | null {
function PagesIndexIndexRender(): any | null {
const _ctx = this
const _cache = this.$.renderCache
return createElementVNode(\"image\", utsMapOf({ src: _imports_0 }))
Expand Down
Loading

0 comments on commit 508cd94

Please sign in to comment.