mirror of
				https://github.com/Tencent/tmagic-editor.git
				synced 2025-11-04 18:52:18 +08:00 
			
		
		
		
	fix(vue-components): button删除调试代码,text支持富文本
This commit is contained in:
		
							parent
							
								
									d53a479b21
								
							
						
					
					
						commit
						2a714ae9cc
					
				@ -1,5 +1,5 @@
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
  "version": "0.1.1",
 | 
					  "version": "0.1.2",
 | 
				
			||||||
  "name": "@tmagic/vue-button",
 | 
					  "name": "@tmagic/vue-button",
 | 
				
			||||||
  "type": "module",
 | 
					  "type": "module",
 | 
				
			||||||
  "main": "src/index.ts",
 | 
					  "main": "src/index.ts",
 | 
				
			||||||
 | 
				
			|||||||
@ -7,10 +7,10 @@
 | 
				
			|||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script lang="ts">
 | 
					<script lang="ts">
 | 
				
			||||||
import { defineComponent, inject, type PropType } from 'vue-demi';
 | 
					import { defineComponent, type PropType } from 'vue-demi';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { COMMON_EVENT_PREFIX, type Id, type MComponent } from '@tmagic/core';
 | 
					import { COMMON_EVENT_PREFIX, type Id, type MComponent } from '@tmagic/core';
 | 
				
			||||||
import { useApp, useComponentStatus } from '@tmagic/vue-runtime-help';
 | 
					import { useApp } from '@tmagic/vue-runtime-help';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
interface ButtonSchema extends Omit<MComponent, 'id'> {
 | 
					interface ButtonSchema extends Omit<MComponent, 'id'> {
 | 
				
			||||||
  id?: Id;
 | 
					  id?: Id;
 | 
				
			||||||
@ -36,10 +36,6 @@ export default defineComponent({
 | 
				
			|||||||
  },
 | 
					  },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  setup(props) {
 | 
					  setup(props) {
 | 
				
			||||||
    const { setStatus } = inject<ReturnType<typeof useComponentStatus>>('componentStatusStore')!;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    setStatus('disabled');
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    const { app, node } = useApp(props);
 | 
					    const { app, node } = useApp(props);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    const clickHandler = () => {
 | 
					    const clickHandler = () => {
 | 
				
			||||||
 | 
				
			|||||||
@ -1,5 +1,5 @@
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
  "version": "0.1.0",
 | 
					  "version": "0.1.1",
 | 
				
			||||||
  "name": "@tmagic/vue-text",
 | 
					  "name": "@tmagic/vue-text",
 | 
				
			||||||
  "type": "module",
 | 
					  "type": "module",
 | 
				
			||||||
  "main": "src/index.ts",
 | 
					  "main": "src/index.ts",
 | 
				
			||||||
 | 
				
			|||||||
@ -1,7 +1,5 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <p @click="clickHandler">
 | 
					  <p @click="clickHandler" v-html="config.text"></p>
 | 
				
			||||||
    <slot>{{ config.text }}</slot>
 | 
					 | 
				
			||||||
  </p>
 | 
					 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script lang="ts">
 | 
					<script lang="ts">
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user