Skip to content

Commit 240644e

Browse files
committed
feat: init classname
1 parent eaf7e11 commit 240644e

File tree

11 files changed

+21783
-20800
lines changed

11 files changed

+21783
-20800
lines changed

demos/noengine/engine.js

Lines changed: 5406 additions & 5196 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demos/noengine/sub/engine.js

Lines changed: 5406 additions & 5196 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js

Lines changed: 5406 additions & 5196 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/devtools/src/demos/helloworld.vue

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { defineComponent } from "vue";
33
44
let template = `
55
<view id="container">
6-
<text id="testText" class="redText" value="Hello World"></text>
6+
<text id="testText" class="" value="Hello World"></text>
77
</view>
88
`;
99
@@ -17,7 +17,7 @@ let style = {
1717
alignItems: "center",
1818
},
1919
testText: {
20-
color: "#ffffff",
20+
color: "black",
2121
width: "100%",
2222
height: "100%",
2323
lineHeight: 200,
@@ -56,6 +56,16 @@ export default defineComponent({
5656
5757
let testText = Layout.getElementById('testText');
5858
59+
testText.style.backgroundColor = '#f3f3f3'
60+
61+
testText.on('click', () => {
62+
console.log(testText.className)
63+
const newClass = (testText.className === 'testText' ? 'testText redText' : 'testText')
64+
console.log(newClass)
65+
66+
testText.className = newClass
67+
})
68+
5969
// console.log(testText.style.textShadow)
6070
6171
// testText.style.textShadow = '2px 2px 2px blue'

0 commit comments

Comments
 (0)