travel/admin/node_modules/.cache/vue-loader/94c379855c3fb98e246d96b8e32...

1 line
6.2 KiB
JSON

{"remainingRequest":"D:\\phpstudy_pro\\WWW\\travel\\admin\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\phpstudy_pro\\WWW\\travel\\admin\\node_modules\\element-ui\\packages\\avatar\\src\\main.vue?vue&type=script&lang=js","dependencies":[{"path":"D:\\phpstudy_pro\\WWW\\travel\\admin\\node_modules\\element-ui\\packages\\avatar\\src\\main.vue","mtime":1718764964850},{"path":"D:\\phpstudy_pro\\WWW\\travel\\admin\\node_modules\\cache-loader\\dist\\cjs.js","mtime":1718764957200},{"path":"D:\\phpstudy_pro\\WWW\\travel\\admin\\node_modules\\babel-loader\\lib\\index.js","mtime":1718764959024},{"path":"D:\\phpstudy_pro\\WWW\\travel\\admin\\node_modules\\cache-loader\\dist\\cjs.js","mtime":1718764957200},{"path":"D:\\phpstudy_pro\\WWW\\travel\\admin\\node_modules\\vue-loader\\lib\\index.js","mtime":1718764959862}],"contextDependencies":[],"result":[{"type":"Buffer","data":"base64:CmV4cG9ydCBkZWZhdWx0IHsKICBuYW1lOiAnRWxBdmF0YXInLAoKICBwcm9wczogewogICAgc2l6ZTogewogICAgICB0eXBlOiBbTnVtYmVyLCBTdHJpbmddLAogICAgICB2YWxpZGF0b3IodmFsKSB7CiAgICAgICAgaWYgKHR5cGVvZiB2YWwgPT09ICdzdHJpbmcnKSB7CiAgICAgICAgICByZXR1cm4gWydsYXJnZScsICdtZWRpdW0nLCAnc21hbGwnXS5pbmNsdWRlcyh2YWwpOwogICAgICAgIH0KICAgICAgICByZXR1cm4gdHlwZW9mIHZhbCA9PT0gJ251bWJlcic7CiAgICAgIH0KICAgIH0sCiAgICBzaGFwZTogewogICAgICB0eXBlOiBTdHJpbmcsCiAgICAgIGRlZmF1bHQ6ICdjaXJjbGUnLAogICAgICB2YWxpZGF0b3IodmFsKSB7CiAgICAgICAgcmV0dXJuIFsnY2lyY2xlJywgJ3Nxd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zdCA9IGZhbHNlOwogICAgICB9CiAgICB9LAogICAgcmVuZGVyQXZhdGFyKCkgewogICAgICBjb25zdCB7IGljb24sIHNyYywgYWx0LCBpc0ltYWdlRXhpc3QsIHNyY1NldCwgZml0IH0gPSB0aGlzOwoKICAgICAgaWYgKGlzSW1hZ2VFeGlzdCAmJiBzcmMpIHsKICAgICAgICByZXR1cm4gPGltZwogICAgICAgICAgc3JjPXtzcmN9CiAgICAgICAgICBvbkVycm9yPXt0aGlzLmhhbmRsZUVycm9yfQogICAgICAgICAgYWx0PXthbHR9CiAgICAgICAgICBzcmNTZXQ9e3NyY1NldH0KICAgICAgICAgIHN0eWxlPXt7ICdvYmplY3QtZml0JzogZml0IH19Lz47CiAgICAgIH0KCiAgICAgIGlmIChpY29uKSB7CiAgICAgICAgcmV0dXJuICg8aSBjbGFzcz17aWNvbn0gLz4pOwogICAgICB9CgogICAgICByZXR1cm4gdGhpcy4kc2xvdHMuZGVmYXVsdDsKICAgIH0KICB9LAoKICByZW5kZXIoKSB7CiAgICBjb25zdCB7IGF2YXRhckNsYXNzLCBzaXplIH0gPSB0aGlzOwoKICAgIGNvbnN0IHNpemVTdHlsZSA9IHR5cGVvZiBzaXplID09PSAnbnVtYmVyJyA/IHsKICAgICAgaGVpZ2h0OiBgJHtzaXplfXB4YCwKICAgICAgd2lkdGg6IGAke3NpemV9cHhgLAogICAgICBsaW5lSGVpZ2h0OiBgJHtzaXplfXB4YAogICAgfSA6IHt9OwoKICAgIHJldHVybiAoCiAgICAgIDxzcGFuIGNsYXNzPXsgYXZhdGFyQ2xhc3MgfSBzdHlsZT17IHNpemVTdHlsZSB9PgogICAgICAgIHsKICAgICAgICAgIHRoaXMucmVuZGVyQXZhdGFyKCkKICAgICAgICB9CiAgICAgIDwvc3Bhbj4KICAgICk7CiAgfQoKfTsK"},{"version":3,"sources":["main.vue"],"names":[],"mappings":";AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA","file":"main.vue","sourceRoot":"node_modules/element-ui/packages/avatar/src","sourcesContent":["<script>\nexport default {\n name: 'ElAvatar',\n\n props: {\n size: {\n type: [Number, String],\n validator(val) {\n if (typeof val === 'string') {\n return ['large', 'medium', 'small'].includes(val);\n }\n return typeof val === 'number';\n }\n },\n shape: {\n type: String,\n default: 'circle',\n validator(val) {\n return ['circle', 'square'].includes(val);\n }\n },\n icon: String,\n src: String,\n alt: String,\n srcSet: String,\n error: Function,\n fit: {\n type: String,\n default: 'cover'\n }\n },\n\n data() {\n return {\n isImageExist: true\n };\n },\n\n computed: {\n avatarClass() {\n const { size, icon, shape } = this;\n let classList = ['el-avatar'];\n\n if (size && typeof size === 'string') {\n classList.push(`el-avatar--${size}`);\n }\n\n if (icon) {\n classList.push('el-avatar--icon');\n }\n\n if (shape) {\n classList.push(`el-avatar--${shape}`);\n }\n\n return classList.join(' ');\n }\n },\n\n methods: {\n handleError() {\n const { error } = this;\n const errorFlag = error ? error() : undefined;\n if (errorFlag !== false) {\n this.isImageExist = false;\n }\n },\n renderAvatar() {\n const { icon, src, alt, isImageExist, srcSet, fit } = this;\n\n if (isImageExist && src) {\n return <img\n src={src}\n onError={this.handleError}\n alt={alt}\n srcSet={srcSet}\n style={{ 'object-fit': fit }}/>;\n }\n\n if (icon) {\n return (<i class={icon} />);\n }\n\n return this.$slots.default;\n }\n },\n\n render() {\n const { avatarClass, size } = this;\n\n const sizeStyle = typeof size === 'number' ? {\n height: `${size}px`,\n width: `${size}px`,\n lineHeight: `${size}px`\n } : {};\n\n return (\n <span class={ avatarClass } style={ sizeStyle }>\n {\n this.renderAvatar()\n }\n </span>\n );\n }\n\n};\n</script>\n"]}]}