(name)
| 1972 | |
| 1973 | //验证组件名称 必须是大小写,并且是-横杆 |
| 1974 | function validateComponentName(name) { |
| 1975 | if (!/^[a-zA-Z][\w-]*$/.test(name)) { |
| 1976 | warn( |
| 1977 | 'Invalid component name: "' + name + '". Component names ' + |
| 1978 | 'can only contain alphanumeric characters and the hyphen, ' + |
| 1979 | 'and must start with a letter.' |
| 1980 | ); |
| 1981 | } |
| 1982 | if (isBuiltInTag(name) || config.isReservedTag(name)) { |
| 1983 | warn( |
| 1984 | 'Do not use built-in or reserved HTML elements as component ' + |
| 1985 | 'id: ' + name |
| 1986 | ); |
| 1987 | } |
| 1988 | } |
| 1989 | |
| 1990 | /** |
| 1991 | * Ensure all props option syntax are normalized into the |
no outgoing calls
no test coverage detected