Skip to content

Commit

Permalink
refactor: translate merge files
Browse files Browse the repository at this point in the history
  • Loading branch information
mahmudunnabikajal committed Feb 8, 2024
1 parent 814aeab commit 642cbb8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions src/api/sfc-script-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,9 @@ const props = withDefaults(defineProps<Props>(), {

## defineModel() <sup class="vt-badge" data-text="3.4+" /> {#definemodel}

This macro can be used to declare a two-way binding prop that can be consumed via `v-model` from the parent component. Example usage is also discussed in the [Component `v-model`](/guide/components/v-model) guide.
এই ম্যাক্রোটি একটি দ্বি-মুখী বাইন্ডিং প্রপ ঘোষণা করতে ব্যবহার করা যেতে পারে যা মূল উপাদান থেকে `v-model` এর মাধ্যমে ব্যবহার করা যেতে পারে। উদাহরণ ব্যবহার [কম্পোনেন্ট `v-model`](/guide/components/v-model) গাইডেও আলোচনা করা হয়েছে।

Under the hood, this macro declares a model prop and a corresponding value update event. If the first argument is a literal string, it will be used as the prop name; Otherwise the prop name will default to `"modelValue"`. In both cases, you can also pass an additional object which can include the prop's options and the model ref's value transform options.
হুডের নিচে, এই ম্যাক্রো একটি মডেল প্রপ এবং একটি সংশ্লিষ্ট মান আপডেট ইভেন্ট ঘোষণা করে। যদি প্রথম আর্গুমেন্টটি একটি আক্ষরিক স্ট্রিং হয় তবে এটি প্রপ নাম হিসাবে ব্যবহার করা হবে; অন্যথায় প্রপ নামটি ডিফল্ট হবে `"modelValue"`। উভয় ক্ষেত্রেই, আপনি একটি অতিরিক্ত অবজেক্টও পাস করতে পারেন যা প্রপের বিকল্পগুলি এবং মডেল রেফের মান রূপান্তর বিকল্পগুলি অন্তর্ভুক্ত করতে পারে।

```js
// declares "modelValue" prop, consumed by parent via v-model
Expand All @@ -253,7 +253,7 @@ function inc() {
```

:::warning
If you have a `default` value for `defineModel` prop and you don't provide any value for this prop from the parent component, it can cause a de-synchronization between parent and child components. In the example below, the parent's `myRef` is undefined, but the child's `model` is 1:
যদি আপনার কাছে `defineModel` প্রপের জন্য একটি `default` মান থাকে এবং আপনি এই প্রপের জন্য অভিভাবক উপাদান থেকে কোনো মান প্রদান না করেন, তাহলে এটি পিতামাতা এবং শিশু উপাদানগুলির মধ্যে একটি ডি-সিঙ্ক্রোনাইজেশন সৃষ্টি করতে পারে। নীচের উদাহরণে, পিতামাতার `myRef` অসংজ্ঞায়িত, কিন্তু সন্তানের `model` হল 1:

```js
// child component:
Expand All @@ -271,7 +271,7 @@ const myRef = ref()

### Modifiers and Transformers {#modifiers-and-transformers}

To access modifiers used with the `v-model` directive, we can destructure the return value of `defineModel()` like this:
`v-model` নির্দেশের সাথে ব্যবহৃত মডিফায়ার অ্যাক্সেস করতে, আমরা `defineModel()` এর রিটার্ন মানকে এভাবে ধ্বংস করতে পারি:

```js
const [modelValue, modelModifiers] = defineModel()
Expand All @@ -282,7 +282,7 @@ if (modelModifiers.trim) {
}
```

When a modifier is present, we likely need to transform the value when reading or syncing it back to the parent. We can achieve this by using the `get` and `set` transformer options:
যখন একটি সংশোধক উপস্থিত থাকে, তখন আমাদের সম্ভবত মানটি প্যারেন্টের সাথে পড়ার বা সিঙ্ক করার সময় রূপান্তর করতে হবে। আমরা `get` এবং `set` ট্রান্সফরমার বিকল্পগুলি ব্যবহার করে এটি অর্জন করতে পারি:

```js
const [modelValue, modelModifiers] = defineModel({
Expand All @@ -300,7 +300,7 @@ const [modelValue, modelModifiers] = defineModel({

### Usage with TypeScript <sup class="vt-badge ts" /> {#usage-with-typescript}

Like `defineProps` and `defineEmits`, `defineModel` can also receive type arguments to specify the types of the model value and the modifiers:
`defineProps` এবং `defineEmits` এর মতো, `defineModel` মডেলের মান এবং মডিফায়ারের ধরন নির্দিষ্ট করতে টাইপ আর্গুমেন্টও পেতে পারে:

```ts
const modelValue = defineModel<string>()
Expand Down
10 changes: 5 additions & 5 deletions src/guide/components/v-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const model = defineModel()
</template>
```

[Playground Example](https://play.vuejs.org/#eNqFUtFKwzAU/ZWYl06YLbK30Q10DFSYigq+5KW0t11mmoQknZPSf/cm3eqEsT0l555zuefmpKV3WsfbBuiUpjY3XDtiwTV6ziSvtTKOLNZcFKQ0qiZRnATkG6JB0BIDJen2kp5iMlfSOlLbisw8P4oeQAhFPpURxVV0zWSa9PNwEgIHtRaZA0SEpOvbeduG5q5LE0Sh2jvZ3tSqADFjFHlGSYJkmhz10zF1FseXvIo3VklcrfX9jOaq1lyAedGOoz1GpyQwnsvQ3fdTqDnTwPhQz9eQf52ob+zO1xh9NWDBbIHRgXOZqcD19PL9GXZ4H0h03whUnyHfwCrReI+97L6RBdo+0gW3j+H9uaw+7HLnQNrDUt6oV3ZBzyhmsjiz+p/dSTwJfUx2+IpD1ic+xz5enwQGXEDJJaw8Gl2I1upMzlc/hEvdOBR6SNKAjqP1J6P/o6XdL11L5h4=)
[চেষ্টা করুন](https://play.vuejs.org/#eNqFUtFKwzAU/ZWYl06YLbK30Q10DFSYigq+5KW0t11mmoQknZPSf/cm3eqEsT0l555zuefmpKV3WsfbBuiUpjY3XDtiwTV6ziSvtTKOLNZcFKQ0qiZRnATkG6JB0BIDJen2kp5iMlfSOlLbisw8P4oeQAhFPpURxVV0zWSa9PNwEgIHtRaZA0SEpOvbeduG5q5LE0Sh2jvZ3tSqADFjFHlGSYJkmhz10zF1FseXvIo3VklcrfX9jOaq1lyAedGOoz1GpyQwnsvQ3fdTqDnTwPhQz9eQf52ob+zO1xh9NWDBbIHRgXOZqcD19PL9GXZ4H0h03whUnyHfwCrReI+97L6RBdo+0gW3j+H9uaw+7HLnQNrDUt6oV3ZBzyhmsjiz+p/dSTwJfUx2+IpD1ic+xz5enwQGXEDJJaw8Gl2I1upMzlc/hEvdOBR6SNKAjqP1J6P/o6XdL11L5h4=)

### Under the Hood {#under-the-hood}

Expand Down Expand Up @@ -85,7 +85,7 @@ const model = defineModel({ default: 0 })
```

:::warning
If you have a `default` value for `defineModel` prop and you don't provide any value for this prop from the parent component, it can cause a de-synchronization between parent and child components. In the example below, the parent's `myRef` is undefined, but the child's `model` is 1:
যদি আপনার কাছে `defineModel` প্রপের জন্য একটি `default` মান থাকে এবং আপনি এই প্রপের জন্য অভিভাবক উপাদান থেকে কোনো মান প্রদান না করেন, তাহলে এটি পিতামাতা এবং শিশু উপাদানগুলির মধ্যে একটি ডি-সিঙ্ক্রোনাইজেশন সৃষ্টি করতে পারে। নীচের উদাহরণে, পিতামাতার `myRef` অসংজ্ঞায়িত, কিন্তু সন্তানের `model` হল 1:

```js
// child component:
Expand All @@ -105,7 +105,7 @@ const myRef = ref()

<div class="options-api">

First let's revisit how `v-model` is used on a native element:
প্রথমে আসুন একটি নেটিভ এলিমেন্টে কীভাবে `v-model` ব্যবহার করা হয় তা আবার দেখা যাক:

```vue-html
<input v-model="searchText" />
Expand Down Expand Up @@ -249,7 +249,7 @@ defineEmits(['update:title'])
</div>
<div class="options-api">

In this case, instead of the default `modelValue` prop and `update:modelValue` event, the child component should expect a `title` prop and emit an `update:title` event to update the parent value:
এই ক্ষেত্রে, ডিফল্ট `modelValue` প্রপ এবং `update:modelValue` ইভেন্টের পরিবর্তে, চাইল্ড কম্পোনেন্টের একটি `title` প্রপ আশা করা উচিত এবং প্যারেন্ট মান আপডেট করার জন্য একটি `update:title` ইভেন্ট নির্গত করা উচিত:

```vue
<!-- MyComponent.vue -->
Expand Down Expand Up @@ -445,7 +445,7 @@ function emitValue(e) {

<div class="options-api">

Los modificadores agregados a un componente `v-model` se proporcionarán al componente a través de la propiedad `modelModifiers`. En el siguiente ejemplo, hemos creado un componente que contiene un accesorio `modelModifiers` que por defecto es un objeto vacío:
একটি `v-model` উপাদানে যোগ করা সংশোধকগুলিকে `modelModifiers` বৈশিষ্ট্যের মাধ্যমে উপাদানটিতে সরবরাহ করা হবে। নিম্নলিখিত উদাহরণে, আমরা একটি উপাদান তৈরি করেছি যাতে একটি `modelModifiers` প্রপ রয়েছে যা ডিফল্টরূপে একটি খালি বস্তু:

```vue{11}
<script>
Expand Down

0 comments on commit 642cbb8

Please sign in to comment.