Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

第二版dialog #19

Open
2439905184 opened this issue Jun 9, 2023 · 1 comment
Open

第二版dialog #19

2439905184 opened this issue Jun 9, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@2439905184
Copy link
Contributor

2439905184 commented Jun 9, 2023

<p id="dialog"></p>
	<script>
	var dialog = document.getElementById("dialog")

	var text="a sentence"
	var text2="测试 程序也"
	var character_array = text2.split("")
	console.log(character_array)
	
	var ch_index = 0
	var ch_wait_time = 1000
	// dialog.innerText += character_array[0] + character_array[1] + character_array[2]
	// dialog.innerText = character_array[0]
	// var s="a"+" " +"s" 
	// console.log(s)
	var timer = setInterval(()=>
	{
		console.log(character_array[ch_index])
		dialog.innerText += character_array[ch_index]
		if(character_array[ch_index] == ' ')
		{
			dialog.innerText += '\xa0'
		}
		ch_index+= 1
		if(ch_index == character_array.length)
		{
			clearInterval(this.timer)
		}
		
	},ch_wait_time)
@2439905184 2439905184 added the enhancement New feature or request label Jun 9, 2023
@2439905184
Copy link
Contributor Author

在新的重写引擎框架里面:vue-gal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant