Browse Source

upd: cli warning

richard1015 5 years ago
parent
commit
6ec66cb7df

+ 1 - 1
src/packages/cell/index.vue

@@ -18,7 +18,7 @@
 </template>
 
 <script lang="ts">
-import { toRefs, computed } from 'vue';
+import { computed } from 'vue';
 import { createComponent } from '@/utils/create';
 import { useRouter } from 'vue-router';
 import Icon from '@/packages/icon/index.vue';

+ 1 - 1
src/packages/price/index.vue

@@ -31,7 +31,7 @@ export default create({
     }
   },
   components: {},
-  setup(props, { slots }) {
+  setup(props) {
     // setup内部只能访问这4个属性,值得注意的是props必须在上面声明才能在这里取到
     // console.log('props', props, 'slots', slots);
     const { price, needSymbol, decimalDigits, thousands } = toRefs(props);

+ 4 - 2
src/packages/temp/index.vue

@@ -5,7 +5,7 @@
   </view>
 </template>
 <script lang="ts">
-import { toRefs, PropType } from 'vue';
+import { toRefs } from 'vue';
 import { createComponent } from '@/utils/create';
 const { componentName, create } = createComponent('temp');
 
@@ -23,7 +23,9 @@ export default create({
   components: {},
   emits: ['click'],
 
-  setup(props, { emit, slots }) {
+  setup(props, { emit }) {
+    console.log('componentName', componentName);
+
     const { name, txt } = toRefs(props);
 
     const handleClick = (event: Event) => {

+ 1 - 1
src/sites/doc/components/demo-block/demoBlock.vue

@@ -9,7 +9,7 @@
 </template>
 <script>
 export default {
-  setup(props, ctx) {
+  setup() {
     function onlineFun() {
       alert('hello');
     }