From e6b3dbc56ff6c3526117e7fb4da2e32b80cfecb8 Mon Sep 17 00:00:00 2001
From: ygcedu <937601471@qq.com>
Date: Tue, 12 Jul 2022 21:46:06 +0800
Subject: [PATCH 1/2] fix: v-model directive emit event get error value
---
src/models/StyledComponent.js | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/models/StyledComponent.js b/src/models/StyledComponent.js
index 80420ec..32aec1d 100644
--- a/src/models/StyledComponent.js
+++ b/src/models/StyledComponent.js
@@ -25,7 +25,7 @@ export default (ComponentStyle) => {
...combinedPropDefinition
},
- emits: ['input', 'update:modelValue'],
+ emits: ['input','change', 'update:modelValue'],
setup (props, { slots, attrs, emit }) {
const theme = inject('theme')
@@ -56,8 +56,12 @@ export default (ComponentStyle) => {
...targetProps,
class: classes,
onInput: (e) => {
- emit('update:modelValue', e.target.value)
+ emit('update:modelValue', e)
emit('input', e)
+ },
+ onChange:(e) => {
+ emit('update:modelValue', e)
+ emit('change', e)
}
},
slots
From 372bd35086260fe6d6b8facd0bc906ca66823880 Mon Sep 17 00:00:00 2001
From: ygcedu <937601471@qq.com>
Date: Tue, 12 Jul 2022 22:38:10 +0800
Subject: [PATCH 2/2] rename package
---
README.md | 326 +--------------------------------------------------
package.json | 2 +-
2 files changed, 5 insertions(+), 323 deletions(-)
diff --git a/README.md b/README.md
index 19f1f46..3d342f0 100644
--- a/README.md
+++ b/README.md
@@ -1,329 +1,11 @@
-# This is a fork of [vue-styled-components](https://github.com/styled-components/vue-styled-components)
+# This is a fork of [vue3-styled-components](https://github.com/UX-and-I/vue3-styled-components)
-It has been refactored to work with Vuejs 3. Changes are too large to merge them back into the upstream and this version is not backwards compatible.
-
-Also, we'll have to see how the update path will work for Vuejs 2.x dependencies. This is a very quick, as-is-port of vue-styled-components, meaning it will only provide the functionality we need, until vue-styled-components hopefully has found its own path to Vuejs 3.
-
-Please note that the package name has been changed to `vue3-styled-components` to avoid any name collisions.
+The original warehouse has stopped maintenance, this repository was created to fix some existing issues.
---
-# vue-styled-components
-
-> Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress 💅
-
-## Support
-
-> This version is compatible with Vue 2.x
-
-```
-yarn add vue-styled-components
-```
-
-Utilising tagged template literals (a recent addition to JavaScript) and the power of CSS allows you to write actual CSS code to style your components. It also removes the mapping between components and styles – using components as a low-level styling construct could not be easier!
-
-*This is a (not fully-featured)fork from original styled-components made by [Glen Maddern](https://twitter.com/glenmaddern) and [Max Stoiber](https://twitter.com/mxstbr), supported by [Front End Center](https://frontend.center) and [Thinkmill](http://thinkmill.com.au/). Thank you for making this project possible!*
-
-## Usage
-
-> Register first your component locally (see https://vuejs.org/v2/guide/components.html#Local-Registration)
-
-```
- new Vue({
- // ...
- components {
- 'styled-title': StyledTitle
- },
- template: ' Hello! '
- }
-```
-
-### Basic
-
-> Do not use built-in or reserved HTML elements as component id (title, button, input...).
-
-
-This creates two Vue components, `` and ``:
-
-```JS
-import styled from 'vue-styled-components';
-
-// Create a Vue component that renders an