Coder Social home page Coder Social logo

297854895 / vue-tsx-admin Goto Github PK

View Code? Open in Web Editor NEW
55.0 5.0 31.0 864 KB

基于typscript+jsx+vue+ant-design-vue+ant-design-pro的中后台模板

HTML 0.17% TypeScript 99.83%
typescript jsx vue vuex less ant-design-vue css vue-router admin-template

vue-tsx-admin's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

vue-tsx-admin's Issues

JSX element type 'Button' is not a constructor function for JSX elements

package.json

{
	"name": "love-farm",
	"version": "0.1.0",
	"private": true,
	"scripts": {
		"start": "vue-cli-service serve",
		"build": "vue-cli-service build",
		"lint": "vue-cli-service lint"
	},
	"dependencies": {
		"core-js": "^3.6.4",
		"vant": "^2.5.3",
		"vue": "^2.6.11",
		"vue-class-component": "^7.2.2",
		"vue-property-decorator": "^8.3.0",
		"vue-router": "^3.1.5",
		"vuex": "^3.1.2"
	},
	"devDependencies": {
		"@typescript-eslint/eslint-plugin": "^2.18.0",
		"@typescript-eslint/parser": "^2.18.0",
		"@vue/cli-plugin-babel": "^4.2.0",
		"@vue/cli-plugin-eslint": "^4.2.0",
		"@vue/cli-plugin-router": "^4.2.0",
		"@vue/cli-plugin-typescript": "^4.2.0",
		"@vue/cli-plugin-vuex": "^4.2.0",
		"@vue/cli-service": "^4.2.0",
		"@vue/eslint-config-prettier": "^6.0.0",
		"@vue/eslint-config-typescript": "^5.0.1",
		"babel-plugin-import": "^1.13.0",
		"eslint": "^6.7.2",
		"eslint-plugin-prettier": "^3.1.1",
		"eslint-plugin-vue": "^6.1.2",
		"less": "^3.0.4",
		"less-loader": "^5.0.0",
		"prettier": "^1.19.1",
		"typescript": "~3.7.5",
		"vue-template-compiler": "^2.6.11"
	}
}

tsconfig.json

{
  "compilerOptions": {
    "target": "esnext",
    "module": "esnext",
    "strict": true,
    "jsx": "preserve",
    "importHelpers": true,
    "moduleResolution": "node",
    "experimentalDecorators": true,
    "esModuleInterop": true,
    "allowSyntheticDefaultImports": true,
    "sourceMap": true,
    "baseUrl": ".",
    "types": [
      "webpack-env"
    ],
    "paths": {
      "@/*": [
        "src/*"
      ]
    },
    "lib": [
      "esnext",
      "dom",
      "dom.iterable",
      "scripthost"
    ]
  },
  "include": [
    "src/**/*.ts",
    "src/**/*.tsx",
    "src/**/*.vue",
    "tests/**/*.ts",
    "tests/**/*.tsx"
  ],
  "exclude": [
    "node_modules"
  ]
}
import { Component, Vue } from 'vue-property-decorator'
import { Button } from 'ant-design-vue'

@Component
export default class Home extends Vue {
	protected render() {
		return (
			<div class="Home">
				<Button>Button</Button>
			</div>
		)
	}
}

9:5 JSX element type 'Button' is not a constructor function for JSX elements.
  Type 'Button' is missing the following properties from type 'ElementClass': $el, $options, $parent, $root, and 29 more.
     7 |   return (
     8 |       <div class="Home">
  >  9 |             <Button>Button</Button>
       |                                ^
    10 |       </div>
    11 |       )
    12 |   }
Version: typescript 3.7.5

node v10.15.1

@vue/cli 4.1.1

###请问出现如下错误是少了什么配置吗?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.